cat >> /etc/modprobe.d/bonding.conf <<EOF alias bond0 bonding options bond0 mode=balance-alb miimon=1000 EOF cat > /etc/sysconfig/network-scripts/ifcfg-eth0 <<EOF DEVICE="eth0" ONBOOT="yes" BOOTPROTO="none" USERCTL="no" NM_CONTROLLED="no" EOF cat > /etc/sysconfig/network-scripts/ifcfg-eth1 <<EOF DEVICE="eth1" ONBOOT="yes" BOOTPROTO="none" USERCTL="no" NM_CONTROLLED="no" EOF cat > /etc/sysconfig/network-scripts/ifcfg-bond0 <<EOF DEVICE="bond0" ONBOOT="yes" BOOTPROTO="none" TYPE="Ethernet" IPADDR=172.16.0.5 NETMASK=255.255.255.0 NETWORK=172.16.0.0 USERCTL="no" NM_CONTROLLED="no" EOF modprobe bonding mode=balance-alb miimon=1000 ifconfig bond0 up ifconfig bond0 172.16.0.5 netmask 255.255.255.0 up ip route add default via 172.16.0.254 dev bond0 ifenslave bond0 eth0 ifenslave bond0 eth1 cat >> /etc/rc.local <<EOF #------------------------- ifenslave bond0 eth0 ifenslave bond0 eth1 ip route add default via 172.16.0.254 dev bond0 #------------------------- EOF more /proc/net/bonding/bond0
Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a>comments powered by Disqus
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。