Mục tiêu thực hành:
- Hiệu chỉnh Native VLAN trên Cisco Switch.
- Hiệu chỉnh Native VLAN trên Cisco Router.
Truy cập vào "Lab 4-2 - Hieu chinh Native VLAN tren duong Trunk v1" tại Public Unetlab Server 24/7 để thực hành.
interface e0/0switchport trunk encapsulation dot1qswitchport mode trunkspanning-tree portfast trunkexit
interface e0/0no shutdownexitinterface e0/0.1encapsulation dot1q 1 nativeip address 172.16.1.254 255.255.255.0ip nat insideno shutdownexitinterface e0/0.10encapsulation dot1q 10ip address 172.16.10.254 255.255.255.0ip nat insideno shutdownexitinterface e0/0.20encapsulation dot1q 20ip address 172.16.20.254 255.255.255.0ip nat insideno shutdownexit
Hiệu chỉnh Native VLAN trên Cisco Switch.
- Native VLAN mặc định là VLAN 1.
Sw1#show interfaces trunkPort Mode Encapsulation Status Native vlanEt0/0 on 802.1q trunking 1Port Vlans allowed on trunkEt0/0 1-4094Port Vlans allowed and active in management domainEt0/0 1,10,20Port Vlans in spanning tree forwarding state and not prunedEt0/0 1,10,20Sw1#
- Hiệu chỉnh Native VLAN trên cổng Trunk của Switch.
Sw1#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Sw1(config)#interface e0/0Sw1(config-if)#switchport trunk native vlan 10Sw1(config-if)#endSw1#
- Kiểm tra Native VLAN sau khi hiệu chỉnh.
Sw1#show interface trunkPort Mode Encapsulation Status Native vlanEt0/0 on 802.1q trunking 10Port Vlans allowed on trunkEt0/0 1-4094Port Vlans allowed and active in management domainEt0/0 1,10,20Port Vlans in spanning tree forwarding state and not prunedEt0/0 1,10,20Sw1#
- PC1 không thể ping được tới Gateway 172.16.10.254 vì Native VLAN không đồng nhất giữa Switch với Router.
PC1> ip 172.16.10.1/24 172.16.10.254Checking for duplicate address...PC1 : 172.16.10.1 255.255.255.0 gateway 172.16.10.254PC1>
PC1> ping 172.16.10.254host (172.16.10.254) not reachablePC1>
Hiệu chỉnh Native VLAN trên Cisco Router.
- Hiệu chỉnh VLAN 10 là Native VLAN trên R1.
R1#configure terminalEnter configuration commands, one per line. End with CNTL/Z.R1(config)#interface e0/0.10R1(config-subif)#encapsulation dot1q 10 nativeR1(config-subif)#endR1#
R1#show vlansVirtual LAN ID: 1 (IEEE 802.1Q Encapsulation)vLAN Trunk Interface: Ethernet0/0.1Protocols Configured: Address: Received: Transmitted:Ethernet0/0.1 (1)IP 172.16.1.254 0 0Other 0 22538 packets, 36552 bytes input22 packets, 7884 bytes outputVirtual LAN ID: 10 (IEEE 802.1Q Encapsulation)vLAN Trunk Interface: Ethernet0/0.10This is configured as native Vlan for the following interface(s) :Ethernet0/0Protocols Configured: Address: Received: Transmitted:Ethernet0/0.10 (10)IP 172.16.10.254 0 0Other 0 21084 packets, 69312 bytes input2 packets, 92 bytes outputVirtual LAN ID: 20 (IEEE 802.1Q Encapsulation)vLAN Trunk Interface: Ethernet0/0.20Protocols Configured: Address: Received: Transmitted:Ethernet0/0.20 (20)IP 172.16.20.254 0 0Other 0 2534 packets, 36312 bytes input2 packets, 92 bytes outputR1#
- Sau khi hiệu chỉnh Native VLAN đồng nhất giữa Router và Switch thì PC1 đã có thể ping được Gateway 172.16.10.254.
PC1> ip 172.16.10.1/24 172.16.10.254Checking for duplicate address...PC1 : 172.16.10.1 255.255.255.0 gateway 172.16.10.254PC1>
PC1> ping 172.16.10.25484 bytes from 172.16.10.254 icmp_seq=1 ttl=255 time=0.238 ms84 bytes from 172.16.10.254 icmp_seq=2 ttl=255 time=0.322 ms84 bytes from 172.16.10.254 icmp_seq=3 ttl=255 time=0.311 ms84 bytes from 172.16.10.254 icmp_seq=4 ttl=255 time=0.333 ms84 bytes from 172.16.10.254 icmp_seq=5 ttl=255 time=0.314 msPC1>
Tham khảo các videos lý thuyết Hướng dẫn thực hành CCNA R&S để biết thêm thông tin chi tiết.
0 comments