NA-NP-IE系列实验21: EIGRP 路由汇总

实验21: EIGRP 路由汇总
1.实验目的
通过本实验可以掌握:
1)路由汇总的目的
2EIGRP 自动汇总
3EIGRP 手工汇总
4)指向null0 路由的含义
注:
默认的时候EIGRP 的自动汇总是开启的,自动汇总只对本地产生的EIGRP 路由汇总,可以通过“no auto-summary”命令关闭自动汇总,然后进行手工汇总
2.实验拓扑
本实验拓扑结构如图所示。
NA-NP-IE系列实验21: EIGRP 路由汇总
3.实验步骤
路由器R0R1 R2的配置如下:
Router(config)#ho r0
r0(config)#n ip do loo
% Ambiguous command:  "n ip do loo"
r0(config)#no ip do loo
r0(config)#lin c 0
r0(config-line)#logg s
r0(config-line)#exec-t 00
r0(config-line)#exit
r0(config)#int s0/0
r0(config-if)#ip add 172.16.1.1 255.255.255.0
r0(config-if)#no sh
r0(config-if)#
*Mar  1 00:02:37.019: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
*Mar  1 00:02:38.019: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r0(config-if)#exit
r0(config)#router eigrp 1
r0(config-router)#net 172.16.1.0 255.255.255.0
r0(config-router)#         
*Mar  1 00:03:18.355: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.2 (Serial0/0) is up: new adjacency
r0(config-router)#do sh ip route
Codes: 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
 
Gateway of last resort is not set
 
D    4.0.0.0/8 [90/2809856] via 172.16.1.2, 00:01:03, Serial0/0
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Serial0/0
D       172.16.2.0 [90/2681856] via 172.16.1.2, 00:02:35, Serial0/0
r0(config-router)#do sh ip route
Codes: 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
 
Gateway of last resort is not set
 
     4.0.0.0/24 is subnetted, 3 subnets
D       4.4.0.0 [90/2809856] via 172.16.1.2, 00:00:09, Serial0/0
D       4.4.1.0 [90/2809856] via 172.16.1.2, 00:00:09, Serial0/0
D       4.4.3.0 [90/2809856] via 172.16.1.2, 00:00:09, Serial0/0
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Serial0/0
D       172.16.2.0 [90/2681856] via 172.16.1.2, 00:03:11, Serial0/0
r0(config-router)#do sh ip route
Codes: 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
 
Gateway of last resort is not set
 
     4.0.0.0/18 is subnetted, 1 subnets
D       4.4.0.0 [90/2809856] via 172.16.1.2, 00:00:17, Serial0/0
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Serial0/0
D       172.16.2.0 [90/2681856] via 172.16.1.2, 00:05:05, Serial0/0
r0(config-router)#do sh ip route
Codes: 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
 
Gateway of last resort is not set
 
     4.0.0.0/22 is subnetted, 1 subnets
D       4.4.0.0 [90/2809856] via 172.16.1.2, 00:00:12, Serial0/0
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Serial0/0
D       172.16.2.0 [90/2681856] via 172.16.1.2, 00:07:15, Serial0/0
r0(config-router)#do ping 4.4.0.4
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.0.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/26/52 ms
 
 
 
 
 
r1(config)#no  ip dom loo
r1(config)#lin  c 0
r1(config-line)#logg s
r1(config-line)#exec-t 00
r1(config-line)#exit
r1(config)#int s0/0
r1(config-if)#ip add 172.16.1.2 255.255.255.0
r1(config-if)#no sh
r1(config-if)#exit
r1(config)#int
*Mar  1 00:01:50.867: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
r1(config)#int s
*Mar  1 00:01:51.871: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r1(config)#int s0/1
r1(config-if)#ip add 172.16.2.1 255.255.255.0
r1(config-if)#no sh
r1(config-if)#
*Mar  1 00:02:06.259: %LINK-3-UPDOWN: Interface Serial0/1, changed state to up
r1(config-if)#
*Mar  1 00:02:07.263: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up
r1(config-if)#
*Mar  1 00:02:17.307: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
r1(config-if)#
*Mar  1 00:02:27.323: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to down
r1(config-if)#
*Mar  1 00:02:37.315: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up
r1(config-if)#
*Mar  1 00:02:47.299: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r1(config-if)#exit
r1(config)#router eigrp 1
r1(config-router)#net 172.16.1.0 255.255.255.0
r1(config-router)#ne
*Mar  1 00:03:18.623: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.1 (Serial0/0) is up: new adjacency
r1(config-router)#net 172.16.2.0 255.255.255.0
r1(config-router)#
*Mar  1 00:04:53.679: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.2 (Serial0/1) is up: new adjacency
r1(config-router)#do sh ip route
Codes: 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
 
Gateway of last resort is not set
 
D    4.0.0.0/8 [90/2297856] via 172.16.2.2, 00:01:20, Serial0/1
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Serial0/0
C       172.16.2.0 is directly connected, Serial0/1
r1(config-router)#
*Mar  1 00:06:30.931: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.2 (Serial0/1) is resync: peer graceful-restart
r1(config-router)#do sh ip route
Codes: 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
 
Gateway of last resort is not set
 
     4.0.0.0/24 is subnetted, 3 subnets
D       4.4.0.0 [90/2297856] via 172.16.2.2, 00:00:15, Serial0/1
D       4.4.1.0 [90/2297856] via 172.16.2.2, 00:00:15, Serial0/1
D       4.4.3.0 [90/2297856] via 172.16.2.2, 00:00:15, Serial0/1
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Serial0/0
C       172.16.2.0 is directly connected, Serial0/1
r1(config-router)#
*Mar  1 00:08:16.487: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.2 (Serial0/1) is resync: peer graceful-restart
r1(config-router)#do sh ip route
Codes: 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
 
Gateway of last resort is not set
 
     4.0.0.0/18 is subnetted, 1 subnets
D       4.4.0.0 [90/2297856] via 172.16.2.2, 00:00:29, Serial0/1
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Serial0/0
C       172.16.2.0 is directly connected, Serial0/1
r1(config-router)#
*Mar  1 00:10:22.879: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.2 (Serial0/1) is resync: peer graceful-restart
r1(config-router)#
*Mar  1 00:10:31.659: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.2 (Serial0/1) is resync: peer graceful-restart
r1(config-router)#do sh ip route
Codes: 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
 
Gateway of last resort is not set
 
     4.0.0.0/22 is subnetted, 1 subnets
D       4.4.0.0 [90/2297856] via 172.16.2.2, 00:00:25, Serial0/1
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Serial0/0
C       172.16.2.0 is directly connected, Serial0/1
r1(config-router)#
 
 
r2(config)#no ip do loo
r2(config)#lin  c 0
r2(config-line)#logg s
r2(config-line)#exec-t 00
r2(config-line)#exit
r2(config)#int s0/0
r2(config-if)#ip add 172.16.2.2 255.255.255.0
r2(config-if)#no sh
r2(config-if)#
*Mar  1 00:02:22.755: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
r2(config-if)#
*Mar  1 00:02:23.759: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r2(config-if)#exit
r2(config)#int loo 1
r2(config-if)#ip add
*Mar  1 00:03:42.559: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
r2(config-if)#ip add 4.4.0.4 255.255.255.0
r2(config-if)#int loo 2
r2(config-if)#ip add 4.4.
*Mar  1 00:03:56.287: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback2, changed state to up
r2(config-if)#ip add 4.4.1.4 255.255.255.0
r2(config-if)#int loo 3
r2(config-if)#ip add 
*Mar  1 00:04:09.999: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback3, changed state to up
r2(config-if)#ip add 4.4.2.4 255.255.255.0
r2(config-if)#int loo 3
r2(config-if)#ip add 4.4.3.4 255.255.255.0
r2(config-if)#exit
r2(config)#roter eigrp 1
             ^
% Invalid input detected at '^' marker.
 
r2(config)#router eigrp 1
r2(config-router)#net 172.16.2.0 255.255.255.0
r2(config-router)#net
*Mar  1 00:04:53.827: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.1 (Serial0/0) is up: new adjacency
r2(config-router)#net 4.4.0.4 255.255.255.0
r2(config-router)#net 4.4.1.4 255.255.255.0
r2(config-router)#net 4.4.2.4 255.255.255.0
r2(config-router)#net 4.4.3.4 255.255.255.0
r2(config-router)#do sh ip route
Codes: 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
 
Gateway of last resort is not set
 
     4.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       4.4.0.0/24 is directly connected, Loopback1
C       4.4.1.0/24 is directly connected, Loopback2
C       4.4.3.0/24 is directly connected, Loopback3
D       4.0.0.0/8 is a summary, 00:00:45, Null0
     172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
D       172.16.0.0/16 is a summary, 00:00:45, Null0
D       172.16.1.0/24 [90/2681856] via 172.16.2.1, 00:00:52, Serial0/0
C       172.16.2.0/24 is directly connected, Serial0/0
以上输出表明路由器R2 的路由表中有条明细路由。以上输出说明,在路由器R2 s0/0执行自动汇总后,会在自己路由表产生一条指向
null0”的EIGRP 路由,主要是为了防止路由环路的;
 
 
r2(config-router)#no au
r2(config-router)#
*Mar  1 00:06:30.967: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.1 (Serial0/0) is resync: summary configured
r2(config-router)#exit
r2(config)#int s0/0 
r2(config-if)#ip summary-address eigrp 1 4.4.0.0 255.255.192.0
r2(config-if)#
*Mar  1 00:08:16.507: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.1 (Serial0/0) is resync: summary configured
r2(config-if)#do sh ip route
Codes: 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
 
Gateway of last resort is not set
 
     4.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       4.4.0.0/24 is directly connected, Loopback1
D       4.4.0.0/18 is a summary, 00:00:05, Null0
C       4.4.1.0/24 is directly connected, Loopback2
C       4.4.3.0/24 is directly connected, Loopback3
     172.16.0.0/24 is subnetted, 2 subnets
D       172.16.1.0 [90/2681856] via 172.16.2.1, 00:03:28, Serial0/0
C       172.16.2.0 is directly connected, Serial0/0
以上输出说明,在路由器R2 上关闭工汇总后,路由表产生一条指向
null0”的EIGRP 路由也会消失 ,
 
r2(config-if)#no ip summary-address eigrp 1 4.4.0.0 255.255.192.0
r2(config-if)#no ip summary-address eigrp 1 4.4.0.0 255.255.192.0
*Mar  1 00:10:22.923: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.1 (Serial0/0) is resync: summary configured
r2(config-if)#ip summary-address eigrp 1 4.4.0.0 255.255.252.0   
r2(config-if)#
*Mar  1 00:10:31.675: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.1 (Serial0/0) is resync: summary configured
r2(config-if)#do sh ip route
Codes: 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
 
Gateway of last resort is not set
 
     4.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       4.4.0.0/24 is directly connected, Loopback1
D       4.4.0.0/22 is a summary, 00:00:04, Null0
C       4.4.1.0/24 is directly connected, Loopback2
C       4.4.3.0/24 is directly connected, Loopback3
     172.16.0.0/24 is subnetted, 2 subnets
D       172.16.1.0 [90/2681856] via 172.16.2.1, 00:05:41, Serial0/0
C       172.16.2.0 is directly connected, Serial0/0
以上输出说明,在路由器R2 s0/0 执行手工汇总后,在路由器R3 上收到被汇总的路由条目“4.4.0.0/22”。
 
r2(config-if)#
r2(config-if)#
r2(config-if)#
r2(config-if)#


本文转自gauyanm 51CTO博客,原文链接:http://blog.51cto.com/gauyanm/237307,如需转载请自行联系原作者
上一篇:《大数据系统构建:可扩展实时数据系统构建原理与最佳实践》一2.3 图模式


下一篇:深入理解r2dbc-mysql