当前位置:文档之家› VLAN配置命令列表

VLAN配置命令列表

VLAN配置命令列表

命令 命令功能
configure terminal 进入全局配置模式
vlan vlan-id 创建VLAN命令
name vlan-name 给创建的VLAN添加名称
end 结束配置,退回特权模式
show vlan {name vlan-name | id vlan-id} 查看配置完成的结果
copy running-config startup config 将配置信息保存
no vlan vlan-id 删除已存在的VLAN
interface interface-id 进入指定接口
shutdown 关闭指定接口
no shutdown 开启指定接口
switchport mode access 将接口的模式设为访问模式
switchport access vlan vlan-id 将接口加入指定的VLAN中
switchport mode dynamic desirable 将接口设置为动态主动自适应模式
switchport mode dynamic auto 将接口设置为动态被动自适应模式
switchport mode trunk 将接口设置为干道模式
switchport nonegotiate 将接口设置为不协商模式,关闭DTP协议
switchport trunk encapsulation dot1q 设置接口的干道协议
switchport trunk encapsulation isl 设置接口的干道协议
switchport trunk native vlan vlan-id 设置本征VLAN
vtp mode mode 设置VTP的工作模式
vtp domain domain-name 设置VTP工作的域名
vtp password password 设置VTP的密码
vtp version version-number 设置VTP工作版本,有1和2两个版本
vtp pruning 配置VTP裁剪功能
show vtp status 查看VTP信息
private-vlan primary 设置PVLAN为主VLAN
private-vlan isolated 设置PVLAN为隔离VLAN
private-vlan community 设置PVLAN为共同体VLAN
private-vlan association vlan-id 设置和主VLAN关联的次VLAN信息
switchport private-vlan host-association vlan-id 设置接口和主VLAN和次VLAN的关联
private-vlan mapping vlan-id vlan-id vlan-id… 设置接口和VLAN的映射关联

相关主题
文本预览
相关文档 最新文档