交换技术之八-Advanced Configurations of the Catalyst 5000 Switch
www.net130.com 日期:2005-8-31 浏览次数:
作者:红头发(原作者)、net130整理 出处:bbs.net130.com
Management Domains
管理域(或VTP domain)是一组在处于相同管理之下的交换机的集合,在VTP domain里,VTP在trunk line上发送VTP更新(update).处于同一个VTP domain里的交换机才能交换VTP更新.所以在同一个VTP domain里的交换机的VTP域名要设置成一样的
VTP域名是大小写敏感的,使用set domain name命令进行设置,如下:
console> (enable) set vtp domain [name]
例子如下图:
Switch_A> (enable) set vtp domain ACC
VTP domain ACC modified
Switch_A> (enable)
在A上设置VTP域名为ACC,在B上无须设置,因为B是通过trunk line直连到A,会自动加到AAC的管理范围(但是这个方法不推荐,推荐在B上进行手动设置VTP域名)
设置VTP的工作模式,使用set vtp mode命令,默认是server模式.如下:
Switch_A> (enable) set vtp mode [mode]
例子:
Switch_A> (enable) set vtp mode client
VTP domain ACC modified
Switch_A> (enable) set vlan 30
Cannot add/modify VLANs on a VTP client.
Switch_A> (enable)
由于把VLAN 30设置为了client模式,添加新的VLAN将收到错误提示 net130整理
Configuring Secure Management Domains
如果你不想把直连的新的交换机自动加到某个VTP域的管理范围内,就可以设置VTP域的密码(password).把VTP域设置一个密码,上述情况就不会发生,设置密码的时候要注意,所有在同一个VTP域里的交换机上的密码要设置成一样的.设置命令,只需要在set vtp domain [name]后加上passwd [password]就可以了,刚才的例子,如下:
Switch_A> (enable) set vtp domain ACC passwd TobaccoRoad
Generating MD5 secret for the password ....
VTP domain ACC modified
Switch_A> (enable)
Switch_B> (enable) set vtp domain ACC passwd TobaccoRoad
Generating MD5 secret for the password ....
VTP domain ACC modified
Switch_B> (enable)
Configuring VTP Version 2
默认Catalyst上是没有启用版本2的.在启用之前要先看下你的交换机是否全部支持VTP版本2.设置VTP版本2,使用set vtp v2 enable命令,如下:
Switch_A> (enable) set vtp v2 enable
This command will enable the version 2 function in the entire management domain.
All devices in the management domain should be version2-capable before enabling.
Do you want to continue (y/n) [n]? y
VTP domain ACC modified
Switch_A> (enable)
Configuring VTP Pruning
VTP pruning默认是没有启用的,如果在一个VTP域里启用了VTP pruning,整个VTP域里的交换机都自动进行VTP pruning,即无须在第二台交换机上进行设置VTP pruning.命令如下: net130整理
console> (enable) set vtp pruning enable
例子:
Switch_A> (enable) set vtp pruning enable
This command will enable the pruning function in the entire
management domain.
All devices in the management domain should be pruning-capable before enabling.
Do you want to continue (y/n) [n]? y
VTP domain ACC modified
Switch_A> (enable)
要注意的是VTP版本1不支持VTP pruning