スイッチより多くの時間は、各スイッチのVLANを維持すると、それは非常に面倒、とコンテナエラーです。
手動で1つのスイッチだけをVLAN維持し、その後、他のVLAN VLANは自動的にその設定を取得するために同期が、同期していない各スイッチインターフェイスで分割されてする方法があります。
シスコ独自のVTPプロトコルは、上記の要件を満たすことができます。
VLANトランクインターフェイスは、だけで渡すことができます
VTPプロトコル要素
実験:サーバーは、CLIENT1と透明VLANに同期されます
図1に示すように、提供されるトランクインターフェイス
サーバー:E0 / 0およびE0 / 1インターフェイストランクインターフェイスに提供
複数のインターフェースを変更します。int RAN E0 / 0-1
server(config)#int ran e0/0-1
server(config-if-range)#switchport trunk encapsulation dot1q
server(config-if-range)#sw mo trunk
CLIENT1:E0 / 0インターフェイスにトランクインターフェイスに提供
client1(config)#int e0/0
client1(config-if)#sw trunk encapsulation dot1q
client1(config-if)#sw mode tr
E0 / 0インターフェイスにトランクインターフェイス提供:透明
transparent(config)#int e0/0
transparent(config-if)#sw tr en dot1q
transparent(config-if)#sw mo tr
図2に示すように、スイッチモードに割り当てられたVTP
ビューVTP statusコマンド:
server#show vtp status
VTP Version capable : 1 to 3
VTP version running : 1
VTP Domain Name :
VTP Pruning Mode : Disabled
VTP Traps Generation : Disabled
Device ID : aabb.cc80.0100
Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00
Local updater ID is 0.0.0.0 (no valid interface found)
Feature VLAN:
--------------
VTP Operating Mode : Server
Maximum VLANs supported locally : 1005
Number of existing VLANs : 5
Configuration Revision : 0
MD5 digest : 0x57 0xCD 0x40 0x65 0x63 0x59 0x47 0xBD
0x56 0x9D 0x4A 0x3E 0xA5 0x69 0x35 0xBC
- VTP動作モード:サーバーは、デフォルトのサーバーモードを切り替えることです
モードスイッチCLIENT1クライアントを変更します。
client1(config)#vtp mode client
client1(config)#exit
client1#show vtp statu
Feature VLAN:
--------------
VTP Operating Mode : Client
透明透明モードスイッチを変更します。
transparent(config)#vtp mode transparent
Setting device to VTP Transparent mode for VLANS.
transparent#show vtp status
Feature VLAN:
--------------
VTP Operating Mode : Transparent
あなたが他の二つのスイッチに同期することができるかどうか、VLANを構築するためのサーバーでは、我々は何の同期が見つかりませんでした。
しかし、一つの重要な変更があります:
既存のVLANの数:5から6になり
コンフィギュレーションリビジョン:0から1に変更
コンフィギュレーションリビジョンは非常に重要です。サーバーの変更は、元のVLAN情報のみをクライアントまたは他のサーバが、何のオプション行い、大型のコンフィギュレーションリビジョン番号から得ることができた場合、誰を選択します。変更、作成する場合は、削除VLANの設定リビジョンが増加します。
server(config)#vlan 10
server(config-vlan)#exit
server(config)#exit
server#show vlan b
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Et0/2, Et0/3, Et1/0, Et1/1
Et1/2, Et1/3, Et2/0, Et2/1
Et2/2, Et2/3, Et3/0, Et3/1
Et3/2, Et3/3
10 VLAN0010 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
server#show vtp status
VTP Version capable : 1 to 3
VTP version running : 1
VTP Domain Name :
VTP Pruning Mode : Disabled
VTP Traps Generation : Disabled
Device ID : aabb.cc80.0100
Configuration last modified by 0.0.0.0 at 1-17-20 14:45:41
Local updater ID is 0.0.0.0 (no valid interface found)
Feature VLAN:
--------------
VTP Operating Mode : Server
Maximum VLANs supported locally : 1005
Number of existing VLANs : 6
Configuration Revision : 1
MD5 digest : 0xB1 0xBE 0x72 0x49 0x96 0x6D 0x99 0xA4
0xB4 0xDC 0x94 0x56 0xD4 0xC2 0x6A 0xBB
なぜそれを同期しませんか?VTPドメイン名(ドメイン名)のサーバとして設定されていません。
3,配置server的VTP Domain Name,一旦配置了VTP Domain Name,server会马上发送自己的域名和vlan信息给所有没有域名的交换机的trunk接口,client接到了server的域名和vlan信息后,更新自己的域名和vlan。
server:每5分钟发送一次vtp。
server(config)#vtp domain d1
Changing VTP domain name from NULL to d1
server#show vtp status
VTP Version capable : 1 to 3
VTP version running : 1
VTP Domain Name : d1
VTP Pruning Mode : Disabled
VTP Traps Generation : Disabled
Device ID : aabb.cc80.0100
Configuration last modified by 0.0.0.0 at 1-17-20 14:45:41
Local updater ID is 0.0.0.0 (no valid interface found)
Feature VLAN:
--------------
VTP Operating Mode : Server
Maximum VLANs supported locally : 1005
Number of existing VLANs : 6
Configuration Revision : 1
MD5 digest : 0x28 0x95 0x36 0xD6 0xB7 0x58 0xC1 0xA0
0xCF 0xFB 0xBC 0xF1 0xB0 0x2B 0x7F 0xAA
client:从server获得了域名和vlan10,而且Configuration Revision也和server相同。
client1#show vtp status
VTP Version capable : 1 to 3
VTP version running : 1
VTP Domain Name : d1
VTP Pruning Mode : Disabled
VTP Traps Generation : Disabled
Device ID : aabb.cc80.0200
Configuration last modified by 0.0.0.0 at 1-17-20 14:45:41
Feature VLAN:
--------------
VTP Operating Mode : Client
Maximum VLANs supported locally : 1005
Number of existing VLANs : 6
Configuration Revision : 1
MD5 digest : 0x28 0x95 0x36 0xD6 0xB7 0x58 0xC1 0xA0
0xCF 0xFB 0xBC 0xF1 0xB0 0x2B 0x7F 0xAA
client1#show vlan b
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Et0/1, Et0/2, Et0/3, Et1/0
Et1/1, Et1/2, Et1/3, Et2/0
Et2/1, Et2/2, Et2/3, Et3/0
Et3/1, Et3/2, Et3/3
10 VLAN0010 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
transport:完全不同步server的vlan,只是把server的vlan信息,传递出去。
4,再加一台交换机server2,模式是server,设置e0/0为trunk接口,并在的server1上,添加一个vlan 20,server2马上就获得了,server1的vtp信息。
server#conf t
Enter configuration commands, one per line. End with CNTL/Z.
server(config)#vlan 20
server2#show vtp status
VTP Version capable : 1 to 3
VTP version running : 1
VTP Domain Name : d1
VTP Pruning Mode : Disabled
VTP Traps Generation : Disabled
Device ID : aabb.cc80.0400
Configuration last modified by 0.0.0.0 at 1-17-20 15:20:26
Local updater ID is 0.0.0.0 (no valid interface found)
Feature VLAN:
--------------
VTP Operating Mode : Server
Maximum VLANs supported locally : 1005
Number of existing VLANs : 7
Configuration Revision : 4
MD5 digest : 0x89 0x21 0x61 0xDD 0x49 0xED 0x7D 0x89
0x67 0x72 0x75 0xFB 0xDA 0x3A 0x42 0x3E
server2#show vlan b
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Et0/1, Et0/2, Et0/3, Et1/0
Et1/1, Et1/2, Et1/3, Et2/0
Et2/1, Et2/2, Et2/3, Et3/0
Et3/1, Et3/2, Et3/3
10 VLAN0010 active
20 VLAN0020 active
1002 fddi-default act/unsup
1003 token-ring-default act/unsup
1004 fddinet-default act/unsup
1005 trnet-default act/unsup
在server2上,删除vlan20后,server1和client上的vlan20,也被删除了。
设置server的密码
由于有可能多个server,防止某一个人,不知道这台交换机是server,随意修改了一些vlan,导致传播到了所有client和server。所以把server和client的密码设置成一样的;server2不设置密码,然后在server上添加vlan30,发现只同步到了client,而没有同步到server2.原因是server2的密码和它们不同。
结论:只用域名同,密码同,才能够同步。
server(config)#vtp password 123
Setting device VTP password to 123
查看server的密码:
server#show vtp password
VTP Password: 123
client模式:
一旦断电,vlan信息就没了,开机重新同步;server和transparent断电可以保留vlan信息。
不可以在模式为client的交换机下,创建,删除vlan
client1(config)#vlan 30 VTP VLAN configuration not allowed when device is in CLIENT mode.
client也可以传递vtp。client1可以把vtp传递给client2.