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 associationvlan-id
設置和主VLAN關聯的次VLAN信息
switchport private-vlan host-association vlan-id
設置接口和主VLAN和次VLAN的關聯
private-vlan mapping vlan-id vlan-id vlan-id…
設置接口和VLAN的映射關聯
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章