Tabla de enrutamiento no muestra rutas OSPF externas

Fecha: 31 de enero del 2023

 

Escenario

 

Este laboratorio está basado en un escenario real mucho más complejo, pero que por simplicidad se reduce

a tres switches layer 3 y un router Mikrotik simulando ser un nodo contenedor de Kubernetes (o como se llamen)

que aloja la red 172.16.0.0/24 repartida en hasta 254 hosts /32, y que publica estos por BGP contra uno de los

switches layer 3 que lo redistribuye en OSPF.

 

 

 

 

No vamos a entrar mucho en la teoría de por qué los Kubernetes (o como se llamen) usan BGP pero básicamente

es porque pueden crearse dinámicamente en N nodos físicos distribuídos en la red, y por eso se muestran como /32

cuando se publican al levantar. Y al que quiera usar BGP en toda la red, bueno, le deseo la mejor suerte en ello.

 

El problema en cuestión es que desde una red conectada a uno de los switches layer 3 (puntualmente el Switch-L3-B) no

se pueden alcanzar los Kubernetes (o como se llamen) si no es mediante una ruta estática 172.16.0.0/24 vía Switch-L3-C

(que se configuró “como para zafar hasta que lo vea Ernesto”), cuando debería aprenderse por OSPF como en el resto

de los switches de la topología.

 

Y allá vamos…

 

 

1.- Verificación inicial de vecindario OSPF:

 

1.1.- En Switch-L3-A:

 

Switch-L3-A#sh ip ospf neighbor

 

Neighbor ID     Pri   State              Dead Time   Address         Interface

192.168.1.2     255  FULL/DR       00:00:36      192.168.1.2     Vlan1 (Switch-L3-B)

192.168.1.3       1    FULL/BDR     00:00:38      192.168.1.3     Vlan1 (Switch-L3-C)

Switch-L3-A#

 

1.2.- En Switch-L3-B:

 

Switch-L3-B#sh ip ospf neighbor

 

Neighbor ID     Pri   State               Dead Time   Address         Interface

192.168.1.1       1    FULL/DROTHER  :00:36    192.168.1.1     Vlan1 (Switch-L3-A)

192.168.1.3       1    FULL/BDR        00:00:38    192.168.1.3     Vlan1 (Switch-L3-C)

Switch-L3-B#

 

1.3.- En Switch-L3-C:

 

Switch-L3-C#sh ip ospf neighbor

 

Neighbor ID     Pri    State               Dead Time   Address         Interface

192.168.1.1         1   FULL/DROTHER :00:37    192.168.1.1     Vlan1 (Switch-L3-A)

192.168.1.2     255   FULL/DR         00:00:36     192.168.1.2     Vlan1 (Switch-L3-B)

Switch-L3-C#

 

2.- Verificamos rutas:

 

2.1.- En Switch-L3-A:

 

Switch-L3-A#sh ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route, + - replicated route

 

Gateway of last resort is not set

 

      172.16.0.0/32 is subnetted, 3 subnets

O E2     172.16.0.1 [110/1] via 192.168.1.3, 00:09:28, Vlan1 (BGP redistribuído en OSPF)

O E2     172.16.0.2 [110/1] via 192.168.1.3, 00:09:28, Vlan1

O E2     172.16.0.3 [110/1] via 192.168.1.3, 00:09:28, Vlan1

      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.1.0/24 is directly connected, Vlan1 (backbone OSPF)

L        192.168.1.1/32 is directly connected, Vlan1

O     192.168.2.0/24 [110/2] via 192.168.1.3, 00:07:12, Vlan1 (segmento BGP)

      192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.10.0/24 is directly connected, Vlan10 (LAN Switch-L3-A)

L        192.168.10.1/32 is directly connected, Vlan10

O     192.168.20.0/24 [110/2] via 192.168.1.2, 00:03:29, Vlan1 (LAN Switch-L3-B)

O     192.168.30.0/24 [110/2] via 192.168.1.3, 00:05:33, Vlan1 (LAN Switch-L3-C)

Switch-L3-A#

 

 

2.2.- En Switch-L3-B:

 

Switch-L3-B#sh ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP

       + - replicated route, % - next hop override

 

Gateway of last resort is not set

 

      172.16.0.0/16 is subnetted, 1 subnets

S        172.16.0.0/24 [1/0] via 192.168.1.3 (ruta configurada a mano para poder operar)

      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.1.0/24 is directly connected, Vlan1 (backbone OSPF)

L        192.168.1.2/32 is directly connected, Vlan1

S     192.168.2.0/24 [1/0] via 192.168.1.3 (segmento BGP configurado a mano)

O     192.168.10.0/24 [110/2] via 192.168.1.1, 00:04:55, Vlan1 (LAN Switch-L3-A)

      192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.20.0/24 is directly connected, Vlan20 (LAN Switch-L3-B)

L        192.168.20.1/32 is directly connected, Vlan20

O     192.168.30.0/24 [110/2] via 192.168.1.3, 00:02:27, Vlan1 (LAN Switch-L3-C)

Switch-L3-B#

 

2.3.- En Switch-L3-C:

 

Switch-L3-C#sh ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP

       a - application route

       + - replicated route, % - next hop override

 

Gateway of last resort is not set

 

      172.16.0.0/32 is subnetted, 3 subnets

B        172.16.0.1 [200/0] via 192.168.2.2, 00:10:18

B        172.16.0.2 [200/0] via 192.168.2.2, 00:10:18

B        172.16.0.3 [200/0] via 192.168.2.2, 00:10:18

      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.1.0/24 is directly connected, Vlan1 (backbone OSPF) 

L        192.168.1.3/32 is directly connected, Vlan1

      192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.2.0/24 is directly connected, Vlan2 (segmento BGP)

L        192.168.2.1/32 is directly connected, Vlan2

O     192.168.10.0/24 [110/2] via 192.168.1.1, 00:08:55, Vlan1 (LAN Switch-L3-A)

O     192.168.20.0/24 [110/2] via 192.168.1.2, 00:04:42, Vlan1 (LAN Switch-L3-B)

      192.168.30.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.30.0/24 is directly connected, Vlan30 (LAN Switch-L3-C)

L        192.168.30.1/32 is directly connected, Vlan30

Switch-L3-C#

 

2.4.- El servidor/nodo que aloja los Kubernetes (o como se llamen):

 

El router tiene una única ruta por defecto a través de la interface VLAN 2 del Switch-L3-B.

 

 

3.- Eliminamos la ruta estática a la red 172.16.0.0/24 para trabajar únicamente con el OSPF:

 

Switch-L3-B(config)#no ip route 172.16.0.0 255.255.255.0 192.168.2.2

Switch-L3-B(config)#

 

4.- Verificamos:

 

Switch-L3-B#sh ip route (no existen rutas a 172.16.x.x)

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP

       + - replicated route, % - next hop override

 

Gateway of last resort is not set

 

      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.1.0/24 is directly connected, Vlan1 (backbone OSPF)

L        192.168.1.2/32 is directly connected, Vlan1

S     192.168.2.0/24 [1/0] via 192.168.1.3

O     192.168.10.0/24 [110/2] via 192.168.1.1, 00:15:19, Vlan1

      192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.20.0/24 is directly connected, Vlan20

L        192.168.20.1/32 is directly connected, Vlan20

O     192.168.30.0/24 [110/2] via 192.168.1.3, 00:12:51, Vlan1

Switch-L3-B#

 

5.- Verificación OSPF para ver si aprendió las rutas:

 

Switch-L3#sh ip ospf route (no aparecen las rutas externas)

 

            OSPF Router with ID (192.168.1.2) (Process ID 1)

 

 

                Base Topology (MTID 0)

 

 

    Area BACKBONE(0)

 

    Intra-area Route List

*   192.168.1.0/24, Intra, cost 1, area 0, Connected

      via 192.168.1.2, Vlan1

*   192.168.2.0/24, Intra, cost 2, area 0

      via 192.168.1.3, Vlan1

*>  192.168.10.0/24, Intra, cost 2, area 0

      via 192.168.1.1, Vlan1

*   192.168.20.0/24, Intra, cost 1, area 0, Connected

      via 192.168.20.1, Vlan20

*>  192.168.30.0/24, Intra, cost 2, area 0

      via 192.168.1.3, Vlan1

 

    Intra-area Router Path List

i 192.168.1.3 [1] via 192.168.1.3, Vlan1, ASBR, Area 0, SPF 49

Switch-L3#

 

Switch-L3-B#sh ip ospf database

 

            OSPF Router with ID (192.168.1.2) (Process ID 1)

 

Router Link States (Area 0)

 

Link ID            ADV Router      Age         Seq#       Checksum     Link count

192.168.1.1     192.168.1.1     1495        0x80000003 0x00FA87 1

192.168.1.2     192.168.1.2       632        0x80000016 0x00D299 1

192.168.1.3     192.168.1.3         44        0x80000004 0x004FAD 2

 

Net Link States (Area 0)

 

Link ID         ADV Router      Age         Seq#       Checksum

192.168.1.2     192.168.1.2     1454      0x80000002 0x00C551

 

Type-5 AS External Link States

 

Link ID         ADV Router      Age         Seq#            Checksum Tag

172.16.0.1      192.168.1.3     39          0x80000003 0x00D642  0 (las aprendió pero no las publica)

172.16.0.2      192.168.1.3     39          0x80000003 0x00CC4B 0

172.16.0.3      192.168.1.3     39          0x80000003 0x00C254  0

Switch-L3-B#

 

6.- Comenzamos el análisis del OSPF:

 

Switch-L3#debug ip routing

IP routing debugging is on

Switch-L3-B#debug ip ospf events

OSPF events debugging is on

Switch-L3-B#debug ip ospf sfp

OSPF SPF debugging is on

OSPF SPF intra debugging is on

OSPF SPF inter debugging is on

OSPF SPF external debugging is on

Switch-L3-B#

 

7.- Eliminamos la ruta estática a la red 2:

 

Switch-L3-B#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Switch-L3-B(config)#no ip route 192.168.2.0 255.255.255.0 192.168.1.3

Switch-L3-B(config)#

 

Jan 31 13:52:53.820: RT: del 192.168.2.0 via 192.168.1.3, static metric [1/0]

Jan 31 13:52:53.820: RT: delete network route to 192.168.2.0/24

Jan 31 13:52:53.820: RT: updating ospf 192.168.2.0/24 (0x0)  :

    via 192.168.1.3 Vl1  0 1048578

Jan 31 13:52:53.820: RT: add 192.168.2.0/24 via 192.168.1.3, ospf metric [110/2]

Jan 31 13:53:09.315: RT: updating ospf 172.16.0.3/32 (0x0)  :

    via 192.168.1.3 Vl1  0 1048578

Jan 31 13:53:09.315: RT: add 172.16.0.3/32 via 192.168.1.3, ospf metric [110/1]

Jan 31 13:53:09.318: RT: updating ospf 172.16.0.2/32 (0x0)  :

    via 192.168.1.3 Vl1  0 1048578

Jan 31 13:53:09.318: RT: add 172.16.0.2/32 via 192.168.1.3, ospf metric [110/1]

Jan 31 13:53:09.318: RT: updating ospf 172.16.0.1/32 (0x0)  :

    via 192.168.1.3 Vl1  0 1048578

Jan 31 13:53:09.318: RT: add 172.16.0.1/32 via 192.168.1.3, ospf metric [110/1]

 

 

 

8.- Verificamos:

 

8.1.- En la tabla de enrutamiento:

 

Switch-L3-B#sh ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route, + - replicated route

 

Gateway of last resort is not set

 

      172.16.0.0/32 is subnetted, 3 subnets

O E2     172.16.0.1 [110/1] via 192.168.1.3, 00:07:48, Vlan1 (se agregaron las rutas vía OSPF)

O E2     172.16.0.2 [110/1] via 192.168.1.3, 00:07:48, Vlan1

O E2     172.16.0.3 [110/1] via 192.168.1.3, 00:07:48, Vlan1

      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.1.0/24 is directly connected, Vlan1

L        192.168.1.1/32 is directly connected, Vlan1

O     192.168.2.0/24 [110/2] via 192.168.1.3, 00:14:25, Vlan1 (se agregó la ruta vía OSPF)

O     192.168.10.0/24 [110/2] via 192.168.1.1, 00:15:19, Vlan1

      192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.20.0/24 is directly connected, Vlan20

L        192.168.20.1/32 is directly connected, Vlan20

O     192.168.30.0/24 [110/2] via 192.168.1.3, 00:12:51, Vlan1

Switch-L3-A#

 

8.2.- En el OSPF:

 

Switch-L3#sh ip ospf route

 

            OSPF Router with ID (192.168.1.2) (Process ID 1)

 

 

                Base Topology (MTID 0)

 

 

    Area BACKBONE(0)

 

    Intra-area Route List

*   192.168.1.0/24, Intra, cost 1, area 0, Connected

      via 192.168.1.2, Vlan1

*>  192.168.2.0/24, Intra, cost 2, area 0

      via 192.168.1.3, Vlan1

*>  192.168.10.0/24, Intra, cost 2, area 0

      via 192.168.1.1, Vlan1

*   192.168.20.0/24, Intra, cost 1, area 0, Connected

      via 192.168.20.1, Vlan20

*>  192.168.30.0/24, Intra, cost 2, area 0

      via 192.168.1.3, Vlan1

 

    Intra-area Router Path List

i 192.168.1.3 [1] via 192.168.1.3, Vlan1, ASBR, Area 0, SPF 49

 

    External Route List

*>  172.16.0.1/32, Ext2, cost 1, tag 0

      via 192.168.1.3, Vlan1

*>  172.16.0.2/32, Ext2, cost 1, tag 0

      via 192.168.1.3, Vlan1

*>  172.16.0.3/32, Ext2, cost 1, tag 0

      via 192.168.1.3, Vlan1

Switch-L3#

 

9.- Contraprueba agregando la ruta estática nuevamente:

 

Switch-L3-B#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Switch-L3-B(config)#ip route 192.168.2.0 255.255.255.0 192.168.1.3

Switch-L3-B(config)#

 

Jan 31 13:47:27.574: OSPF-1 INTER: Check and generate summary LSA into all areas

Jan 31 13:47:27.574: OSPF-1 EXTER: Started Building Type 5 External Routes

Jan 31 13:47:27.574: OSPF-1 EXTER: Start processing Type 5 External LSA 172.16.0.1, mask 255.255.255.255

Jan 31 13:47:27.574: OSPF-1 EXTER:  adv_rtr 192.168.1.3, age 799, seq 0x80000001, metric 1, metric-type 2, fw-addr 192.168.2.2

Jan 31 13:47:27.574: OSPF-1 EXTER:    More specific non-OSPF route to forwarding address

Jan 31 13:47:27.574: OSPF-1 EXTER: Add forward address unreachable 192.168.2.2, allowed types Intra and Inter, to watched queue

Jan 31 13:47:27.574: OSPF-1 EXTER: Start processing Type 5 External LSA 172.16.0.2, mask 255.255.255.255

Jan 31 13:47:27.574: OSPF-1 EXTER:  adv_rtr 192.168.1.3, age 799, seq 0x80000001, metric 1, metric-type 2, fw-addr 192.168.2.2

Jan 31 13:47:27.574: OSPF-1 EXTER:    More specific non-OSPF route to forwarding address

Jan 31 13:47:27.574: OSPF-1 EXTER: Start processing Type 5 External LSA 172.16.0.3, mask 255.255.255.255

Jan 31 13:47:27.574: OSPF-1 EXTER:  adv_rtr 192.168.1.3, age 798, seq 0x80000001, metric 1, metric-type 2, fw-addr 192.168.2.2

Jan 31 13:47:27.574: OSPF-1 EXTER:    More specific non-OSPF route to forwarding address

Jan 31 13:47:27.574: OSPF-1 EXTER: Started Building Type 7 External Routes

Jan 31 13:47:27.574: OSPF-1 EXTER: Entered External route sync for area dummy area

Jan 31 13:47:27.574: OSPF-1 EXTER: Entered External route sync for area dummy area

Jan 31 13:47:27.574: OSPF-1 EXTER: Deleted external route 172.16.0.1/255.255.255.255

Jan 31 13:47:27.574: OSPF-1 EXTER: Deleted external route 172.16.0.2/255.255.255.255

Jan 31 13:47:27.574: OSPF-1 EXTER: Deleted external route 172.16.0.3/255.255.255.255

Jan 31 13:47:27.574: OSPF-1 EXTER: Entered NSSA route sync for area 0

Jan 31 13:47:27.574: OSPF-1 EXTER: Entered NSSA route sync for area 0

Switch-L3-B#

 

10.- Verificamos:

 

10.1.- En la tabla de enrutamiento:

 

Switch-L3-B#sh ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP

       + - replicated route, % - next hop override

 

Gateway of last resort is not set

 

      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks (desaparecen las rutas 172.16.0.x)

C        192.168.1.0/24 is directly connected, Vlan1

L        192.168.1.2/32 is directly connected, Vlan1

S     192.168.2.0/24 [1/0] via 192.168.1.3

O     192.168.10.0/24 [110/2] via 192.168.1.1, 00:12:36, Vlan1

      192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.20.0/24 is directly connected, Vlan20

L        192.168.20.1/32 is directly connected, Vlan20

O     192.168.30.0/24 [110/2] via 192.168.1.3, 00:10:08, Vlan1

Switch-L3-B#

 

11.- Resumen:

 

En el escenario real probablemente la ruta estática quedó como configuración residual por un problema de licencias en el switch

y que bajó el proceso OSPF y hubo que improvisar con rutas estáticas.

 

Para poder alcanzar las redes 172.16.0.x redistribuídas en OSPF, es necesario que el gateway a estas pertenezca a una red

aprendida por OSPF, o directamente que no haya rutas con mejor métricas a esta red (hablamos de la 192.168.2.0/24).

La existencia de una ruta estática al mencionado segmento (como en el caso de este escenario) hace que dichas redes no

sean procesadas por OSPF ni instaladas en la tabla de enrutamiento.

 

12.- Detalle post resumen:

 

Como detalle dejado para luego de reflexionar por que no eran alcanzables la redes 17216.0.x, dejamos documentado de que

no es necesario publicar en el OSPF la red 192.168.2.0/24 para que el resto de los switches aorendan las primeras.

Por eso en el resumen del laboratorios se aclara “o directamente que no haya rutas con mejor métricas a esta red” para demostrar

esto hacemos la siguiente prueba:

 

12.1.- Verificamos la existencia de la ruta del segmento BGP/OSPF:

 

Switch-L3-A #sh ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route, + - replicated route

 

Gateway of last resort is not set

 

      172.16.0.0/32 is subnetted, 3 subnets

O E2     172.16.0.1 [110/1] via 192.168.1.3, 00:09:48, Vlan1

O E2     172.16.0.2 [110/1] via 192.168.1.3, 00:09:48, Vlan1

O E2     172.16.0.3 [110/1] via 192.168.1.3, 00:09:48, Vlan1

      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.1.0/24 is directly connected, Vlan1

L        192.168.1.1/32 is directly connected, Vlan1

O     192.168.2.0/24 [110/2] via 192.168.1.3, 00:00:05, Vlan1 (vemos publicada la ruta BGP/OSPF)

      192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.10.0/24 is directly connected, Vlan10

L        192.168.10.1/32 is directly connected, Vlan10

O     192.168.20.0/24 [110/2] via 192.168.1.2, 00:03:29, Vlan1

O     192.168.30.0/24 [110/2] via 192.168.1.3, 00:05:33, Vlan1

Switch-L3-A #

 

12.2.- Dejamos de publicar el segmento en el OSPF:

 

Switch-L3-C#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

Switch-L3-C(config)#router ospf 1

Switch-L3-C (config-router)#no network 192.168.2.0 0.0.0.255 area 0

Switch-L3-C (config-router)#end

Switch-L3-C #

 

12.3.- Verificamos:

 

Switch-L3-A#sh ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2

       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

       ia - IS-IS inter area, * - candidate default, U - per-user static route

       o - ODR, P - periodic downloaded static route, + - replicated route

 

Gateway of last resort is not set

 

      172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks

O E2     172.16.0.1/32 [110/1] via 192.168.1.3, 00:07:18, Vlan1 (siguen publicandose las rutas redistribuídas)

O E2     172.16.0.2/32 [110/1] via 192.168.1.3, 00:07:18, Vlan1

O E2     172.16.0.3/32 [110/1] via 192.168.1.3, 00:07:18, Vlan1

      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.1.0/24 is directly connected, Vlan1

L        192.168.1.1/32 is directly connected, Vlan1 (ya no está publicada la ruta a la red 192.168.2.0/24)

      192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks

C        192.168.10.0/24 is directly connected, Vlan10

L        192.168.10.1/32 is directly connected, Vlan10

O     192.168.20.0/24 [110/2] via 192.168.1.2, 00:03:29, Vlan1

O     192.168.30.0/24 [110/2] via 192.168.1.3, 00:05:33, Vlan1

Switch-L3-A#

 

¿ Por que entonces se publica en OSPF la red 192.168.2.0/24 ? es porque existen otros servers en esa red,

también para alcanzar y administrar el nodo que aloja los fucking Kubernetes (o como se llamen) y también

porque queda prolijo y educado publicarla.

 

 

13.- Configuración de los equipos:

 

13.1.- Switch-L3-A:

 

Switch-L3-A#sh run (sólo lo más relevante)

!

ip routing

!

- interfaces físicas en las VLANs correspondientes -

!

interface Vlan1

 ip address 192.168.1.1 255.255.255.0

!

interface Vlan10

 ip address 192.168.10.1 255.255.255.0

!

router ospf 1

 network 192.168.1.0 0.0.0.255 area 0 (backbone inter-switches)

 network 192.168.10.0 0.0.0.255 area 0

!

Switch-L3-A#

 

13.2.- Switch-L3-B:

 

Switch-L3-B#sh run (sólo lo más relevante)

!

ip routing

!

- interfaces físicas en las VLANs correspondientes -

!

interface Vlan1

 ip address 192.168.1.2 255.255.255.0

 ip ospf priority 255 (fuerza a ser el DR)

!

interface Vlan20

 ip address 192.168.20.1 255.255.255.0

!

router ospf 1

 network 192.168.1.0 0.0.0.255 area 0 (backbone inter-switches)

 network 192.168.2.0 0.0.0.255 area 0

!

ip route 192.168.2.0 255.255.255.0 192.168.1.3

!

Switch-L3-B#

 

13.3.- Switch-L3-B:

 

Switch-L3-C#sh run (sólo lo más relevante)

!

ip routing

!

- interfaces físicas en las VLANs correspondientes -

!

interface Vlan1

 ip address 192.168.1.3 255.255.255.0

!

interface Vlan2

 ip address 192.168.2.1 255.255.255.0

!

interface Vlan30

 ip address 192.168.30.1 255.255.255.0

 

router ospf 1

 router-id 192.168.1.3

 redistribute bgp 1234 subnets

 network 192.168.1.0 0.0.0.255 area 0 (backbone inter-switches)

 network 192.168.2.0 0.0.0.255 area 0 (VLAN de servers y segmento BGP)

 network 192.168.30.0 0.0.0.255 area 0

!

router bgp 1234

 bgp log-neighbor-changes

 bgp redistribute-internal (al ser una topología iBGP permite que se redistribuya en OSPF)

 neighbor 192.168.2.2 remote-as 1234 (el switch Switch-L3-C)

!

Switch-L3-C#

 

13.4.- Mikrotik que simulamos los Kubernetes (o como se llamen):

 

13.4.1.- Interfaces:

 

 

13.4.2.- Instancia BGP:

 

 

13.4.3.- Declaramos las redes a publicar:

 

 

13.4.4.- Declaramos el Switch-L3-B como peer:

 

 

 

(2023) ¡ Por dios ! la ruta está trabada y fría…

Rosario, Argentina