A stub router sends a special peer information packet to all neighboring routers to report its status as a stub router.
Any neighbor that receives a packet informing it of the stub status does not query the stub router for any routes.
Router(config-router)# eigrp stub [receive-only|connected|static|summary]
-
-
connected: Permits stub to send connected routes (may still need to redistribute).
-
static: Permits stub to send static routes (must still redistribute).
-
summary: Permits stub to send summary routes.
-
Default is connectedand summary.
基本网络配置
R1# interface Loopback0 ip address 172.16.1.1 255.255.255.0 interface FastEthernet0/0 ip address 10.1.1.1 255.255.255.0 ip summary-address eigrp 100 172.16.0.0 255.255.0.0 router eigrp 100 network 10.1.1.1 0.0.0.0 network 172.16.1.1 0.0.0.0 redistribute static metric 100000 1 255 1 1500 ip route 172.16.11.0 255.255.255.0 Null0
R2# interface Loopback0 ip address 172.16.2.1 255.255.255.0 interface FastEthernet0/0 ip address 10.1.1.2 255.255.255.0 router eigrp 100 network 10.1.1.2 0.0.0.0 network 172.16.2.1 0.0.0.0
ip address 172.16.1.1 255.255.255.0 (connected)
interface FastEthernet0/0 ip address 10.1.1.1 255.255.255.0 ip summary-address eigrp 100 172.16.0.0 255.255.0.0 (summary)
router eigrp 100 network 10.1.1.1 0.0.0.0 network 172.16.1.1 0.0.0.0 redistribute static metric 100000 1 255 1 1500
ip route 172.16.11.0 255.255.255.0 Null0 (static)
EIGRP Stub connected配置
R1向R2只发布直连路由 172.16.1.0
R1# router eigrp 100 network 10.1.1.1 0.0.0.0 network 172.16.1.1 0.0.0.0 redistribute static metric 100000 1 255 1 1500eigrp stub connected
验证
R2#show ip route eigrp | begin Gateway Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksD 172.16.1.0/24 [90/156160] via 10.1.1.1, 00:01:22, FastEthernet0/0
EIGRP Stub summary配置
R1向R2只发布汇总路由 172.16.0.0
R1# router eigrp 100 network 10.1.1.1 0.0.0.0 network 172.16.1.1 0.0.0.0 redistribute static metric 100000 1 255 1 1500eigrp stub summary
验证
R2#show ip route eigrp | begin Gateway Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 3 subnets, 3 masksD 172.16.0.0/16 [90/28416] via 10.1.1.1, 00:00:01, FastEthernet0/0
EIGRP Stub static配置
R1向R2只发布静态路由 172.16.11.0
R1# router eigrp 100 network 10.1.1.1 0.0.0.0 network 172.16.1.1 0.0.0.0 redistribute static metric 100000 1 255 1 1500eigrp stub static
验证
R2#show ip route eigrp | begin Gateway Gateway of last resort is not set 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masksD EX 172.16.11.0/24 [170/28416] via 10.1.1.1, 00:00:09, FastEthernet0/0
EIGRP Stub receive-only配置
R1不向R2发布路由
R1# router eigrp 100 network 10.1.1.1 0.0.0.0 network 172.16.1.1 0.0.0.0 redistribute static metric 100000 1 255 1 1500eigrp stub receive-only
验证
R2#show ip route eigrp | begin Gateway Gateway of last resort is not set R2#