EIGRP External Route Path Selection

EIGRP external routes use an AD (Administrative Distance) of 170. When two sources are advertising the same route, then it’s up to the metric to decide which one we will install in the routing table. When the metric is equal, EIGRP will install both routes as successor routes, and that’s it.

What I explained above is only true when all EIGRP routers are using the same AS number. When you use more than one AS number, something else will happen…

To demonstrate this, I’ll use the following three routers:

EIGRP External Path Selection Demo

Above we have three routers. R2 and R3 have a loopback interface with the same IP address (23.23.23.23) which we’ll redistribute into EIGRP.

Configuration




External route – Same AS Number

Let’s start with an example where all routers are using the same AS number. Here’s the configuration of all routers:

R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.12.0 0.0.0.255
R1(config-router)#network 192.168.13.0 0.0.0.255
R2(config-if)#router eigrp 1
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.12.0 0.0.0.255
R2(config-router)#redistribute connected metric 1 1 1 1 1
R3(config)#router eigrp 1
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.13.0 0.0.0.255
R3(config-router)#redistribute connected metric 1 1 1 1 1

R2 and R3 will redistribute all directly connected interfaces that don’t have a network command, in our case that’s only the loopback interface. Here’s what the routing table of R1 looks like:

R1#show ip route eigrp 

      23.0.0.0/32 is subnetted, 1 subnets
D EX     23.23.23.23 
           [170/2560000512] via 192.168.13.3, 00:01:16, GigabitEthernet0/2
           [170/2560000512] via 192.168.12.2, 00:01:16, GigabitEthernet0/1

R1 has install two successor routes. This makes sense since the AD and metric are both the same.

External Route – Different AS

Let’s try something else…R1 and R2 will remain in AS 1 but between R1 and R3 I’m going to use AS 3. Let’s change the configurations:

R1(config)#router eigrp 1
R1(config)#no network 192.168.13.0
R1(config)#router eigrp 3
R1(config-router)#network 192.168.13.0 0.0.0.255 
R3(config)#no router eigrp 1
R3(config)#router eigrp 3
R3(config-router)#network 192.168.13.0 0.0.0.255         
R3(config-router)#redistribute connected metric 1 1 1 1 1

Here’s what the routing table of R1 looks like now:

R1#show ip route eigrp 

      23.0.0.0/32 is subnetted, 1 subnets
D EX     23.23.23.23 
           [170/2560000512] via 192.168.12.2, 00:00:04, GigabitEthernet0/1

Only one entry remains…the path through R2. Why? Let’s see if we can find an answer in the EIGRP topology table:

R1#show ip eigrp topology 
EIGRP-IPv4 Topology Table for AS(1)/ID(192.168.13.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 192.168.12.0/24, 1 successors, FD is 2816
        via Connected, GigabitEthernet0/1
P 23.23.23.23/32, 1 successors, FD is 2560000512
        via 192.168.12.2 (2560000512/2560000256), GigabitEthernet0/1

EIGRP-IPv4 Topology Table for AS(3)/ID(192.168.13.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status 

P 192.168.13.0/24, 1 successors, FD is 2816
        via Connected, GigabitEthernet0/2
P 23.23.23.23/32, 0 successors, FD is Infinity
        via 192.168.13.3 (2560000512/2560000256), GigabitEthernet0/2

Above you can see that the path through R3 has been set to infinity. This doesn’t make much sense since the metric remained the same. To figure out what is really going on, we’ll have to do a little experiment. First I will shut all interfaces on R1:

R1(config)#interface Gi0/1
R1(config-if)#shutdown

R1(config)#interface Gi0/2
R1(config-if)#shutdown

Before I reenable all interfaces, we’ll enable a debug:

R1#debug ip routing
IP routing debugging is on

The debug ip routing command is very useful as it will tell you when and why certain routes are installed in the routing table. Let’s enable the interface that connects to R3 first:

R1(config)#interface Gi0/2
R1(config-if)#no shutdown

We can now see that R1 installs the route in its routing table:

R1#
RT: updating eigrp 23.23.23.23/32 (0x0)  :
    via 192.168.13.3 Gi0/2  0 1048578

So far so good, R1 has installed the path through R3. Let’s enable the interface that connects to R2:

R1(config)#interface GigabitEthernet 0/1
R1(config-if)#no shutdown

This is where the magic happens:

R1#
RT: updating eigrp 23.23.23.23/32 (0x0)  :
    via 192.168.12.2 Gi0/1  0 1048578

RT: closer admin distance for 23.23.23.23, flushing 1 routes
RT: add 23.23.23.23/32 via 192.168.12.2, eigrp metric [170/2560000512]
RT: updating eigrp 23.23.23.23/32 (0x0)  :
    via 192.168.13.3 Gi0/2  0 1048578

Above we can see that R1 removes the path through R3 and installs the path through R2. It’s showing us that it has a “closer admin distance”. The administrative distance however is the same but EIGRP does prefer the lower AS number. That’s why the path through R2 is preferred.

Configurations

Want to take a look for yourself? Here you will find the final configuration of each device.

R1

hostname R1
!
ip cef
!
interface GigabitEthernet0/1
 ip address 192.168.12.1 255.255.255.0
 duplex auto
 speed auto
 media-type rj45
!
interface GigabitEthernet0/2
 ip address 192.168.13.1 255.255.255.0
 duplex auto
 speed auto
 media-type rj45
!
router eigrp 1
 network 192.168.12.0
!
router eigrp 3
 network 192.168.13.0
!
end

R2

hostname R2
!
ip cef
!
interface Loopback0
 ip address 23.23.23.23 255.255.255.255
!
interface GigabitEthernet0/1
 ip address 192.168.12.2 255.255.255.0
 duplex auto
 speed auto
 media-type rj45
!
router eigrp 1
 network 192.168.12.0
 redistribute connected metric 1 1 1 1 1
!
end

R3

hostname R3
!
ip cef
!
interface Loopback0
 ip address 23.23.23.23 255.255.255.255
!
interface GigabitEthernet0/1
 ip address 192.168.13.3 255.255.255.0
 duplex auto
 speed auto
 media-type rj45
!
router eigrp 3
 network 192.168.13.0
 redistribute connected metric 1 1 1 1 1
!
end

Conclusion

EIGRP path selection is usually pretty straightforward but there’s a little twist when you use different AS numbers. When the AD and metric are the same, EIGRP will prefer the lower AS number.


Forum Replies

  1. Hi Rene
    I have two notes about router one configuration :-
    1 - In the configuration of external route – same AS number you need to advertising the 192.168.13.0 network or change the wildcard mask to 0.0.1.255 otherwise the router one and router three will not become neighbors.
    2 - In the configuration of external route – different AS if you get rid of eigrp AS 1 we will lose the neighbor adjacency with router two.
    please correct me if I wrong
    Thanks a lot

  2. Hi Hussein,

    You are right, I left some errors in the configs…oops! Just fixed them, thanks :slight_smile:

    Rene

  3. Hi,

    Is this External routes behaviour the same for Internal routes , i.e 2 different internal AS processes?

    Cheers,
    Rob

  4. Hello Robert

    External routes are defined as routes learned by an EIGRP process via redistribution. This redistribution can also take place from one EIGRP AS to another just like in the lesson. In the lesson, you can see that these routes are marked with the EX designation, meaning they are indeed external routes.

    This behaviour of choosing the lower EIGRP AS as better takes place only when you have multiple AS’es configured within your EIGRP topology, and when the same route is learned from two different EIGRP AS processes.

    Now when you say “internal routes,

    ... Continue reading in our forum

4 more replies! Ask a question or join the discussion by visiting our Community Forum