Experimental topology
Experimental requirements
- Configure an IP address for each PC as shown in the figure
- PC1 belongs to VLAN 10; PC2 and PC5 belong to VLAN 20; PC4 belongs to VLAN 30
- Realize interoperability across the network
Experimental steps
1. Configure link aggregation
Configure the command on SW1 as follows
[SW1]int Eth-Trunk 1
[SW1-Eth-Trunk1]trunkport Ethernet 0 /0/1 to 0/0/3
The configuration command on SW2 is as follows
[SW2]int Eth-Trunk 1
[SW2-Eth-Trunk1]trunkport Ethernet 0/0/1 to 0/0/3
2. Verify the effect of link aggregation
[SW1-Eth-Trunk1]dis eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 3
------------------------------ --------------------------------------------------
PortName Status Weight
Ethernet0/0/1 Up 1
Ethernet0/0/2 Up 1
Ethernet0/0/3 Up 1
3. Set the attribute of the interconnected aggregate interface to Hybrid on SW1 and SW2 , And allow VLAN 10; VLAN 20; VLAN 30 pass
Configuration on SW1
[SW1-Eth-Trunk1]port link-type hybrid
[SW1-Eth- Trunk1] port hybrid tagged vlan 10 20 30
Configuration on SW2
[SW2-Eth-Trunk1]port link-type hybrid
[SW2-Eth-Trunk1] port hybrid tagged vlan 10 20 30
4. On SW1 and SW2, assign the ports of interconnecting PCs to strip VLAN 10; VLAN 20; VLAN 30 labeling ability, configure PVID value and allowable VLAN
< p>SW1
[SW1]int e0/0/4
[SW1-Ethernet0/0/4]port link-type hybrid
[SW1-Ethernet0/0/4] port hybrid pvid vlan 10
[SW1-Ethernet0/0/4]port hybrid tagged vlan 10
[SW1-Ethernet0/0/4]port hybrid untagged vlan 20 30
[SW1]int e0/0/5
[SW1-Ethernet0/0/5]port link-type hybrid
[SW1-Ethernet0/0/5]port hybrid pvid vlan 20
[SW1-Ethernet0/0/5]port hybrid tagged vlan 20
[SW1-Ethernet0/0/5]port hybrid untagged vlan 10 20 30
//Because PC5 in the topology diagram also belongs to VLAN 20 ; Here you need to configure the tag stripping VLAN 20, because the host can only receive Ethernet frames, if it receives an 802.1Q frame, it will be discarded.
[SW1]int e0/0/6
[SW1-Ethernet0/0/6]port link-type hybrid
[SW1-Ethernet0/0/6]port hybrid pvid vlan 20
[SW1-Ethernet0/0/6]port hybrid tagged vlan 20
[SW1-Ethernet0/0/6]port hybrid untagged vlan 10 20 30
SW2 p>
[AR2]int e0/0/5
[AR2-Ethernet0/0/5]port link-type hybrid
[AR2-Ethernet0/0/5]port hybrid pvid vlan 30
[AR2-Ethernet0/0/5]port hybrid tagged vlan 30
[AR2-Ethernet0/0/5]port hybrid untagged vlan 10 20
5. PING test connectivity—– PC4 Ping PC1
PC>ping 192.168.1.1
Ping 192.168.1.1: 32 data bytes, Press Ctrl_C to break
From 192.168.1.1: bytes=32 seq=1 ttl=128 time=63 ms
From 192.168.1.1: bytes=32 seq=2 ttl =128 time=78 ms
From 192.168.1.1: bytes=32 seq=3 ttl=128 time=62 ms
From 192.168.1.1: bytes=32 seq=4 ttl=128 time=63 ms
From 192.168.1.1: bytes=32 seq=5 ttl=128 time=62 ms
--- 192.168.1.1 ping statistics ---
5 packet(s ) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 62/65/78 ms
PING again, We started to capture packets on the SW1 e0/0/2 network segment to view the content of the captured Ping packets
request request data packet, source address 192.168.1.2 to 192.168.1.1 is 802.1Q frame, VLAN ID is 30
The reply packet, the source address 192.168.1.1 goes to 192.168.1.2 is 802.1Q Frame, VLAN ID is 10