VLAN间路由的配置实现( 三 )


M Menus
K Command Line
I IP Configuration
Enter Selection:K
CLI session with the switch is open.
To end the CLI session,enter Exit.
>enable
# config t
Enter configuration commands,one per line. End with CNTL/Z
(config)# hostname 1900EN
1900EN(config)#
(2)配置VTP有关参数,在全局配置模式下使用以下命令 。
vtp server | transparent | client domain domain-name trap enable | disable password password pruningenable | disable
例如,假如将交换机配置为VTP Server,则VTP的治理域为qdnfh 。
1900EN(config)# vtp server
1900EN(config)# vtp domain qdnfh
在特权EXEC模式下,可以使用“Show VTP”察看VTP状态 。
(3)建立VLAN及配置有关参数,在全局配置模式下使用以下命令 。
vlan vlan name vlan-name sde said-value state operational | suspended mtu mtu-size ethernet | fddi | tokenring ring-number ring-no parent-vlan parent-vlan | fddi-net | tr-net bridge-number bridge-number stp-type ibm | ieee tlb-1 vlan1 tlb-2 vlan2
假如是建立3个VLAN,则步骤依次为:
①1900EN(config)# vlan 2 name engineering
②1900EN(config)# vlan 3 name marketing
③1900EN(config)# vlan 4 name accounting
在特权EXEC模式下,可以使用“Show VLAN”察看VLAN状态 。
(4)使用如下接口命令将端口分配给特定VLAN 。
vlan-membership static vlan
假如将端口2分配给VLAN2、端口4分配给VLAN3、端口5分配给VLAN4,则步骤如下:
1900EN(config-if)# int e0/2
1900EN(config-if)# vlan-membership static 2
1900EN(config-if)# int e0/4
1900EN(config-if)# vlan-membership static 3
1900EN(config-if)# int e0/5
1900EN(config-if)# vlan-membership static 4
(5)配置Trunk端口 。
在1900系列上,只有FastEthernet上支持Dynamic Inter-Switch Link(DISL) 。在FastEthernet端口状态下,可使用如下接口命令将其配置为Trunk端口 。

推荐阅读