1.- Bonding device called bond0 which aggregated by eth0 and eth1
# ifconfig
bond0 Link encap:Ethernet HWaddr 44:a8:42:5d:6d:5d
inet addr:192.168.1.51 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe4d:9004/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
eth0 Link encap:Ethernet HWaddr 44:a8:42:5d:6d:5d
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
eth2 Link encap:Ethernet HWaddr 44:a8:42:5d:76:29
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: em1 (primary_reselect always)
Currently Active Slave: em1
MII Status: up
MII Polling Interval (ms): 50
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 44:a8:42:5d:6d:5d
Slave queue ID: 0
Slave Interface: eth2
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 44:a8:42:5d:76:29
Slave queue ID: 0
2.-Online remove one slave network interface which will be assigned with a new IP address from the bonding device, you can remove eth1 from bond0 as you see in the command below
#ifenslave -d bond0 eth1
or
#echo -eth1 > /sys/class/net/bond0/bonding/slaves
During the above 2 steps, the network of bond0 will work fine without any break up.
You will see the eth1 device has been remove from bond0
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: em1 (primary_reselect always)
Currently Active Slave: em1
MII Status: up
MII Polling Interval (ms): 50
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 44:a8:42:5d:6d:5d
#ifup eth1
During the above 2 steps, the network of bond0 will work fine without any break up.
3. Create the same network configuration as bond0 for eth0 via graphic tool or text tool.
4. Remove the eth0 from bond0, destory the bond0 device and start eth0 immediately. The network of bond0/eth0 will break shortly during this step.
# ifenslave -d bond0 eth0; ifdown bond0; ifup eth0
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)
Bonding Mode: load balancing (round-robin)
MII Status: down
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
# ifconfig
eth0 Link encap:Ethernet HWaddr 44:a8:42:5d:6d:5d
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
eth2 Link encap:Ethernet HWaddr 44:a8:42:5d:76:29
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
Remove all bonding setting of bond0 in /etc/modprobe.conf and remove the ifcfg-bond0 in /etc/sysconfig/network-script directory. Then issue following command to remove the bond0 device from memory completely.
#echo -bond0 > /sys/class/net/bonding_masters
# ifconfig
bond0 Link encap:Ethernet HWaddr 44:a8:42:5d:6d:5d
inet addr:192.168.1.51 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::5054:ff:fe4d:9004/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
eth0 Link encap:Ethernet HWaddr 44:a8:42:5d:6d:5d
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
eth2 Link encap:Ethernet HWaddr 44:a8:42:5d:76:29
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: em1 (primary_reselect always)
Currently Active Slave: em1
MII Status: up
MII Polling Interval (ms): 50
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 44:a8:42:5d:6d:5d
Slave queue ID: 0
Slave Interface: eth2
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 44:a8:42:5d:76:29
Slave queue ID: 0
2.-Online remove one slave network interface which will be assigned with a new IP address from the bonding device, you can remove eth1 from bond0 as you see in the command below
#ifenslave -d bond0 eth1
or
#echo -eth1 > /sys/class/net/bond0/bonding/slaves
During the above 2 steps, the network of bond0 will work fine without any break up.
You will see the eth1 device has been remove from bond0
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
Bonding Mode: fault-tolerance (active-backup)
Primary Slave: em1 (primary_reselect always)
Currently Active Slave: em1
MII Status: up
MII Polling Interval (ms): 50
Up Delay (ms): 0
Down Delay (ms): 0
Slave Interface: eth0
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 1
Permanent HW addr: 44:a8:42:5d:6d:5d
#ifup eth1
During the above 2 steps, the network of bond0 will work fine without any break up.
3. Create the same network configuration as bond0 for eth0 via graphic tool or text tool.
4. Remove the eth0 from bond0, destory the bond0 device and start eth0 immediately. The network of bond0/eth0 will break shortly during this step.
# ifenslave -d bond0 eth0; ifdown bond0; ifup eth0
# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)
Bonding Mode: load balancing (round-robin)
MII Status: down
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0
# ifconfig
eth0 Link encap:Ethernet HWaddr 44:a8:42:5d:6d:5d
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
eth2 Link encap:Ethernet HWaddr 44:a8:42:5d:76:29
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:6 errors:0 dropped:0 overruns:0 frame:0
Remove all bonding setting of bond0 in /etc/modprobe.conf and remove the ifcfg-bond0 in /etc/sysconfig/network-script directory. Then issue following command to remove the bond0 device from memory completely.
#echo -bond0 > /sys/class/net/bonding_masters
Comments