H3C S5820二层端口聚合

本文 PDF 版本:H3C S5820二层端口聚合.pdf

0.前言

参考文档:

实验目标:实现sw1 Ten-GigabitEthernet1/0/49~52 4个万兆端口聚合,与 sw2 Ten-GigabitEthernet1/0/49~52 聚合后相连。
实验拓扑:两台H3C S5820 交换机。如下图,先不接线,把聚合配置完,才能接线。线务必后接,防止环路。

aggregation-1.png

1.配置聚合

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<H3C>sys
[H3C]hostname sw1
# 创建聚合组
[sw1]interface Bridge-Aggregation 1
[sw1-Bridge-Aggregation1]desc TO_SW2_BAGG1
[sw1-Bridge-Aggregation1]quit

# 配置端口加入聚合组
[sw1]interface XGE1/0/49
[sw1-Ten-GigabitEthernet1/0/49]desc TO_SW2_XGE1/0/49
[sw1-Ten-GigabitEthernet1/0/49]port link-aggregation group 1
[sw1-Ten-GigabitEthernet1/0/49]shutdown
[sw1-Ten-GigabitEthernet1/0/49]quit
# 剩余Ten-GigabitEthernet1/0/50~52 3个端口,和Ten-GigabitEthernet1/0/49配置类似
# 创建vlan
[sw1]vlan 100
[sw1-vlan100]quit
[sw1-Bridge-Aggregation1]port access vlan 100 # 划分聚合端口到vlan 100。按需求来。
Configuring Ten-GigabitEthernet1/0/49 done.
Configuring Ten-GigabitEthernet1/0/50 done.
Configuring Ten-GigabitEthernet1/0/51 done.
Configuring Ten-GigabitEthernet1/0/52 done.

[sw1]dis interface brief
......
BAGG1 DOWN auto A A 100 TO_SW2_BAGG1
......
XGE1/0/49 ADM 10G F A 100 TO_SW2_XGE1/0/49
XGE1/0/50 ADM 10G F A 100 TO_SW2_XGE1/0/50
XGE1/0/51 ADM 10G F A 100 TO_SW2_XGE1/0/51
XGE1/0/52 ADM 10G F A 100 TO_SW2_XGE1/0/52

sw2 配置和 sw1 类似。都是创建聚合组,加入聚合组,关闭端口。注意要关闭端口,避免环路的可能。等两台交换机的聚合组都配置好了,再打开端口。

sw2 配置完成后,查看一下端口:

1
2
3
4
5
6
7
8
[sw2]dis int brief  
......
BAGG1 DOWN auto A A 100 TO_SW1_BAGG1
......
XGE1/0/49 ADM 10G F A 1 TO_SW1_XGE1/0/49
XGE1/0/50 ADM 10G F A 1 TO_SW1_XGE1/0/50
XGE1/0/51 ADM 10G F A 1 TO_SW1_XGE1/0/51
XGE1/0/52 ADM 10G F A 1 TO_SW1_XGE1/0/52

配置好聚合后,开始接线。
aggregation-2.png

2.查看效果

  • 启用端口,sw1 sw2 共8个端口,都启用。
1
2
3
4
5
6
7
8
9
10
11
12
13
[sw1]interface Ten-GigabitEthernet1/0/49
[sw1-Ten-GigabitEthernet1/0/49]undo shut
[sw1-Ten-GigabitEthernet1/0/49]%Dec 20 18:10:26:886 2018 sw1 IFNET/3/PHY_UPDOWN: Physical state on the interface Ten-GigabitEthernet1/0/49 changed to up.
%Dec 20 18:10:26:888 2018 sw1 LLDP/6/LLDP_CREATE_NEIGHBOR: Nearest bridge agent neighbor created on port Ten-GigabitEthernet1/0/49 (IfIndex 50), neighbor's chassis ID is 6eab-c8c3-0200, port ID is Ten-GigabitEthernet1/0/49.

%Dec 20 18:10:26:888 2018 sw1 LAGG/6/LAGG_ACTIVE: Member port XGE1/0/49 of aggregation group BAGG1 changed to the active state.
%Dec 20 18:10:26:890 2018 sw1 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet1/0/49 changed to up.
%Dec 20 18:10:26:890 2018 sw1 IFNET/3/PHY_UPDOWN: Physical state on the interface Bridge-Aggregation1 changed to up.
%Dec 20 18:10:26:890 2018 sw1 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Bridge-Aggregation1 changed to up.
%Dec 20 18:10:26:892 2018 sw1 STP/6/STP_DETECTED_TC: Instance 0's port Bridge-Aggregation1 detected a topology change.
%Dec 20 18:10:28:996 2018 sw1 STP/6/STP_NOTIFIED_TC: Instance 0's port Bridge-Aggregation1 was notified a topology change.

[sw1-Ten-GigabitEthernet1/0/49]quit
  • 查看效果
1
2
3
4
5
6
7
8
9
10
11
12
[sw1]display interface Brief
......
BAGG1 UP 40G(a) F(a) A 100 TO_SW2_BAGG1
......
[sw1]display interface Bridge-Aggregation 1 brief
Brief information on interfaces in bridge mode:
Link: ADM - administratively down; Stby - standby
Speed: (a) - auto
Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface Link Speed Duplex Type PVID Description
BAGG1 UP 40G(a) F(a) A 100 TO_SW2_BAGG1

3.保存配置

sw1 sw2 都 save 一下。

1
2
3
4
5
6
7
[sw1]save
The current configuration will be written to the device. Are you sure? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
[sw1]

4.模拟端口故障

这里把一个端口关闭,模拟端口故障

1
2
3
4
5
6
7
8
[sw1]interface Ten-GigabitEthernet 1/0/49
[sw1-Ten-GigabitEthernet1/0/49]shut
......
[sw1-Ten-GigabitEthernet1/0/49]quit
[sw1]dis interface Bridge-Aggregation 1 brief
......
Interface Link Speed Duplex Type PVID Description
BAGG1 UP 30G(a) F(a) A 100 TO_SW2_BAGG1

看到端口速度变成了30G

1
2
3
4
5
6
[sw1]
[sw1]interface Ten-GigabitEthernet 1/0/49
[sw1-Ten-GigabitEthernet1/0/49]undo shut
[sw1]dis interface Bridge-Aggregation 1 brief
Interface Link Speed Duplex Type PVID Description
BAGG1 UP 40G(a) F(a) A 100 TO_SW2_BAGG1

看到端口速度又变回40Gbs

文章目录
  1. 0.前言
  2. 1.配置聚合
  3. 2.查看效果
  4. 3.保存配置
  5. 4.模拟端口故障