BGP Static Routes



Static Routes and Redistribution


You could always use static routes to originate a network or a subnet. The only difference is that BGP will consider these routes as having an origin of incomplete (unknown). In the above example the same could have been accomplished by doing:

RTC#
router eigrp 10
network 175.220.0.0
redistribute bgp 200
default−metric 1000 100 250 100 1500
router bgp 200
neighbor 1.1.1.1 remote−as 300
redistribute static
...
ip route 175.220.0.0 255.255.255.0 null0
....
The null 0 interface means disregard the packet. So if I get the packet and there is a more specific match than 175.220.0.0 (which exists of course) the router will send it to the specific match otherwise it will disregard it.

This is a nice way to advertise a supernet.

We have discussed how we can use different methods to originate routes out of our autonomous system.

Please remember that these routes are generated in addition to other BGP routes that BGP has learned via neighbors (internal or external). BGP passes on information that it learns from one peer to other peers. The difference is that routes generated by the network command, or redistribution or static, will indicate your AS as the origin for these networks.

Injecting BGP into IGP is always done by redistribution.



RTA#
router bgp 100
neighbor 150.10.20.2 remote−as 300
network 150.10.0.0
RTB#
router bgp 200
neighbor 160.10.20.2 remote−as 300
network 160.10.0.0
RTC#
router bgp 300
neighbor 150.10.20.1 remote−as 100
neighbor 160.10.20.1 remote−as 200
network 170.10.00
Note that you do not need network 150.10.0.0 or network 160.10.0.0 in RTC unless you want RTC to also generate these networks on top of passing them on as they come in from AS100 and AS200. Again the difference is that the network command will add an extra advertisement for these same networks indicating that AS300 is also an origin for these routes.

An important point to remember is that BGP will not accept updates that have originated from its own AS. This is to insure a loop free interdomain topology.

For example, assume AS200 above had a direct BGP connection into AS100. RTA will generate a route 150.10.0.0 and will send it to AS300 then RTC will pass this route to AS200 with the origin kept as AS100, RTB will pass 150.10.0.0 to AS100 with origin still AS100. RTA will notice that the update has originated from its own AS and will ignore it.