05-07-2008 08:34 PM - edited 03-05-2019 10:49 PM
I have a customer that we configured over our MPLS backbone. I don't spend enough time in the BGP realm to claim to be an expert. When using EIGRP and static routes, its only necessary under the router eigrp statement to list the directly connected subnets and the redistribute the statics. I found out today with BGP, that you list the subnets under the router bgp statement that you have created static routes for instead of using redistribute static. Why is BGP designed this way? The question might be rhetorical. The remote.txt has the static routes in it.
Solved! Go to Solution.
05-07-2008 10:34 PM
Patrick
Firstly the "network x.x.x.x" statement under the BGP config is doing something very different from network statements under OSPF/EIGRP.
With EIGRP/OSPF the network statements tell the router which interfaces to start running that routing protocol on.
With BGP the network statement tells the router which routes to advertise.
Secondly, a router will only advertise out the networks under the BGP config if it finds an exact match in the IGP routing table. So from yur config on the remote end device
router bgp 65005
network 192.168.2.0 (mask 255.255.255.0)
ip route 192.168.2.0 255.255.255.0 192.168.1.1
You only need that static route if there is not a route for 192.168.2.0/24 in the IGP routing table ie. when you do a "sh ip route"
Note that if you had in the IGP routing table
192.168.2.0 255.255.255.128
192.168.2.128 255.255.255.128
that this wouold not be an exact match with your BGP network statement so you can either
1) Add a static route as you have
2) Advertise out the /25 subnets under your BGP config.
Jon
05-07-2008 10:34 PM
Patrick
Firstly the "network x.x.x.x" statement under the BGP config is doing something very different from network statements under OSPF/EIGRP.
With EIGRP/OSPF the network statements tell the router which interfaces to start running that routing protocol on.
With BGP the network statement tells the router which routes to advertise.
Secondly, a router will only advertise out the networks under the BGP config if it finds an exact match in the IGP routing table. So from yur config on the remote end device
router bgp 65005
network 192.168.2.0 (mask 255.255.255.0)
ip route 192.168.2.0 255.255.255.0 192.168.1.1
You only need that static route if there is not a route for 192.168.2.0/24 in the IGP routing table ie. when you do a "sh ip route"
Note that if you had in the IGP routing table
192.168.2.0 255.255.255.128
192.168.2.128 255.255.255.128
that this wouold not be an exact match with your BGP network statement so you can either
1) Add a static route as you have
2) Advertise out the /25 subnets under your BGP config.
Jon
05-08-2008 12:26 AM
1) Add a static route as you have
2) Advertise out the /25 subnets under your BGP config.
OR
3) Advertise the classful 192.168.2.0 network without the mask keyword and then any route for the major network or one of its subnets of 192.168.2.0 that may already exist in the IP routing table would suffice to advertise the class C address. In other words, an exact match is only needed if the mask keyword is used to advertise a classless route.
HTH
Victor
05-08-2008 05:52 PM
Hey Victor
3) - that i did not know and is something that will be quite useful in some of our sites.
Many thanks, rated
Jon
05-08-2008 06:56 PM
Wait a minute! You mean I was able to actually teach YOU something for a change??? Wow! Im impressed with myself. Shazam! :-)
Thanks for the rating, buddy.
Victor
05-08-2008 08:54 PM
Your configuration like this
router bgp 65005
network 192.168.2.0 (mask 255.255.255.0)
#ip route 192.168.2.0 255.255.255.0 null 0
05-08-2008 08:29 PM
You don't have to use the network statement to bring those routes into BGP, you still can do a "redistribute static" like other routing protocols.
There are a few differences, though.
First, if you do not filter on the redistribution, it will pull all of your statics into BGP, whereas with network statements, only the ones you specify will be pulled in (as long as those networks listed on the network statements are in the RIB).
Second, routes brought into BGP via the network statement will be listed with an origin of i (IGP) whereas netowrks brought in via redistribution will have an origin of ? (incomplete). In many networks, that difference is not much of a concern.
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: