Lab 4.2: (1) Cấu hình Trunk trên Cisco Switch

By , 0 View

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>enable
Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#interface e0/0
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
Switch(config-if)#spanning-tree portfast trunk
%Warning: portfast should only be enabled on ports connected to a single
 host. Connecting hubs, concentrators, switches, bridges, etc... to this
 interface  when portfast is enabled, can cause temporary bridging loops.
 Use with CAUTION

Switch(config-if)#end
Switch#

Kiểm tra kết nối trunk trên Cisco Switch.
Switch#show interfaces trunk 

Port        Mode             Encapsulation  Status        Native vlan
Et0/0       on               802.1q         trunking      1

Port        Vlans allowed on trunk
Et0/0       1-4094

Port        Vlans allowed and active in management domain
Et0/0       1,10,20

Port        Vlans in spanning tree forwarding state and not pruned
Et0/0       1,10,20
Switch#
 
Switch#show interfaces e0/0 switchport 
Name: Et0/0
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: On
Access Mode VLAN: 1 (default)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: enabled
Voice VLAN: none
Administrative private-vlan host-association: none 
Administrative private-vlan mapping: none 
Administrative private-vlan trunk native VLAN: none
Administrative private-vlan trunk Native VLAN tagging: enabled
Administrative private-vlan trunk encapsulation: dot1q
Administrative private-vlan trunk normal VLANs: none
Administrative private-vlan trunk associations: none
Administrative private-vlan trunk mappings: none
Operational private-vlan: none
Trunking VLANs Enabled: ALL
Pruning VLANs Enabled: 2-1001
Capture Mode Disabled
Capture VLANs Allowed: ALL

Protected: false
Appliance trust: none
Switch#

Cấu hình trunk trên interface e0/0 của Cisco Router.
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#interface e0/0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface e0/0.1
Router(config-subif)#encapsulation dot1q 1 native
Router(config-subif)#ip address 172.16.1.254 255.255.255.0
Router(config-subif)#exit    
Router(config)#interface e0/0.10
Router(config-subif)#encapsulation dot1q 10
Router(config-subif)#ip address 172.16.10.254 255.255.255.0
Router(config-subif)#exit
Router(config)#interface e0/0.20
Router(config-subif)#encapsulation dot1q 20
Router(config-subif)#ip address 172.16.20.254 255.255.255.0
Router(config-subif)#end 
Router#

Kiểm tra kết nối trunk trên Cisco Router.
Router#show vlans

Virtual LAN ID:  1 (IEEE 802.1Q Encapsulation)

   vLAN Trunk Interface:   Ethernet0/0.1

 This is configured as native Vlan for the following interface(s) :
Ethernet0/0

   Protocols Configured:   Address:              Received:        Transmitted:

Ethernet0/0.1 (1)
           IP              172.16.1.254                 0                   0
        Other                                           0                   5

   88 packets, 5936 bytes input
   5 packets, 1266 bytes output

Virtual LAN ID:  10 (IEEE 802.1Q Encapsulation)

   vLAN Trunk Interface:   Ethernet0/0.10

   Protocols Configured:   Address:              Received:        Transmitted:

Ethernet0/0.10 (10)
           IP              172.16.10.254                0                   0
        Other                                           0                   2

   71 packets, 4828 bytes input
   2 packets, 92 bytes output

Virtual LAN ID:  20 (IEEE 802.1Q Encapsulation)

   vLAN Trunk Interface:   Ethernet0/0.20

   Protocols Configured:   Address:              Received:        Transmitted:

Ethernet0/0.20 (20)
           IP              172.16.20.254                0                   0
        Other                                           0                   2

   61 packets, 4148 bytes input
   2 packets, 92 bytes output

Router# 

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. 

You Might Also Like

0 comments