删除ip
echo "########## os remove vip"
ip addr del 192.168.56.101/24 dev bond0 label bond0:1
ip addr del 192.168.165.101/24 dev bond1 label bond1:1
echo "########## os remove phy ip"
ip addr del 192.168.56.100/24 dev bond0
ip addr del 192.168.165.100/24 dev bond1
添加ip
echo "########## os add phy ip"
ip addr add 192.168.56.100/24 brd 192.168.56.255 dev bond0
ip addr add 192.168.165.100/24 brd 192.168.165.255 dev bond1
echo "########## os add vip"
ip addr add 192.168.56.101/24 brd 192.168.56.255 dev bond0 label bond0:1
ip addr add 192.168.165.101/24 brd 192.168.165.255 dev bond1 label bond1:1
记得使用arping
# arping -q -A -c 1 -I bond0 192.168.56.101
# arping -q -A -c 1 -I bond1 192.168.165.101
原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/1771.html