1. 组网需求
如 图1-8所示,Router A和Router B之间用接口Serial2/0 互连,要求Router A用PAP方式验证RouterB,Router B不需要对Router A进行验证。
2. 组网图
图1-1 PAP 验证、CHAP 验证举例组网图
3. 配置步骤
(1) 配置Router A# 为Router B 创建本地用户。
system-view
[RouterA] local-user userb
# 设置本地用户的密码。
[RouterA-luser-userb] password simple passb
# 设置本地用户的服务类型为PPP。
[RouterA-luser-userb] service-type ppp
[RouterA-luser-userb] quit
[RouterA] interface serial 2/0
# 配置接口封装的链路层协议为PPP。
[RouterA-Serial2/0] link-protocol ppp
# 配置本地验证Router B 的方式为PAP。
[RouterA-Serial2/0] ppp authentication-mode pap domain system
# 配置接口的IP 地址。
[RouterA-Serial2/0] ip address 200.1.1.1 16
[RouterA-Serial2/0] quit
# 创建ISP 域。
[RouterA] domain system
# 配置域用户使用本地认证方案。
[RouterA-isp-system] authentication ppp local
(2) 配置Router B
# 配置接口封装的链路层协议为PPP。
system-view
[RouterB] interface serial 2/0
[RouterB-Serial2/0] link-protocol ppp
# 配置本地被Router A 以PAP 方式验证时Router B 发送的PAP 用户名和密码。
[RouterB-Serial2/0] ppp pap local-user userb password simple passb
# 配置接口的IP 地址。
[RouterB-Serial2/0] ip address 200.1.1.2 16
(3) 验证配置结果
通过查看 display interface serial 2/0 信息,接口的物理层和链路层的状态都是up 状态,并且PPP的LCP 和IPCP 都是opened 状态,说明链路的PPP 协商已经成功,并且Router A 和Router B 可以互相ping 通对方。
[RouterB-Serial2/0] display interface serial 2/0
Serial2/0 current state: UP
Line protocol current state: UP
Description: Serial2/0 Interface
The Maximum Transmit Unit is 1500, Hold timer is 10(sec)
Internet Address is 200.1.1.2/16 Primary
Link layer protocol is PPP
LCP opened, IPCP opened
Output queue : (Urgent queuing : Size/Length/Discards) 0/100/0
Output queue : (Protocol queuing : Size/Length/Discards) 0/500/0
Output queue : (FIFO queuing : Size/Length/Discards) 0/75/0
Interface is V35
206 packets input, 2496 bytes
206 packets output, 2492 bytes
[RouterB-Serial2/0] ping 200.1.1.1
PING 200.1.1.1: 56 data bytes, press CTRL_C to break
Reply from 200.1.1.1: bytes=56 Sequence=1 ttl=255 time=103 ms
Reply from 200.1.1.1: bytes=56 Sequence=2 ttl=255 time=1 ms
Reply from 200.1.1.1: bytes=56 Sequence=3 ttl=255 time=1 ms
Reply from 200.1.1.1: bytes=56 Sequence=4 ttl=255 time=1 ms
Reply from 200.1.1.1: bytes=56 Sequence=5 ttl=255 time=10 ms
--- 200.1.1.1 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/23/103 ms





