Práctica
Laboratorio de VLANs paso a paso (Packet Tracer)
Ahora te toca a ti. Arma esta red en Packet Tracer y configúrala tarea por tarea. Intenta cada una antes de abrir la solución.
En pocas palabras
Vas a configurar 2 switches y 1 router: VLANs 10 y 20, trunks con VLAN nativa 999, router-on-a-stick y la VLAN de gestión 99. Al final, PC1 debe hacer ping a PC2 y a PC3.
En esta lección
Topología
Tabla de direcciones
| Equipo | Interfaz | VLAN | Dirección IP | Gateway |
|---|---|---|---|---|
| R1 | G0/0.10 | 10 | 192.168.10.1/24 | — |
| R1 | G0/0.20 | 20 | 192.168.20.1/24 | — |
| R1 | G0/0.99 | 99 | 192.168.99.1/24 | — |
| SW1 | Vlan99 | 99 | 192.168.99.11/24 | 192.168.99.1 |
| SW2 | Vlan99 | 99 | 192.168.99.12/24 | 192.168.99.1 |
| PC1 | SW1 Fa0/1 | 10 | 192.168.10.11/24 | 192.168.10.1 |
| PC2 | SW2 Fa0/1 | 20 | 192.168.20.12/24 | 192.168.20.1 |
| PC3 | SW2 Fa0/2 | 10 | 192.168.10.13/24 | 192.168.10.1 |
VLANs: 10 VENTAS, 20 CONTA, 99 GESTION, 999 NATIVA (sin usuarios).
Tarea 1: crear las VLANs en SW1 y SW2
Ver solución: VLANs (igual en SW1 y SW2)
SW1(config)# vlan 10
SW1(config-vlan)# name VENTAS
SW1(config-vlan)# vlan 20
SW1(config-vlan)# name CONTA
SW1(config-vlan)# vlan 99
SW1(config-vlan)# name GESTION
SW1(config-vlan)# vlan 999
SW1(config-vlan)# name NATIVATarea 2: puertos de acceso
SW1 Fa0/1 → VLAN 10. SW2 Fa0/1 → VLAN 20 y SW2 Fa0/2 → VLAN 10. Desactiva DTP en ellos.
Ver solución: puertos de acceso
SW1(config)# interface fa0/1
SW1(config-if)# switchport mode access
SW1(config-if)# switchport access vlan 10
SW1(config-if)# switchport nonegotiate
SW2(config)# interface fa0/1
SW2(config-if)# switchport mode access
SW2(config-if)# switchport access vlan 20
SW2(config-if)# switchport nonegotiate
SW2(config)# interface fa0/2
SW2(config-if)# switchport mode access
SW2(config-if)# switchport access vlan 10
SW2(config-if)# switchport nonegotiateTarea 3: trunks con VLAN nativa 999
Configura como trunk SW1 G0/1 (hacia R1), SW1 G0/2 y SW2 G0/2. Nativa 999, VLANs permitidas 10, 20, 99 y 999, sin DTP.
Ver solución: trunks
SW1(config)# interface range g0/1 - 2
SW1(config-if-range)# switchport mode trunk
SW1(config-if-range)# switchport trunk native vlan 999
SW1(config-if-range)# switchport trunk allowed vlan 10,20,99,999
SW1(config-if-range)# switchport nonegotiate
SW2(config)# interface g0/2
SW2(config-if)# switchport mode trunk
SW2(config-if)# switchport trunk native vlan 999
SW2(config-if)# switchport trunk allowed vlan 10,20,99,999
SW2(config-if)# switchport nonegotiateTarea 4: router-on-a-stick en R1
Ver solución: R1
R1(config)# interface g0/0
R1(config-if)# no shutdown
R1(config)# interface g0/0.10
R1(config-subif)# encapsulation dot1Q 10
R1(config-subif)# ip address 192.168.10.1 255.255.255.0
R1(config)# interface g0/0.20
R1(config-subif)# encapsulation dot1Q 20
R1(config-subif)# ip address 192.168.20.1 255.255.255.0
R1(config)# interface g0/0.99
R1(config-subif)# encapsulation dot1Q 99
R1(config-subif)# ip address 192.168.99.1 255.255.255.0
R1(config)# interface g0/0.999
R1(config-subif)# encapsulation dot1Q 999 native ← misma nativa que los switchesTarea 5: gestión de los switches
Ver solución: gestión
SW1(config)# interface vlan 99
SW1(config-if)# ip address 192.168.99.11 255.255.255.0
SW1(config-if)# no shutdown
SW1(config)# ip default-gateway 192.168.99.1
SW2(config)# interface vlan 99
SW2(config-if)# ip address 192.168.99.12 255.255.255.0
SW2(config-if)# no shutdown
SW2(config)# ip default-gateway 192.168.99.1Tarea 6: verificar
| Prueba | Resultado esperado | Qué demuestra |
|---|---|---|
| PC1 → ping 192.168.10.13 (PC3) | Éxito | La VLAN 10 cruza el trunk SW1–SW2 |
| PC1 → ping 192.168.20.12 (PC2) | Éxito | R1 enruta entre VLANs |
| PC1 → ping 192.168.99.12 (SW2) | Éxito | Gestión y gateway de SW2 correctos |
show interfaces trunk en SW1 | Gi0/1 y Gi0/2, nativa 999 | Trunks bien formados |
show vlan brief en SW2 | Fa0/1 en 20, Fa0/2 en 10 | Puertos de acceso correctos |
Si algo falla
Sigue el método de la lección de verificación: VLAN existe → puerto → trunk → nativa → capa 3. El primer ping suele fallar mientras se resuelve ARP; repítelo.
Lo que debes recordar
- Crea las mismas VLANs en todos los switches del camino.
- Trunks con la misma VLAN nativa y solo las VLANs necesarias.
- Una subinterfaz por VLAN en el router, incluida la de gestión.
- Verifica con ping y con show vlan brief / show interfaces trunk.
Comprueba lo que aprendiste
4 preguntas al estilo del examen. Algunas tienen una respuesta y otras te piden elegir varias. Responde todas para completar la lección.