meta data for this page
  •  

This is an old revision of the document!


vlan

VLAN

enable
show vlan
configure terminal

! delete vlan 7
no vlan 7

! add tagged vlan 28
vlan 28
name admin
end

show vlan

configure terminal
interface range Gi0/1-28
switchport trunk encapsulation dot1q
switchport trunk native vlan 1
switchport trunk allowed vlan add 28,255
no shut
end
configure terminal
interface range Gi0/1-28
! to remove all ports from VLAN:
no switchport access vlan
end

set trunk port

configure terminal
interface Gi1/47
switchport mode trunk
no switchport nonegotiate
end
wr

set access (end user) ports

Note: taggeg vlans will be available on ports!

configure terminal
interface range Gi1/1-46
switchport trunk encapsulation dot1q
switchport mode access
switchport nonegotiate
spanning-tree portfast

line protocol DOWN

Vlan28 is up, line protocol is down

The VLAN interfaces have to fulfill the following general conditions to be up/up:

  • VLAN exists and is in active status on the switch VLAN database.
  • VLAN interface exists and is not administratively down.
  • At least one L2 (access port or trunk) port exists and has a link up on this VLAN.
show spanning-tree vlan 28

If you don't have any access ports in the VLAN, and you are not trunking the VLAN across at least two trunk ports then the switch has no possible place it could forward the tagged packets to. Consequently it can shut it down.