05-15-2024 01:18 PM
¡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
05-15-2024 01:27 PM
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
05-15-2024 01:33 PM
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)#
05-15-2024 01:50 PM
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
05-15-2024 02:06 PM
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,
05-16-2024 12:00 AM
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
05-16-2024 09:46 AM
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?
05-16-2024 09:50 AM
the downstream router
do
show ip ospf database external <<- share this
MHM
05-16-2024 11:23 AM
The router downstream is Mikrotik, the LSA external and routes are:
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
05-16-2024 11:28 AM
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
05-16-2024 12:13 PM
There was an issue to established the link on FULL state, but it was fixed. There is the database from both routers:
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
05-16-2024 12:34 PM
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
05-16-2024 12:49 PM
On mikrotik table, I have these routes:
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:
05-16-2024 12:52 PM
Did you adjust the forward address by route-map as I mention above?
MHM
05-16-2024 12:58 PM
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)#
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide