2010年9月19日

VTP LAB實作

VTP協定(VLAN Trunking Protocol):用來傳送和同步VLAN的資訊
vtp mode server
This command is executed in global configuration mode and sets the switch as a VTP Server.
This is the default VTP mode for a new switch with the VTP domain set to NULL
vtp mode client
This command is executed in global configuration mode and sets the switch as a VTP client which learns its VLAN information from the VTP Server in its specified VTP Domain.
vtp domain domainname
This command is executed in global configuration mode and sets the VTP domain of a device.
vtp version X (X=version 1 or version 2)
This command is executed in global configuration mode and sets the VTP Version of the device.
vtp password
This command is executed in global configuration mode and sets the VTP password to prevent unauthorized VTP Servers and/or Clients in a particular VTP Domain.
show vtp password
This command can only be executed in privileged mode and displays the current VTP Password.
show vtp status
This command can be executed from user or privileged mode to view the current VTP configuration such as VTP mode, Domain, Version, Pruning and more.
show vtp counters
This command can be executed from user or privileged mode to view the current VTP advertisement and pruning statistics.
show interface fa1/0 pruning
This command can display VTP pruning state.


Switch 1的設定
SW1>en
SW1#configure t
Enter configuration commands, one per line. End with CNTL/Z.
先設定Trunk port
SW1(config)#int range fa1/0 - 2
SW1(config-if-range)#speed 100
SW1(config-if-range)#duplex full
SW1(config-if-range)#no shutdown
SW1(config-if-range)#switchport mode trunk
SW1(config-if-range)#switchport trunk encapsulation dot1q
SW1(config-if-range)#exit
設定VTP角色與網域
SW1(config)#vtp mode server
Device mode already VTP SERVER.
SW1(config)#vtp domain lucky
Changing VTP domain name from NULL to lucky
SW1(config)#vtp version 2
SW1(config)#exit
建立Vlan資料
SW1#configure t
Enter configuration commands, one per line. End with CNTL/Z.
SW1(config)#vlan 10
SW1(config-vlan)#name aaa
SW1(config-vlan)#vlan 20
SW1(config-vlan)#name bbb
SW1(config-vlan)#vlan 30
SW1(config-vlan)#name ccc
SW1(config-vlan)#vlan 40
SW1(config-vlan)#name ddd
SW1(config)#exit

SW1#show vtp status
VTP Version : 2
Configuration Revision : 5
Maximum VLANs supported locally : 36
Number of existing VLANs : 9
VTP Operating Mode : Server
VTP Domain Name : lucky
VTP Pruning Mode : Disabled
VTP V2 Mode : Enabled
VTP Traps Generation : Disabled
MD5 digest : 0x9D 0xB2 0x9D 0x4C 0xC5 0xCF 0x0B 0xC9
Configuration last modified by 0.0.0.0 at 3-1-02 00:12:37
Local updater ID is 0.0.0.0 (no valid interface found)
SW1#show int trunk

Switch 2的設定
SW2>en
SW2#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW2(config)#int fa1/0
SW2(config-if)#speed 100
SW2(config-if)#duplex full
SW2(config-if)#no shutdown
SW2(config-if)#switchport mode trunk
SW2(config-if)#switchport trunk encapsulation dot1q
SW2(config-if)#exit
SW2(config)#vtp mode client
Setting device to VTP CLIENT mode.
SW2(config)#vtp domain lucky
Changing VTP domain name from NULL to lucky
SW2(config)#exit
SW2#show vtp status
VTP Version : 2
Configuration Revision : 5
Maximum VLANs supported locally : 36
Number of existing VLANs : 9
VTP Operating Mode : Client
VTP Domain Name : lucky
VTP Pruning Mode : Disabled
VTP V2 Mode : Enabled
VTP Traps Generation : Disabled
MD5 digest : 0x9D 0xB2 0x9D 0x4C 0xC5 0xCF 0x0B 0xC9
Configuration last modified by 0.0.0.0 at 3-1-02 00:12:37
查看是否已同步VTP資訊,取得網域中的Vlan資料
SW2#show vlan-switch brief

Switch 3的設定
SW3>en
SW3#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW3(config)#int fa1/0
SW3(config-if)#speed 100
SW3(config-if)#duplex full
SW3(config-if)#no shutdown
SW3(config-if)#switchport mode trunk
SW3(config-if)#switchport trunk encapsulation dot1q
SW3(config-if)#exit
SW3(config)#vtp mode client
Setting device to VTP CLIENT mode.
SW3(config)#vtp domain lucky
Changing VTP domain name from NULL to lucky
SW3(config)#exit

Switch 4的設定
SW4>en
SW4#config t
Enter configuration commands, one per line. End with CNTL/Z.
SW4(config)#int fa1/0
SW4(config-if)#speed 100
SW4(config-if)#duplex full
SW4(config-if)#no shutdown
SW4(config-if)#switchport mode trunk
SW4(config-if)#switchport trunk encapsulation dot1q
SW4(config-if)#exit
SW4(config)#vtp mode client
Setting device to VTP CLIENT mode.
SW4(config)#vtp domain lucky
Changing VTP domain name from NULL to lucky
SW4(config)#exit

0 回應:

Copyright © 2009 New Life in Taipei All rights reserved. Theme by Laptop Geek. | Bloggerized by FalconHive.