標籤:centos雙網卡綁定
1.登入系統切換目錄:
# cd /etc/sysconfig/network-scripts/
2.添加綁定網卡bond#的配置
# vim ifcfg-bond0
DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR=59.151.2.134
NETMASK=255.255.255.240
GATEWAY=59.151.2.129
# vim ifcfg-bond1
DEVICE=bond1
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=static
IPADDR=172.16.10.134
NETMASK=255.255.255.0
3.修改原來的網卡設定檔內容為:
# cat ifcfg-em*
DEVICE=em1
ONBOOT=yes
BOOTPROTO=none
DEVICE=em2
ONBOOT=yes
BOOTPROTO=none
DEVICE=em3
ONBOOT=yes
BOOTPROTO=none
DEVICE=em4
ONBOOT=yes
BOOTPROTO=none
4.在dist.conf檔案中添加
# vim/etc/modprobe.d/dist.conf
alias bond0bonding
options bond0miimon=100 mode=6
alias bond1bonding
options bond1miimon=100 mode=6
alias net-pf-10off
alias ipv6 off
5.在/etc/rc.local中添加
ifenslave bond0em1 em2
ifenslave bond1em3 em4
本文出自 “wqh” 部落格,請務必保留此出處http://wangqh.blog.51cto.com/5367393/1758788
Centos上的雙網卡綁定