Both sides previous revisionPrevious revisionNext revision | Previous revision |
wiki:centos_bonding_interfaces [2017/06/26 11:46] – [ifcfg-bond0] walkeradmin | wiki:centos_bonding_interfaces [2023/03/09 22:35] (current) – external edit 127.0.0.1 |
---|
DNS2=8.8.8.8 | DNS2=8.8.8.8 |
</file> | </file> |
\\ | |
\\ | \\ |
So <color #ed1c24>ifcfg-eth0</color> and <color #ed1c24>ifcfg-eth1</color> don't contain any address information, but they both contain the entry <color #ed1c24>MASTER=bond0</color> to tie them to a particular bond file. | So <color #ed1c24>ifcfg-eth0</color> and <color #ed1c24>ifcfg-eth1</color> don't contain any address information, but they both contain the entry <color #ed1c24>MASTER=bond0</color> to tie them to a particular bond file. |
\\ | \\ |
<color #00a2e8>miimon</color> specifies the MII <color #00a2e8>link monitoring frequency in milliseconds</color>. This determines how often the link state of each slave is inspected for link failures. A value of zero disables MII link monitoring. A value of 100 is a good starting point. | <color #00a2e8>miimon</color> specifies the MII <color #00a2e8>link monitoring frequency in milliseconds</color>. This determines how often the link state of each slave is inspected for link failures. A value of zero disables MII link monitoring. A value of 100 is a good starting point. |
| \\ |
| \\ |
| |
| ---- |
| ===== Ingress/Egress Interface Bonding ===== |
| \\ |
| For bonding the ingress/egress interfaces, we will require four files. I am making the assumption that we are using the second two interfaces (eth2 and eth3) for Egress, and that this is the second bond on this device (so bond1, bond0 being for Management): |
| <file> |
| ifcfg-eth2 |
| ifcfg-eth3 |
| ifcfg-bond1 |
| route-bond1 |
| </file> |
| So <color #ed1c24>ifcfg-eth2</color> and <color #ed1c24>ifcfg-eth3</color> are the interface configuration files, again they contain no addressing: |
| \\ |
| ==== ifcfg-eth2 ==== |
| <file> |
| DEVICE=eth2 |
| HWADDR=00:1E:67:F2:63:12 |
| TYPE=Ethernet |
| UUID=6530a0c3-592d-44d0-8418-b6795818cf55 |
| ONBOOT=yes |
| MASTER=bond1 |
| SLAVE=yes |
| </file> |
| ==== ifcfg-eth3 ==== |
| <file> |
| DEVICE=eth3 |
| HWADDR=00:1E:67:F2:63:13 |
| TYPE=Ethernet |
| UUID=13c99bfe-03f9-44c8-8a91-277dbd2c192b |
| ONBOOT=yes |
| MASTER=bond1 |
| SLAVE=yes |
| </file> |
| \\ |
| Now we have the bond file (<color #22b14c>ifcfg-bond1</color>) that contains the IP Addressing |
| \\ |
| ==== ifcfg-bond1 ==== |
| <file> |
| DEVICE=bond1 |
| ONBOOT=yes |
| BOOTPROTO=static |
| USERCTL=no |
| BONDING_OPTS="mode=1 miimon=100" |
| IPADDR=11.0.100.1 |
| NETMASK=255.0.0.0 |
| </file> |
| \\ |
| Finally we have a routing file (<color #00a2e8>route-bond1</color>) that is for the multicast routing (so we know our incoming multicast will be available on this interface/bond) |
| \\ |
| ==== route-bond1 ==== |
| <file> |
| ADDRESS0=239.0.0.0 |
| NETMASK0=255.0.0.0 |
| GATEWAY0=11.0.100.1 |
| </file> |
| \\ |
| \\ |
| <color #ed1c24>NOTE!</color> the routes must start from <color #ed1c24>0</color> (ADDRESS<color #ed1c24>0</color>, NETMASK<color #ed1c24>0</color>, GATEWAY<color #ed1c24>0</color>) and if there is more than one route the numbering must be contiguous. |
| \\ |
| \\ |
| |
| ---- |
| ==== Route ==== |
| Below we can see the route information with the bondx entries in the right hand column. |
| \\ |
| <file> |
| Destination Gateway Genmask Flags Metric Ref Use Iface |
| 192.168.27.0 * 255.255.255.0 U 0 0 0 bond0 |
| link-local * 255.255.0.0 U 1004 0 0 eth4 |
| link-local * 255.255.0.0 U 1005 0 0 eth5 |
| link-local * 255.255.0.0 U 1008 0 0 eth7 |
| link-local * 255.255.0.0 U 1009 0 0 eth6 |
| link-local * 255.255.0.0 U 1010 0 0 bond0 |
| link-local * 255.255.0.0 U 1011 0 0 bond1 |
| 239.0.0.0 11.0.100.1 255.0.0.0 UG 0 0 0 bond1 |
| 10.0.0.0 * 255.0.0.0 U 0 0 0 eth4 |
| 11.0.0.0 * 255.0.0.0 U 0 0 0 bond1 |
| default 192.168.27.254 0.0.0.0 UG 0 0 0 bond0 |
| </file> |
| \\ |
| \\ |