一、实验目的:掌握PAPCHAP认证配置

二、拓扑图:

三、具体步骤配置:

(1)R1路由器配置:

Router>enable  –进入特权模式

Router#configure terminal  –进入全局配置模式

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

Router(config)#hostname R1  –修改路由器名为R1

R1(config)#interface l0  –进入回环端口

R1(config-if)#ip address 192.168.1.254 255.255.255.0  –配置ip地址

R1(config-if)#no shutdown  –激活端口

R1(config-if)#exit  –返回上一级

R1(config)#interface s0/0/0  –进入端口

R1(config-if)#ip address 192.168.12.1 255.255.255.0  –为端口配置ip地址

R1(config-if)#clock rate 64000  –设置时钟同步速率

R1(config-if)#no shutdown  –激活端口

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down

R1(config-if)#exit  –返回上一级

R1(config)#route rip  –开启rip服务

R1(config-router)#version 2  –版本2

R1(config-router)#no auto-summary  –关闭路由自动汇总

R1(config-router)#network 192.168.1.0  –添加直连网段到rip

R1(config-router)#network 192.168.12.0

R1(config-router)#exit  –返回上一级

R1(config)#username abc1 password 456  –在中心路由器R1上为远程路由器R2设置用户名和密码

R1(config)#interface s0/0/0  –进入端口

R1(config-if)#encapsulation ppp  –封装端口为ppp

R1(config-if)#ppp authentication pap  –在R1上,配置PAP 验证

R1(config-if)#ppp pap sent-username abc password 123  –在中心路由器R1上为远程路由器R2设置用户名和密码

R1(config-if)#end  –返回特权模式

%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

R1#

%SYS-5-CONFIG_I: Configured from console by console

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

 

(2)R2路由器配置:

Router>enable  –进入特权模式

Router#configure terminal  –进入全局配置模式

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

Router(config)#hostname R2  –修改路由器名为R2

R2(config)#interface l0  –进入回环端口

R2(config-if)#ip address 192.168.2.254 255.255.255.0  –配置ip地址

R2(config-if)#no shutdown  –激活端口

R2(config-if)#exit  –返回上一级

R2(config)#interface s0/0/0  –进入端口

R2(config-if)#ip address 192.168.12.2 255.255.255.0  –为端口配置ip地址

R2(config-if)#no shutdown  –激活端口

R2(config-if)#interface s0/0/1  –进入端口

R2(config-if)#ip address 192.168.24.2 255.255.255.0  –为端口配置ip地址

R2(config-if)#clock rate 64000  –设置时钟同步速率

R2(config-if)#no shutdown  –激活端口

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down

R2(config-if)#exit  –返回上一级

R2(config)#route rip  –开启rip协议

R2(config-router)#version 2  –版本2

R2(config-router)#no auto-summary  –关闭路由自动汇总

R2(config-router)#network 192.168.2.0  –添加直连网段到rip

R2(config-router)#network 192.168.12.0

R2(config-router)#network 192.168.24.0

R2(config-router)#exit  –返回上一级

R2(config)#username abc password 123  –在R2上为R1设置用户名和密码

R2(config)#username R3 password cisco  –在R2上为R3设置用户名和密码(注意两端密码要相同)

R2(config)#interface s0/0/0  –进入端口

R2(config-if)#encapsulation ppp  –封装端口为PPP协议

R2(config-if)#ppp authentication pap  –配置PAP验证

R2(config-if)#ppp pap sent-username abc1 password 456  –在R2上为R1设置用户名和密码

R2(config-if)#interface s0/0/1  –进入端口

R2(config-if)#encapsulation ppp  –封装端口为ppp协议

R2(config-if)#ppp authentication chap  –配置chap验证

R2(config-if)#end  –返回特权模式

R2#

%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

%SYS-5-CONFIG_I: Configured from console by console

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

R2#

%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up

 

(3)R3路由器配置:

Router>enable  –进特权模式

Router#configure terminal  –进入全局配置模式

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

Router(config)#hostname R3  –修改路由器名为R3

R3(config)#interface l0  –进入回环端口

R3(config-if)#ip address 192.168.3.254 255.255.255.0  –为端口配置ip地址

R3(config-if)#no shutdown  –激活端口

R3(config-if)#exit  –返回上一级

R3(config)#interface S0/0/0  –进入端口

R3(config-if)#ip address 192.168.24.1 255.255.255.0  –为端口配置ip地址

R3(config-if)#no shutdown  –激活端口

R3(config-if)#exit  –返回上一级

R3(config)#route rip  –开启rip协议

R3(config-router)#version 2  –版本2

R3(config-router)#no auto-summary  –关闭路由自动汇总

R3(config-router)#network 192.168.3.0  –添加直连网段到rip

R3(config-router)#network 192.168.24.0

R3(config-router)#exit  –返回上一级

R3(config)#username R2 password cisco  –在R3上为R2设置用户名和密码

R3(config)#interface s0/0/0  –进入端口

R3(config-if)#encapsulation ppp  –封装端口为ppp协议

R3(config-if)#ppp authentication chap  –配置chap验证

R3(config-if)#end  –返回特权模式

%LINK-5-CHANGED: Interface Loopback0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up

%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up

R3#

%SYS-5-CONFIG_I: Configured from console by console

 

四、验证测试:

1、测试是否开启ppp认证

(1)R1:

(2)R2:

(3)R3:

 

2、查看R1S0/0/0端口信息

如图,红色标记处表示是PPP认证

 

3、测试全网是否互通:

(1)R1R2

 

(2)R2R3

 

(3)R3R1

 

结果:全网互通成功!!!

夜河资源网提供的所有内容仅供学习与交流。通过使用本站内容随之而来的风险以及法律责任与本站无关,所承担的法律责任由使用者承担。
一、如果您发现本站侵害了相关版权,请附上本站侵权链接和您的版权证明一并发送至邮箱:yehes#qq.com(#替换为@)我们将会在五天内处理并断开该文章下载地址。
二、本站所有资源来自互联网整理收集,全部内容采用撰写共用版权协议,要求署名、非商业用途和相同方式共享,如转载请也遵循撰写共用协议。
三、根据署名-非商业性使用-相同方式共享 (by-nc-sa) 许可协议规定,只要他人在以原作品为基础创作的新作品上适用同一类型的许可协议,并且在新作品发布的显著位置,注明原作者的姓名、来源及其采用的知识共享协议,与该作品在本网站的原发地址建立链接,他人就可基于非商业目的对原作品重新编排、修改、节选或者本人的作品为基础进行创作和发布。
四、基于原作品创作的所有新作品都要适用同一类型的许可协议,因此适用该项协议, 对任何以他人原作为基础创作的作品自然同样都不得商业性用途。
五、根据二〇〇二年一月一日《计算机软件保护条例》规定:为了学习和研究软件内含的设计思想和原理,通过安装、显示、传输或者存储软件等方式使用软件的,可不经软件著作权人许可,无需向其支付报酬!
六、鉴此,也望大家按此说明转载和分享资源!本站提供的所有信息、教程、软件版权归原公司所有,仅供日常使用,不得用于任何商业用途,下载试用后请24小时内删除,因下载本站资源造成的损失,全部由使用者本人承担!