sentos中bonding(网卡绑定技术)
一、GRUB添加kernel参数
1.# vim /etc/sysconfig/grub
GRUB_CMDLINE_LINUX=”…… net.ifnames=0″
2.重新装载配置文件
# grub2-mkconfig -o /boot/grub2/grub.cfg
3. reboot
# reboot
二、具体步骤(提前准备两个网卡)
1. 接口配置文件
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=none
IPADDR=192.168.40.128
PREFIX=24
USERCTL=no
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=”Ethernet”
PROXY_METHOD=”none”
BROWSER_ONLY=”no”
BOOTPROTO=”none”
DEFROUTE=”yes”
NAME=”eth0″
IPADDR=192.168.40.128
NETMASK=255.255.255.0
GATEWAY=192.168.40.2
DNS1=202.96.O.133
DNS2=114.114.114.114
UUID=”2e708131-906a-4e94-acbb-582c6031afd1″
DEVICE=”eth0″
ONBOOT=”yes”
USERCTL=no
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
[root@localhost ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth1(同eth0)
2. bonding参数
# vim /etc/modprobe.d/bond0.conf
alias bond0 bonding
options bonding mode=0 miimon=100
3. 重启网络服务
# systemctl restart network
# ip a
4.查看
[root@localhost ~]# ethtool bond0
Settings for bond0:
Supported ports: [ ]
Supported link modes: Not reported
Supported pause frame use: No
Supports auto-negotiation: No
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 2000Mb/s
Duplex: Full
Port: Other
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
Link detected: yes