LINUX双网卡绑定设置方法:
RedHat6
1)编辑Bond文件
- [root@redhat01 ~]# vim /etc/sysconfig/network-scripts/ifcfg-bond0
- DEVICE=bond0
- ONBOOT=yes
- BOOTPROTO=none
- IPADDR=
- NETMASK=
- GATEWAY=
- USERCTL=no
- NM_CONTROLLED=no
- [root@redhat01 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
- DEVICE=eth0
- TYPE=Ethernet
- ONBOOT=yes
- BOOTPROTO=none
- MASTER=bond0
- SLAVE=yes
- NM_CONTROLLED=no
- USERCTL=no
- [root@redhat01 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth1
- DEVICE=eth1
- TYPE=Ethernet
- ONBOOT=yes
- BOOTPROTO=none
- MASTER=bond0
- SLAVE=yes
- NM_CONTROLLED=no
- USERCTL=no
3)修改modprobe相关文件,并加载Bonding模块
- [root@redhat01 ~]# vim /etc/modprobe.d/dist.conf
- alias bond0 bonding
- options bond0 miimon=100 mode=1
- [root@redhat01 ~]# vim /etc/rc.local
- ifenslave bond0 eth0 eth1
- [root@redhat01 /]# cat /proc/net/bonding/bond0
- Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)
- Bonding Mode: fault-tolerance (active-backup)
- Primary Slave: None
- Currently Active Slave: eth0
- MII Status: up
- MII Polling Interval (ms): 100
- Up Delay (ms): 0
- Down Delay (ms): 0
- Slave Interface: eth0
- MII Status: up
- Speed: 1000 Mbps
- Duplex: full
- Link Failure Count: 0
- Permanent HW addr: 00:0c:29:04:5b:51
- Slave queue ID: 0
- Slave Interface: eth1
- MII Status: up
- Speed: 1000 Mbps
- Duplex: full
- Link Failure Count: 0
- Permanent HW addr: 00:0c:29:04:5b:47
- Slave queue ID: 0