Ejercicio de redistribución y filtros
En el siguiente ejercicio se configurará redistribución y filtros en routers CISCO con protocolo de enrutamiento EIGRP, OSPF y RIPv2.
La topología es la siguiente:
Objetivos:
- Lograr convergencia.
- Aplicar los siguientes filtros de redistribución:
- la ruta externa no debe ser conocida por RIP,
- el área 60 no debe ser conocida por EIGRP
- OSPF debe conocer las rutas L7 y L8 como E1, y
- la ruta L2 no debe ser conocida por RIP.
Configuración básica
ROUTER R1
R1#conf t R1(config)#int s1/0 R1(config-if)#ip address 20.0.0.1 255.255.255.252 R1(config-if)#clock rate 128000 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#int loopback 0 R1(config-if)#ip address 10.10.0.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#int loopback 1 R1(config-if)#ip address 10.20.0.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit R1(config)#int loopback 2 R1(config-if)#ip address 10.30.0.1 255.255.255.0 R1(config-if)#no shutdown R1(config-if)#exit
ROUTER R2
R2#conf t R2(config)#int s1/0 R2(config-if)#ip address 20.0.0.2 255.255.255.252 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#int s1/1 R2(config-if)#ip address 20.0.0.5 255.255.255.252 R2(config-if)#clock rate 128000 R2(config-if)#no shutdown R2(config-if)#exit R2(config)#int loopback 200 R2(config-if)#ip address 200.2.2.2 255.255.255.0 R2(config-if)#no shutdown R2(config-if)#exit
ROUTER R3
R3#conf t R3(config)#int s1/1 R3(config-if)#ip address 20.0.0.6 255.255.255.252 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#int s1/2 R3(config-if)#ip address 20.0.0.9 255.255.255.252 R3(config-if)#clock rate 128000 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#int loopback 3 R3(config-if)#ip address 30.3.3.3 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#int loopback 4 R3(config-if)#ip address 60.1.1.1 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#int loopback 5 R3(config-if)#ip address 60.1.2.1 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#exit R3(config)#int loopback 6 R3(config-if)#ip address 60.1.3.1 255.255.255.0 R3(config-if)#no shutdown R3(config-if)#exit
ROUTER R4
R4#conf t R4(config)#int s1/2 R4(config-if)#ip address 20.0.0.10 255.255.255.252 R4(config-if)#no shutdown R4(config-if)#exit R4(config)#int loopback 7 R4(config-if)#ip address 172.70.0.1 255.255.255.0 R4(config-if)#no shutdown R4(config-if)#exit R4(config)#int loopback 8 R4(config-if)#ip address 172.80.0.1 255.255.255.0 R4(config-if)#no shutdown R4(config-if)#exit
Enrutamiento
ROUTER R1
R1(config)#router eigrp 50 R1(config-router)#no auto-summary R1(config-router)#network 20.0.0.0 0.0.0.3 R1(config-router)#network 10.10.0.0 0.0.0.255 R1(config-router)#network 10.20.0.0 0.0.0.255 R1(config-router)#network 10.30.0.0 0.0.0.255 R1(config-router)#exit
ROUTER R2
R2(config)#router eigrp 50 R2(config-router)#no auto-summary R2(config-router)#network 20.0.0.0 0.0.0.3 R2(config-router)#exit R2(config)#router ospf 1 R2(config-router)#network 20.0.0.4 0.0.0.3 area 0 R2(config-router)#exit
ROUTER R3
R3(config)#router ospf 1 R3(config-router)#network 20.0.0.4 0.0.0.3 area 0 R3(config-router)#network 30.3.3.0 0.0.0.255 area 0 R3(config-router)#network 60.1.1.0 0.0.0.255 area 60 R3(config-router)#network 60.1.2.0 0.0.0.255 area 60 R3(config-router)#network 60.1.3.0 0.0.0.255 area 60 R3(config-router)#exit R3(config)#router rip R3(config-router)#version 2 R3(config-router)#no auto-summary R3(config-router)#network 20.0.0.8 R3(config-router)#exit
ROUTER R4
R4(config)#router rip R4(config-router)#version 2 R4(config-router)#no auto-summary R4(config-router)#network 20.0.0.8 R4(config-router)#network 172.70.0.0 R4(config-router)#network 172.80.0.0 R4(config-router)#exit
Redistribución
ROUTER R2
R2(config)#router eigrp 50 R2(config-router)#redistribute connected R2(config-router)#redistribute ospf 1 metric 10000 100 255 1 1500 R2(config-router)#exit R2(config)#router ospf 1 R2(config-router)#redistribute eigrp 50 subnets R2(config-router)#exit
ROUTER R3
R3(config)#router ospf 1 R3(config-router)#redistribute rip subnets R3(config-router)#exit R3(config)#router rip R3(config-router)#redistribute ospf 1 metric 2 R3(config-router)#exit
Comprobar conectividad
ROUTER R1
R1(config)#do ping 200.2.2.2 source 10.10.0.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/22/52 ms R1(config)#do ping 30.3.3.3 source 10.10.0.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 24/38/52 ms R1(config)#do ping 60.1.1.1 source 10.10.0.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 24/46/76 ms R1(config)#do ping 172.70.0.1 source 10.10.0.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 32/54/80 ms
Configuración loopbacks OSPF
ROUTER R3
R3(config)#int loopback 3 R3(config-if)#ip ospf network point-to-point R3(config-if)#exit R3(config)#int loopback 4 R3(config-if)#ip ospf network point-to-point R3(config-if)#exit R3(config)#int loopback 5 R3(config-if)#ip ospf network point-to-point R3(config-if)#exit R3(config)#int loopback 6 R3(config-if)#ip ospf network point-to-point R3(config-if)#exit
Filtros
a) la ruta externa no debe ser conocida por RIP
SI NO DEBE SER RECONOCIDA POR RIP, ENTONCES DEBEMOS CONFIGURAR EL FILTRO EN EL ROUTER 3
QUE ES DONDE SE CONFIGURA LA REDISTRIBUCION A RIP.
PRIMERO COMPROBAMOS QUE RIP VE LA RED 200.2.2.0
R4(config)#do sh ip route R 200.2.2.0/24 [120/2] via 20.0.0.9, 00:00:16, Serial1/2
AHORA CREAMOS EL FILTRO
R3(config)#access-list 1 permit 200.2.2.0 R3(config)#route-map deny200 deny 10 R3(config-route-map)#match ip address 1 R3(config-route-map)#exit R3(config)#route-map deny200 permit 20 R3(config-route-map)#exit
AHORA LO AGREGAMOS A LA REDISTRIBUCION DE RIP
(PODEMOS VER EL COMANDO CON SH RUN SI NO LO RECORDAMOS)
R3(config)#router rip R3(config-router)#redistribute ospf 1 metric 2 route-map deny200 R3(config-router)#exit
AHORA COMPROBAMOS QUE RIP NO VE LA RED 200.2.2.0
R4(config)#do sh ip route 20.0.0.0/30 is subnetted, 3 subnets R 20.0.0.4 [120/1] via 20.0.0.9, 00:00:16, Serial1/2 R 20.0.0.0 [120/2] via 20.0.0.9, 00:00:16, Serial1/2 C 20.0.0.8 is directly connected, Serial1/2 172.70.0.0/24 is subnetted, 1 subnets C 172.70.0.0 is directly connected, Loopback7 172.80.0.0/24 is subnetted, 1 subnets C 172.80.0.0 is directly connected, Loopback8 10.0.0.0/24 is subnetted, 3 subnets R 10.10.0.0 [120/2] via 20.0.0.9, 00:00:16, Serial1/2 R 10.30.0.0 [120/2] via 20.0.0.9, 00:00:16, Serial1/2 R 10.20.0.0 [120/2] via 20.0.0.9, 00:00:16, Serial1/2 60.0.0.0/24 is subnetted, 3 subnets R 60.1.1.0 [120/2] via 20.0.0.9, 00:00:17, Serial1/2 R 60.1.3.0 [120/2] via 20.0.0.9, 00:00:17, Serial1/2 R 60.1.2.0 [120/2] via 20.0.0.9, 00:00:17, Serial1/2 30.0.0.0/24 is subnetted, 1 subnets R 30.3.3.0 [120/2] via 20.0.0.9, 00:00:17, Serial1/2
b) el área 60 no debe ser conocida por EIGRP
PRIMERO COMPROBAMOS QUE EIGRP VE LAS REDES DEL AREA 60
R1(config)#do sh ip route 60.0.0.0/24 is subnetted, 3 subnets D EX 60.1.1.0 [170/2195456] via 20.0.0.2, 00:15:55, Serial1/0 D EX 60.1.3.0 [170/2195456] via 20.0.0.2, 00:15:45, Serial1/0 D EX 60.1.2.0 [170/2195456] via 20.0.0.2, 00:15:45, Serial1/0
DEBEMOS CREAR EL FILTRO EN EL ROUTER 2 EN LA REDISTRIBUCION DE EIGRP
R2(config)#access-list 1 permit 60.1.1.0 R2(config)#access-list 1 permit 60.1.2.0 R2(config)#access-list 1 permit 60.1.3.0 R2(config)#route-map deny60 deny 10 R2(config-route-map)#match ip address 1 R2(config-route-map)#exit R2(config)#route-map deny60 permit 20 R2(config-route-map)#exit
AGREGAMOS EL FILTRO A LA REDISTRIBUCION DE EIGRP
R2(config)#router eigrp 50 R2(config-router)#redistribute ospf 1 metric 10000 100 255 1 1500 route-map deny60 R2(config-router)#exit
COMPROBAMOS SI SE VEN LAS REDES DEL AREA 60
R1(config)#do sh ip route 20.0.0.0/30 is subnetted, 3 subnets D EX 20.0.0.4 [170/2681856] via 20.0.0.2, 00:30:49, Serial1/0 C 20.0.0.0 is directly connected, Serial1/0 D EX 20.0.0.8 [170/2195456] via 20.0.0.2, 00:23:52, Serial1/0 172.70.0.0/24 is subnetted, 1 subnets D EX 172.70.0.0 [170/2195456] via 20.0.0.2, 00:23:52, Serial1/0 172.80.0.0/24 is subnetted, 1 subnets D EX 172.80.0.0 [170/2195456] via 20.0.0.2, 00:23:52, Serial1/0 D EX 200.2.2.0/24 [170/2297856] via 20.0.0.2, 00:30:49, Serial1/0 10.0.0.0/24 is subnetted, 3 subnets C 10.10.0.0 is directly connected, Loopback0 C 10.30.0.0 is directly connected, Loopback2 C 10.20.0.0 is directly connected, Loopback1 30.0.0.0/24 is subnetted, 1 subnets D EX 30.3.3.0 [170/2195456] via 20.0.0.2, 00:18:04, Serial1/0
c) OSPF debe conocer las rutas L7 y L8 como E1, y
REVISAMOS COMO VE LAS RUTAS L7 Y L8 OSPF
R2(config)#do sh ip route 172.70.0.0/24 is subnetted, 1 subnets O E2 172.70.0.0 [110/20] via 20.0.0.6, 00:20:17, Serial1/1 172.80.0.0/24 is subnetted, 1 subnets O E2 172.80.0.0 [110/20] via 20.0.0.6, 00:20:17, Serial1/1
LAS VE COMO O E2. PARA CAMBIAR A E1, DEBEMOS CREAR UN FILTRO Y AGREGARLO EN LA REDISTRIBUCION OSPF R3
R3(config)#access-list 2 permit 172.70.0.0 R3(config)#access-list 2 permit 172.80.0.0 R3(config)#route-map E1 permit 10 R3(config-route-map)#match ip address 2 R3(config-route-map)#set metric-type type-1 R3(config-route-map)#exit
AGREGAMOS A LA REDISTRIBUCION EL FILTRO
R3(config)#router ospf 1 R3(config-router)#redistribute rip subnets route-map E1 R3(config-router)#exit
COMPROBAMOS QUE CAMBIO A E1
R2(config)#do sh ip route 172.70.0.0/24 is subnetted, 1 subnets O E1 172.70.0.0 [110/84] via 20.0.0.6, 00:00:30, Serial1/1 172.80.0.0/24 is subnetted, 1 subnets O E1 172.80.0.0 [110/84] via 20.0.0.6, 00:00:10, Serial1/1
d) la ruta L2 no debe ser conocida por RIP.
COPROBAMOS QUE RIP CONOCE LA RUTA L2
R4(config)#do sh ip route R 10.30.0.0 [120/2] via 20.0.0.9, 00:00:03, Serial1/2
CREAMOS EL FILTRO EN R3 AGREGANDO LA REGLA A LA ROUTE-MAP YA CREADA
YA QUE LA REDISTRIBUCION SOLO ACEPTA 1 ROUTE-MAP
CREAMOS EL ACCESS LIST 2 CON LA RED 10.30.0.0
R3(config)#access-list 2 permit 10.30.0.0
AHORA CREAMOS UN ROUTE-MAP CON EL MISMO NOMBRE DEL FILTRO DE LA LETRA «a)» (EL NOMBRE ES deny200)
CON EL NUMERO 15 (PUEDE SER CUALQUIER NUMERO MENOR AL 20 QUE ES EL QUE PERMITE LO DEMAS)
R3(config)#route-map deny200 deny 15 R3(config-route-map)#match ip address 2 R3(config-route-map)#exit
COMPROBAMOS QUE RIP NO RECONOCE LA RED 10.30.0.0
R4(config)#do sh ip route 20.0.0.0/30 is subnetted, 3 subnets R 20.0.0.4 [120/1] via 20.0.0.9, 00:00:12, Serial1/2 R 20.0.0.0 [120/2] via 20.0.0.9, 00:00:12, Serial1/2 C 20.0.0.8 is directly connected, Serial1/2 172.70.0.0/24 is subnetted, 1 subnets C 172.70.0.0 is directly connected, Loopback7 172.80.0.0/24 is subnetted, 1 subnets C 172.80.0.0 is directly connected, Loopback8 10.0.0.0/24 is subnetted, 2 subnets R 10.10.0.0 [120/2] via 20.0.0.9, 00:00:12, Serial1/2 R 10.20.0.0 [120/2] via 20.0.0.9, 00:00:12, Serial1/2 60.0.0.0/24 is subnetted, 3 subnets R 60.1.1.0 [120/2] via 20.0.0.9, 00:00:12, Serial1/2 R 60.1.3.0 [120/2] via 20.0.0.9, 00:00:13, Serial1/2 R 60.1.2.0 [120/2] via 20.0.0.9, 00:00:13, Serial1/2 30.0.0.0/24 is subnetted, 1 subnets R 30.3.3.0 [120/2] via 20.0.0.9, 00:00:13, Serial1/2