本次实验采用的设备是:神州数码DCR-2855路由器
PPP的详细步骤已经在上一篇分享过了,接下来分享PPP的两种验证方式CHAP和PAP它们两种的区别在于一个只需要验证对方的账号即可,一个需要验证账号和密码才可以,本次分享的是CHAP
- 拓扑图
- 配置需求
路由器 | 接口 | IP地址 | 账号 | 密码 |
RT-1 | S1/0 | 192.168.1.1/24 | user1 | abcd |
RT-2 | S1/1 | 192.168.1.2/24 | user2 | abcd |
- 配置步骤
RT-1的配置
RT-1_config#aaa authentication ppp rt-1 local 创建三A认证,rt-1是名称可以随便写
RT-1_config#username user1 password abcd 创建认证所需要的账号密码
RT-1_config#interface serial 1/0 进入端口
RT-1_config_s1/0#ip add 192.168.1.1 255.255.255.0 配置IP地址
RT-1_config_s1/0#encapsulation ppp 封装PPP协议
RT-1_config_s1/0#ppp authentication chap rt-1 选择认证方式
RT-1_config_s1/0#ppp chap hostname user2 验证对方的账号
RT-1_config_s1/0#physical-layer speed 64000 一端配置时钟速率
RT-2的配置
RT-2_config#aaa authentication ppp rt-2 local
RT-2_config#username user2 password abcd
RT-2_config#interface serial 1/1
RT-2_config_s1/1#ip add 192.168.1.2 255.255.255.0
RT-2_config_s1/1#encapsulation ppp
RT-2_config_s1/1#ppp authentication chap rt-2
RT-2_config_s1/1#ppp chap hostname user1
RT-2_config#show interface serial 1/1 查看端口状态
Serial1/1 is up, line protocol is up
Mode=Sync DTE
DTR=UP,DSR=UP,RTS=UP,CTS=UP,DCD=UP
MTU 1500 bytes, BW 64 kbit, DLY 2000 usec
Interface address is 192.168.1.2/24
Encapsulation PPP, loopback not set
Keepalive set(10 sec)
PAP的验证方式请看下一篇