VTP: V1和V2不兼容
VTP默認Server模式
Server和Client的VLAN信息都保存在vlan.dat ,透明模式情況下vlan的配置保存在配置文件config中
SW1(config)#vtp domain NULL--會清空配置版本號
VTP同步的問題:
1、Trunk 2、VTP Version相同 3、VTP域名相同 4、VTP Password
如果客戶端配置版本號大於Server端,客戶端可以同步服務器端,標註是配置版本號
vtp password cisco--配置域密碼
SW1(config)#vtp pruning ----開啟VTP修剪,同時會同步到client,domain名字和修剪都可以同步到客戶端
透明模式的配置版本號為0
在VTP版本3
SW2(config)#vtp version 3
SW2#vtp primary vlan ---配置VTP主Server,才能創建VLAN
主Server的配置版本號會傳遞更新其他新加的高於主Server的設備
SW1(config)#vtp password cisco hidden ---VTP 密碼隱藏模式
SW1#show vtp password
VTP Password: 52C518C46CE6647155DE01304CECA63E
1、主Server 創建、修改、刪除 , 普通Server作為一個子類型
2、password增強的
明文、hidden、secret
MST ,多實例生成樹---通過VTPv3交換
Name Revison Map
3、兼容性
具有V1和V2能力,運行V1的會自動升級V2與R3兼容
V3兼容V2不兼容V1,如果設備具有V2能力但是配置為V1時,會被V3觸發V1為V2
V1和V2不兼容
創建沒有使用的VLAN進行觸發VTP
======================================================
R8#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Sw(config)#interface range ethernet 0/0-1
Sw(config-if-range)#switchport protected ---配置被保護的端口
被保護端口之間無法通信,被保護和非被保護端口之間可以通信。
R8#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
.....
RSPAN ERSPAN
Isolated(隔離端口)只能和混雜端口通信 混雜端口和所有端口都可以通信
Community A--A通信, A--B不能通信 , A--混雜端口通信
私有VLAN 透明模式 Sw(config)#vtp mode transparent
Sw(config)#vtp version 3
Sw#vtp primary vlan
Sw(config)#vlan 100 ----配置主VLAN和輔VLAN
Sw(config-vlan)#private-vlan primary
Sw(config)#vlan 201
Sw(config-vlan)#private-vlan isolated
Sw(config)#vlan 202
Sw(config-vlan)#private-vlan community
Sw(config)#vlan 100
private-vlan association 201-202 ---配置主VLAN並關聯輔VLAN
Sw(config)# interface e0/0
Sw(config-if)#switchport mode private-vlan host
Sw(config-if)#switchport private-vlan host-association 100 201
Sw#show vlan private-vlan
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
100 201 isolated Et0/0
100 202 community
interface Ethernet0/1
switchport private-vlan mapping 100 201-202---接口劃入vlan100可以和輔助vlan201-202通信
switchport mode private-vlan promiscuous ---定義混雜端口
Sw#show vlan private-vlan
Primary Secondary Type Ports
------- --------- ----------------- ------------------------------------------
100 201 isolated Et0/0, Et0/1
100 202 community Et0/1
模擬器對於私有VLAN支持的效果不是很好,僅用於命令配置。
歡迎關注和轉發,更多精彩內存下期繼續分享