01-04-2007 08:56 AM - edited 03-03-2019 03:15 PM
Due to some reason, I need to redistribute one route leart from BGP into OSPF, in order to let the hosts in my network know this route. I use the following commands.
router ospf 17357
router-id 216.x.x.10
log-adjacency-changes
redistribute connected subnets
redistribute static subnets
redistribute bgp 7367 subnets route-map ToMDC
network 67.x.x.0 0.0.31.255 area 0
network 208.x.x.0 0.0.15.255 area 0
network 216.x.x.0 0.0.31.255 area 0
default-information originate always
route-map ToMDC permit 10
match ip address prefix-list MDC_IN
ip prefix-list MDC_IN seq 10 permit 131.190.0.0/16
When I verify the result on this router with following command, everything seems OK.
EdgeRouter2#show ip route 131.190.0.0
Routing entry for 131.x.0.0/16
Known via "bgp 7367", distance 20, metric 0
Tag 11177, type external
Redistributing via ospf 17357
Last update from 216.x.110.62 7w0d ago
Routing Descriptor Blocks:
* 216.67.110.62, from 216.x.110.62, 7w0d ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 11177
However, when I check on its OSPF neighbors, those ones running BGP can learn this route through iBGP, but those ones only running OSPF cannot learn this route.
Is there anyone can tell me what's the cause to this problem or tell me how to make that? Thanks a lot.
Solved! Go to Solution.
01-05-2007 06:15 AM
Hi
" bgp redistribute-internal " command is used when you redistribute a ibgp learned route to igp . But in your case , its a ebgp route , so no other extra config is required , it should get redistributed.
Can u try doing a " clear ip route x.x.x.x mask " for this route in your ebgp router and check.
Hope this helps
regards
vanesh k
01-04-2007 09:35 AM
Hi,
Pls let me know wheter you are receiving the default route advertised by this router in your other OSPF router.
Also see wheter it gets into ospf database
sh ip ospf database external 131.190.0.0
regards
vanesh k
01-04-2007 01:23 PM
yes, other OSPF routers can recieve the default route advertised by this router.
and this route cannot be found in the OSPF database.
01-04-2007 02:01 PM
Philipp,
Can you try to do a "clear ip ospf redistribution" to see if it fixes the issue.
Hope this helps,
01-05-2007 05:40 AM
yes, I did do this, but it didn't work.
I think the router may do the redistribution in this mechanism: The routes leart from eBGP will convert to iBGP first, if you want to redistribute the routes into IGP, you have to use "bgp redistribute-internal" command. Am I right?
BTW, what if I just want to redistribute some of the routes? Should I redistribute all the iBGP routes into IGP?
01-05-2007 06:15 AM
Hi
" bgp redistribute-internal " command is used when you redistribute a ibgp learned route to igp . But in your case , its a ebgp route , so no other extra config is required , it should get redistributed.
Can u try doing a " clear ip route x.x.x.x mask " for this route in your ebgp router and check.
Hope this helps
regards
vanesh k
01-05-2007 08:39 AM
The only reason why I thought about using " bgp redistribute-internal " is that other routers running both OSPF and BGP in my network will learn this route from iBGP, but only after I configure the redistributing BGP to OSPF. It's very odd, isn't it? anyway, we solve the problem, thanks a lot!
01-05-2007 06:16 AM
You really shouldn't use the redistribute internal unless you have no other option. You will end up having to mess with administrative distance on some routers to make it really work.
If I read you post correctly the routes you are redistributing are EBGP routes anyway. If you do show ip bgp you should see if they are ebgp or Ibgp.
It appears it does redistribute them into OSPF.... at least it says it does. Do a show ip ospf database external and see if the routes and in the ospf database.
You can then do the same command on one of the ospf only routers. See if the entry is in the database. If it is then you have a problem with ospf not installing the route into the routing table and that can be caused by a number of things. If it is not in the ospf database on the remote ospf routers then you must look at your design. If you are using stub or NSSA areas these routers will not get this route and that is the correct thing since they are assumed to use the default route.
Hopefull this is more helpful than confusing now that I reread this
01-05-2007 08:34 AM
The problem is sovled. Thanks a lot to network.king, your last advice is really helpful. And also many thanks to tdrais too.
When I made my first configuration and check with "show ip route 131.190.0.0" on that router, it said "Redistributing via ospf 17356". But it was not in the database when I use the command "show ip ospf database".
But thing is different with the command "clear route 131.190.0.0 255.255.0.0" adviced by network.king. The following is the result:
EdgeRouter2#show ip route 131.190.0.0
Routing entry for 131.191.0.0/16
Known via "bgp 17357", distance 20, metric 0
Tag 11177, type external
Redistributing via ospf 17357
Advertised by ospf 17357 subnets route-map ToMDC
Last update from 216.67.110.62 00:13:00 ago
Routing Descriptor Blocks:
* 216.67.110.62, from 216.67.110.62, 00:13:00 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 11177
"Advertised by ospf 17357 subnets route-map ToMDC" is really the differnece. It's very confusing, when the IOS says "redistributing", it does not mean it will "advertising".
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: