#cp /etc/init.d/network /etc/init.d/network_bak
ÔٴΣºÎÒÃÇÐèÒªÐÞ¸Ä/etc/init.d/network£¬½«start Ñ¡ÏîµÄ×îºó¼ÓÉÏÈçÏÂÓï¾ä£º
sleep 10s ʹÉ豸Æô¶¯µÄʱºò£¬ÔÝÍ£Ö´ÐÐÏÂÃæµÄÓï¾ä£¬Ê¹Íø¿¨µÄÓ²¼þÉ豸Äܸü˳Àû¼ÓÔØ£¬Èç¹û²»¼ÓÈë¸Ã¾äÓпÉÄÜÔÚÖ´ÐÐÖ®ºó£¬Íø¿¨²¢²»ÄÜÕæÕýµÄ¼ÓÔص¼ÖÂÍøÂ粻ͨ£¡
modprobe bonding miimon=100 mode=balance-rr #mode=balance-rr Ϊ¸ºÔؾùºâ£¬mode=active-backup miimon=100ÿ100ºÁÃë¼ì²âÒ»´ÎÍøÂçÊÇ·ñͨ³©£¬Ã»ÓÐÕâ²ÎÊýIPMPÊDz»»á×Ô¶¯Çл»µÄ£¡
Ϊ»¥±¸
ifconfig bond0
route add -host
route add default gw
ifenslave bond0 eth2
ifenslave bond0 eth3 #Ϊbonding µÄÍø¿¨Ìí¼Óʵ¼ÊÎïÀíÉ豸
×îºó£ºÔÚstop Ñ¡ÏîµÄ×îÇ°Ãæ¼ÓÉÏ£º
ifenslave -d bond0 eth2
ifenslave -d bond0 eth3 #´Óbonding µÄÍø¿¨ÖÐɾ³ýʵ¼ÊÎïÀíÉ豸
ifconfig bond0 down #Í£Ö¹bond0
È»ºóÖØÆðÍøÂç
>/etc/init.d/network restart
¾Í¿ÉÒÔÔÚHA µÄ·þÎñÅäÖÃÖÐʹÓÃbond0 ×÷ΪÍøÂç½Ó¿ÚÁË¡£
ÑùÀýÈçÏ£º
sleep 10s
modprobe bonding miimon=100 mode=active-backup
ifconfig bond0 172.17.192.62 netmask 255.255.255.0 broadcast 172.17.192.255
route add -host 172.17.192.1 dev bond0
ifenslave bond0 eth0
ifenslave bond0 eth1
;;
stop)
ifenslave -d bond0 eth0
ifenslave -d bond0 eth1
ifconfig bond0 dow