Cu hình trunking 801Q ấ

Một phần của tài liệu Hạ tầng mạng LAN và không dây (Trang 28 - 30)

III. Cu hình VLAN và đấ ường trunk

2. Cu hình trunking 801Q ấ

Bài toán: Switch S2 và S3 tri n khai đã tri n khai vlan 10, 20 và 30 trên cácể ể c ng tổ ương ng f0/11, f0/18 và f0/6. Yêu c u đ t ra là làm sao đ các máy tínhứ ầ ặ ể thu c cùng vlan có th giao ti p v i nhau.ộ ể ế ớ

Cú pháp:

Switch(config)#interface fastEthernet[port-id] Switch(config-if)#switchport mode trunk

Switch(config-if)#switchport trunk encapsulation dot1q

Trong đó:

Switchport mode trunk : C u hình lo i c ng là trunkingấ ạ ổ

Switchport trunk encapsulation dot1q : C u hình ki u đóng gói làấ ể 802.1Q

Tri n khai:ể

Ta th y Switch S1 đ ng trung gian gi a S2 và S3, do đó S1 sẽ làm nhi m vấ ứ ữ ệ ụ transit traffic gi a các vlan. Đ cho phép frame c a nhi u vlan khác nhau đi trênữ ể ủ ề cùng 1 liên k t thì liên k t đó c n đế ế ầ ược tri n khai trunking. Nh v y, ta sẽ c uể ư ậ ấ hình trunking gi a f0/11 c a S2 v i f0/1 c a S1 và f0/11 c a S3 v i f0/3 c a S1ữ ủ ớ ủ ủ ớ ủ

Trên switch S2:

S2(config)#interface f0/11

S2(config-if)#switchport mode trunk

S2(config-if)#switchport trunk encapsulation dot1q

Trên switch S3:

S3(config)#interface f0/11

S3(config-if)#switchport mode trunk

S3(config-if)#switchport trunk encapsulation dot1q

Và trên switch S1

S1(config)#interface f0/1

S1(config-if)#switchport mode trunk

S1(config-if)#switchport trunk encapsulation dot1q S1(config-if)#interface f0/3

S1(config-if)#switchport mode trunk

S1(config-if)#switchport trunk encapsulation dot1q

Xác nh n:ậ

Chúng ta có th xác nh n b ng vi c cho phép các PC thu c cùng vlan pingể ậ ằ ệ ộ cho nhau và xem k t qu . Ngoài ra, chúng ta cũng có th ki m tra tr ng tháiế ả ể ể ạ trunking v i câu l nh show interface trunk ho c show interface switchportớ ệ ặ

Trên switch S2

S1#show interface trunk

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

Fa0/3 on 802.1q trunking 1

Port Vlans allowed on trunk Fa0/1 1-1005

Fa0/3 1-1005

Port Vlans allowed and active in management domain Fa0/1 1,10,20,30,99

Fa0/3 1-1005

Port Vlans in spanning tree forwarding state and not pruned Fa0/1 1,10,20,30,99

Fa0/3 1-1005

Trên switch S1

S1#show interface f0/11 switchport Name: Fa0/1

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) 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 encapsulation: dot1q Administrative private-vlan trunk normal VLANs: none Administrative private-vlan trunk private VLANs: 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

Một phần của tài liệu Hạ tầng mạng LAN và không dây (Trang 28 - 30)

Tải bản đầy đủ (DOCX)

(49 trang)
w