1 实验拓扑:

LAB3 EIGRP1实验_OSPF

2 实验要求:

1>.R1-R3环回口0:192.168.100.x/32。

2>.R1上采用手动汇总的命令,汇总4条环回口成一条。

3>.R1上下发一条默认路由。

4>.实现R1到R2的环回口路由非等价负载。

5>.as 90都使用eigrp认证。

6>.配置R3为stub区域,且只能发送直连和汇总路由。

7>.优化R1,R2,R3环回口,使其收不到任何eigrp报文。

8>.使用偏移列表(

offset-list)修改R2到R3环回口的metric值,增加30。

3 实验步骤和实验总结:

0>.基础配置。

Router(config)#hostname R1

R1(config)#int eth0/0

R1(config-if)#ip add 100.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#int s1/0

R1(config-if)#ip add 12.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#int eth0/1

R1(config-if)#ip add 14.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#exit


Router(config)#hostname R2

R2(config)#int s1/1

R2(config-if)#ip add 12.1.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit

R2(config)#int s1/0

R2(config-if)#ip add 23.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 100.1.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#exit


Router(config)#hostname R3

R3(config)#int s1/0

R3(config-if)#ip add 23.1.1.3 255.255.255.0

R3(config-if)#no shutdown

R3(config-if)#exit


Router(config)#hostname Internet

Internet(config)#int eth0/0

Internet(config-if)#ip add 14.1.1.4 255.255.255.0

Internet(config-if)#no shutdown

Internet(config-if)#exit


1>.R1-R3环回口0:192.168.100.x/32。

R1(config)#int loopback0

R1(config-if)#ip add 192.168.100.1 255.255.255.255

R1(config-if)#exit


R2(config)#int loopback0

R2(config-if)#ip add 192.168.100.2 255.255.255.255

R2(config-if)#exit


R3(config)#int loopback0

R3(config-if)#ip add 192.168.100.3 255.255.255.255

R3(config-if)#exit


2>.R1上采用手动汇总的命令,汇总4条环回口成一条。

R1(config)#int loopback1

R1(config-if)#ip add 192.168.0.1 255.255.255.0

R1(config-if)#int loopback2

R1(config-if)#ip add 192.168.1.1 255.255.255.0

R1(config-if)#int loopback3

R1(config-if)#ip add 192.168.2.1 255.255.255.0

R1(config-if)#int loopback4

R1(config-if)#ip add 192.168.3.1 255.255.255.0

R1(config-if)#exit


R1(config)#router eigrp 90

R1(config-router)#no auto-summary

R1(config-router)#network 192.168.100.1 0.0.0.0

R1(config-router)#network 192.168.0.1 0.0.0.255

R1(config-router)#network 192.168.0.0 0.0.255.255

R1(config-router)#network 14.1.1.0 0.0.0.255

R1(config-router)#network 100.1.1.0 0.0.0.255

R1(config-router)#network 12.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 100.1.1.0 0.0.0.255

R2(config-router)#network 23.1.1.0 0.0.0.255

R2(config-router)#network 192.168.0.0 0.0.255.255

R2(config-router)#network 12.1.1.0 0.0.0.255

R2(config-router)#exit


R3(config)#router eigrp 90

R3(config-router)#no auto-summary

R3(config-router)#network 192.168.100.0 0.0.0.255

R3(config-router)#network 23.1.1.0 0.0.0.255

R3(config-router)#exit


Internet(config)#router eigrp 90

Internet(config-router)#no auto-summary

Internet(config-router)#network 14.1.1.0 0.0.0.255

Internet(config-router)#exit


汇总前:

R3(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/24 is subnetted, 1 subnets

D 12.1.1.0 [90/2681856] via 23.1.1.2, 00:09:30, Serial1/0

14.0.0.0/24 is subnetted, 1 subnets

D 14.1.1.0 [90/2221056] via 23.1.1.2, 00:09:30, Serial1/0

23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 23.1.1.0/24 is directly connected, Serial1/0

L 23.1.1.3/32 is directly connected, Serial1/0

100.0.0.0/24 is subnetted, 1 subnets

D 100.1.1.0 [90/2195456] via 23.1.1.2, 00:09:30, Serial1/0

D 192.168.0.0/24 [90/2323456] via 23.1.1.2, 00:09:30, Serial1/0

D 192.168.1.0/24 [90/2323456] via 23.1.1.2, 00:09:30, Serial1/0

D 192.168.2.0/24 [90/2323456] via 23.1.1.2, 00:09:30, Serial1/0

D 192.168.3.0/24 [90/2323456] via 23.1.1.2, 00:09:30, Serial1/0

192.168.100.0/32 is subnetted, 3 subnets

D 192.168.100.1 [90/2323456] via 23.1.1.2, 00:09:30, Serial1/0

D 192.168.100.2 [90/2297856] via 23.1.1.2, 00:09:30, Serial1/0

C 192.168.100.3 is directly connected, Loopback0

汇总:

R1(config)#int e0/1

R1(config-if)#ip summary-address eigrp 90 192.168.0.0/22

R1(config-if)#int e0/0

R1(config-if)#ip summary-address eigrp 90 192.168.0.0/22

R1(config-if)#int s1/0

R1(config-if)#ip summary-address eigrp 90 192.168.0.0/22

R1(config-if)#exit

汇总后:

R3(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/24 is subnetted, 1 subnets

D 12.1.1.0 [90/2681856] via 23.1.1.2, 00:15:50, Serial1/0

14.0.0.0/24 is subnetted, 1 subnets

D 14.1.1.0 [90/2221056] via 23.1.1.2, 00:15:50, Serial1/0

23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C 23.1.1.0/24 is directly connected, Serial1/0

L 23.1.1.3/32 is directly connected, Serial1/0

100.0.0.0/24 is subnetted, 1 subnets

D 100.1.1.0 [90/2195456] via 23.1.1.2, 00:15:50, Serial1/0

D 192.168.0.0/22 [90/2323456] via 23.1.1.2, 00:01:49, Serial1/0

192.168.100.0/32 is subnetted, 3 subnets

D 192.168.100.1 [90/2323456] via 23.1.1.2, 00:15:50, Serial1/0

D 192.168.100.2 [90/2297856] via 23.1.1.2, 00:15:50, Serial1/0

C 192.168.100.3 is directly connected, Loopback0


3>.R1上下发一条默认路由。

R1(config)#ip route 0.0.0.0 0.0.0.0 14.1.1.4

R1(config)#router eigrp 90

R1(config-router)#redistribute static

R1(config-router)#exit


R3(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 23.1.1.2 to network 0.0.0.0

D*EX 0.0.0.0/0 [170/2221056] via 23.1.1.2, 00:00:07, Serial1/0

12.0.0.0/24 is subnetted, 1 subnets

D 12.1.1.0 [90/2681856] via 23.1.1.2, 00:25:17, Serial1/0

14.0.0.0/24 is subnetted, 1 subnets

D 14.1.1.0 [90/2221056] via 23.1.1.2, 00:25:17, Serial1/0

100.0.0.0/24 is subnetted, 1 subnets

D 100.1.1.0 [90/2195456] via 23.1.1.2, 00:25:17, Serial1/0

D 192.168.0.0/22 [90/2323456] via 23.1.1.2, 00:11:16, Serial1/0

192.168.100.0/32 is subnetted, 3 subnets

D 192.168.100.1 [90/2323456] via 23.1.1.2, 00:25:17, Serial1/0

D 192.168.100.2 [90/2297856] via 23.1.1.2, 00:25:17, Serial1/0


4>.实现R1到R2的环回口路由非等价负载。

确认拓扑表中是否有两条路由条目:

R1(config)#do show ip eigrp topology

EIGRP-IPv4 Topology Table for AS(90)/ID(192.168.100.1)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,

r - reply Status, s - sia Status

P 192.168.3.0/24, 1 successors, FD is 128256

via Connected, Loopback4

P 14.1.1.0/24, 1 successors, FD is 281600

via Connected, Ethernet0/1

P 192.168.2.0/24, 1 successors, FD is 128256

via Connected, Loopback3

P 192.168.0.0/22, 1 successors, FD is 128256

via Summary (128256/0), Null0

P 192.168.0.0/24, 1 successors, FD is 128256

via Connected, Loopback1

P 192.168.1.0/24, 1 successors, FD is 128256

via Connected, Loopback2

P 100.1.1.0/24, 1 successors, FD is 281600

via Connected, Ethernet0/0

P 0.0.0.0/0, 1 successors, FD is 281600

via Rstatic (281600/0)

P 192.168.100.2/32, 1 successors, FD is 409600

via 100.1.1.2 (409600/128256), Ethernet0/0

via 12.1.1.2 (2297856/128256), Serial1/0

P 23.1.1.0/24, 1 successors, FD is 2195456

via 100.1.1.2 (2195456/2169856), Ethernet0/0

via 12.1.1.2 (2681856/2169856), Serial1/0

P 12.1.1.0/24, 1 successors, FD is 2169856

via Connected, Serial1/0

P 192.168.100.1/32, 1 successors, FD is 128256

via Connected, Loopback0

P 192.168.100.3/32, 1 successors, FD is 2323456

via 100.1.1.2 (2323456/2297856), Ethernet0/0

via 12.1.1.2 (2809856/2297856), Serial1/0


设置非等价负载:

R1(config)#router eigrp 90

R1(config-router)#variance 10

R1(config-router)#exit


设置后实现非等价负载:

R1(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 14.1.1.4 to network 0.0.0.0


23.0.0.0/24 is subnetted, 1 subnets

D 23.1.1.0 [90/2195456] via 100.1.1.2, 00:00:38, Ethernet0/0

[90/2681856] via 12.1.1.2, 00:00:38, Serial1/0

D 192.168.0.0/22 is a summary, 00:00:38, Null0

192.168.100.0/32 is subnetted, 3 subnets

D 192.168.100.2 [90/409600] via 100.1.1.2, 00:00:38, Ethernet0/0

[90/2297856] via 12.1.1.2, 00:00:38, Serial1/0

D 192.168.100.3 [90/2323456] via 100.1.1.2, 00:00:38, Ethernet0/0

[90/2809856] via 12.1.1.2, 00:00:38, Serial1/0


R1(config)#do show ip route 192.168.100.2

Routing entry for 192.168.100.2/32

Known via "eigrp 90", distance 90, metric 409600, type internal

Redistributing via eigrp 90

Last update from 12.1.1.2 on Serial1/0, 00:01:05 ago

Routing Descriptor Blocks:

* 100.1.1.2, from 100.1.1.2, 00:01:05 ago, via Ethernet0/0

Route metric is 409600, traffic share count is 240

Total delay is 6000 microseconds, minimum bandwidth is 10000 Kbit

Reliability 255/255, minimum MTU 1500 bytes

Loading 1/255, Hops 1

12.1.1.2, from 12.1.1.2, 00:01:05 ago, via Serial1/0

Route metric is 2297856, traffic share count is 43

Total delay is 25000 microseconds, minimum bandwidth is 1544 Kbit

Reliability 255/255, minimum MTU 1500 bytes

Loading 1/255, Hops 1


5>.as 90都使用eigrp认证。

R2(config)#key chain glab

R2(config-keychain)#key 1

R2(config-keychain-key)#key-string galb123

R2(config-keychain-key)#exit


R2(config-keychain)#key 2

R2(config-keychain-key)#key-string glab123

R2(config-keychain-key)#exit


R2(config)#int s1/0

R2(config-if)#ip authentication key-chain eigrp 90 glab

R2(config-if)#ip authentication mode eigrp 90 md5

R2(config-if)#exit


R3(config)#key chain glab1

R3(config-keychain)#key 1

R3(config-keychain-key)#key-string galb123

R3(config-keychain-key)#exit

R3(config-keychain)#key 2

R3(config-keychain-key)#key-string glab123

R3(config-keychain-key)#exit

R3(config)#int s1/0

R3(config-if)#ip authentication key-chain eigrp 90 glab1

R3(config-if)#ip authentication mode eigrp 90 md5

R3(config-if)#exitR2(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

2 23.1.1.3 Se1/0 12 00:00:29 26 156 0 10

1 12.1.1.1 Se1/1 13 01:00:23 14 100 0 39

0 100.1.1.1 Et0/0 12 01:01:16 6 100 0 38


R2(config)#int s1/1

R2(config-if)#ip authentication key-chain eigrp 90 glab

R2(config-if)#ip authentication mode eigrp 90 md5

R2(config-if)#exit


R1(config)#key chain glab1

R1(config-keychain)#key 1

R1(config-keychain-key)#key-string galb123

R1(config-keychain-key)#exit

R1(config-keychain)#key 2

R1(config-keychain-key)#key-string glab123

R1(config-keychain-key)#exit

R1(config-keychain)#exit

R1(config)#int e0/1

R1(config-if)#ip authentication key-chain eigrp 90 glab1

R1(config-if)#ip authentication mode eigrp 90 md5

R1(config-if)#exit

R1(config)#int s1/0

R1(config-if)#ip authentication key-chain eigrp 90 glab1

R1(config-if)#ip authentication mode eigrp 90 md5

R1(config-if)#exi


Internet(config)#key chain glab1

Internet(config-keychain)#key 1

Internet(config-keychain-key)#key-string galb123

Internet(config-keychain-key)#exit

Internet(config-keychain)#key 2

Internet(config-keychain-key)#key-string glab123

Internet(config-keychain-key)#exit

Internet(config-keychain)#exit

Internet(config)#int e0/0

Internet(config-if)#ip authentication key-chain eigrp 90 glab1

Internet(config-if)#ip authentication mode eigrp 90 md5

Internet(config-if)#exit


6>.配置R3为stub区域,且只能发送直连和汇总路由。

R3(config)#router eigrp 90

R3(config-router)#eigrp stub

R3(config-router)#do show run | se eigrp

ip authentication mode eigrp 90 md5

ip authentication key-chain eigrp 90 glab1

router eigrp 90

network 23.1.1.0 0.0.0.255

network 192.168.100.0

eigrp stub connected summary

7>.优化R1,R2,R3环回口,使其收不到任何eigrp报文。

R3(config)#router eigrp 90

R3(config-router)#passive-interface loopback0

R3(config-router)#exit


R2(config)#router eigrp 90

R2(config-router)#passive-interface loopback0

R2(config-router)#exit


R1(config-if)#router eigrp 90

R1(config-router)#passive-interface loopback0

R1(config-router)#exit

8>.使用偏移列表(offset-list)修改R2到R3环回口的metric值,增加30。

R2(config)#access-list 1 permit 192.168.100.3

R2(config)#router eigrp 90

R2(config-router)#offset-list 1 in 30 serial 1/0


R2(config-router)#do show ip rout 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 100.1.1.1 to network 0.0.0.0


D*EX 0.0.0.0/0 [170/307200] via 100.1.1.1, 00:12:45, Ethernet0/0

14.0.0.0/24 is subnetted, 1 subnets

D 14.1.1.0 [90/307200] via 100.1.1.1, 00:12:45, Ethernet0/0

D 192.168.0.0/22 [90/409600] via 100.1.1.1, 00:12:45, Ethernet0/0

192.168.100.0/32 is subnetted, 3 subnets

D 192.168.100.1 [90/409600] via 100.1.1.1, 00:12:45, Ethernet0/0

D 192.168.100.3 [90/2297886] via 23.1.1.3, 00:00:11, Serial1/0


4.作业中遇到的问题: