cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1122
Views
3
Helpful
16
Replies

Redistribuir rutas por OSPF en nexus 9396

¡Saludos a todos!

Tengo la siguiente topología:

(Proveedor)<----- BGP ------->(Nexus 9396)<----- OSPF ----->(Router downstream)

Quiero redistribuir la ruta por defecto aprendida por BGP al router downstream vía OSPF, pero este router no lo termina de aprender. ¿Qué me podría estar faltando en el Nexus? Adjunto configuración del Nexus:

Configuración OSPF

router ospf 201
default-information originate always
redistribute bgp 273024 route-map bgp-to-ospf

Configuración interfaz contra router

interface Ethernet1/17.202
description SERVIDOR-to-hex
encapsulation dot1q 202
ip address 38.7.104.97/28
ip ospf network point-to-point
ip ospf mtu-ignore
ip router ospf 201 area 0.0.0.0
no shutdown

16 Replies 16

Nexus Is ASBR since it connect two protocol bgp and ospf 

ASRB dont advertise defualt route if it not in RIB even if you use always.

So in NSK do 

Show ip bgp 

And check 0.0.0.0

Share here if ypu can

MHM

 

Hi!

Yes, Nexus has default route in RIB.

switch(config)# show ip bgp
BGP routing table information for VRF default, address family IPv4 Unicast
BGP table version is 20, local router ID is 10.255.255.1
Status: s-suppressed, x-deleted, S-stale, d-dampened, h-history, *-valid, >-best
Path type: i-internal, e-external, c-confed, l-local, a-aggregate, r-redist, I-i
njected
Origin codes: i - IGP, e - EGP, ? - incomplete, | - multipath, & - backup

Network Next Hop Metric LocPrf Weight Path
*>e0.0.0.0/0 10.254.3.249 0 21826 i
l38.7.104.0/24 0.0.0.0 100 32768 i
*>a 0.0.0.0 100 32768 i
s>l38.7.104.96/28 0.0.0.0 100 32768 i
switch(config)#

Do following in NSK

Route-map default permit 10

Match ip address prefix-list default 

!

Ip prefix-list default seq 5 permit 0.0.0.0/0

!

Router ospf  x

Redistrubte bgp x route-map default <- you can add later more prefix to this route-map' now we want just to check redistrubte of default 

Default information originate 

MHM

 

Hi @MHM Cisco World ,

"default-information originate" is the only way you can inject the default route into ospf. The redistribute statement is useless if the only route you need is the default route.

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

after deep investigate I found the issue in my lab hope it same in your network
I check the show ip ospf database 
which help me to detect issue 
the issue is ospf network 
one side is p2p and other side is broadcast  

match the network type

MHM

Hello everyone! @MHM Cisco World @Harold Ritter Thanks for the support.

I just used both commands:

default-information originate always
redistribute bgp 273024 route-map bgp-to-ospf

And from the beginning, both sides are p2p. But the router downstream is not learning the default route.

I tried to quit the command "redistribute" but the status on router downstream is the same...

Is the problem in nexus configuration or is there something missing in router downstream?

the downstream router 
do 
show ip ospf database external <<- share this 

MHM

The router downstream is Mikrotik, the LSA external and routes are:

AndresElGharib_0-1715883705848.png

From nexus:

switch# show ip ospf database external
OSPF Router with ID (10.255.255.1) (Process ID 201 VRF default)

Type-5 AS External Link States

Link ID ADV Router Age Seq# Checksum Tag
0.0.0.0 10.255.255.1 232 0x80000002 0x8a3b 0

 

 

As you see the nexus add default route to it DB, and mikro is see this prefix via ospf. 

If you sure the link is p2p in both sides 

Then last thing to do use route-map with default information and under this route map  set forward-address

Also, check if mikro have any default route via static or other igp.

MHM

There was an issue to established the link on FULL state, but it was fixed. There is the database from both routers:

AndresElGharib_0-1715886470295.pngAndresElGharib_1-1715886506678.png

 

Mikrotik router has a static default route, but if I disable it, the table also does not update. However, nexus router learn some routes via ospf

AndresElGharib_3-1715886735441.png

 

Sorry can yoh more elaborate about below 

"" Mikrotik router has a static default route, but if I disable it, the table also does not update. However, nexus router learn some routes via ospf""

Thanks 

MHM

On mikrotik table, I have these routes:

AndresElGharib_0-1715888194356.png

 

Where the letters on the left are: A - active; D - Dynamic; C - connected; S - static; O - OSPF.

There is not routes learned via OSPF because any file has O in the left.

I erased the default route from this table (the first one) just for test if the mikrotik learn the default route via OSPF, but it does not work. So, Mikrotik route does not learn routes via OSPF, but it receive LSA from Nexus.

Instead, Nexus is learning 2 routes via OSPF:

AndresElGharib_1-1715888714042.png

 

 

Did you adjust the forward address by route-map as I mention above?

MHM

switch(config)# show run ospf

!Command: show running-config ospf
!Time: Thu May 16 20:09:13 2024

version 6.1(2)I3(2)
feature ospf

router ospf 201
default-information originate always
redistribute bgp 273024 route-map bgp-to-ospf

 

(...)

switch(config)# show route-map
route-map bgp-to-ospf, permit, sequence 10
Match clauses:
ip address prefix-lists: b2o
route-type: external
Set clauses:

switch(config)# show ip prefix-list b2o
ip prefix-list b2o: 1 entries
seq 5 permit 0.0.0.0/0
switch(config)#

Review Cisco Networking for a $25 gift card