cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1046
Views
0
Helpful
1
Replies

Understanding OSPF Metric with BGP redistribution + route-map

roger perkin
Level 2
Level 2

I need to understand the OSPF metric and have a level of confusion which I am hoping someone can clarify for me?

We have our MPLS WAN redistributing all the routes from BGP into OSPF

CE Router:

router ospf 1

log-adjacency-changes

redistribute bgp 64993 subnets

On my WAN switch (connected to CE router) I have a network 10.188.3.0 which shows as below.

O E2    10.188.3.0/24 [110/1] via 10.251.251.98, 00:00:54, FastEthernet1/0

According to my knowledge this has a Distance of 110 (OSPF) and a metric of 1 (Not exactly sure what this means?)

We also have a bakckup link which I want to affect traffic to go over.

So I make this change

CE Router:

router ospf 1

log-adjacency-changes

redistribute bgp 64993 subnets route-map BGP_to_OSPF

Currently the route-map does not exist??

But his happens on WAN switch

*Mar  1 18:18:47.235: RT: del 10.188.3.0/24 via 10.251.251.98, ospf metric [110/1]

*Mar  1 18:18:47.235: RT: delete subnet route to 10.188.3.0/24

*Mar  1 18:18:47.235: RT: NET-RED 10.188.3.0/24

*Mar  1 18:18:47.235: RT: NET-RED queued, Queue size 1

*Mar  1 18:18:47.235: RT: add 10.188.3.0/24 via 10.251.251.209, ospf metric [110/20]

*Mar  1 18:18:47.235: RT: NET-RED 10.188.3.0/24

Now sh ip route on WAN Switch shows this

O E2    10.188.3.0/24 [110/20] via 10.251.251.209, 00:01:45, FastEthernet0/0

It is now taking a different path because metric is now 20?

Why does redistributing with a route-map statement that does not exist cause this behaviour?

Many Thanks

Roger

1 Reply 1

milan.kulik
Level 10
Level 10

Hi,

IMHO, it should make no difference.

" If no metric is specified, OSPF puts a default value of 20 when redistributing routes from all protocols except BGP routes, which get a metric of 1. The metric-type is discussed in the next paragraph."

See

http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml#t32 for details.

As the next-hop is also different, are you sure the new route is still redistributed from your BGP router?

Isn't it received from other device?

HTH,

Milan