ppp认证实验
ppp认证实验
- 实验拓扑
- 实验要求
- R1和R2使用PPP链路直连,R2和R3把2条PPP链路捆绑为PPPMP直连
- 按照图示配置工P地址
- R2对R1的PPP进行单向chap验证
- R2和R3的PPP进行双向chap验证
三、实验思路
1、R1、R2网段为192.168.1.0/24配置IP
2、R2—3之间做MP—group(链路聚合)并配配置IP
3、做R2对R1的的单向chap认证,在R2上做主认证方配置aaa服务,R1在接口做认证
4、R2和R3的PPP进行双向chap验证先以R2为主认证方,其次再以R3为主认证方做chap认证
四、实验步骤
1、R1,R2配置IP
[R1]interface Serial 3/0/0
[R1-Serial3/0/0]ip address 192.168.1.1 24
[R2]interface Serial 3/0/0
[R2-Serial3/0/0]ip address 192.168.1.2 24
2、R2,R3做MP-group(链路聚合)并配置IP
[R2]interface Mp-group 0/0/0
[R2-Mp-group0/0/0]ip address 192.168.2.2 24
[R3]interface Mp-group 0/0/0
[R3-Mp-group0/0/0]ip address 192.168.2.3 24
再将接口对应到MP组中
[R2]interface Serial 3/0/1
[R2-Serial3/0/1]ppp mp Mp-group 0/0/0
[R2]interface Serial 4/0/0
[R2-Serial4/0/0]ppp mp Mp-group 0/0/0
[R3]interface Serial 3/0/1
[R3-Serial3/0/1]ppp mp Mp-group 0/0/0
[R3]interface Serial 4/0/0
[R3-Serial4/0/0]ppp mp Mp-group 0/0/0
3、做R2对R1的的单向chap认证
1)R2为主认证方,R1为被认证方
[R2]aaa //进入aaa服务,设定用户名,密码
[R2-aaa]local-user liu password cipher 111 //设置用户名,密码
Info: Add a new user.
[R2-aaa]local-user liu service-type ppp //指定此账户用于的服务类型
[R2-aaa]q
[R2]interface Serial 3/0/0 //进入接口指定ppp的身份验证模式
[R2-Serial3/0/0]ppp authentication-mode chap //指定chap认证
我们再R1先不做配置,现在我们将接口重启看看chap认证的效果
测试:
重启前:双方可以通讯
重启后:因chap认证R2向R1发送challenge报文R1并没有做回应所以双方通讯断开
接口一直处于dead状态
现在我们只需要在R1上做认证配置即可
[R1-Serial3/0/0]ppp chap user liu
[R1-Serial3/0/0]ppp chap password cipher 111
现在双方可以正常通讯了
4、R2和R3的PPP进行双向chap验证
根据R1\2的单向chap认证,可以将双向认证拆分为两个单向认证
1)以R2为主认证方R3为被认证方
[R2]aaa //进入aaa服务,设定用户名,密码
[R2-aaa]local-user liu password cipher 111 //设置用户名,密码
Info: Add a new user.
[R2-aaa]local-user liu service-type ppp //指定此账户用于的服务类型
[R2-aaa]q
[R2]interface Serial 3/0/1 //进入接口指定ppp的身份验证模式
[R2-Serial3/0/1]ppp authentication-mode chap //指定chap认证
[R2]interface Serial 4/0/0
[R2-Serial4/0/0]ppp authentication-mode chap
R3做chap认证
[R3]interface Serial 3/0/1
[R3-Serial3/0/1]ppp chap user liu
[R3-Serial3/0/1]ppp chap password cipher 111
[R3-Serial3/0/1]q
[R3]interface Serial 4/0/0
[R3-Serial4/0/0]ppp chap user liu
[R3-Serial4/0/0]ppp chap password cipher 111
2)以R3为主认证方R2为被认证方
R3配置aaa服务
[R3]aaa
[R3-aaa]local-user hao password cipher 222
Info: Add a new user.
[R3-aaa]local-user hao service-type ppp
[R3]interface Serial 3/0/1
[R3-Serial3/0/1]ppp authentication-mode chap
[R3-Serial3/0/1]q
[R3]interface Serial 4/0/0
[R3-Serial4/0/0]ppp authentication-mode chap
R2上做认证
[R2]interface Serial 3/0/1
[R2-Serial3/0/1]ppp chap user hao
[R2-Serial3/0/1]ppp chap password cipher 222
[R2-Serial3/0/1]q
[R2]interface Serial 4/0/0
[R2-Serial4/0/0]ppp chap user hao
[R2-Serial4/0/0]ppp chap password cipher 222
测试:
原文地址:https://blog.csdn.net/2301_79767652/article/details/140621749
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!