EIGRP STUB
Stub routing is one way to limit queries. A stub router is
one that is connected to on more than two neighbors and should be a transit
router.
The EIGRP stub routing feature improve network stability, reduces
resource utilization, and simplifies remote router (spoke) configuration. Stub
routing is commonly used in a Hub-and-Spoke topology.
Here is the command:
R1(config-router)#EIGRP STUB ?
connected Do
advertise connected routes
leak-map Allow
dynamic prefixes based on the leak-map
receive-only Set receive
only neighbor
redistributed Do advertise
redistributed routes
static Do
advertise static routes
summary Do
advertise summary routes
- Connected
means the router advertise connected routes only for those interfaces which
matched with a network command.
- Leak-map
means the router advertise only which is specified by a leak-map
- Receive-only
means the router do not advertise any routes. And this option can be used with
any other option.
- Redistribution
means the router advertise only the redistributed routes.
- Static
means the router advertise only the static routes with redistributed static
command configured.
- Summary
means the router advertise only auto summarized or statically configured
summary routes
let's see the configuration for a better understanding: -
Topology:
Goal:
- configure the topology as per the diagram.
- configure EIGRP 650001 advertise interfaces and disable auto-summary.
- make sure only one route advertises to router 1 and router 2 from router 3
- after verifying the summary now configure EIGRP STUB on router 1 preventing sending any routes to router 2 make sure router 2 receives routes only from router 2.
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.1.1.1 YES manual up up
Serial3/0 1.1.1.1 YES manual up up
Loopback0 11.0.0.1 YES manual up up
Loopback1 11.0.1.1 YES manual up up
Loopback2 11.0.2.1 YES manual up up
Loopback3 11.0.3.1 YES manual up up
R2#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 20.1.1.1 YES manual up up
Serial3/0 1.1.1.2 YES manual up up
Serial3/1 2.1.1.1 YES manual up up
Serial3/2 3.1.1.1 YES manual up up
Loopback0 12.0.0.1 YES manual up up
Loopback1 12.0.1.1 YES manual up up
Loopback2 12.0.2.1 YES manual up up
Loopback3 12.0.3.1 YES manual up up
R3#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 30.1.1.1 YES manual up up
Serial3/1 2.1.1.2 YES manual up up
Loopback0 13.0.0.1 YES manual up up
Loopback1 13.0.1.1 YES manual up up
Loopback2 13.0.2.1 YES manual up up
Loopback3 13.0.3.1 YES manual up up
R1(config)#router eigrp 65001
R1(config-router)#network 1.0.0.0
R1(config-router)#network 10.0.0.0
R1(config-router)#no auto-summary
R1(config-router)#exit
R2(config)#router eigrp 65001
R2(config-router)#network 1.0.0.0
R2(config-router)#network 1.0.0.0
*Mar 18 12:25:38.567: %DUAL-5-NBRCHANGE: EIGRP-IPv4 65001: Neighbor 1.1.1.1 (Serial3/0) is up: new adjacency
R2(config-router)#network 2.0.0.0
R2(config-router)#network 20.0.0.0
R2(config-router)#no auto-summary
R2(config-router)#exit
R3(config)#router eigrp 65001
R3(config-router)#network 2.0.0.0
*Mar 18 12:26:16.707: %DUAL-5-NBRCHANGE: EIGRP-IPv4 65001: Neighbor 2.1.1.1 (Serial3/1) is up: new adjacency
R3(config-router)#network 13.0.0.0
R3(config-router)#network 30.0.0.0
R3(config-router)#no auto-summary
R3(config-router)#exit
R2#show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(65001)
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 2.1.1.2 Se3/1 12 00:08:12 73 438 0 6
0 1.1.1.1 Se3/0 14 00:08:50 67 402 0 6
R1#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
D 2.0.0.0/8 [90/2681856] via 1.1.1.2, 00:10:28, Serial3/0
13.0.0.0/24 is subnetted, 4 subnets
D 13.0.0.0 [90/2809856] via 1.1.1.2, 00:02:34, Serial3/0
D 13.0.1.0 [90/2809856] via 1.1.1.2, 00:02:34, Serial3/0
D 13.0.2.0 [90/2809856] via 1.1.1.2, 00:02:34, Serial3/0
D 13.0.3.0 [90/2809856] via 1.1.1.2, 00:02:34, Serial3/0
D 20.0.0.0/8 [90/2172416] via 1.1.1.2, 00:06:46, Serial3/0
D 30.0.0.0/8 [90/2684416] via 1.1.1.2, 00:05:52, Serial3/0
R2#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
D 10.0.0.0/8 [90/2172416] via 1.1.1.1, 00:09:56, Serial3/0
13.0.0.0/24 is subnetted, 4 subnets
D 13.0.0.0 [90/2297856] via 2.1.1.2, 00:01:57, Serial3/1
D 13.0.1.0 [90/2297856] via 2.1.1.2, 00:01:57, Serial3/1
D 13.0.2.0 [90/2297856] via 2.1.1.2, 00:01:57, Serial3/1
D 13.0.3.0 [90/2297856] via 2.1.1.2, 00:01:57, Serial3/1
D 30.0.0.0/8 [90/2172416] via 2.1.1.2, 00:05:15, Serial3/1
(now we are going to configure summary route)
R3(config)#interface serial 3/1
R3(config-if)#ip summary-address eigrp 65001 13.0.0.0 255.255.252.0
*Mar 18 12:39:48.235: %DUAL-5-NBRCHANGE: EIGRP-IPv4 65001: Neighbor 2.1.1.1 (Serial3/1) is resync: summary configured
R3(config)#router eigrp 65001
R3(config-router)#eigrp stub ?
connected Do advertise connected routes
leak-map Allow dynamic prefixes based on the leak-map
receive-only Set receive only neighbor
redistributed Do advertise redistributed routes
static Do advertise static routes
summary Do advertise summary routes
<cr>
R3(config-router)#eigrp stub summary
*Mar 18 12:42:36.931: %DUAL-5-NBRCHANGE: EIGRP-IPv4 65001: Neighbor 2.1.1.1 (Serial3/1) is down: peer info changed
*Mar 18 12:42:37.375: %DUAL-5-NBRCHANGE: EIGRP-IPv4 65001: Neighbor 2.1.1.1 (Serial3/1) is up: new adjacency
R3(config-router)#end
R2#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
D 10.0.0.0/8 [90/2172416] via 1.1.1.1, 00:17:21, Serial3/0
13.0.0.0/22 is subnetted, 1 subnets
D 13.0.0.0 [90/2297856] via 2.1.1.2, 00:00:22, Serial3/1
R1#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
D 2.0.0.0/8 [90/2681856] via 1.1.1.2, 00:19:02, Serial3/0
13.0.0.0/22 is subnetted, 1 subnets
D 13.0.0.0 [90/2809856] via 1.1.1.2, 00:02:07, Serial3/0
D 20.0.0.0/8 [90/2172416] via 1.1.1.2, 00:15:20, Serial3/0
R1(config)#router eigrp 65001
R1(config-router)#eigrp stub ?
connected Do advertise connected routes
leak-map Allow dynamic prefixes based on the leak-map
receive-only Set receive only neighbor
redistributed Do advertise redistributed routes
static Do advertise static routes
summary Do advertise summary routes
<cr>
R1(config-router)#eigrp stub receive-only
*Mar 18 12:52:06.603: %DUAL-5-NBRCHANGE: EIGRP-IPv4 65001: Neighbor 1.1.1.2 (Serial3/0) is down: peer info changed
*Mar 18 12:52:06.959: %DUAL-5-NBRCHANGE: EIGRP-IPv4 65001: Neighbor 1.1.1.2 (Serial3/0) is up: new adjacency
R1(config-router)#end
R2#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
13.0.0.0/22 is subnetted, 1 subnets
D 13.0.0.0 [90/2297856] via 2.1.1.2, 00:11:12, Serial3/1
R3#show ip route eigrp
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
D 1.0.0.0/8 [90/2681856] via 2.1.1.1, 00:11:55, Serial3/1
13.0.0.0/8 is variably subnetted, 9 subnets, 3 masks
D 13.0.0.0/22 is a summary, 00:14:44, Null0
D 20.0.0.0/8 [90/2172416] via 2.1.1.1, 00:11:55, Serial3/1
(after configure EIGRP STUB receive only on route 1. router 1 preventing all the routes
but router 3 learn all the routes from route 2)