2023年12月19日发(作者:晋玉韵)
交换机端口汇聚的配置
一、实验目的
通过对交换机端口汇聚的配置,了解交换机端口的一些基本配置信息,并掌握相关的重要命令,利用交换机Console口命令对交换机进行配置,明白端口汇聚的作用。
二、实验内容
1、修改交换机主机名
2、修改交换机端口地址与属性
3、配置交换机端口的静态MAC 地址表
4、实现交换机的端口汇聚
三、网络实验图
VLAN:192.168.1.1/24
VLAN1:192.168.1.2/24
E0/1 E0/1
Switch1
E0/2
Console
E0/2
Switch2
PC机
四、实验步骤
(1)、按拓扑图连线
连线:按拓扑图将Switch1的E1/0/1与Switch2的E0/1相连,Switch1的E1/0/2与Switch2的E0/2相连,PC机COM口与Switch1的Console口相连,网线与E0/24相连。
(2)、设置Switch1的E1/0/1和E1/0/2端口
[Quidway]sysname switch1
System View: return to User View with Ctrl+Z.
[switch1]interface ethernet 1/0/1
[switch1-Ethernet0/1]speed 100
[switch1-Ethernet0/1]duplex full
[switch1-Ethernet0/1]int e1/0/2
[switch1-Ethernet0/2]speed 100
[switch1-Ethernet0/2]quit
(3)、设置Switch2的E0/1和E0/2端口
[Quidway]sysname switch2
[switch1-Ethernet0/2]duplex full
System View: return to User View with Ctrl+Z.
[switch2]interface ethernet 0/1
[switch2-Ethernet0/1]speed 100
[switch2-Ethernet0/1]duplex full
[switch2-Ethernet0/1]int e0/2
[switch2-Ethernet0/2]speed 100
[switch2-Ethernet0/2]quit
(4)、汇聚交换机的E0/1和E0/2端口
交换机Switch1上端口汇聚
[switch1-Ethernet1/0/2]quit
[switch2-Ethernet0/2]duplex full
[switch1]link-aggregation group 1 mode static
[switch1]interface e1/0/1
[switch1-Ethernet1/0/1]port link-aggregation
group 1
[switch1-Ethernet1/0/2]port link-aggregation
group 1
交换机Switch2上端口汇聚
[switch2]link-aggregation e0/1 to e0/2 both
(5)、配置交换机1的VLAN1地址
[switch1-Vlan-interface1]
%Apr 2 00:01:27:508 2000 switch1 L2INF/5/VLANIF
Vlan-interface1: is UP
[switch1-Vlan-interface1]ip address
[switch1-Ethernet1/0/1]interface e1/0/2
[switch1]int vlan-interface 1
LINK STATUS CHANGE:- 1 -
192.168.1.1 255.255.255.0
[switch1-Vlan-interface1]
%Apr 2 00:01:41:967 2000 switch1
IFNET/5/UPDOWN:- 1 -Line protocol on the inter
face Vlan-interface1 is UP
[switch1]disp int vlan 1
[switch1-Vlan-interface1]quit
Vlan-interface1 current state :UP
IP Sending Frames' Format is PKTFMT_ETHNT_2,
Internet Address is 19
Description : HUAWEI, Quidway Series,
Line protocol current state :UP
Hardware address is 000f-e220-938b
Vlan-interface1 Interface
The Maximum Transmit Unit is 1500
(6)、配置交换机2的VLAN1地址
[switch2]interface vlan-interface 1
[switch2-Vlan-interface1]ip
192.168.1.2 255.255.0
[switch2]disp interface vlan 1
Vlan-interface1 current state :UPD
Line protocol current state :UP
[switch2-Ethernet1/0/2]
address
[switch2-Vlan-interface1]quit
IP Sending Frames' Format is PKTFMT_ETHNT_2,
Hardware address is 000f-e220-938bNGE:- 1
-8:01:04 2000 switch2 ARP/4/DUPIFIP:Duplicate
address 192.168.1.2 on VL
Internet Address is 192.168.1.2/24 Primary227634,
ifAdminStatus is 1, ifOperStatuN1,
Description
s is 2
%Apr 1 23:57:54:1000 2000 switch2
The Maximum Transmit Unit is 1500
(7)、测试汇聚结果
[switch1]ping 192.168.1.2
PING 192.168.1.2: 56 data bytes, press CTRL_C
Reply from 192.168.1.2: bytes=56 Sequence=1
Reply from 192.168.1.2: bytes=56 Sequence=2
Reply from 192.168.1.2: bytes=56 Sequence=3
: HUAWEI, Quidway Series,
Vlan-interface1 Interface-Vlan-interfa
to break
ttl=254 time=27 ms
ttl=254 time=7 ms
ttl=254 time=7 ms
Reply from 192.168.1.2: bytes=56 Sequence=4
Reply from 192.168.1.2: bytes=56 Sequence=5
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 7/15/27 ms
(8)、验证端口汇聚
ttl=254 time=20 ms
ttl=254 time=14 ms
--- 192.168.1.2 ping statistics ---
[switch1]display mac-address
MAC ADDR VLAN ID STATE
Ethernet1/0/1 AGING
0016-ec0b-d89b 1 Learned
Ethernet1/0/1 AGING
00e0-4c90-3da5 1 Learned
PORT INDEX AGING TIME(s)
000f-e21a-ec6f 1 Learned
Ethernet1/0/24 AGING
[switch1]int e1/0/1
[switch1-Ethernet1/0/1]
#Apr 2 00:07:49:321 2000 switch1 L2INF/2/PORT
Trap 1.3.6.1.6.3.1.1.5.3: portIndex is 4227626,
s is 2
#Apr 2 00:07:49:514 2000 switch1
--- 2 mac address(es) found ---
[switch1-Ethernet1/0/1]shutdown
LINK STATUS CHANGE:- 1 -
ifAdminStatus is 2, ifOperStatu
LAGG/2/AggPortInactive:- 1 -Trap 1.3.6.1.4.1.2
011.5.25.25.2.2: TrapIndex 31465473 Aggregation
/1 is INACTIVE!
#Apr 2 00:07:49:731 2000 switch1
Group 1: port member Ethernet1/0
LAGG/2/AggPortRecoverActive:- 1 -Trap 1.3.6.1.
t1/0/2 is now ACTIVE!
%Apr 2 00:07:49:947 2000 switch1 L2INF/5/PORT
4.1.2011.5.25.25.2.2: TrapIndex 31465474A
LINK STATUS CHANGE:- 1 -
Ethernet1/0/1: is DOWN
[switch1-Ethernet1/0/1]quit
[switch1]ping 192.168.1.2
PING 192.168.1.2: 56 data bytes, press CTRL_C
to break
Reply from 192.168.1.2: bytes=56 Sequence=1
ttl=254 time=9 ms
Reply from 192.168.1.2: bytes=56 Sequence=2
ttl=254 time=13 ms
Reply from 192.168.1.2: bytes=56 Sequence=3
ttl=254 time=19 ms
Reply from 192.168.1.2: bytes=56 Sequence=4
ttl=254 time=8 ms
Reply from 192.168.1.2: bytes=56 Sequence=5
ttl=254 time=10 ms
--- 192.168.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 8/11/19 ms
[switch1]disp mac-address
PORT INDEX AGING TIME(s)
000f-e21a-ec6f 1 Learned
Ethernet1/0/2 AGING
0016-ec0b-d89b 1 Learned
Ethernet1/0/2 AGING
00e0-4c90-3da5 1 Learned
Ethernet1/0/24 AGING
--- 3 mac address(es) found ---
五、实验小结
由显示的MAC地址看出,此时MAC地址000f-e21a-ec6f、0016-ec0b-d89b都在E0/2端口所连接的网段上。由此可知,Switch1把发到目的节点000f-e21a-ec6f、0016-ec0b-d89b的数据帧通过E0/2这个备份端口转发,显示了端口汇聚的相互备份作用。
MAC ADDR VLAN ID STATE
2023年12月19日发(作者:晋玉韵)
交换机端口汇聚的配置
一、实验目的
通过对交换机端口汇聚的配置,了解交换机端口的一些基本配置信息,并掌握相关的重要命令,利用交换机Console口命令对交换机进行配置,明白端口汇聚的作用。
二、实验内容
1、修改交换机主机名
2、修改交换机端口地址与属性
3、配置交换机端口的静态MAC 地址表
4、实现交换机的端口汇聚
三、网络实验图
VLAN:192.168.1.1/24
VLAN1:192.168.1.2/24
E0/1 E0/1
Switch1
E0/2
Console
E0/2
Switch2
PC机
四、实验步骤
(1)、按拓扑图连线
连线:按拓扑图将Switch1的E1/0/1与Switch2的E0/1相连,Switch1的E1/0/2与Switch2的E0/2相连,PC机COM口与Switch1的Console口相连,网线与E0/24相连。
(2)、设置Switch1的E1/0/1和E1/0/2端口
[Quidway]sysname switch1
System View: return to User View with Ctrl+Z.
[switch1]interface ethernet 1/0/1
[switch1-Ethernet0/1]speed 100
[switch1-Ethernet0/1]duplex full
[switch1-Ethernet0/1]int e1/0/2
[switch1-Ethernet0/2]speed 100
[switch1-Ethernet0/2]quit
(3)、设置Switch2的E0/1和E0/2端口
[Quidway]sysname switch2
[switch1-Ethernet0/2]duplex full
System View: return to User View with Ctrl+Z.
[switch2]interface ethernet 0/1
[switch2-Ethernet0/1]speed 100
[switch2-Ethernet0/1]duplex full
[switch2-Ethernet0/1]int e0/2
[switch2-Ethernet0/2]speed 100
[switch2-Ethernet0/2]quit
(4)、汇聚交换机的E0/1和E0/2端口
交换机Switch1上端口汇聚
[switch1-Ethernet1/0/2]quit
[switch2-Ethernet0/2]duplex full
[switch1]link-aggregation group 1 mode static
[switch1]interface e1/0/1
[switch1-Ethernet1/0/1]port link-aggregation
group 1
[switch1-Ethernet1/0/2]port link-aggregation
group 1
交换机Switch2上端口汇聚
[switch2]link-aggregation e0/1 to e0/2 both
(5)、配置交换机1的VLAN1地址
[switch1-Vlan-interface1]
%Apr 2 00:01:27:508 2000 switch1 L2INF/5/VLANIF
Vlan-interface1: is UP
[switch1-Vlan-interface1]ip address
[switch1-Ethernet1/0/1]interface e1/0/2
[switch1]int vlan-interface 1
LINK STATUS CHANGE:- 1 -
192.168.1.1 255.255.255.0
[switch1-Vlan-interface1]
%Apr 2 00:01:41:967 2000 switch1
IFNET/5/UPDOWN:- 1 -Line protocol on the inter
face Vlan-interface1 is UP
[switch1]disp int vlan 1
[switch1-Vlan-interface1]quit
Vlan-interface1 current state :UP
IP Sending Frames' Format is PKTFMT_ETHNT_2,
Internet Address is 19
Description : HUAWEI, Quidway Series,
Line protocol current state :UP
Hardware address is 000f-e220-938b
Vlan-interface1 Interface
The Maximum Transmit Unit is 1500
(6)、配置交换机2的VLAN1地址
[switch2]interface vlan-interface 1
[switch2-Vlan-interface1]ip
192.168.1.2 255.255.0
[switch2]disp interface vlan 1
Vlan-interface1 current state :UPD
Line protocol current state :UP
[switch2-Ethernet1/0/2]
address
[switch2-Vlan-interface1]quit
IP Sending Frames' Format is PKTFMT_ETHNT_2,
Hardware address is 000f-e220-938bNGE:- 1
-8:01:04 2000 switch2 ARP/4/DUPIFIP:Duplicate
address 192.168.1.2 on VL
Internet Address is 192.168.1.2/24 Primary227634,
ifAdminStatus is 1, ifOperStatuN1,
Description
s is 2
%Apr 1 23:57:54:1000 2000 switch2
The Maximum Transmit Unit is 1500
(7)、测试汇聚结果
[switch1]ping 192.168.1.2
PING 192.168.1.2: 56 data bytes, press CTRL_C
Reply from 192.168.1.2: bytes=56 Sequence=1
Reply from 192.168.1.2: bytes=56 Sequence=2
Reply from 192.168.1.2: bytes=56 Sequence=3
: HUAWEI, Quidway Series,
Vlan-interface1 Interface-Vlan-interfa
to break
ttl=254 time=27 ms
ttl=254 time=7 ms
ttl=254 time=7 ms
Reply from 192.168.1.2: bytes=56 Sequence=4
Reply from 192.168.1.2: bytes=56 Sequence=5
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 7/15/27 ms
(8)、验证端口汇聚
ttl=254 time=20 ms
ttl=254 time=14 ms
--- 192.168.1.2 ping statistics ---
[switch1]display mac-address
MAC ADDR VLAN ID STATE
Ethernet1/0/1 AGING
0016-ec0b-d89b 1 Learned
Ethernet1/0/1 AGING
00e0-4c90-3da5 1 Learned
PORT INDEX AGING TIME(s)
000f-e21a-ec6f 1 Learned
Ethernet1/0/24 AGING
[switch1]int e1/0/1
[switch1-Ethernet1/0/1]
#Apr 2 00:07:49:321 2000 switch1 L2INF/2/PORT
Trap 1.3.6.1.6.3.1.1.5.3: portIndex is 4227626,
s is 2
#Apr 2 00:07:49:514 2000 switch1
--- 2 mac address(es) found ---
[switch1-Ethernet1/0/1]shutdown
LINK STATUS CHANGE:- 1 -
ifAdminStatus is 2, ifOperStatu
LAGG/2/AggPortInactive:- 1 -Trap 1.3.6.1.4.1.2
011.5.25.25.2.2: TrapIndex 31465473 Aggregation
/1 is INACTIVE!
#Apr 2 00:07:49:731 2000 switch1
Group 1: port member Ethernet1/0
LAGG/2/AggPortRecoverActive:- 1 -Trap 1.3.6.1.
t1/0/2 is now ACTIVE!
%Apr 2 00:07:49:947 2000 switch1 L2INF/5/PORT
4.1.2011.5.25.25.2.2: TrapIndex 31465474A
LINK STATUS CHANGE:- 1 -
Ethernet1/0/1: is DOWN
[switch1-Ethernet1/0/1]quit
[switch1]ping 192.168.1.2
PING 192.168.1.2: 56 data bytes, press CTRL_C
to break
Reply from 192.168.1.2: bytes=56 Sequence=1
ttl=254 time=9 ms
Reply from 192.168.1.2: bytes=56 Sequence=2
ttl=254 time=13 ms
Reply from 192.168.1.2: bytes=56 Sequence=3
ttl=254 time=19 ms
Reply from 192.168.1.2: bytes=56 Sequence=4
ttl=254 time=8 ms
Reply from 192.168.1.2: bytes=56 Sequence=5
ttl=254 time=10 ms
--- 192.168.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 8/11/19 ms
[switch1]disp mac-address
PORT INDEX AGING TIME(s)
000f-e21a-ec6f 1 Learned
Ethernet1/0/2 AGING
0016-ec0b-d89b 1 Learned
Ethernet1/0/2 AGING
00e0-4c90-3da5 1 Learned
Ethernet1/0/24 AGING
--- 3 mac address(es) found ---
五、实验小结
由显示的MAC地址看出,此时MAC地址000f-e21a-ec6f、0016-ec0b-d89b都在E0/2端口所连接的网段上。由此可知,Switch1把发到目的节点000f-e21a-ec6f、0016-ec0b-d89b的数据帧通过E0/2这个备份端口转发,显示了端口汇聚的相互备份作用。
MAC ADDR VLAN ID STATE