您的位置:首页 > 其它

cisco 2900系列 VLAN 配置

2010-03-20 21:31 876 查看
2900XL VLAN config

--------------------------------------------------------------------------------

Switch# vlan database
Switch(vlan)# vtp domain domain-name

Switch(vlan)# vtp domain domain-name password password-value

Switch(vlan)# vtp server

Switch(vlan)# show vtp status

若想Disable VTP,只须将VTP模式改为transparent

即Switch(vlan)# vtp transparent

2. 激活VTP V2(交换机默认的是VTP V1)。

Switch# vlan database

Switch(vlan)# vtp v2-mode

Switch# show vtp status

3. 增加VLAN。Catalyst 2900XL系列交换机最大支持64个激活的VLAN,

VLAN ID 号从1-1005。

Switch# vlan database

Switch(vlan)# vlan vlan-id name vlan-name

Switch# show vlan name vlan-name

Switch(vlan)# no vlan vlan-id //删除VLAN

4. 将端口加入VLAN。

Switch# configure terminal

Switch(config)# interface interface

Switch(config-if)# switchport mode access

Switch(config-if)# switchport access vlan vlan-id

Switch(config-if)# show interface interface-id switchport

5. 配置trunk 端口。

Switch# configure terminal

Switch(config)# interface interface

Switch(config-if)# switchport mode trunk

Switch(config-if)# switchport trunk encapsulation isl

Switch(config-if)# end

Switch# show interface interface switchport

Switch# copy running-config startup-config

6. 配置trunk 上允许的VLAN。

Switch(config)# interface interface

Switch(config-if)# switchport mode trunk

Switch(config-if)# switchport trunk allowed vlan remove vlan-id-range

Switch(config-if)# switchport trunk allowed vlan add vlan-id-range

Switch(config-if)# end

Switch# show interface interface switchport allowed-vlan

若想取消trunk端口,只需

Switch(config-if)# no switchport mode

7. 使用STP实现负载。

实现负载分担有两种方法:

1) 使用端口优先级。

配置:

Switch_1(config-if)# interface fa0/1

Switch_1(config-if)# spanning-tree vlan 8 9 10 port-priority 10

Switch_1(config)# interface fa0/2

Switch_1(config-if)# spanning-tree vlan 3 4 5 6 port-priority 10

2) 使用路径值。例如:

Switch_1(config)# interface fa0/1

Switch_1(config-if)# spanning-tree vlan 2 3 4 cost 30

Switch_1(config)# interface fa0/2

Switch_1(config-if)# spanning-tree vlan 8 9 10 cost 30

注:VTP(VLAN Trunking Protocol):是VLAN中继协议,也被称为虚拟局域网干道协议。

 它是一个OSI参考模型第二层的通信协议,主要用于管理在同一个域的网络范围内VLANs的建立、删除和重命名。在一台VTP Server 上配置一个新的VLAN时,该VLAN的配置信息将自动传播到本域内的其他所有交换机。这些交换机会自动地接收这些配置信息,使其VLAN的配置与VTP Server保持一致,从而减少在多台设备上配置同一个VLAN信息的工作量,而且保持了VLAN配置的统一性。

  VTP通过网络(ISL帧或cisco私有DTP帧)保持VLAN配置统一性。VTP在系统级管理增加,删除,调整的VLAN,自动地将信息向网络中其它的交换机广播。此外,VTP减小了那些可能导致安全问题的配置。便于管理,只要在vtp server做相应设置,vtp client会自动学习vtp server上的vlan信息

  * 当使用多重名字VLAN能变成交叉--连接。

  * 当它们是错误地映射在一个和其它局域网,VLAN能变成内部断开。

  VTP有三种工作模式:VTP Server、VTP Client 和 VTP Transparent。 一般,一个VTP域内的整个网络只设一个VTP Server。VTP Server维护该VTP域中所有VLAN 信息列表,VTP Server可以建立、删除或修改VLAN。VTP Client虽然也维护所有VLAN信息列表,但其VLAN的配置信息是从VTP Server学到的,VTP Client不能建立、删除或修改VLAN。VTP Transparent相当于是一上独立的交换机,它不参与VTP工作,不从VTP Server学习VLAN的配置信息,而只拥有本设备上自己维护的VLAN信息。VTP Transparent可以建立、删除和修改本机上的 VLAN信息。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: