实验目的

  1. 理解CHAP认证的原理
  2. 掌握CHAP认证的配置

实验拓扑

实验需求

  1. 根据实验拓扑图,完成设备的基本配置;
  2. 在R1和R2之间做CHAP单向认证,R1是认证方,R2是被认证方。

实验步骤

步骤1:设备的基本配置

配置R1:

Router>enable

Router#configure terminal

Router(config)#hostname R1

R1(config)#no ip domain-lookup

R1(config)#line console 0

R1(config-line)#exec-timeout 0 0

R1(config-line)#logging synchronous

R1(config-line)#exit

R1(config)#interface serial1/0

R1(config-if)#ip address 12.1.1.1 255.255.255.0

R1(config-if)#no shutdown

R1(config-if)#end

R1#

配置R2:

Router>enable

Router#configure terminal

Router(config)#hostname R2

R2(config)#no ip domain-lookup

R2(config)#line console 0

R2(config-line)#exec-timeout 0 0

R2(config-line)#logging synchronous

R2(config-line)#exit

R2(config)#interface serial1/0

R2(config-if)#ip address 12.1.1.2 255.255.255.0

R2(config-if)#no shutdown

R2(config-if)#end

R2#

步骤2:配置CHAP认证

配置R1:

R1(config)#interface serial 1/0

R1(config-if)#encapsulation ppp //封装PPP

R1(config-if)#ppp authentication chap //启用CHAP认证

R1(config-if)#exit

R1(config)#username xmws password wisdom //创建用户名和密码

R1(config)#end

R1#

配置R2:

R2(config)#interface serial 1/0

R2(config-if)#encapsulation ppp //封装PPP

R2(config-if)#ppp chap hostname xmws //CHAP认证的用户名

R2(config-if)#ppp chap password wisdom //CHAP认证的密码

R2(config-if)#end

R2#

步骤3:检查:CHAP认证

检查R1:

R1#show ip interface brief

Interface IP-Address OK? Method Status Protocol

Ethernet0/0 unassigned YES unset administratively down down

Ethernet0/1 unassigned YES unset administratively down down

Ethernet0/2 unassigned YES unset administratively down down

Ethernet0/3 unassigned YES unset administratively down down

Serial1/0 12.1.1.1 YES manual up up

Serial1/1 unassigned YES unset administratively down down

Serial1/2 unassigned YES unset administratively down down

Serial1/3 unassigned YES unset administratively down down

检查R2:

R2#show ip interface brief

Interface IP-Address OK? Method Status Protocol

Ethernet0/0 unassigned YES unset administratively down down

Ethernet0/1 unassigned YES unset administratively down down

Ethernet0/2 unassigned YES unset administratively down down

Ethernet0/3 unassigned YES unset administratively down down

Serial1/0 12.1.1.2 YES manual up up

Serial1/1 unassigned YES unset administratively down down

Serial1/2 unassigned YES unset administratively down down

Serial1/3 unassigned YES unset administratively down down


微思郭仔
31 声望2 粉丝

微思IT认证培训-思科、华为、红帽、oracle、VMware、PMP、CISP等,一切为了成为更好的自己,加油!!!