EIGRP Stub Leak Map

The EIGRP stub feature is useful to prevent unnecessary EIGRP queries and to filter some routes that you advertise. What if you want to configure your router as a stub router but still make an exception to some routes that it advertises? That is possible with the leak-map feature. Let’s have a look…

Configuration

Here is the topology we will use:

three routers r1 r2 r3

R3 has two loopback interfaces that we advertise in EIGRP. R2 will become our stub router, which prevents R1 from learning 3.3.3.3/32 and 33.33.33.33/32. We’ll then use the leak-map so that R2 makes an exception, allowing R1 to learn 3.3.3.3/32.

The EIGRP stub feature is useful to prevent unnecessary EIGRP queries and to filter some routes that you advertise. What if you want to configure your router as a stub router but still make an exception to some routes that it advertises? That is possible with the leak-map feature. Let's have a look.

Let’s start with a basic EIGRP configuration:

R1(config-if)#router eigrp 1
R1(config-router)#network 192.168.12.0
R2(config-if)#router eigrp 1
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
R3(config-if)#router eigrp 1
R3(config-router)#network 192.168.23.0
R3(config-router)#network 3.3.3.3 0.0.0.0 
R3(config-router)#network 33.33.33.33 0.0.0.0

Right now, R1 can learn about the 3.3.3.3/32 and 33.33.33.33/32 networks:

R1#show ip route eigrp 

      3.0.0.0/32 is subnetted, 1 subnets
D        3.3.3.3 [90/131072] via 192.168.12.2, 00:00:10, GigabitEthernet0/1
      33.0.0.0/32 is subnetted, 1 subnets
D        33.33.33.33 
           [90/131072] via 192.168.12.2, 00:00:10, GigabitEthernet0/1
D     192.168.23.0/24 [90/3072] via 192.168.12.2, 00:00:12, GigabitEthernet0/1

Let’s turn R2 into a stub router:

R2(config-if)#router eigrp 1
R2(config-router)#eigrp stub

The default option for a stub router is that it only advertises connected and summary routes. That’s why R1 is now unable to learn the networks from R3:

R1#show ip route eigrp 

D     192.168.23.0/24 [90/3072] via 192.168.12.2, 00:00:14, GigabitEthernet0/1

If we want to make an exception to this rule, we can use a leak-map. I’ll create an access-list that matches 3.3.3.3/32 and add it to a route-map. The route-map can then be used in the eigrp stub command:

R2(config)#ip access-list standard R3_L0
R2(config-std-nacl)#permit host 3.3.3.3

R2(config)#route-map R3_L0_LEAK
R2(config-route-map)#match ip address R3_L0

R2(config)#router eigrp 1
R2(config-router)#eigrp stub leak-map R3_L0_LEAK

Let’s check R1 to see the new result:

R1#show ip route eigrp 

      3.0.0.0/32 is subnetted, 1 subnets
D        3.3.3.3 [90/131072] via 192.168.12.2, 00:00:14, GigabitEthernet0/1
D     192.168.23.0/24 [90/3072] via 192.168.12.2, 00:00:16, GigabitEthernet0/1

There we go, R2 now advertises 3.3.3.3/32 because of leak-map. That’s all there is to it!

Configurations

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

R1

hostname R1
!
ip cef
!
interface GigabitEthernet0/1
 ip address 192.168.12.1 255.255.255.0
!
router eigrp 1
 network 192.168.12.0
!
end

R2

hostname R2
!
ip cef
!
interface GigabitEthernet0/1
 ip address 192.168.12.2 255.255.255.0
!
interface GigabitEthernet0/2
 ip address 192.168.23.2 255.255.255.0
!
router eigrp 1
 network 192.168.12.0
 network 192.168.23.0
 eigrp stub connected summary leak-map R3_L0_LEAK
!
ip access-list standard R3_L0
 permit 3.3.3.3
!
route-map R3_L0_LEAK permit 10
 match ip address R3_L0
!
end

R3

hostname R3
!
ip cef
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface Loopback1
 ip address 33.33.33.33 255.255.255.255
!
interface GigabitEthernet0/1
 ip address 192.168.23.3 255.255.255.0
!
router eigrp 1
 network 3.3.3.3 0.0.0.0
 network 33.33.33.33 0.0.0.0
 network 192.168.23.0
!
end

Conclusion

You have now learned how to make an exception in the routers that an EIGRP stub router advertises by using the leak-map feature.

Tags:


Forum Replies

  1. Hi Rob,

    There’s a big difference between the two. An EIGRP router that is configured as a stub does not receive queries when one of its neighbors loses a network.

    Passive-interface is about sending hello packets on an interface. Normally when you use the network command to advertise something then it does two things:

    1. It advertises all networks that fall within the range of your network commmand on all active interfaces.
    2. It sends hello packets on all active interfaces that have networks that fall within the range of your network command.

    When you enable passiv

    ... Continue reading in our forum

  2. Hi,

    Yes this is pretty much exactly what I said in my post.

    There are some specific use cases where you will need to allow a stub router to process queries (such as multihomed branch offices in a DMVPN deployment where if R1’s uplink fails, you have to reconverge through R2 etc).

  3. Hello Jeremy

    This is a great question and it brings up some subtle points of how EIGRP functions. Queries are subject to the split horizon rule just like advertisements are. If you get a query for a network from an interface, you never send out a query for that same network from that interface.

    So in the first case, when R2 lost connectivity to the loopback network, it sent a query to R1 for an alternate route to that destination. This is because in this case, R1 is not a stub. Because R1 got a query from R2, it did not send a query back to R2 via that inte

    ... Continue reading in our forum

  4. Thank you Lazaros,
    It is clear for me, and I have to say that I am one of the luckiest person that I have Lazaros.

  5. Hello Rene,

    I took some time to lab this “eigrp stub redistributed” out and found some interesting parts (if only “redistributed” is in it without “connected” and “summary”)
    The Stub router will only advertise if you use the eigrp “redistribute” command with an foreign routing protocol or another EIGRP AS it wont advertise the route if you use “redistribute connected” or “redistribute static” you need to manually

    ... Continue reading in our forum

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