BGP and redistribution issue

Unanswered Question
Jul 14th, 2008
User Badges:

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




  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
chrislau388 Mon, 07/14/2008 - 06:25
User Badges:

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



lee.reade Mon, 07/14/2008 - 06:27
User Badges:
  • Silver, 250 points or more

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

acbenny Tue, 07/15/2008 - 08:05
User Badges:

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





Attachment: 
royalblues Tue, 07/15/2008 - 09:24
User Badges:
  • Green, 3000 points or more

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

acbenny Tue, 07/15/2008 - 20:23
User Badges:

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]

Actions

This Discussion