Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
ubuntu_networking [2016/05/12 10:22] steve |
ubuntu_networking [2016/05/12 14:35] steve |
||
---|---|---|---|
Line 122: | Line 122: | ||
</code> | </code> | ||
- | In ''/etc/network/interfaces'', add the configuration for bond0 first, using the same setup as you normally would for an ethernet device (dhcp, static ip, etc.). After that, include a directive for ''bond-primary'' with the slave devices. | + | In ''/etc/network/interfaces'', add the configuration for the Ethernet devices that will act as slaves: |
- | + | ||
- | For the sake of simplicity, ''bond0'' is getting an address assigned via DHCP. | + | |
- | + | ||
- | It's important that the configuration for bond0 is first, since ''ifup'' and ''ifdown'' read them in order from first to last. | + | |
- | + | ||
- | <code> | + | |
- | auto bond0 | + | |
- | iface bond0 inet dhcp | + | |
- | bond-primary eth0 eth1 | + | |
- | bond-mode active-backup | + | |
- | </code> | + | |
- | + | ||
- | Add the slave devices, and set them as manually configured: | + | |
<code> | <code> | ||
Line 145: | Line 132: | ||
iface eth1 inet manual | iface eth1 inet manual | ||
bond-master bond0 | bond-master bond0 | ||
+ | </code> | ||
+ | |||
+ | Once they are added, add the settings for the bonding configuration. In this scenario, the connection is checked very 100 ms. The mode is active-backup, meaning that if one slave fails, the other will take over. | ||
+ | |||
+ | After that, you can configure the device as usual. For simplicity's sake, we're using DHCP here: | ||
+ | |||
+ | <code> | ||
+ | auto bond0 | ||
+ | iface bond0 inet dhcp | ||
+ | bond-primary eth0 eth1 | ||
+ | bond-mode active-backup | ||
+ | bond-miimon 100 | ||
</code> | </code> | ||