详解如何调试Cisco Switch Vlan

本篇将介绍如何调试Cisco Switch Vlan。

Vlan的基本调试:

S1#configure terminal
S1(config)#vlan vlan id
S1(config-vlan)#name vlan name
S1(config-vlan)#end

显示当前交换机Vlan状态:

S1#show vlan brief

调试switchport:

S1#configure terminal
S1(config)#interface interface id
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan vlan id
S1(config-if)#end

如何使用show vlan命令:

show vlan [brief | id vlan-id | name vlan-name | summary]
brief: 显示所有vlan名称,状态,和端口。
id: 显示所在vlan的信息。(1-4094)
name: 显示所在vlan的信息。(1字节-32字节)
summary: 总结

show interfaces [interface-id | vlan vlan-id] | switchport
interface-id: 端口。
vlan-id: 1-4094。

如何调试vlan trunking

S1#configure terminal
S1(config)#interface interface id
S1(config-if)#switchport mode trunk
S1(config-if)#switchport trunk native vlan vlan id
S1(config-if)#end