1 實驗拓撲:
2 實驗要求:
1>.配置基本eigrp。
2>.避免所有裝置向不必要的接口發送eigrp封包。
3>.要求總部收到的分部的路由條目盡可能少。
4>.要求實作分部通路internet伺服器(80.80.80.80),實作負載分擔,internet路由器不得參加eigrp。
5>.R3和R4之間使用md5認證。
6>.配置R5為stub區域,且隻能發送直連和彙總路由。
3 實驗步驟和實驗總結:
0>.基礎配置。
Router(config)#hostname R1
R1(config)#int e0/0
R1(config-if)#ip add 12.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#int e0/1
R1(config-if)#ip add 13.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#int e0/2
R1(config-if)#ip add 202.100.1.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#exit
Router(config)#hostname R2
R2(config)#int s1/0
R2(config-if)#ip add 25.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#int e0/0
R2(config-if)#ip add 12.1.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
Router(config)#hostname R3
R3(config)#int e0/1
R3(config-if)#ip add 34.1.1.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
R3(config)#int s1/0
R3(config-if)#ip add 35.1.1.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exi
R3(config)#int e0/0
R3(config-if)#ip add 13.1.1.3 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#exit
Router(config)#hostname R4
R4(config)#int e0/0
R4(config-if)#ip add 34.1.1.4 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit
Router(config)#hostname R5
R5(config)#int s1/1
R5(config-if)#ip add 35.1.1.5 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#exit
R5(config)#int s1/0
R5(config-if)#ip add 25.1.1.5 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#exit
R5(config)#int loopback 0
R5(config-if)#ip add 172.16.144.1 255.255.255.0
R5(config-if)#exit
R5(config)#int loopback 1
R5(config-if)#ip add 172.16.145.1 255.255.255.0
R5(config-if)#int loopback 2
R5(config-if)#ip add 172.16.146.1 255.255.255.0
R5(config-if)#int loopback 3
R5(config-if)#ip add 172.16.147.1 255.255.255.0
R5(config-if)#exit
Router(config)#hostname R6
R6(config)#int e0/0
R6(config-if)#ip add 202.100.1.2 255.255.255.252
R6(config-if)#no shutdown
R6(config-if)#exit
R6(config)#int loopback0
R6(config-if)#ip add 80.80.80.80 255.255.255.255
R6(config-if)#exit
1>.配置基本eigrp。
R4(config)#router eigrp 90
R4(config-router)#no auto-summary
R4(config-router)#network 34.1.1.0 0.0.0.255
R4(config-router)#exit
R3(config)#router eigrp 90
R3(config-router)#network 13.1.1.0 0.0.0.255
R3(config-router)#network 34.1.1.0 0.0.0.255
R3(config-router)#network 35.1.1.0 0.0.0.255
R3(config-router)#no auto-summary
R3(config-router)#exit
R5(config)#router eigrp 90
R5(config-router)#no auto-summary
R5(config-router)#network 25.1.1.0 0.0.0.255
R5(config-router)#network 35.1.1.0 0.0.0.255
R5(config-router)#network 172.16.144.0 0.0.0.255
R5(config-router)#network 172.16.145.0 0.0.0.255
R5(config-router)#network 172.16.146.0 0.0.0.255
R5(config-router)#network 172.16.147.0 0.0.0.255
R5(config-router)#exit
R1(config)#router eigrp 90
R1(config-router)#no auto-summary
R1(config-router)#network 12.1.1.0 0.0.0.255
R1(config-router)#network 13.1.1.0 0.0.0.255
R1(config-router)#exit
R2(config)#router eigrp 90
R2(config-router)#no auto-summary
R2(config-router)#network 12.1.1.0 0.0.0.255
R2(config-router)#network 25.1.1.0 0.0.0.255
R2(config-router)#exit
2>.避免所有裝置向不必要的接口發送eigrp封包。
因為隻有R5設定了loopback0口,是以隻設定R5的loopback口為passive端口。
R5(config)#router eigrp 90
R5(config-router)#passive-interface loopback0
R5(config-router)#passive-interface loopback1
R5(config-router)#passive-interface loopback2
R5(config-router)#passive-interface loopback3
R5(config-router)#exit
3>.要求總部收到的分部的路由條目盡可能少。
彙總前:
R1(config)#do show ip route
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 a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is not set 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 12.1.1.0/24 is directly connected, Ethernet0/0 L 12.1.1.1/32 is directly connected, Ethernet0/0 13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 13.1.1.0/24 is directly connected, Ethernet0/1 L 13.1.1.1/32 is directly connected, Ethernet0/1 25.0.0.0/24 is subnetted, 1 subnets D 25.1.1.0 [90/2195456] via 12.1.1.2, 00:02:29, Ethernet0/0 34.0.0.0/24 is subnetted, 1 subnets D 34.1.1.0 [90/307200] via 13.1.1.3, 00:03:28, Ethernet0/1 35.0.0.0/24 is subnetted, 1 subnets D 35.1.1.0 [90/2195456] via 13.1.1.3, 00:03:28, Ethernet0/1 172.16.0.0/24 is subnetted, 4 subnets D 172.16.144.0 [90/2323456] via 13.1.1.3, 00:02:29, Ethernet0/1 [90/2323456] via 12.1.1.2, 00:02:29, Ethernet0/0 D 172.16.145.0 [90/2323456] via 13.1.1.3, 00:02:29, Ethernet0/1 [90/2323456] via 12.1.1.2, 00:02:29, Ethernet0/0 D 172.16.146.0 [90/2323456] via 13.1.1.3, 00:02:29, Ethernet0/1 [90/2323456] via 12.1.1.2, 00:02:29, Ethernet0/0 D 172.16.147.0 [90/2323456] via 13.1.1.3, 00:02:29, Ethernet0/1 [90/2323456] via 12.1.1.2, 00:02:29, Ethernet0/0 202.100.1.0/24 is variably subnetted, 2 subnets, 2 masks C 202.100.1.0/30 is directly connected, Ethernet0/2 L 202.100.1.1/32 is directly connected, Ethernet0/2 |
彙總:
R5(config)#int s1/0
R5(config-if)#ip summary-address eigrp 90 172.16.144.0/20
R5(config-if)#int s1/1
R5(config-if)#ip summary-address eigrp 90 172.16.144.0/20
R5(config-if)#exit
彙總後:
R1(config)#do show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter areaN1 - 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 a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is not set 12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 12.1.1.0/24 is directly connected, Ethernet0/0 L 12.1.1.1/32 is directly connected, Ethernet0/0 13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 13.1.1.0/24 is directly connected, Ethernet0/1 L 13.1.1.1/32 is directly connected, Ethernet0/1 25.0.0.0/24 is subnetted, 1 subnets D 25.1.1.0 [90/2195456] via 12.1.1.2, 00:08:55, Ethernet0/0 34.0.0.0/24 is subnetted, 1 subnets D 34.1.1.0 [90/307200] via 13.1.1.3, 00:09:54, Ethernet0/1 35.0.0.0/24 is subnetted, 1 subnets D 35.1.1.0 [90/2195456] via 13.1.1.3, 00:09:54, Ethernet0/1 172.16.0.0/20 is subnetted, 1 subnets D 172.16.144.0 [90/2323456] via 13.1.1.3, 00:00:37, Ethernet0/1 [90/2323456] via 12.1.1.2, 00:00:37, Ethernet0/0 202.100.1.0/24 is variably subnetted, 2 subnets, 2 masks C 202.100.1.0/30 is directly connected, Ethernet0/2 L 202.100.1.1/32 is directly connected, Ethernet0/2 |
4>.要求實作分部通路internet伺服器(80.80.80.80),實作負載分擔,internet路由器不得參加eigrp。
R1(config)#ip route 0.0.0.0 0.0.0.0 202.100.1.2
R1(config)#router eigrp 90
R1(config-router)#redistribute static
R1(config-router)#exit
R6(config)#ip route 0.0.0.0 0.0.0.0 202.100.1.1
R5#ping 80.80.80.80
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 80.80.80.80, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 10/10/11 ms |
靜态路由重分布之後路由已經等價負載。
R5(config)#do 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 a - application route+ - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is 35.1.1.3 to network 0.0.0.0 D*EX 0.0.0.0/0 [170/2221056] via 35.1.1.3, 00:01:23, Serial1/1 [170/2221056] via 25.1.1.2, 00:01:23, Serial1/0 12.0.0.0/24 is subnetted, 1 subnets D 12.1.1.0 [90/2195456] via 25.1.1.2, 00:15:17, Serial1/0 13.0.0.0/24 is subnetted, 1 subnets D 13.1.1.0 [90/2195456] via 35.1.1.3, 00:15:12, Serial1/1 34.0.0.0/24 is subnetted, 1 subnets D 34.1.1.0 [90/2195456] via 35.1.1.3, 00:15:12, Serial1/1 172.16.0.0/16 is variably subnetted, 9 subnets, 3 masks D 172.16.144.0/20 is a summary, 00:07:12, Null0 |
以下步驟将0.0.0.0路由的等價負載變更為非等價負載:
R5(config)#access-list 1 permit 0.0.0.0 255.255.255.255
R5(config)#router eigrp 90
R5(config-router)#offset-list 1 in 30 s1/1
R5(config-router)#exit
R5(config)#do show ip route
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 a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is 25.1.1.2 to network 0.0.0.0 D*EX 0.0.0.0/0 [170/2221056] via 25.1.1.2, 00:00:05, Serial1/0 12.0.0.0/24 is subnetted, 1 subnets D 12.1.1.0 [90/2195456] via 25.1.1.2, 00:00:05, Serial1/0 13.0.0.0/24 is subnetted, 1 subnets D 13.1.1.0 [90/2195486] via 35.1.1.3, 00:00:05, Serial1/1 25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 25.1.1.0/24 is directly connected, Serial1/0 L 25.1.1.5/32 is directly connected, Serial1/0 34.0.0.0/24 is subnetted, 1 subnets D 34.1.1.0 [90/2195486] via 35.1.1.3, 00:00:05, Serial1/1 35.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 35.1.1.0/24 is directly connected, Serial1/1 L 35.1.1.5/32 is directly connected, Serial1/1 172.16.0.0/16 is variably subnetted, 9 subnets, 3 masks D 172.16.144.0/20 is a summary, 00:26:15, Null0 C 172.16.144.0/24 is directly connected, Loopback0 L 172.16.144.1/32 is directly connected, Loopback0 C 172.16.145.0/24 is directly connected, Loopback1 L 172.16.145.1/32 is directly connected, Loopback1 C 172.16.146.0/24 is directly connected, Loopback2 L 172.16.146.1/32 is directly connected, Loopback2C 172.16.147.0/24 is directly connected, Loopback3 L 172.16.147.1/32 is directly connected, Loopback3 |
R5(config)#router eigrp 90
R5(config-router)#variance 10
R5(config-router)#exit
R5(config)#do show ip route
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 a - application route + - replicated route, % - next hop override, p - overrides from PfR Gateway of last resort is 35.1.1.3 to network 0.0.0.0 D*EX 0.0.0.0/0 [170/2221086] via 35.1.1.3, 00:00:09, Serial1/1 [170/2221056] via 25.1.1.2, 00:00:09, Serial1/0 12.0.0.0/24 is subnetted, 1 subnets D 12.1.1.0 [90/2221086] via 35.1.1.3, 00:00:09, Serial1/1 [90/2195456] via 25.1.1.2, 00:00:09, Serial1/0 13.0.0.0/24 is subnetted, 1 subnets D 13.1.1.0 [90/2195486] via 35.1.1.3, 00:00:09, Serial1/1 [90/2221056] via 25.1.1.2, 00:00:09, Serial1/0 25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 25.1.1.0/24 is directly connected, Serial1/0 L 25.1.1.5/32 is directly connected, Serial1/0 34.0.0.0/24 is subnetted, 1 subnets D 34.1.1.0 [90/2195486] via 35.1.1.3, 00:00:09, Serial1/1 [90/2246656] via 25.1.1.2, 00:00:09, Serial1/0 35.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 35.1.1.0/24 is directly connected, Serial1/1 L 35.1.1.5/32 is directly connected, Serial1/1 172.16.0.0/16 is variably subnetted, 9 subnets, 3 masks D 172.16.144.0/20 is a summary, 00:00:09, Null0 C 172.16.144.0/24 is directly connected, Loopback0 L 172.16.144.1/32 is directly connected, Loopback0 C 172.16.145.0/24 is directly connected, Loopback1 L 172.16.145.1/32 is directly connected, Loopback1 C 172.16.146.0/24 is directly connected, Loopback2 L 172.16.146.1/32 is directly connected, Loopback2 C 172.16.147.0/24 is directly connected, Loopback3 L 172.16.147.1/32 is directly connected, Loopback3 |
R5(config)#do show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet Known via "eigrp 90", distance 170, metric 2221056, candidate default path, type external Redistributing via eigrp 90 Last update from 35.1.1.3 on Serial1/1, 00:01:49 agoRouting Descriptor Blocks: 35.1.1.3, from 35.1.1.3, 00:01:49 ago, via Serial1/1 Route metric is 2221086, traffic share count is 1 Total delay is 22002 microseconds, minimum bandwidth is 1544 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 2 * 25.1.1.2, from 25.1.1.2, 00:01:49 ago, via Serial1/0 Route metric is 2221056, traffic share count is 1 Total delay is 22000 microseconds, minimum bandwidth is 1544 Kbit Reliability 255/255, minimum MTU 1500 bytes Loading 1/255, Hops 2 |
5>.R3和R4之間使用md5認證。
R4(config)#key chain glab
R4(config-keychain)#key 1
R4(config-keychain-key)#key-string glab
R4(config-keychain-key)#exit
R4(config-keychain)#exit
R4(config)#int e0/0
R4(config-if)#ip authentication key-chain eigrp 90 glab
R4(config-if)#ip authentication mode eigrp 90 md5
R4(config-if)#exit
R3(config)#key chain glab1
R3(config-keychain)#key 1
R3(config-keychain-key)#key-string glab
R3(config-keychain-key)#exit
R3(config-keychain)#exit
R3(config)#int e0/1
R3(config-if)#ip authentication key-chain eigrp 90 glab1
R3(config-if)#ip authentication mode eigrp 90 md5
R3(config-if)#ex
R4(config)#do show ip eigrp neighbors
EIGRP-IPv4 Neighbors for AS(90) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 34.1.1.3 Et0/0 10 00:00:37 9 100 0 32 |
6>.配置R5為stub區域,且隻能發送直連和彙總路由。
R5(config)#router eigrp 90
R5(config-router)#eigrp stub
R5(config-router)#do show running | se eigrp
ip summary-address eigrp 90 172.16.144.0 255.255.240.0 ip summary-address eigrp 90 172.16.144.0 255.255.240.0 router eigrp 90 network 25.1.1.0 0.0.0.255 network 35.1.1.0 0.0.0.255 network 172.16.144.0 0.0.0.255 network 172.16.145.0 0.0.0.255 network 172.16.146.0 0.0.0.255network 172.16.147.0 0.0.0.255 passive-interface Loopback0 passive-interface Loopback1 passive-interface Loopback2 passive-interface Loopback3 eigrp stub connected summary |
4.作業中遇到的問題:
無