CE系列交换机与Intel(R) Server Adapter I340网卡服务器对接示例(IEEE 802.3ad模式)
组网需求
如图2-2所示,服务器使用由两个Intel(R) Server Adapter I340类型的网卡组成的网卡组,该网卡组连接至SwitchA和SwitchB的接口。用户希望服务器和CE系列交换机对接时通过链路聚合提高接口带宽,并且各链路能够分担业务流量。
配置思路
- 两台CE交换机组建M-LAG,创建Eth-Trunk接口,并配置为静态LACP模式。
- 网卡组需要配置为动态链接聚合(IEEE 802.3ad)类型,来提升链路的可靠性、提高接口带宽以及实现链路的负载均衡。
负载均衡模式适用于服务器连接交换机堆叠系统或者M-LAG系统的场景。
操作步骤
- 配置CE系列交换机组建M-LAG,以及连接服务器的Eth-trunk接口。
<HUAWEI> system-view [~HUAWEI] sysname SwitchA [*HUAWEI] commit [~SwitchA] ip vpn-instance DAD [*SwitchA-vpn-instance-DAD] ipv4-family [*SwitchA-vpn-instance-DAD-af-ipv4] route-distinguisher 1:1 [*SwitchA-vpn-instance-DAD-af-ipv4] quit [*SwitchA-vpn-instance-DAD] quit [*SwitchA] interface eth-trunk 10 //部署独立三层互联链路作为M-LAG的心跳 [*SwitchA-Eth-Trunk10] trunkport 10ge 1/0/10 [*SwitchA-Eth-Trunk10] trunkport 10ge 1/0/11 [*SwitchA-Eth-Trunk10] mode lacp-static [*SwitchA-Eth-Trunk10] undo portswitch [*SwitchA-Eth-Trunk10] ip binding vpn-instance DAD [*SwitchA-Eth-Trunk10] ip address 10.10.10.1 255.255.255.0 [*SwitchA-Eth-Trunk10] quit [*SwitchA] stp tc-protection [*SwitchA] stp bpdu-protection [*SwitchA] stp mode rstp [*SwitchA] stp bridge-address 00e0-fc12-3411 //选择其中一台设备的系统MAC作为两台设备共同桥MAC [*SwitchA] stp v-stp enable [*SwitchA] dfs-group 1 //配置DFS [*SwitchA-dfs-group-1] priority 150 [*SwitchA-dfs-group-1] source ip 10.10.10.1 vpn-instance DAD peer 10.10.10.2 [*SwitchA-dfs-group-1] dual-active detection enhanced enable [*SwitchA-dfs-group-1] quit [*SwitchA] interface eth-trunk 10 [*SwitchA-Eth-Trunk10] m-lag unpaired-port reserved //配置DAD接口在Peer-link故障时不被Error-Down [*SwitchA-Eth-Trunk10] quit [*SwitchA] interface eth-trunk 0 //配置Peer-link [*SwitchA-Eth-Trunk0] trunkport 40ge 1/0/1 [*SwitchA-Eth-Trunk0] trunkport 40ge 1/0/2 [*SwitchA-Eth-Trunk0] mode lacp-static [*SwitchA-Eth-Trunk0] peer-link 1 [*SwitchA-Eth-Trunk0] port vlan exclude 1 [*SwitchA-Eth-Trunk0] quit [*SwitchA] vlan batch 10 [*SwitchA] interface eth-trunk 1 //配置交换机连接服务器的Eth-trunk [*SwitchA-Eth-Trunk1] trunkport 10ge 1/0/1 [*SwitchA-Eth-Trunk1] port default vlan 10 [*SwitchA-Eth-Trunk1] mode lacp-static [*SwitchA-Eth-Trunk1] stp edged-port enable [*SwitchA-Eth-Trunk1] dfs-group 1 m-lag 1 [*SwitchA-Eth-Trunk1] quit [*SwitchA] commit
<HUAWEI> system-view [~HUAWEI] sysname SwitchB [*HUAWEI] commit [~SwitchB] ip vpn-instance DAD [*SwitchB-vpn-instance-DAD] ipv4-family [*SwitchB-vpn-instance-DAD-af-ipv4] route-distinguisher 2:2 [*SwitchB-vpn-instance-DAD-af-ipv4] quit [*SwitchB-vpn-instance-DAD] quit [*SwitchB] interface eth-trunk 10 [*SwitchB-Eth-Trunk10] trunkport 10ge 1/0/10 [*SwitchB-Eth-Trunk10] trunkport 10ge 1/0/11 [*SwitchB-Eth-Trunk10] mode lacp-static [*SwitchB-Eth-Trunk10] undo portswitch [*SwitchB-Eth-Trunk10] ip binding vpn-instance DAD [*SwitchB-Eth-Trunk10] ip address 10.10.10.2 255.255.255.0 [*SwitchB-Eth-Trunk10] quit [*SwitchB] stp tc-protection [*SwitchB] stp bpdu-protection [*SwitchB] stp mode rstp [*SwitchB] stp bridge-address 00e0-fc12-3411 [*SwitchB] stp v-stp enable [*SwitchB] dfs-group 1 [*SwitchB-dfs-group-1] priority 100 [*SwitchB-dfs-group-1] source ip 10.10.10.2 vpn-instance DAD peer 10.10.10.1 [*SwitchB-dfs-group-1] dual-active detection enhanced enable [*SwitchB-dfs-group-1] quit [*SwitchB] interface eth-trunk 10 [*SwitchB-Eth-Trunk10] m-lag unpaired-port reserved [*SwitchB-Eth-Trunk10] quit [*SwitchB] interface eth-trunk 0 [*SwitchB-Eth-Trunk0] trunkport 40ge 1/0/1 [*SwitchB-Eth-Trunk0] trunkport 40ge 1/0/2 [*SwitchB-Eth-Trunk0] mode lacp-static [*SwitchB-Eth-Trunk0] peer-link 1 [*SwitchB-Eth-Trunk0] port vlan exclude 1 [*SwitchB-Eth-Trunk0] quit [*SwitchB] vlan batch 10 [*SwitchB] interface eth-trunk 1 [*SwitchB-Eth-Trunk1] trunkport 10ge 1/0/1 [*SwitchB-Eth-Trunk1] port default vlan 10 [*SwitchB-Eth-Trunk1] mode lacp-static [*SwitchB-Eth-Trunk1] stp edged-port enable [*SwitchB-Eth-Trunk1] dfs-group 1 m-lag 1 [*SwitchB-Eth-Trunk1] quit [*SwitchB] commit
- 配置服务器侧的网卡组。
验证配置结果
- 任意视图下,执行display eth-trunk [ trunk-id ]命令,查看Eth-Trunk状态,通过表2-6中的关键信息判断Eth-Trunk状态是否正常。
<SwitchA> display eth-trunk 1 Eth-Trunk1's state information is: Local: LAG ID: 1 Working Mode: Static Preempt Delay: Disabled Hash Arithmetic: profile default System Priority: 32768 System ID: 00e0-fc12-3411 Least Active-linknumber: 1 Max Active-linknumber: 8 Operating Status: up Number Of Up Ports In Trunk: 1 Timeout Period: Slow -------------------------------------------------------------------------------- ActorPortName Status PortType PortPri PortNo PortKey PortState Weight 10GE1/0/1 Selected 10GE 32768 1 321 10100010 1
- 服务器上ping网关地址,可以ping通。
查看刚创建的网卡组WF的属性。打开网络连接找到刚才创建的组,右键点击“属性”,在弹出的窗口中,点击配置,选择“设置”页签。根据表2-7检查网卡组状态。
配置文件
- SwitchA的配置文件
# sysname SwitchA # dfs-group 1 priority 150 source ip 10.10.10.1 vpn-instance DAD peer 10.10.10.2 dual-active detection enhanced enable # vlan batch 10 # stp bridge-address 00e0-fc12-3411 stp mode rstp stp v-stp enable stp bpdu-protection stp tc-protection # ip vpn-instance DAD ipv4-family route-distinguisher 1:1 # interface Eth-Trunk0 mode lacp-static peer-link 1 port vlan exclude 1 # interface Eth-Trunk1 port default vlan 10 mode lacp-static stp edged-port enable dfs-group 1 m-lag 1 # interface Eth-Trunk10 undo portswitch ip binding vpn-instance DAD ip address 10.10.10.1 255.255.255.0 mode lacp-static m-lag unpaired-port reserved # interface Eth-Trunk1 port default vlan 2 mode lacp-static # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/210 eth-trunk 10 # interface 10GE1/0/11 eth-trunk 10 # interface 40GE1/0/1 eth-trunk 0 # interface 40GE1/0/2 eth-trunk 0 # return
- SwitchB的配置文件
# sysname SwitchB # dfs-group 1 source ip 10.10.10.2 vpn-instance DAD peer 10.10.10.1 dual-active detection enhanced enable # vlan batch 10 # stp bridge-address 00e0-fc12-3411 stp mode rstp stp v-stp enable stp bpdu-protection stp tc-protection # ip vpn-instance DAD ipv4-family route-distinguisher 2:2 # interface Eth-Trunk0 mode lacp-static peer-link 1 port vlan exclude 1 # interface Eth-Trunk1 port default vlan 10 mode lacp-static stp edged-port enable dfs-group 1 m-lag 1 # interface Eth-Trunk10 undo portswitch ip binding vpn-instance DAD ip address 10.10.10.2 255.255.255.0 mode lacp-static m-lag unpaired-port reserved # interface 10GE1/0/1 eth-trunk 1 # interface 10GE1/0/10 eth-trunk 10 # interface 10GE1/0/11 eth-trunk 10 # interface 40GE1/0/1 eth-trunk 0 # interface 40GE1/0/2 eth-trunk 0 # return