各位大神:
环境:服务器系统:CentOS Linux release 7.9.2009 (Core) Linux 3.10.0-1160.71.1.el7.x86_64 x86_64
交换机: HUAWEI S5700-26X-SI-12S-AC
问题:服务器把eno3和eno4二块网卡绑定成bond0,接在S5700的gi0/0/23和gi0/0/24接口上,这二个接口放在eth-trunk 0中。linux启用bond0后,无法ping通bond0的IP,eth-trunk 0接口也是DOWN的状态。不知道哪不对。
交换机配置:
interface Eth-Trunk0
port link-type access
port default vlan 30
mode lacp
least active-linknumber 2
-------------------------------
display eth-trunk 0
Eth-Trunk0's state information is:
Local:
LAG ID: 0 WorkingMode: LACP
Preempt Delay: Disabled Hash arithmetic: According to SA-XOR-DA
System Priority: 32768 System ID: c88d-8314-16b0
Least Active-linknumber: 2 Max Active-linknumber: 8
Operate status: down Number Of Up Port In Trunk: 0
--------------------------------------------------------------------------------
ActorPortName Status PortType PortPri PortNo PortKey PortState Weight
GigabitEthernet0/0/23 Unselect 1GE 32768 1 49 10100010 1
GigabitEthernet0/0/24 Unselect 1GE 32768 2 49 10100010 1
Partner:
--------------------------------------------------------------------------------
ActorPortName SysPri SystemID PortPri PortNo PortKey PortState
GigabitEthernet0/0/23 0 0000-0000-0000 0 0 0 10100011
GigabitEthernet0/0/24 0 0000-0000-0000 0 0 0 10100011
***********************************************************************************
二个接口的配置
interface GigabitEthernet0/0/23
eth-trunk 0
interface GigabitEthernet0/0/24
eth-trunk 0
*********************************************************************************
display interface brief
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(E): E-Trunk down
(b): BFD down
(e): ETHOAM down
(dl): DLDP down
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
Eth-Trunk0 down down 0% 0% 0 0
GigabitEthernet0/0/23 up up 0% 0.01% 0 0
GigabitEthernet0/0/24 up up 0% 0.01% 0 0
服务器网卡绑定配置如下:
[root@HPGN9-1 tmp]# cat ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
USERCTL=no
ONBOOT=yes
TYPE=Bond
BONDING_MASTER=yes
BONDING_OPTS="mode=0 miimon=100"
IPADDR=172.16.30.160
NETMASK=255.255.255.0
GATEWAY=172.16.30.1
NM_CONTROLLED=no
[root@HPGN9-1 tmp]# cat ifcfg-eno3
DEVICE=eno3
NAME=bond0-slave
TYPE=Ethernet
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
NM_CONTROLLED=no
[root@HPGN9-1 tmp]# cat ifcfg-eno4
DEVICE=eno4
ONBOOT=yes
NAME=bond0-slave
TYPE=Ethernet
BOOTPROTO=none
USERCTL=no
MASTER=bond0
SLAVE=yes
NM_CONTROLLED=no
之前有配置过,在模式里面遇到坑,链路聚合有手工和lacp的方式,我对比了一下我这边实现的配置,我这边是交换机配置lacp,linuxBONDING_OPTS里面的Mode=4。