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

put one port in VLAN

conf term
interface Gi1/48
switchport access vlan 28
end
wr

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

sh int vlan 28

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.

Solution - add VLAN 28 to one of “up” interfaces, i.e. uplink interface:

conf term
interface Gi0/48
switchport access vlan 28
end
wr

Also solution switch all other ports to trunks

C3560G-2(config)#int
C3560G-2(config)#interface r
C3560G-2(config)#interface range Gi0/1-47
C3560G-2(config-if-range)#swi
C3560G-2(config-if-range)#switchport mode trunk
C3560G-2(config-if-range)#

??? So 48 was already in trunk mode, so it looks that switch needs 2 trunk ports UP to put vlan28 up ?