¿ Es posible la VLAN 0 en un trunk ?
Fecha: 9 de junio del
2023
Escenario
Este lab analiza los
mensajes LLDP de un switch que reporta tener la VLAN 0 como VLAN nativa en un trunk,
lo cual no es posible ya que los valores de VLAN
van de 1 a 4095.
Entonces se debe determinar si realmente
utilizará esa VLAN y si es posible la conectividad por la misma.
El escenario consta de un switch de core HP5130 y un Cisco SG350, por tal motivo sólo
intercambian mensajes
LLDP, y que son parte de un escenario real mucho
más complejo.
El protocolo de descubrimiento de la capa de
enlace (LLDP) es un protocolo abierto que utilizan los dispositivos
de red para anunciar su identidad y capacidades a
los dispositivos vecinos (adyacencias en layer 2).
1.- Verificación en el
switch de core:
<Core-02>disp lldp nei int gi1/0/8 verbose
LLDP neighbor-information of port 8[GigabitEthernet1/0/8]:
LLDP agent nearest-bridge:
LLDP neighbor index : 1
Update time : 165 days, 22 hours, 16
minutes, 7 seconds
Chassis type : MAC address
Chassis ID : 00af-1fbd-5a4e
Port ID type : Interface name
Port ID : gi10
Time to live : 120
System name : sw13-24
System capabilities supported :
Bridge, Router
System capabilities enabled : Bridge, Router
Port VLAN ID(PVID) : 0 (imposible !)
<Core-02>
2.- Log del core:
%Jun 9 07:43:44:453 2023 Core-02
LLDP/5/LLDP_PVID_INCONSISTENT: PVID mismatch
discovered on GigabitEthernet1/0/8 (PVID 113), with sw13-24 gi10 (PVID 0).
3.- Log del switch vecino:
09-Jun-2023 07:44:12 :%CDP-W-NATIVE_VLAN_MISMATCH: Native VLAN mismatch
detected on interface gi10.
4.- Verificamos el rango de VLANs disponibles en el switch vecino:
sw13-24(config)#vlan ?
database Enter vlan
database mode
prohibit-internal-usage specify
VLANs that cannot be used internally
<2-4094> Specify a list of VLAN tags
sw13-24(config)#
5.- Verificamos el LLDP en
el switch:
5.1.- Anuncios LLDP del
Puerto:
sw13-24#sh lldp
local gi10
Device ID: 00:af:1f:bd:5a:4e
Port ID: gi10
Capabilities: Bridge, Router
System Name: sw13-24
802.1 PVID: 0
802.1 PPVID:
802.1 VLAN:
802.1 Protocol:
sw13-24#
5.2.- Captura de trama LLDP
del puerto:
Frame 1: 60 bytes on wire
(480 bits), 60 bytes captured (480 bits) on interface
Ethernet II, Src: 00:af:1f:bd:5a:4e, Dst: 01:80:c2:00:00:0e (multicast LLDP)
Link Layer Discovery Protocol
Chassis Subtype = MAC address,
Id: 00:af:1f:bd:5a:4e
Port Subtype = Interface name,
Id: gi10
Time To Live = 120 sec
Capabilities
IEEE - Port VLAN ID
1111 111. .... .... = TLV
Type: Organization Specific (127)
.... ...0 0000 0110 = TLV
Length: 6
Organization Unique Code:
00:80:c2 (IEEE)
IEEE 802.1 Subtype: Port
VLAN ID (0x00)
Port VLAN Identifier: 0 (0x0000)
End of LLDPDU
5.3.- Vecinos LLDP:
sw13-24#sh lldp
nei
System capability legend:
B - Bridge; R - Router; W - Wlan Access Point;
T - telephone;
D - DOCSIS Cable Device; H - Host; r - Repeater;
TP - Two Ports MAC Relay; S - S-VLAN; C - C-VLAN; O - Other
Port Device ID Port ID System Name Capabilities TTL
-----------------------------------------------------------------------------------------------------
gi10 2c:23:3a:f1:a7:97 GigabitEthern
Core02 B, R, C 115
et1/0/8
sw13-24#
6.- Verificamos la
configuración del puerto:
sw13-24#sh runn int gi10
interface gigabitethernet10
spanning-tree link-type
point-to-point
switchport mode trunk
switchport trunk allowed vlan remove
1 (vemos que no tiene la VLAN
1 como VLAN de datos)
macro description switch
!next command is internal.
macro auto smartport
dynamic_type switch (tiene
la autoconfiguración activada)
!
sw13-24#
Una macro smartport es una
secuencia de comandos configurada en una interfaz para aplicar una
configuración determinada.
El campo detección automática (auto dynamic_type) de dispositivos de smartport,
puede detectar el tipo de dispositivo.
Las opciones disponibles son:
Host: cualquier ordenador de usuario o portátil
con capacidad LLDP.
Teléfono IP: Teléfono IP compatible con CDP o
LLDP.
Teléfono IP + escritorio: teléfono IP o teléfono
IP basado en software instalado en el escritorio.
Switch: switches
habilitados para CDP o LLDP.
Router: Dispositivo de
capas 3 con CDP o LLDP activado.
Punto de acceso inalámbrico: puntos de acceso
inalámbricos de capa 2 o capa 3 con capacidad CDP o LLDP.
7.- Default Configuration del macro smartport
switch:
The default value of parameter $native_vlan of
the built-in Smartport macros is 1.
For other parameters, the default value is the parameter’s default value.
For instance, if the parameter is the native VLAN, the default value is
the default native VLAN.
Port becomes trunk with all vlans allowed.
Fuente: www.cisco.com
8.- Proceso de
autoconfiguración del puerto:
9.- Corrección de la
autoconfiguración de puerto:
sw13-24#conf t
sw13-24(config)#interface
gigabitethernet10
sw13-24(config-if)#no macro
auto smartport
sw13-24(config-if)#no macro description
sw13-24(config-if)#switchport mode trunk (se debe Volver a reconfigurar el
puerto)
sw13-24(config-if)#switchport
trunk native vlan 13
sw13-24(config-if)#switchport
trunk allowed vlan remove 1
sw13-24(config-if)#end
sw13-24#
10.- Modificación en el
Puerto del switch:
[Core-02]interface
GigabitEthernet1/0/8
[Core-02-GigabitEthernet1/0/8]port
trunk pvid vlan 13
[Core-02-GigabitEthernet1/0/8]quit
[Core-02]
11.- Verificación:
[Core-02]disp lldp nei int gi1/0/8 verbose
LLDP neighbor-information of port 8[GigabitEthernet1/0/8]:
LLDP agent nearest-bridge:
LLDP neighbor index : 1
Update time : 1 days, 21 hours, 8 minutes,
23 seconds
Chassis type : MAC address
Chassis ID : 00af-1fbd-5a4e
Port ID type : Interface name
Port ID : gi10
Time to live : 120
System name : sw13-24
System capabilities supported :
Bridge, Router
System capabilities enabled : Bridge, Router
Port VLAN ID(PVID) : 13
[Core-02-GigabitEthernet1/0/8]
12.- Resumen:
Se determina que el switch al enviar mensajes
LLDP por el puerto autoconfigurado en trunk mediante smartport,
no puede hacerlo por la VLAN nativa 1, que es
la VLAN por default, ya que dicha VLAN no está permitida en el
trunk, lo que lleva a anunciar LLDP con el valor 0 en el campo
de VLAN nativa.
Esto no quiere decir que sea posible tener
conectividad en el enlace entre ambos switches por dicha VLAN.
Se desactivó el modo smartport
del puerto para tener un control manual del mismo.
El enlace queda como trunk
con la VLAN 13 (nativa/untagged/pvid)
solamente, pero permite agregar más VLANs
(etiquetadas/tagged) en
el futuro sin generar cortes o microcortes debido al
cambio de modo del puerto.
Una trama 802.1q etiquetada (tagged)
con la VLAN 0 no es lo mismo que una trama sin etiquetar (untagged),
ya
que existen otros campos en la etiqueta.
(2023) Trunk drunk
Rosario, Argentina