当前位置:网站首页>Record of problems encountered in dual network card binding

Record of problems encountered in dual network card binding

2022-06-22 13:36:00 weixin_ forty-one million five hundred and sixty-one thousand n

Project background

After relocation of machine room , All servers need to be bound with dual network cards to access the network . Although the dual network card binding is relatively simple , But there are still some episodes , So here's a record .

Dual network card configuration

At present, the operating system we use is mainly divided into two versions :centos/redhat6 and centos/redhat7, The configuration mode is consistent with the process , All use bond To configure and manage , This is the configuration case of two versions .

[[email protected] network-scripts]# cat /etc/modprobe.d/dist.conf
alias bond0 bonding
options bond0 miimon=100 mode=4
[[email protected] network-scripts]# cat /etc/rc.local
#!/bin/bash
touch /var/lock/subsys/local
ifenslave bond0 enp21s0f1 enp21s0f2

centos/redhat6
[[email protected] network-scripts]# cat ifcfg-bond0
DEVICE=bond0
IPADDR=10.176.50.26
NETMASK=255.255.255.0
GATEWAY=10.176.50.254
ONBOOT=yes
BOOTPROTO=static

[[email protected] network-scripts]# cat ifcfg-enp21s0f1
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp21s0f1
UUID=8418798d-8dc3-4dec-b72d-0b4591f858b8
DEVICE=enp21s0f1
ONBOOT=yes
MASTER=bond0
SLAVE=yes

[[email protected] network-scripts]# cat ifcfg-enp21s0f2
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp21s0f2
UUID=5df9e7e6-15ee-49c4-84e4-02b5a40fe185
DEVICE=enp21s0f2
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes

centos/redhat7

[email protected] network-scripts]# cat ifcfg-bond0
DEVICE=bond0
IPADDR=10.176.50.29
NETMASK=255.255.255.0
GATEWAY=10.176.50.254
BONDING_OPTS=“bond0 mode=4 miimon=100”
ONBOOT=yes
[[email protected] network-scripts]#
[[email protected] network-scripts]# cat ifcfg-enp21s0f0
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp21s0f0
UUID=ef45c4b7-f8be-4156-9d22-f31f1df618e7
DEVICE=enp21s0f0
ONBOOT=yes
#IPADDR=10.176.50.29
#PREFIX=24
#GATEWAY=10.176.50.254
IPV6_PRIVACY=no
MASTER=bond0
SLAVE=yes

[[email protected] network-scripts]# cat ifcfg-enp21s0f2
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=enp21s0f2
UUID=218fa44e-8778-43df-b2f7-068c3ef54c8f
DEVICE=enp21s0f2
ONBOOT=yes
MASTER=bond0
SLAVE=yes

Problems encountered

1、 Parameter input error causes the binding of dual network cards to fail
2、 The firewall problem causes the dual network card configuration to fail after successful configuration ping adopt
3、 The dual network card binding failed due to the switch configuration problem ( about mode4 Pattern , The switch needs to be configured 802.3ad)
4、NetworkManager The service failed to bind the dual network card

Investigation thought

After configuring dual network cards , The troubleshooting idea of network impassability is as follows :
Configuration policy of switch ( Prepare a new switch test )—》 Ethernet cable —》 so (etltool)—》bond Configuration parameters —> service (NetworkManager、 A firewall )

summary

1、 The configuration of dual network cards is not complicated , Mainly small details . For example, the firewall is turned on after the server is reset, or a word is input incorrectly , It is easy to solve as long as we check carefully .

原网站

版权声明
本文为[weixin_ forty-one million five hundred and sixty-one thousand n]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/173/202206221138209658.html