- 论坛徽章:
- 0
|
1台服务器很多个网卡,用其中4个网口做两个bonding,分别是bond0和bond1,两个网口做bond0,两个网口做bond1,都是mode=1的模式,但是实际配置完成之后,连在bond0的两个网口都可以ping通共享的ip,但bond1的两个网口都ping不通。
请问各位有在一台服务器上配过两个ip bonding的情况吗?- 1. Set config file
- Notes: Please back the ifcfg-ethx before change them.
- ---Create bonding file
- /etc/sysconfig/network-scripts/ifcfg-bond0
- [root@sca network-scripts]# more ifcfg-bond0
- DEVICE=bond0
- BOOTPROTO=none
- BROADCAST=147.128.20.239
- IPADDR=147.128.20.238
- NETMASK=255.255.255.224
- NETWORK=147.128.20.224
- ONBOOT=yes
- TYPE=Ethernet
- GATEWAY=147.128.20.225
- USERCTL=no
-
- --Modify eth2
- /etc/sysconfig/network-scripts/ifcfg-eth2
- [root@sca network-scripts]# more ifcfg-eth2
- DEVICE=eth2
- BOOTPROTO=none
- ONBOOT=yes
- MASTER=bond0
- SlAVE=yes
- USERCTL=no
-
- Notes: can not
- ---Modify eth3
- /etc/sysconfig/network-scripts/ifcfg-eth3
- [root@sca network-scripts]# more ifcfg-eth3
- DEVICE=eth3
- #HWADDR=AC:16:2D:89:FE:63
- BOOTPROTO=none
- ONBOOT=yes
- USERCTL=no
- MASTER=bond0
- SLAVE=yes
-
- 2. Modify modprobe related files and mount bonding
- Create a file /etc/modprobe.d/bond0.conf
- [root@sca modprobe.d]# more bond0.conf
- alias bond0 bonding
- options bonding mode=1 miimon=200
-
- 3. Mount the bonding module
- [root@sca modprobe.d]# modprobe bonding
- Check file content:
- [root@sca bonding]# more /sys/class/net/bond0/bonding/mode
- active-backup 1
- [root@sca bonding]# lsmod | grep bonding
- bonding 125610 0
- ipv6 322029 161 bonding,ip6t_REJECT,nf_conntrack_ipv6,nf_defrag_ipv6
-
- 4. Stop NetworkManager, this step is very import.
- It will down eth0,eth1 and bonding configuration will take effect after restart network service.
- [root@sca bonding]# service NetworkManager stop
- Stopping NetworkManager daemon: [ OK ]
-
- 5. Restart network
- [root@sca bonding]# service network restart
复制代码 |
|