Cheat Sheet (Referencia Técnica)
Tipos de VLAN
Section titled “Tipos de VLAN”| VLAN | Descripción |
|---|---|
| Por defecto | VLAN 1, no se puede borrar ni renombrar |
| Datos | Tráfico de usuarios |
| Gestión | Administración (SSH, telnet) |
| Nativa | En trunk, tramas sin etiqueta (default VLAN 1) |
| Voz | Teléfonos IP (QoS) |
802.1Q: etiqueta de 4 bytes; VID de 12 bits → hasta 4094 VLANs.
Configuración de VLANs
Section titled “Configuración de VLANs”vlan 10name Ventasvlan 20name Systemsvlan 99name Administrative
interface range f0/1 - 12switchport mode accessswitchport access vlan 10
interface range f0/1 - 24switchport mode accessswitchport access vlan 10
interface range g0/1 - 2switchport mode trunkswitchport trunk native vlan 99switchport trunk allowed vlan 10,20,99VLAN de voz
Section titled “VLAN de voz”interface GigabitEthernet0/3 switchport mode access switchport access vlan 10 switchport voice vlan 100Direccionamiento del switch (SVI)
Section titled “Direccionamiento del switch (SVI)”interface vlan 1# ip add sw maskip address 192.168.10.1 255.255.255.0no shutdownexit
# Switch capa 2 (sin ip routing): gateway obligatorioip default-gateway 192.168.99.2
# Switch multicapa: habilita enrutar entre VLANsip routing
do copy running-config startup-configinterface vlan 10# ip add sw maskip address 192.168.10.1 255.255.255.0no shutdown
interface vlan 99ip address 192.168.99.1 255.255.255.0no shutdownexit
# Switch capa 2 (sin ip routing): gateway obligatorioip default-gateway 192.168.99.2
# Switch multicapa: habilita enrutar entre VLANsip routing
do copy running-config startup-configDireccionamiento del router (interfaz física)
Section titled “Direccionamiento del router (interfaz física)”int g0/1# ip add gw maskip address 192.168.10.1 255.255.255.0no shutdown
int s0/0/0ip address 192.168.20.1 255.255.255.252no shutdownSubinterfaces (Router-on-a-Stick)
Section titled “Subinterfaces (Router-on-a-Stick)”interface g0/1no shutdown
interface g0/1.10encapsulation dot1q 10# ip address GW maskip address 192.168.10.1 255.255.255.0
interface g0/1.20encapsulation dot1q 20ip address 192.168.20.1 255.255.255.0exit
# VLAN nativainterface g0/1ip address 192.168.99.1 255.255.255.0Del lado del switch, hacia el router: puerto trunk con las VLANs permitidas.
Verificación switching / direccionamiento
Section titled “Verificación switching / direccionamiento”show vlan briefshow interfaces trunkshow ip interface brief# routershow vlans