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…
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 184.108.40.206/32 and 220.127.116.11/32. We’ll then use the leak-map so that R2 makes an exception, allowing R1 to learn 18.104.22.168/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 22.214.171.124 0.0.0.0 R3(config-router)#network 126.96.36.199 0.0.0.0
Right now, R1 can learn about the 188.8.131.52/32 and 184.108.40.206/32 networks:
R1#show ip route eigrp 220.127.116.11/32 is subnetted, 1 subnets D 18.104.22.168 [90/131072] via 192.168.12.2, 00:00:10, GigabitEthernet0/1 22.214.171.124/32 is subnetted, 1 subnets D 126.96.36.199 [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 188.8.131.52/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 184.108.40.206 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 220.127.116.11/32 is subnetted, 1 subnets D 18.104.22.168 [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 22.214.171.124/32 because of leak-map. That’s all there is to it!
Want to take a look for yourself? Here you will find the final configuration of each device.
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
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 126.96.36.199 ! route-map R3_L0_LEAK permit 10 match ip address R3_L0 ! end
hostname R3 ! ip cef ! interface Loopback0 ip address 188.8.131.52 255.255.255.255 ! interface Loopback1 ip address 184.108.40.206 255.255.255.255 ! interface GigabitEthernet0/1 ip address 192.168.23.3 255.255.255.0 ! router eigrp 1 network 220.127.116.11 0.0.0.0 network 18.104.22.168 0.0.0.0 network 192.168.23.0 ! end
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 forum
I 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?
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!
Thank you so much!!
I could understand well.