实验拓扑图:

 

EIGRP认证_第1张图片

实验过程

1.R1的预配置

Router>en

Router#config t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#no ip domain-lookup

Router(config)#line console 0

Router(config-line)#no exec-timeout

Router(config-line)#loggin syn

Router(config-line)#exit

Router(config)#host R1

R1(config)#interface s1/0

R1(config-if)#no shut

R1(config-if)#ip add 172.16.1.9 255.255.255.252

R1(config-if)#interface lo0

R1(config-if)#ip add 10.1.1.1 255.255.255.0

R1(config-if)#exit

2.R2的预配置

Router>en

Router#config t

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#no ip domain-lookup

Router(config)#line console 0

Router(config-line)#no exec-timeout

Router(config-line)#loggin syn

Router(config-line)#exit

Router(config)#host R2

R2(config)#interface s1/0

R2(config-if)#no shut

R2(config-if)#ip add 172.16.1.10 255.255.255.252

R2(config-if)#interface lo0

R2(config-if)#ip add 192.168.1.1 255.255.255.0

R2(config-if)#exit

3.R1配置EIGRP

R1(config)#router eigrp 50

R1(config-router)#network 172.16.1.0

R1(config-router)#network 10.1.1.0

R1(config-router)#no auto

R1(config-router)#end

4.R2配置EIGRP

R2(config)#router eigrp 50

R2(config-router)#network 172.16.1.0

*Jan  5 22:58:05.047: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 50: Neighbor 172.16.1.9 (Serial1/0) is up: new adjacency

R2(config-router)#network 192.168.1.0

R2(config-router)#no auto

R2(config-router)#end

5.查看R1R2的路由表

R1#show ip rout eigrp

D    192.168.1.0/24 [90/2297856] via 172.16.1.10, 00:03:19, Serial1/0

R2#show ip route eigrp

     10.0.0.0/24 is subnetted, 1 subnets

D       10.1.1.0 [90/2297856] via 172.16.1.9, 00:04:21, Serial1/0

6.R1上配置认证

R1#config t

Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)#key chain ccnp

R1(config-keychain)#key 1

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

R1(config-keychain-key)#exit

R1(config-keychain)#exit

R1(config)#interface s1/0

R1(config-if)#ip authentication key-chain eigrp 50 ccnp

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

R1(config-if)#end

7.查看R2输出信息

*Jan  5 23:07:15.283: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 50: Neighbor 172.16.1.9 (Serial1/0) is down: Auth failure  //因为R2没有配置认证,所以认证失败

R2#show ip eigrp nei

IP-EIGRP neighbors for process 50   //不能建立邻居关系

8.配置R2的认证

R2#config t

Enter configuration commands, one per line.  End with CNTL/Z.

R2(config)#key chain ccnp

R2(config-keychain)#key 1

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

R2(config-keychain-key)#exit

R2(config-keychain)#exit

R2(config)#interface s1/0

R2(config-if)#ip authentication key-chain eigrp 50 ccnp

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

*Jan  5 23:14:50.715: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 50: Neighbor 172.16.1.9 (Serial1/0) is up: new adjacency

R2(config-if)#end

9.查看R2邻居表和路由表

R2#show ip eigrp nei

IP-EIGRP neighbors for process 50

H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq

                                            (sec)         (ms)       Cnt Num

0   172.16.1.9              Se1/0             14 00:04:14  114   684  0  11

R2#show ip route eigrp

     10.0.0.0/24 is subnetted, 1 subnets

D       10.1.1.0 [90/2297856] via 172.16.1.9, 00:04:21, Serial1/0