本徵VLAN是不帶標籤的,SW1和SW2之間互聯接口E1/0本徵VLAN分別為VLAN10和VLAN1
由於本徵VLAN是不帶標籤的因此VLAN10和VLAN1是可以通的
R1#ping 12.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:
!!!!!
SW2(config)#vlan dot1q tag native ----使本徵vlan也打tag,這樣就不通了
R1#ping 12.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12.1.1.2, timeout is 2 seconds:
.....
Native VLAN的幀在Trunk鏈路上不帶標記
交換機收到不打標記的幀會轉發到Native VLAN
容易引起跨越VLAN攻擊
DTP:動態trunk協議,思科私有,默認兩臺思科設備互聯自動協商DTP Trunk
Trunk: ON 默認發送DTP(switchport mode trunk)
OFF: 用命令“switchport nonegotiate”關掉DTP
Switch(config)#interface e1/3
Switch(config-if)#switchport trunk encapsulation dot1q
Switch(config-if)#switchport mode trunk
Switch(config-if)#switchport nonegotiate
關閉DTP:
Switch(config-if)#interface e1/3
Switch(config-if)#no switchport nonegotiate --開啟DTP
Switch(config-if)#switchport mode dynamic desirable --設置desirable主動協商
歡迎關注和轉發,更多精彩內容下期繼續分享!
閱讀更多 專注分享網絡技術 的文章