LINUX双网卡绑定设置。
2017-12-14 11:13
423 查看
LINUX双网卡绑定设置方法:
RedHat6
1)编辑Bond文件
[ruby] view
plain copy
[root@redhat01 ~]# vim /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=none
IPADDR=
NETMASK=
GATEWAY=
USERCTL=no
NM_CONTROLLED=no
2)编辑网卡配置文件(eth0、eth1)
[ruby] view
plain copy
[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模块
[ruby] view
plain copy
[root@redhat01 ~]# vim /etc/modprobe.d/dist.conf
alias bond0 bonding
options bond0 miimon=100 mode=1
[ruby] view
plain copy
[root@redhat01 ~]# vim /etc/rc.local
ifenslave bond0 eth0 eth1
4)重启网络并查看bond状态
[ruby] view
plain copy
[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
RedHat6
1)编辑Bond文件
[ruby] view
plain copy
[root@redhat01 ~]# vim /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=none
IPADDR=
NETMASK=
GATEWAY=
USERCTL=no
NM_CONTROLLED=no
2)编辑网卡配置文件(eth0、eth1)
[ruby] view
plain copy
[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模块
[ruby] view
plain copy
[root@redhat01 ~]# vim /etc/modprobe.d/dist.conf
alias bond0 bonding
options bond0 miimon=100 mode=1
[ruby] view
plain copy
[root@redhat01 ~]# vim /etc/rc.local
ifenslave bond0 eth0 eth1
4)重启网络并查看bond状态
[ruby] view
plain copy
[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
相关文章推荐
- Linux设置bond网卡绑定
- linux下多网卡绑定设置问题
- Red Hat linux下设置网卡固定IP地址(两个IP绑定)
- linux设置网卡别名和网卡绑定
- Linux查看双网卡绑定设置
- linux下多网卡聚合绑定的设置 -搜集
- linux设置bond网卡绑定
- linux 双网卡绑定网络设置方法
- linux设置bond网卡绑定
- Linux/CentOS服务器 一个网卡绑定多IP地址(永久设置)
- linux 双网卡绑定网络设置方法
- Windows以及Linux下双网卡内外网同时使用、设置域名解析优先级的方法
- linux双网卡绑定
- [ 总结 ] Linux下两种常用的双网卡绑定
- Linux下实现双网卡绑定
- Linux 网卡配置文件,命令详细设置
- centos设置双网卡绑定band0
- 在 Linux 中用 nmcli 命令绑定多块网卡
- Linux下双网卡绑定技术实现负载均衡和失效保护
- linux 双网卡绑定