Lesson Contents
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:
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.
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 final 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.
Hi.
... Continue reading in our forumI have a question.
When turn R2 into a stub router, neighbor router of R2 don’t send advertise routes except connected and summary?
After I turn R2 into a stub router, I looked R2 Routing table.
R2 have entry about R3 L0 and L1 route.
Is this correct?
Hello Yoichi
When R2 is configured as a stub router, this means that R2 only advertises connected and summary routes. This configuration does not affect the behavior of R3. So R3 still sends out its entries for L0 and L1, and R2 receives them. However, R2 will only advertise connected and summary routes to R1. This is the behavior of the stub feature for EIGRP.
I hope this has been helpful!
Laz
Hello Laz
Thank you so much!!
I could understand well.
Yoichi
https://cdn-forum.networklessons.com/uploads/default/original/2X/1/160336f9d80d11a258ed6e4468004d8c1b48c900.png
The network 1.1.1.1/32 is on R1
I was investigating split horizon and EIGRP and I noticed that if router R3 is a stub it will not send back infinite routes through the interface(Gi0/1) that it learned the route(1.1.1.1) from. It will also not advertise the downstream route either to R4 through Gi0/0. I noticed this because show ip eigrp topology all-links was not showing a non successor through gi0/1. Also furthermore after shutting down the backup l
... Continue reading in our forumHello Justin
Thanks for sharing your experience and the results of your investigations of the split horizon and stub features of EIGRP. This behavior that you observed in the R3 router is indeed based on how EIGRP operates. The behavior centers on the fact that R3 is configured as a stub even though it has more than one connection to the rest of the EIGRP topology.
The term “stub” typically denotes an endpoint or a router at the edge, and in the common EIGRP use case, it’s often a router with a single connection to the rest of the network. Such routers are id
... Continue reading in our forum