cmdref.net - Cheat Sheet and Example

cmdref.net is command references/cheat sheets/examples for system engineers.

User Tools

Site Tools


Sidebar








Etc


Reference














.

hardware:cisco:vlan.html



Cisco VLAN Configuration Examples

Show

Operation Command
To display VLAN information switch# show vlan
switch# show vlan brief ← Displays only a single line
Display Trunk switch(config)# show interfaces trunk
Check Port's Trunk switch(config)# show interfaces PORT trunk
switch(config)# show interfaces fa0/11 trunk



Createing VLAN

Switch#conf t                        ← configure terminal
Switch(conf)#vlan 10                 ← make VLAN 10
Switch(config-vlan)#name VLAN10      ← "vlan 10"'s Name is VLAN10.
Switch(config-vlan)#end
Switch#
Switch#show vlan brief              ← Check


Deleteing VLAN

Switch#conf t                        ← configure terminal
Switch(conf)# no vlan 10
Switch(config-vlan)#end
Switch#
Switch#show vlan brief              ← Check


Access Port (1 VLAN)

Add VLAN to interface port.

Switch#conf t
Switch(config)#interface fa0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10
Switch(config-if)#end
Switch#
Switch#show vlan brief              ← Check


Trunk Port (Multiple VLAN)

Switch# configure terminal
Switch(config)#
Switch(config)# interface fa0/8
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport nonegotiate
Switch(config-if)# end
Switch#
Switch# show interfaces trunk

Permit VLAN

Switch(config)# interface GigabitEthernet 0/1
Switch(config-if)# switchport trunk allowed vlan vlan 10,20,30

#Example VLAN_NO
vlan 1-3
vlan 10,20,30
vlan 1-3,10

Add VLAN

Switch(config)# vlan VLAN_NO   <- add vlan

Switch(config)# interface GigabitEthernet 0/1
Switch(config-if)# switchport trunk allowed vlan add 40,50

Delete VLAN

Switch(config)# interface GigabitEthernet 0/1
Switch(config-if)# switchport trunk allowed vlan remove VLAN_NO

#Example
Switch(config-if)# switchport trunk allowed vlan remove 15,16


Magagement IP adresss to VLAN interface

Switch#
Switch#conf t
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.1.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#exit
Switch(config)#exit
Switch#

SVI(Switch Virtual Interface)




hardware/cisco/vlan.html.txt · Last modified: 2019/06/08 by admin

Page Tools