meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
network:switches:cisco:cli:vlan [2024/07/18 12:09] niziaknetwork:switches:cisco:cli:vlan [2024/08/19 12:42] (current) niziak
Line 1: Line 1:
 ====== vlan ====== ====== vlan ======
- 
  
 ===== VLAN ===== ===== VLAN =====
Line 34: Line 33:
 no switchport access vlan no switchport access vlan
 end end
 +</code>
 +
 +==== put one port in VLAN ====
 +
 +<code>
 +conf term
 +interface Gi1/48
 +switchport access vlan 28
 +end
 +wr
 </code> </code>
  
Line 58: Line 67:
 spanning-tree portfast spanning-tree portfast
 </code> </code>
 +
 +==== line protocol DOWN ====
 +
 +<code>
 +sh int vlan 28
 +
 +Vlan28 is up, line protocol is down
 +</code>
 +
 +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. 
 +
 +<code>
 +show spanning-tree vlan 28
 +</code>
 +
 +
 +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:
 +<code>
 +conf term
 +interface Gi0/48
 +switchport access vlan 28
 +end
 +wr
 +</code>
 +
 +Also solution switch all other ports to trunks
 +
 +<code>
 +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)#
 +</code>
 +
 +??? So 48 was already in trunk mode, so it looks that switch needs 2 trunk ports UP to put vlan28 up ?
 +