Ejercicio: Routing entre Redes
graph TD
PCV1[PC Ventas A<br/>192.168.0.10] --- SW1
PCS1[PC Sistemas A<br/>192.168.1.10] --- SW1
SW1[SW1<br/>192.168.4.2] ---|trunk<br/>g0/1| R1[192.168.4.1<br/><b>R1</b><br/>192.168.4.17]
R1 ---|"OSPF<br/>s0/0/0"| R2[192.168.4.18<br/><b>R2 - Redistribución</b><br/>192.168.4.21]
R2 ---|"EIGRP<br/>s0/0/1"| R3[192.168.4.22<br/><b>R3</b><br/>192.168.4.9]
R3 ---|trunk<br/>g0/1| SW4[192.168.4.10<br/>SW4]
SW4 --- PCV2[PC Ventas B<br/>192.168.2.10]
SW4 --- PCS2[PC Sistemas B<br/>192.168.3.10]
Objetivos
Section titled “Objetivos”- Configurar VLANs, trunks y router-on-a-stick en los dos edificios.
- Enrutar el edificio A con OSPF (R1-R2) y el edificio B con EIGRP (R3-R4).
- Redistribuir rutas entre OSPF y EIGRP en R2.
- Verificar que una PC de un edificio llega a la otra punta de la red.
Plan de direccionamiento
Section titled “Plan de direccionamiento”| Name | Address | Prefix | Mask |
|---|---|---|---|
| Ventas A | 192.168.0.0 | 24 | 255.0 |
| Sistemas A | 192.168.1.0 | 24 | 255.0 |
| Ventas B | 192.168.2.0 | 24 | 255.0 |
| Sistemas B | 192.168.3.0 | 24 | 255.0 |
| Administrative | 192.168.4.0 | 29 | 0.248 |
| Administrative | 192.168.4.8 | 29 | 0.248 |
| Wan1 | 192.168.4.16 | 30 | 0.252 |
| Wan2 | 192.168.4.20 | 30 | 0.252 |
1. VLANs y SVI en SW1
Section titled “1. VLANs y SVI en SW1”SW1(config)# vlan 10SW1(config-vlan)# name VentasSW1(config-vlan)# vlan 20SW1(config-vlan)# name SistemasSW1(config-vlan)# vlan 99SW1(config-vlan)# name AdministracionSW1(config-vlan)# exit
SW1(config)# interface range f0/1 - 6SW1(config-if)# switchport mode accessSW1(config-if)# switchport access vlan 10SW1(config-if)# exit
SW1(config)# interface range f0/7 - 8SW1(config-if)# switchport mode accessSW1(config-if)# switchport access vlan 20SW1(config-if)# exit
SW1(config)# interface range g0/1 - 2SW1(config-if)# switchport mode trunkSW1(config-if)# switchport trunk native vlan 99SW1(config-if)# switchport trunk allowed vlan 10,20,99SW1(config-if)# no shutdownSW1(config-if)# exit
SW1(config)# interface vlan 99SW1(config-if)# ip address 192.168.4.2 255.255.255.248SW1(config-if)# no shutdownSW1(config-if)# exit
SW1(config)# ip default-gateway 192.168.4.12. Trunk y subinterfaces en R1
Section titled “2. Trunk y subinterfaces en R1”R1(config)# int g0/1R1(config-if)# no shutdown
R1(config-if)# interface g0/1.10R1(config-subif)# encapsulation dot1q 10R1(config-subif)# ip address 192.168.0.1 255.255.255.0R1(config-subif)# exit
R1(config)# interface g0/1.20R1(config-subif)# encapsulation dot1q 20R1(config-subif)# ip address 192.168.1.1 255.255.255.0R1(config-subif)# exit
# VLAN 99 (nativa)R1(config)# int g0/1.99R1(config-if)# ip address 192.168.4.1 255.255.255.248Repite los pasos 1 y 2 en el Edificio B con SW4 y R3.
3. Enlaces seriales
Section titled “3. Enlaces seriales”Levanta los enlaces punto a punto Wan1 (R1-R2) y Wan2 (R2-R3):
# Wan1 R1-R2R1(config)# interface Serial0/0/0R1(config-if)# ip address 192.168.4.17 255.255.255.252R1(config-if)# no shutdown
R2(config)# interface Serial0/0/0R2(config-if)# ip address 192.168.4.18 255.255.255.252R2(config-if)# no shutdown
# Wan2 R2-R3R2(config)# interface Serial0/0/1R2(config-if)# ip address 192.168.4.21 255.255.255.252R2(config-if)# no shutdown
R3(config)# interface Serial0/0/0R3(config-if)# ip address 192.168.4.22 255.255.255.252R3(config-if)# no shutdown4. OSPF en R1 y R2 (dominio del edificio A)
Section titled “4. OSPF en R1 y R2 (dominio del edificio A)”R1 anuncia sus VLANs; R2 adyacente por Serial0/0/0:
R1(config)# router ospf 1R1(config-router)# router-id 1.1.1.1R1(config-router)# passive-interface defaultR1(config-router)# no passive-interface Serial0/0/0R1(config-router)# exitR1(config)# interface Serial0/0/0R1(config-if)# ip ospf 1 area 0R1(config-if)# exitR1(config)# interface GigabitEthernet0/0.10R1(config-subif)# ip ospf 1 area 0R1(config)# interface GigabitEthernet0/0.20R1(config-subif)# ip ospf 1 area 0R1(config)# interface GigabitEthernet0/0R1(config-if)# ip ospf 1 area 0R1(config-if)# exit
R2(config)# router ospf 1R2(config-router)# router-id 2.2.2.2R2(config-router)# passive-interface defaultR2(config-router)# no passive-interface Serial0/0/0R2(config-router)# exitR2(config)# interface Serial0/0/0R2(config-if)# ip ospf 1 area 0En R1 las LANs de usuarios se anuncian pasivas (no hay vecino allí); R2 solo levanta adyacencia OSPF por el serial hacia R1, y por el serial hacia R3 usará EIGRP (pasos 5-6).
5. EIGRP en R3 (dominio del edificio B)
Section titled “5. EIGRP en R3 (dominio del edificio B)”EIGRP anuncia redes con wildcard y también conviene no auto-summary. R3
anuncia sus VLANs y el Wan2; R2 completará su lado EIGRP en el paso 6.
R3(config)# router eigrp 100R3(config-router)# passive-interface defaultR3(config-router)# no passive-interface Serial0/0/1R3(config-router)# network 192.168.2.0 0.0.0.255R3(config-router)# network 192.168.3.0 0.0.0.255R3(config-router)# network 192.168.4.8 0.0.0.7R3(config-router)# network 192.168.4.20 0.0.0.3R3(config-router)# no auto-summaryCon esto, dentro de cada dominio las rutas fluyen: R3 anuncia el edificio B
y R2 el edificio A (paso 6). OSPF aprende 192.168.2.0/24, 192.168.3.0/24
y 192.168.4.8/29 solo después de redistribuir (paso 6), y EIGRP aprende
192.168.0.0/24, 192.168.1.0/24 y 192.168.4.0/29 también después de
redistribuir. Sin redistribución, los dos dominios no se ven.
6. Redistribución en R2
Section titled “6. Redistribución en R2”R2 corre ambos protocolos y es el punto de conversión. Cada protocolo necesita sus propios comandos:
R2(config)# router ospf 1R2(config-router)# redistribute eigrp 100 subnetsR2(config-router)# exit
R2(config)# router eigrp 100R2(config-router)# passive-interface defaultR2(config-router)# no passive-interface Serial0/0/1R2(config-router)# network 192.168.4.20 0.0.0.3R2(config-router)# redistribute ospf 1 metric 10000 100 255 1 1500R2(config-router)# no auto-summary- En OSPF:
redistribute eigrp 100 subnetsintroduce las rutas EIGRP como externas (O E2). Faltasubnetsporque sin él OSPF solo redistribuye redes de clase mayor. - En EIGRP: la métrica es obligatoria y no existe en OSPF, así que se
declara en orden: banda (Kbps) · retardo (×10 µs) · confiabilidad · carga ·
MTU →
metric 10000 100 255 1 1500.
Verificación
Section titled “Verificación”Adyacencias
Section titled “Adyacencias”R1# show ip ospf neighborNeighbor ID Pri State Dead Time Address Interface2.2.2.2 0 FULL/ - 00:00:36 192.168.4.18 Serial0/0/0
R3# show ip eigrp neighborsIP-EIGRP neighbors for process 100Address Interface Hold Uptime SRTT RTO Q Seq192.168.4.21 Se0/0/0 13 00:02:10 1 200 0 3Tablas de enrutamiento (rutas redistribuidas)
Section titled “Tablas de enrutamiento (rutas redistribuidas)”R1# show ip route ospfO E2 192.168.2.0/24 [110/20] via 192.168.4.18, 00:01:00, Serial0/0/0O E2 192.168.3.0/24 [110/20] via 192.168.4.18, 00:01:00, Serial0/0/0O E2 192.168.4.8/29 [110/20] via 192.168.4.18, 00:01:00, Serial0/0/0O E2 192.168.4.20/30 [110/20] via 192.168.4.18, 00:01:00, Serial0/0/0
R3# show ip route eigrpD 192.168.4.20/30 [90/2195456] via 192.168.4.21, 00:01:00, Serial0/0/0D EX 192.168.0.0/24 [170/2300416] via 192.168.4.21, 00:01:00, Serial0/0/0D EX 192.168.1.0/24 [170/2300416] via 192.168.4.21, 00:01:00, Serial0/0/0D EX 192.168.4.0/29 [170/2300416] via 192.168.4.21, 00:01:00, Serial0/0/0O E2es una ruta externa redistribuida en OSPF (métrica default 20).D EXes una ruta externa redistribuida en EIGRP: AD 170 (las internas son 90) — por eso se ve el[170/…].
De extremo a extremo
Section titled “De extremo a extremo”PC-VentasA# ping 10.0.10.10 # edificio B, cruzando OSPF→EIGRPPC-SistemasB# ping 192.168.10.10 # edificio A, cruzando EIGRP→OSPFR2# show ip protocols # confirma que R2 corre ambos procesosSi falla, revisa en orden: que cada dominio converja por separado (R1 ve a R2,
R3 ve a R4), que existan las rutas redistribuidas (O E2 / D EX), y que en
EIGRP no falte la métrica en el redistribute ospf.
Comprobación final
Section titled “Comprobación final”| Pregunta | Respuesta esperada |
|---|---|
| ¿PC Ventas A llega a PC Ventas B? | Sí, vía OSPF→R2→EIGRP |
| ¿Cómo aparecen en R1 las VLANs del edificio B? | Como O E2 (redistribuidas por R2) |
| ¿Cómo aparecen en R4 las VLANs del edificio A? | Como D EX (redistribuidas, AD 170) |
| ¿Dónde ocurre la redistribución? | En R2, que corre OSPF y EIGRP a la vez |
| ¿Por qué EIGRP exige métrica al redistribuir? | OSPF no tiene banda/retardo; se declaran en redistribute ospf 1 metric 10000 100 255 1 1500 |
Resumen
Section titled “Resumen”- Los VLANs + router-on-a-stick repiten en dos edificios el ejercicio del Módulo 3, con subredes distintas.
- OSPF (R1-R2) y EIGRP (R3-R4) funcionaron completos por separado: cada dominio convergió solo.
- La redistribución en R2 convirtió rutas entre protocolos:
O E2hacia el lado OSPF yD EX(AD 170) hacia el lado EIGRP. - Guarda la configuración de los seis equipos:
copy running-config startup-config.
En el Módulo 5 harás esta misma red redundante en la capa de conmutación (STP y EtherChannel) y segura (seguridad de capa 2), y en el Módulo 6 añadirás un gateway redundante con HSRP.