Default Route Propagation Using BGP and EIGRP

One of the more complicated routing configurations we need to do in the Marine Corps is to propagate a default route.  I know you are thinking default route propagation is not rocket science, but there are nuances that make efficient routing more challenging than it may appear.  The scenario I have created simulates a pair of screening and point of presence (POP) routers with iBGP connections inside of ASN 1.  The POP routers also connect to a router running only EIGRP which simulates what we would see on our LAN routers.  R8 contains a number of loopback interfaces to show propagated routes, and a loopback 6.0.0.1/8 that I have used to simulate a default network.  The addressing I used was 172.16.X.0/30 where X stands for the routers involved in the connection (for example, the point to point connection from R2 to R4 would be 172.16.24.0/30).

The first thing we need to do is propagate a default route from our screening router to our POP router (R4 -> R2 and R5 -> R3).  We could just use the neighbor default-originate command by itself, but this would not allow for proper failover if one of our eBGP neighbors went down.  If one of our neighbors went down we would be dropping half of our packets because when they made it to the screening router there would be no path out.  We could configure some additional interconnections to account for this, or we could place a condition on the propagation of the default route.  In this case, we will create a route-map that must be satisfied in order to generate the default route.  We will create the prefix-list, route-map and default-originate statement on R4 and R5.  It would look like this:

ip prefix-list DEFAULT seq 5 permit 6.0.0.0/8
!
route-map DEFAULT permit 10
 match ip address prefix-list DEFAULT
!
router bgp 1
neighbor 172.16.24.1 default-originate route-map DEFAULT

The 6.0.0.0/8 network is the loopback I used to simulate a default network.  At this point, R2 and R3 should see the default network.  To test your route-map’s success try shutting down your loopback for the 6.0.0.0/8 network.  The default route will disappear when this loopback is shutdown.

R1 still does not have a default route. We will need to configure redistribution for this.  For the purposes of this example I have created 2-way redistribution on R2 and R3 (this way our simulated backside networks will be in BGP so our pings to ASN 3 networks will succede).  One of the gotchas about this configuration is that redistribution does not work for iBGP by default, so we will need an additional command to override that.  Here is what that would look like:

router eigrp 1
 redistribute bgp 1 metric 1000 10 255 1 1500
!
router bgp 1
bgp redistribute-internal

redistribute eigrp 1

Now that we have configured the 2-way redistribution we run into a problem.  In my case when I ran these commands everything was as it should have been on R2.  R3 no longer received its default route through its iBGP connection, but through an external EIGRP connection (ultimately coming from R2).  This is because of the administrative distance of iBGP (200) and external EIGRP (170).  Because we are now only effectively propagating a default route from one source, we will need to make a change to this default configuration.  To solve this issue we will need to prefer iBGP to external EIGRP.  You could accomplish this by either lowering the AD of iBGP or raising the AD of external EIGRP.  I prefer to lower the AD of iBGP.  Changing the AD is local to the router (not propagated) so we will need to do this on both R2 and R3.  In addition to the change in AD, you will need to reset your BGP connections for the default routes to propagate with the newly configured AD.  The command would look like this:

router bgp 1
 distance bgp 20 169 169 

After the neighbor relationships have reestablished, we achieve the desired result on R1 (simulating our LAN routers) of a load-balanced default route.

R1#show ip route
Gateway of last resort is 172.16.13.2 to network 0.0.0.0
     1.0.0.0/32 is subnetted, 1 subnets
D EX    1.1.1.1 [170/2588160] via 172.16.13.2, 01:21:03, FastEthernet0/1
                [170/2588160] via 172.16.12.2, 01:21:03, FastEthernet0/0
     2.0.0.0/32 is subnetted, 1 subnets
D EX    2.2.2.2 [170/2588160] via 172.16.13.2, 01:21:03, FastEthernet0/1
                [170/2588160] via 172.16.12.2, 01:21:03, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
D EX    3.3.3.3 [170/2588160] via 172.16.13.2, 01:21:03, FastEthernet0/1
                [170/2588160] via 172.16.12.2, 01:21:03, FastEthernet0/0
D EX 6.0.0.0/8 [170/2588160] via 172.16.13.2, 00:27:04, FastEthernet0/1
               [170/2588160] via 172.16.12.2, 00:27:04, FastEthernet0/0
     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
C       172.16.12.0/30 is directly connected, FastEthernet0/0
C       172.16.13.0/30 is directly connected, FastEthernet0/1
C       172.16.99.0/24 is directly connected, Loopback0
D*EX 0.0.0.0/0 [170/2588160] via 172.16.13.2, 00:27:06, FastEthernet0/1

               [170/2588160] via 172.16.12.2, 00:27:06, FastEthernet0/0 

This is certainly not the only way you can accomplish multihoming and default route propagation, but this is a great start for learning some of the nuances of BGP and EIGRP.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.