cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1962
Views
0
Helpful
3
Replies

Redistribute OSPF default with higher metric

aweise
Level 1
Level 1

I have two edge routers on my enterprise network that are both receiving a default route via BGP with my ISP. I want to be able to redistribute the default routes into my internal network, but preferring one over the other. I'm doing OSPF on these routers with the neighbor being a Palo Alto firewall. The topology is like this at both locations:

 

Edge router (ISR4431) --- Palo Alto 3050 FW --- Nexus core switches --- Internal WAN router (ASR 1002-X)

 

Site A is the primary data center and Site B is the DR site (which we use as secondary for internet traffic). In my lab, I tried configuring the Site A router to tell the neighbor that the default was an external type-2 using the "default-information originate metric-type 1". However, this didn't seem to propagate to the internal routers. 

 

Instead, on Site B can I do the following:

 

default-information originate metric 10

 

So that the metric from Site B will be higher and tell the internal neighbors just that, thus preferring everything through Site A.

 

The way things are working now is that all core devices in Site B will use Site B's perimeter router as the default, all the way through to the Internal WAN router. Likewise, the devices in Site A will use Site A's perimeter router as the default. 

 

I would prefer to see the default advertised so that everything prefers Site A, but I'm not sure how this can be done in this environment.

3 Replies 3

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @aweise ,

you can use a route-map to decide when the default route is generated in OSPF in each router.

In doing this you can set the metric type to O E1 for router in site A so that because O E1 is preferred over O E2 (the default type) until site A generates a default route it will be preferred.

Alternatively you can generate both default routes of type O E1 but site B can use an higher seed metric like 1000 so that in normal conditions it is not used by any device.

I have used this second approach in the past with good results.

In my case I was checking for the existance of a default route learned in eBGP by checking the next-hop of the default route.

 

Hope to help

Giuseppe

 

Thank you, Giuseppe. The perimeter routers both hear a default route via eBGP, so the default route exists. 

 

I was going to do something like the following:

 

route-map DefaultToOSPF permit 10

  set metric-type type-1

!

router ospf 1

  default-information originate route-map DefaultToOSPF

 

I will attempt this during our next maintenance window.

Hello @aweise ,

you can also set the seed metric so I would use the following:

 

RA:

route-map DefaultToOSPF permit 10

set metric-type type-1

set metric 50

!

 

RB:

 

route-map DefaultToOSPF permit 10

set metric-type type-1

set metric 1000

!.

In this way RA of site A will be preferred in normal conditions if RA stops to send its own default route in OSPF, RB's default route will be used.

 

Hope to help

Giuseppe

 

Review Cisco Networking for a $25 gift card