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 |
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
Switch#conf t ← configure terminal Switch(conf)# no vlan 10 Switch(config-vlan)#end Switch# Switch#show vlan brief ← Check
Switch(conf)# no interface Vlan10 or Switch(conf)# no interface vlan 10
Swtich# show 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
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
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
Switch(config)# vlan VLAN_NO <- add vlan Switch(config)# interface GigabitEthernet 0/1 Switch(config-if)# switchport trunk allowed vlan add 40,50
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
Switch1(config)# interface port-channel 1 Switch1(config-if)# switchport trunk allowed vlan add 93
Switch1(config)# interface port-channel 1 Switch1(config-if)# switchport trunk allowed vlan remove 93
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#
Host(config) # vlan 10 Host(config) # vlan 20 Host(config) # ip routing Host(config) # interface vlan 10 Host(config-if) # ip address 192.168.10.254 255.255.255.0 Host(config-if) # no shutdown Host(config) # interface vlan 20 Host(config-if) # ip address 192.168.20.254 255.255.255.0 Host(config-if) # no shutdown