cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
488
Views
10
Helpful
5
Replies

BGP and redistribution issue

acbenny
Level 1
Level 1

Hi,

I have setup a network to test the routing and observe below result that I

don't understand. Can anyone help to explain it. Thanks!

-16A Router

All E2 route [110/1] learned --I don't know why the metric is 1 as

I redistribute bgp route into ospf with external metric (default 20), I expect the metric will be 20 instead of 1

-14 Router

202.122.64.65/32 [20/0]

202.122.64.1/32 [20/0]

why subnet mask is 255.255.255.255, I expect it will be 255.255.255.192 because I divide the whole class C into 4 networks

Why metric is 0

-17A Router

202.122.64.65/32 [20/100]

202.122.64.1/32 [20/100]

Why metric is 100

5 Replies 5

chrislau388
Level 1
Level 1

Please paste the result of "show ip route" of the routers.

lee.reade
Level 4
Level 4

Hi,

I have not looked at your config files and there is quite a bit f info there, but basically when ospf and bgp redistribute between each other, the ospf metric will be copied into the bgp med attribute and vice versa.

Also with regard to subnet mask 255.255.255.255 I will assume that this is for your loopback addresses on the ospf routers? If so then ospf will always advertise loopback addresses as /32, you can do 3 things to change this,

a. ip ospf network type point-to-point

b. redistribute connected

c. area range commaand

Just go with option a and you will be fine.

HTH

LR

Hi all,

I still have below issue, can expert help to explain it?

-16A Router

All E2 route [110/1] learned --I don't know why the metric is 1 as

I redistribute bgp route into ospf with external metric (default 20), I expect the metric will be 20 instead of 1

17A, 17B Router

B 202.122.64.64 [20/100]

B 202.122.64.0 [20/100]

B 202.122.65.64 [20/0]

B 202.122.65.0 [20/0]

Why metric is 100 and 0

16B, 16C Router

why the metric of all bgp learned route is 0

26, 36 Router

why the metric of all bgp learned route is 0

When you redistribute BGP routes into OSPF, the default metric is 1. The default value of 20 is there for other IGP's but it is 1 for BGP

The Metric for the BGP route is nothing but the MED. By default all the prefixes learned from a BGP peer are assigned a MED of 0 (unless assigned specifically)and hence you see that the routes have a metric value of 0

as they are learned from BGP (202.122.65.0)

However if you redistribute any route into BGP with a metric value, it gets copied as the MED which is reflected in the routing table (the reason for seeing 100 for prefix 202.122.64.0)

HTH

Narayan

Hi Narayan,

Thanks for your help, just one more question.

To 17A and 17B router, it seen 202.122.64.0 redistribute from ospf to bgp with metric value 100.Therefore 17A and 17B

routing table has 202.122.64.0 [20/100]

So How about 16B and 16C seen 202.122.64.0. It is just one more hop count away from 17A and 17B. Then why 16B and 16C

routing table has 202.122.64.0 [20/0]

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card