I have some static routes on a router where OSPF and BGP are also running. I have redistributed the static routes into OSPF (showing in OSPF database). I also want to have the static routes into the BGP routing table. Understand this can be done by using a prefix list permiting all the static routes, however I was thinking a simpler way just redistributing whatever is in the OSPF routing tabel into BGP (permit 0.0.0.0/0 le 32).
My question is if OSPF really redistributes those routes. Those routes are shown as "static" in "sh ip route" even though they are also in OSPF database. I have heard that OSPF only redistributes the routes showing as "OSPF routes", not what's in its database.
in general terms redistribution will always check the IP routing table and not OSPF database, BGP table or elsewhere.
So "redistribute static" will redistribute only those routes, which will be found currently in the IP routing table marked with an "S". And also "redistribute ospf 10" will only redistribute those routes into another routing protocol, which the OSPF process 10 has inserted into the IP routing table.
In your case OSPF will announce the network inserted into the IP routing table through static routes as long as they are in there, because of the "redistribute static subnets" you probably have configured.
If you now want to have the static routes in BGP you would configure something like
router bgp 65000
redistribute static route-map static2bgp
route-map static2bgp permit 10
match ip address prefix-list 123
ip prefix-list 123 permit ...
You could leave the route-map away, but in case you have a bgp router connected to the internet I would strongly recommend to use some filters.
"redistribute ospf 10" would look for all internal ospf routes in the IP routing table and therefore NOT grab the static ones.
The thing to understand here is that the use of redistribution does not change anything in the routing table of the router on which you are configuring it.
As you have observed, static routes do not become OSPF routes when you redistribute them into OSPF. This can be generalised to the following: when you redistribute protoclol1 into protocol2, the router will scan the routing table for routes installed by protocol1 and will then do one of the following, depending on the protocol it is being redistributed into:
- if it is a Link state protocol like OSPF, it will originate LSAs appropriate to the route being redistributed. These LSAs will be subsequently flooded to other routers which will install them as routes in their routing table. The only change on the redistributing router is the installation of additional LSAs; the routing table does not change
- if it is a distance vector protocol like IGRP, the router will take the protocol1 routes and advertise them via IGRP update packets every time an update packet is sent. Once again, there is no change on the routing table of the redistributing router.
Note the other important point: when redistributing is carried out, the only routes that are redistributed are those that are in the routing table and installed there by the source protocol, which could be quite different to the contents of link-state databases.
Hi everyone, I would like to thank you in advance for any help you can provide a newcomer like myself!
Im studying the 100-105 book by Odom and am currently on the topic of Port security. I purchased a used 2960 and I'm trying to follow a...
While deploying a number of 18xx/2802/3802 model access points (APs), which run AP-COS as their operating platform. It can be observed on some occasions that while many of their access points were able to join the fabric WLC withou...
I am going to design and build an LAN network under a tunnel underground with long distance between the switches.
I will have 2 Catalyst switches and 8 Industrial IE3000, and they will be connected with fiber.
For now I am planning on use Layer-2 s...