Mục tiêu thực hành:
- Cấu hình trunk trên interface e0/0 của Cisco Switch.
- Kiểm tra kết nối trunk trên Cisco Switch.
- Cấu hình trunk trên interface e0/0 của Cisco Router.
- Kiểm tra kết nối trunk trên Cisco Router.
Truy cập vào "Lab 4-2 - Cau hinh trunk tren Cisco Switch v1" tại Public Unetlab Server 24/7 để thực hành.
Cấu hình trunk trên interface e0/0 của Cisco Switch.
Switch>enableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#interface e0/0Switch(config-if)#switchport trunk encapsulation dot1qSwitch(config-if)#switchport mode trunkSwitch(config-if)#spanning-tree portfast trunk%Warning: portfast should only be enabled on ports connected to a singlehost. Connecting hubs, concentrators, switches, bridges, etc... to thisinterface when portfast is enabled, can cause temporary bridging loops.Use with CAUTIONSwitch(config-if)#endSwitch#
Kiểm tra kết nối trunk trên Cisco Switch.
Switch#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,20Switch#
Switch#show interfaces e0/0 switchportName: Et0/0Switchport: EnabledAdministrative Mode: trunkOperational Mode: trunkAdministrative Trunking Encapsulation: dot1qOperational Trunking Encapsulation: dot1qNegotiation of Trunking: OnAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Administrative Native VLAN tagging: enabledVoice VLAN: noneAdministrative private-vlan host-association: noneAdministrative private-vlan mapping: noneAdministrative private-vlan trunk native VLAN: noneAdministrative private-vlan trunk Native VLAN tagging: enabledAdministrative private-vlan trunk encapsulation: dot1qAdministrative private-vlan trunk normal VLANs: noneAdministrative private-vlan trunk associations: noneAdministrative private-vlan trunk mappings: noneOperational private-vlan: noneTrunking VLANs Enabled: ALLPruning VLANs Enabled: 2-1001Capture Mode DisabledCapture VLANs Allowed: ALLProtected: falseAppliance trust: noneSwitch#
Cấu hình trunk trên interface e0/0 của Cisco Router.
Router>enableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#interface e0/0Router(config-if)#no shutdownRouter(config-if)#exitRouter(config)#interface e0/0.1Router(config-subif)#encapsulation dot1q 1 nativeRouter(config-subif)#ip address 172.16.1.254 255.255.255.0Router(config-subif)#exitRouter(config)#interface e0/0.10Router(config-subif)#encapsulation dot1q 10Router(config-subif)#ip address 172.16.10.254 255.255.255.0Router(config-subif)#exitRouter(config)#interface e0/0.20Router(config-subif)#encapsulation dot1q 20Router(config-subif)#ip address 172.16.20.254 255.255.255.0Router(config-subif)#endRouter#
Kiểm tra kết nối trunk trên Cisco Router.
Router#show vlansVirtual LAN ID: 1 (IEEE 802.1Q Encapsulation)vLAN Trunk Interface: Ethernet0/0.1This is configured as native Vlan for the following interface(s) :Ethernet0/0Protocols Configured: Address: Received: Transmitted:Ethernet0/0.1 (1)IP 172.16.1.254 0 0Other 0 588 packets, 5936 bytes input5 packets, 1266 bytes outputVirtual LAN ID: 10 (IEEE 802.1Q Encapsulation)vLAN Trunk Interface: Ethernet0/0.10Protocols Configured: Address: Received: Transmitted:Ethernet0/0.10 (10)IP 172.16.10.254 0 0Other 0 271 packets, 4828 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 261 packets, 4148 bytes input2 packets, 92 bytes outputRouter#
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