Mô hình
IEEE dot1q tunneling là một cơ chế cho phép mang nhiều VLAN của khách hàng trong một tunnel. Trong hình trên, khách hàng X có hai mạng bị phân chia bởi một service provider. Switch 1 của khách hàng X sẽ có một kết nối trunking đến mạng của service providers. Mạng của SP sẽ tạo ra một tunnel để mang tất cả các thông tin VLAN sang đầu kia của tunnel. Các VLAN ở hai switch của khách hàng X sẽ có thể thấy nhau như thể được trunking trực tiếp.
Từ trái sang phải:
Switch I của khách hàng X: dùng catalyst 2950
Switch I của nhà cung cấp dịch vụ: dùng Catalyst 3550
Switch II của nhà cung cấp dịch vụ: dùng Catalyst 3550
Switch II của khách hàng X: dùng Catalyst 2912
I. Switch I của khách hàng X:
SHOW RUN
Building configuration...
Current configuration:
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
ip subnet-zero
!
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/3
switchport access vlan 7
!
interface FastEthernet0/4
switchport access vlan 10
!
interface FastEthernet0/5
switchport access vlan 10
!
interface FastEthernet0/6
switchport access vlan 10
!
interface FastEthernet0/7
switchport access vlan 10
!
interface FastEthernet0/8
switchport access vlan 10
!
interface FastEthernet0/9
switchport access vlan 10
!
interface FastEthernet0/10
switchport access vlan 10
!
interface FastEthernet0/11
switchport access vlan 10
!
interface FastEthernet0/12
switchport access vlan 10
!
interface VLAN1
ip address 10.1.2.1 255.255.255.0
no ip directed-broadcast
no ip route-cache
!
line con 0
transport input none
stopbits 1
line vty 0 4
login
line vty 5 15
login
!
end
Trên switch 1, các VLAN sau đây được chia. Dùng lệnh show vlan để kiểm tra:
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2
7 VLAN0007 active Fa0/3
10 VLAN0010 active Fa0/4, Fa0/5, Fa0/6, Fa0/7,
Fa0/8, Fa0/9, Fa0/10, Fa0/11,
Fa0/12
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
7 enet 100007 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0
Kiểm tra trạng thái của port f0/1 của switch:
Switch#show int f0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Disabled
Access Mode VLAN: 0 ((Inactive))
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: ALL
Trunking VLANs Active: 1,7,10
Pruning VLANs Enabled: 2-1001
Priority for untagged frames: 0
Override vlan tag priority: FALSE
Voice VLAN: none
Appliance trust: none
Port f0/1 của switch được cấu hình như trunking mode bình thường. Switch I của khách hàng X ‘không biết’ là đang được trunk với một switch của service provider.
Switch#
Sau khi hoàn tất cấu hình, dùng lệnh show cdp neighbor. Điểm độc đáo là switch của khách hàng X chỉ thấy switch của khách hàng X bên kia. CDP không phát hiện được Catalyst switch của providers.
Switch#show cdp ne
Switch#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Fas 0/1 135 S I WS-C2950-2Fas 0/1
Switch#show cdp neighbors detail
-------------------------
Device ID: Switch
Entry address(es):
IP address: 10.1.2.6
Platform: cisco WS-C2950-24, Capabilities: Switch IGMP
Interface: FastEthernet0/1, Port ID (outgoing port): FastEthernet0/1
Holdtime : 130 sec
Version :
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(14)EA1a, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2003 by cisco Systems, Inc.
Compiled Tue 02-Sep-03 03:33 by antonino
advertisement version: 2
Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF010221FF000000000000000F239D C640FF0000
VTP Management Domain: 'a'
Native VLAN: 1
Duplex: full
II. Switch I của service provider:
Khảo sát qua Switch của service provider:
sh run
Building configuration...
Current configuration : 2248 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
!
vlan dot1q tag native
ip subnet-zero
!
!
spanning-tree extend system-id
system mtu 1546
!
interface FastEthernet0/1
switchport access vlan 10
switchport trunk encapsulation dot1q
switchport mode dot1q-tunnel
no ip address
l2protocol-tunnel cdp
no cdp enable
spanning-tree bpdufilter enable!
interface FastEthernet0/4
switchport access vlan 3
no ip address
!
interface FastEthernet0/5
switchport access vlan 3
no ip address
!
interface FastEthernet0/7
switchport access vlan 5
no ip address
!
interface FastEthernet0/8
switchport access vlan 5
no ip address
!
interface FastEthernet0/9
switchport access vlan 5
no ip address
!
interface FastEthernet0/10
switchport access vlan 5
no ip address
!
interface FastEthernet0/11
switchport access vlan 5
no ip address
!
interface FastEthernet0/12
switchport access vlan 5
no ip address
!
interface FastEthernet0/13
switchport access vlan 5
no ip address
!
interface FastEthernet0/14
switchport access vlan 5
no ip address
!
interface FastEthernet0/15
switchport access vlan 5
no ip address
!
interface FastEthernet0/16
switchport access vlan 5
no ip address
!
interface FastEthernet0/17
switchport access vlan 5
no ip address
!
interface FastEthernet0/18
switchport access vlan 5
no ip address
!
interface FastEthernet0/19
switchport access vlan 5
no ip address
!
interface FastEthernet0/20
switchport access vlan 5
no ip address
!
interface FastEthernet0/21
switchport access vlan 5
no ip address
!
interface FastEthernet0/22
switchport access vlan 5
no ip address
!
interface FastEthernet0/23
switchport access vlan 5
no ip address
!
interface FastEthernet0/24
description trunk with switch II của provider
switchport access vlan 10
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
!
interface Vlan1
ip address 10.1.1.1 255.255.255.0
!
ip classless
ip http server
!
line con 0
line vty 5 15
!
end
Xem các vlan được cấu hình trên switch của service provider:
Switch#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/6, Gi0/1
Gi0/2
2 cus active
3 sell active Fa0/4, Fa0/5
5 aaa active Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23
7 VLAN0007 active
10 VLAN0010 active Fa0/1
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
3 enet 100003 1500 - - - - - 0 0
5 enet 100005 1500 - - - - - 0 0
7 enet 100007 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - srb 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Xem các switch láng giềng bằng lệnh show cdp neighbor:
Switch#sh cdp nei
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Fas 0/24 120 S I WS-C3550-4Fas 0/24
Kết quả của lệnh trên cho thấy, chỉ có switch của service provider là thấy nhau. Switch của khách hàng X (Cat 2950) không hiển thị trong output này.
Switch#sh int f0/1 trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 off 802.1q not-trunking 1
Port Vlans allowed on trunk
Fa0/1 10
Port Vlans allowed and active in management domain
Fa0/1 10
Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 10
Switch#sh int f0/23 4 trunk
Port Mode Encapsulation Status Native vlan
Fa0/24 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa0/24 1-4094
Port Vlans allowed and active in management domain
Fa0/24 1-3,5,7,10
Port Vlans in spanning tree forwarding state and not pruned
Fa0/24 1-3,5,7,10
Switch#shin int f0/1 trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 off 802.1q not-trunking 1
Port Vlans allowed on trunk
Fa0/1 10
Port Vlans allowed and active in management domain
Fa0/1 10
Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 10
Switch#
III. Switch service provider II:
Khảo sát switch của sevice provider 2:
show run
Building configuration...
Current configuration : 3937 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
!
ip subnet-zero
no ip domain-lookup
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan dot1q tag native
!
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode dot1q-tunnel
no ip address
l2protocol-tunnel cdp
l2protocol-tunnel stp
l2protocol-tunnel vtp
no cdp enable
spanning-tree bpdufilter enable!
interface FastEthernet0/2
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1-3
switchport mode trunk
no ip address
!
interface FastEthernet0/5
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/6
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/7
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/8
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/9
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/10
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/11
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/12
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/13
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/14
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/15
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/16
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/17
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/18
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/19
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/20
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/21
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/22
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/23
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/24
switchport access vlan 3
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
!
interface Vlan1
ip address 10.1.1.2 255.255.255.0
!
ip classless
ip http server
!
line con 0
line vty 5 15
!
end
Xem các VLAN được cấu hình trên switch của provider II:
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/25
Fa0/26, Fa0/27, Fa0/28, Fa0/29
Fa0/30, Fa0/31, Fa0/32, Fa0/33
Fa0/34, Fa0/35, Fa0/36, Fa0/37
Fa0/38, Fa0/39, Fa0/40, Fa0/41
Fa0/42, Fa0/43, Fa0/44, Fa0/45
Fa0/46, Fa0/47, Fa0/48, Gi0/1
Gi0/2
2 cus active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
3 sell active Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23
5 aaa active
7 VLAN0007 active
10 VLAN0010 active Fa0/1
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
5 enet 100005 1500 - - - - - 0 0
7 enet 100007 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - srb 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Kiểm tra các switch láng giềng:
Switch#show cdp ne
Switch#show cdp neighbors detail
-------------------------
Device ID: Switch
Entry address(es):
IP address: 10.1.1.1
Platform: cisco WS-C3550-24, Capabilities: Switch IGMP
Interface: FastEthernet0/24, Port ID (outgoing port): FastEthernet0/24
Holdtime : 176 sec
Version :
Cisco Internetwork Operating System Software
IOS (tm) C3550 Software (C3550-I5Q3L2-M), Version 12.1(11)EA1a, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Thu 17-Oct-02 23:29 by antonino
advertisement version: 2
Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF010221FF000000000000000DBC33 2B00FF0000
VTP Management Domain: 'a'
Native VLAN: 1
Duplex: full
Switch#show int trunk
Port Mode Encapsulation Status Native vlan
Fa0/24 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa0/24 1-4094
Port Vlans allowed and active in management domain
Fa0/24 1-3,5,7,10
Port Vlans in spanning tree forwarding state and not pruned
Fa0/24 1-3,5,7,10
Switch#show dot1q-tunnel
Port
-----
Fa0/1
Switch#
IV. Xem switch của khách hàng X bên phải:
show run
Building configuration...
Current configuration : 2311 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
enable password cisco
!
ip subnet-zero
!
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/5
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/6
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/7
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/8
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/9
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/10
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/11
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/12
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/13
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/14
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/15
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/16
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/17
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/18
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/19
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/20
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/21
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/22
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/23
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/24
switchport access vlan 7
switchport mode access
!
interface Vlan1
ip address 10.1.2.6 255.255.255.0
no ip route-cache
!
ip http server
!
!
line con 0
line vty 0 4
password cisco
no login
line vty 5 15
password cisco
no login
!
end
Trên switch 2 có VLAN 7 và VLAN 10:
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2
2 cus active
3 sell active
5 aaa active
7 VLAN0007 active Fa0/3, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24
10 VLAN0010 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
5 enet 100005 1500 - - - - - 0 0
7 enet 100007 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - srb 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Khi show cdp neighbor, chỉ thấy switch của khách hàng X bên trái, không thấy switch của providers.
Switch#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Fas 0/1 168 T S WS-C2912-XFas 0/1
Switch#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa0/1 1-4094
Port Vlans allowed and active in management domain
Fa0/1 1-3,5,7,10
Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1-3,5,7,10
IEEE dot1q tunneling là một cơ chế cho phép mang nhiều VLAN của khách hàng trong một tunnel. Trong hình trên, khách hàng X có hai mạng bị phân chia bởi một service provider. Switch 1 của khách hàng X sẽ có một kết nối trunking đến mạng của service providers. Mạng của SP sẽ tạo ra một tunnel để mang tất cả các thông tin VLAN sang đầu kia của tunnel. Các VLAN ở hai switch của khách hàng X sẽ có thể thấy nhau như thể được trunking trực tiếp.
Từ trái sang phải:
Switch I của khách hàng X: dùng catalyst 2950
Switch I của nhà cung cấp dịch vụ: dùng Catalyst 3550
Switch II của nhà cung cấp dịch vụ: dùng Catalyst 3550
Switch II của khách hàng X: dùng Catalyst 2912
I. Switch I của khách hàng X:
SHOW RUN
Building configuration...
Current configuration:
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
ip subnet-zero
!
interface FastEthernet0/1
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface FastEthernet0/3
switchport access vlan 7
!
interface FastEthernet0/4
switchport access vlan 10
!
interface FastEthernet0/5
switchport access vlan 10
!
interface FastEthernet0/6
switchport access vlan 10
!
interface FastEthernet0/7
switchport access vlan 10
!
interface FastEthernet0/8
switchport access vlan 10
!
interface FastEthernet0/9
switchport access vlan 10
!
interface FastEthernet0/10
switchport access vlan 10
!
interface FastEthernet0/11
switchport access vlan 10
!
interface FastEthernet0/12
switchport access vlan 10
!
interface VLAN1
ip address 10.1.2.1 255.255.255.0
no ip directed-broadcast
no ip route-cache
!
line con 0
transport input none
stopbits 1
line vty 0 4
login
line vty 5 15
login
!
end
Trên switch 1, các VLAN sau đây được chia. Dùng lệnh show vlan để kiểm tra:
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2
7 VLAN0007 active Fa0/3
10 VLAN0010 active Fa0/4, Fa0/5, Fa0/6, Fa0/7,
Fa0/8, Fa0/9, Fa0/10, Fa0/11,
Fa0/12
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 1002 1003
7 enet 100007 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 1 1003
1003 tr 101003 1500 1005 0 - - srb 1 1002
1004 fdnet 101004 1500 - - 1 ibm - 0 0
1005 trnet 101005 1500 - - 1 ibm - 0 0
Kiểm tra trạng thái của port f0/1 của switch:
Switch#show int f0/1 switchport
Name: Fa0/1
Switchport: Enabled
Administrative mode: trunk
Operational Mode: trunk
Administrative Trunking Encapsulation: dot1q
Operational Trunking Encapsulation: dot1q
Negotiation of Trunking: Disabled
Access Mode VLAN: 0 ((Inactive))
Trunking Native Mode VLAN: 1 (default)
Trunking VLANs Enabled: ALL
Trunking VLANs Active: 1,7,10
Pruning VLANs Enabled: 2-1001
Priority for untagged frames: 0
Override vlan tag priority: FALSE
Voice VLAN: none
Appliance trust: none
Port f0/1 của switch được cấu hình như trunking mode bình thường. Switch I của khách hàng X ‘không biết’ là đang được trunk với một switch của service provider.
Switch#
Sau khi hoàn tất cấu hình, dùng lệnh show cdp neighbor. Điểm độc đáo là switch của khách hàng X chỉ thấy switch của khách hàng X bên kia. CDP không phát hiện được Catalyst switch của providers.
Switch#show cdp ne
Switch#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Fas 0/1 135 S I WS-C2950-2Fas 0/1
Switch#show cdp neighbors detail
-------------------------
Device ID: Switch
Entry address(es):
IP address: 10.1.2.6
Platform: cisco WS-C2950-24, Capabilities: Switch IGMP
Interface: FastEthernet0/1, Port ID (outgoing port): FastEthernet0/1
Holdtime : 130 sec
Version :
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(14)EA1a, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2003 by cisco Systems, Inc.
Compiled Tue 02-Sep-03 03:33 by antonino
advertisement version: 2
Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF010221FF000000000000000F239D C640FF0000
VTP Management Domain: 'a'
Native VLAN: 1
Duplex: full
II. Switch I của service provider:
Khảo sát qua Switch của service provider:
sh run
Building configuration...
Current configuration : 2248 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
!
vlan dot1q tag native
ip subnet-zero
!
!
spanning-tree extend system-id
system mtu 1546
!
interface FastEthernet0/1
switchport access vlan 10
switchport trunk encapsulation dot1q
switchport mode dot1q-tunnel
no ip address
l2protocol-tunnel cdp
no cdp enable
spanning-tree bpdufilter enable!
interface FastEthernet0/4
switchport access vlan 3
no ip address
!
interface FastEthernet0/5
switchport access vlan 3
no ip address
!
interface FastEthernet0/7
switchport access vlan 5
no ip address
!
interface FastEthernet0/8
switchport access vlan 5
no ip address
!
interface FastEthernet0/9
switchport access vlan 5
no ip address
!
interface FastEthernet0/10
switchport access vlan 5
no ip address
!
interface FastEthernet0/11
switchport access vlan 5
no ip address
!
interface FastEthernet0/12
switchport access vlan 5
no ip address
!
interface FastEthernet0/13
switchport access vlan 5
no ip address
!
interface FastEthernet0/14
switchport access vlan 5
no ip address
!
interface FastEthernet0/15
switchport access vlan 5
no ip address
!
interface FastEthernet0/16
switchport access vlan 5
no ip address
!
interface FastEthernet0/17
switchport access vlan 5
no ip address
!
interface FastEthernet0/18
switchport access vlan 5
no ip address
!
interface FastEthernet0/19
switchport access vlan 5
no ip address
!
interface FastEthernet0/20
switchport access vlan 5
no ip address
!
interface FastEthernet0/21
switchport access vlan 5
no ip address
!
interface FastEthernet0/22
switchport access vlan 5
no ip address
!
interface FastEthernet0/23
switchport access vlan 5
no ip address
!
interface FastEthernet0/24
description trunk with switch II của provider
switchport access vlan 10
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
!
interface Vlan1
ip address 10.1.1.1 255.255.255.0
!
ip classless
ip http server
!
line con 0
line vty 5 15
!
end
Xem các vlan được cấu hình trên switch của service provider:
Switch#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/6, Gi0/1
Gi0/2
2 cus active
3 sell active Fa0/4, Fa0/5
5 aaa active Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23
7 VLAN0007 active
10 VLAN0010 active Fa0/1
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
3 enet 100003 1500 - - - - - 0 0
5 enet 100005 1500 - - - - - 0 0
7 enet 100007 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - srb 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Xem các switch láng giềng bằng lệnh show cdp neighbor:
Switch#sh cdp nei
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Fas 0/24 120 S I WS-C3550-4Fas 0/24
Kết quả của lệnh trên cho thấy, chỉ có switch của service provider là thấy nhau. Switch của khách hàng X (Cat 2950) không hiển thị trong output này.
Switch#sh int f0/1 trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 off 802.1q not-trunking 1
Port Vlans allowed on trunk
Fa0/1 10
Port Vlans allowed and active in management domain
Fa0/1 10
Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 10
Switch#sh int f0/23 4 trunk
Port Mode Encapsulation Status Native vlan
Fa0/24 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa0/24 1-4094
Port Vlans allowed and active in management domain
Fa0/24 1-3,5,7,10
Port Vlans in spanning tree forwarding state and not pruned
Fa0/24 1-3,5,7,10
Switch#shin int f0/1 trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 off 802.1q not-trunking 1
Port Vlans allowed on trunk
Fa0/1 10
Port Vlans allowed and active in management domain
Fa0/1 10
Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 10
Switch#
III. Switch service provider II:
Khảo sát switch của sevice provider 2:
show run
Building configuration...
Current configuration : 3937 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
!
ip subnet-zero
no ip domain-lookup
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan dot1q tag native
!
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode dot1q-tunnel
no ip address
l2protocol-tunnel cdp
l2protocol-tunnel stp
l2protocol-tunnel vtp
no cdp enable
spanning-tree bpdufilter enable!
interface FastEthernet0/2
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 1-3
switchport mode trunk
no ip address
!
interface FastEthernet0/5
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/6
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/7
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/8
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/9
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/10
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/11
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/12
switchport access vlan 2
switchport mode access
no ip address
!
interface FastEthernet0/13
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/14
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/15
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/16
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/17
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/18
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/19
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/20
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/21
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/22
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/23
switchport access vlan 3
switchport mode access
no ip address
!
interface FastEthernet0/24
switchport access vlan 3
switchport trunk encapsulation dot1q
switchport mode trunk
no ip address
!
interface Vlan1
ip address 10.1.1.2 255.255.255.0
!
ip classless
ip http server
!
line con 0
line vty 5 15
!
end
Xem các VLAN được cấu hình trên switch của provider II:
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2, Fa0/3, Fa0/4, Fa0/25
Fa0/26, Fa0/27, Fa0/28, Fa0/29
Fa0/30, Fa0/31, Fa0/32, Fa0/33
Fa0/34, Fa0/35, Fa0/36, Fa0/37
Fa0/38, Fa0/39, Fa0/40, Fa0/41
Fa0/42, Fa0/43, Fa0/44, Fa0/45
Fa0/46, Fa0/47, Fa0/48, Gi0/1
Gi0/2
2 cus active Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
3 sell active Fa0/13, Fa0/14, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23
5 aaa active
7 VLAN0007 active
10 VLAN0010 active Fa0/1
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
5 enet 100005 1500 - - - - - 0 0
7 enet 100007 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - srb 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Kiểm tra các switch láng giềng:
Switch#show cdp ne
Switch#show cdp neighbors detail
-------------------------
Device ID: Switch
Entry address(es):
IP address: 10.1.1.1
Platform: cisco WS-C3550-24, Capabilities: Switch IGMP
Interface: FastEthernet0/24, Port ID (outgoing port): FastEthernet0/24
Holdtime : 176 sec
Version :
Cisco Internetwork Operating System Software
IOS (tm) C3550 Software (C3550-I5Q3L2-M), Version 12.1(11)EA1a, RELEASE SOFTWARE (fc1)
Copyright (c) 1986-2002 by cisco Systems, Inc.
Compiled Thu 17-Oct-02 23:29 by antonino
advertisement version: 2
Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF010221FF000000000000000DBC33 2B00FF0000
VTP Management Domain: 'a'
Native VLAN: 1
Duplex: full
Switch#show int trunk
Port Mode Encapsulation Status Native vlan
Fa0/24 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa0/24 1-4094
Port Vlans allowed and active in management domain
Fa0/24 1-3,5,7,10
Port Vlans in spanning tree forwarding state and not pruned
Fa0/24 1-3,5,7,10
Switch#show dot1q-tunnel
Port
-----
Fa0/1
Switch#
IV. Xem switch của khách hàng X bên phải:
show run
Building configuration...
Current configuration : 2311 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname Switch
!
enable password cisco
!
ip subnet-zero
!
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/5
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/6
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/7
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/8
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/9
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/10
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/11
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/12
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/13
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/14
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/15
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/16
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/17
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/18
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/19
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/20
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/21
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/22
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/23
switchport access vlan 7
switchport mode access
!
interface FastEthernet0/24
switchport access vlan 7
switchport mode access
!
interface Vlan1
ip address 10.1.2.6 255.255.255.0
no ip route-cache
!
ip http server
!
!
line con 0
line vty 0 4
password cisco
no login
line vty 5 15
password cisco
no login
!
end
Trên switch 2 có VLAN 7 và VLAN 10:
Switch#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/2
2 cus active
3 sell active
5 aaa active
7 VLAN0007 active Fa0/3, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/13, Fa0/14
Fa0/15, Fa0/16, Fa0/17, Fa0/18
Fa0/19, Fa0/20, Fa0/21, Fa0/22
Fa0/23, Fa0/24
10 VLAN0010 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
2 enet 100002 1500 - - - - - 0 0
3 enet 100003 1500 - - - - - 0 0
5 enet 100005 1500 - - - - - 0 0
7 enet 100007 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - srb 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
1005 trnet 101005 1500 - - - ibm - 0 0
Remote SPAN VLANs
------------------------------------------------------------------------------
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
Khi show cdp neighbor, chỉ thấy switch của khách hàng X bên trái, không thấy switch của providers.
Switch#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone
Device ID Local Intrfce Holdtme Capability Platform Port ID
Switch Fas 0/1 168 T S WS-C2912-XFas 0/1
Switch#show interfaces trunk
Port Mode Encapsulation Status Native vlan
Fa0/1 on 802.1q trunking 1
Port Vlans allowed on trunk
Fa0/1 1-4094
Port Vlans allowed and active in management domain
Fa0/1 1-3,5,7,10
Port Vlans in spanning tree forwarding state and not pruned
Fa0/1 1-3,5,7,10
Comment