PPP PAP实验
实验拓扑
实验需求
-
按照图示搭建拓扑,并且配置IP地址
-
在RTA配置本地用户以PAP方式验证对端RTB
-
在RTB上配置PAP验证时发来的用户名和密码
-
在PCA或PCB上通过ping命令检查PCB或PCA的互通性
实验解析
1、按照图示搭建拓扑,并且配置IP地址
步骤1:在PCA上配置IP地址
步骤2:在RTA上配置IP地址
[RTA]interface GigabitEthernet 0/0 [RTA-GigabitEthernet0/0]ip address 192.168.1.1 30 [RTA]interface Serial 1/0 [RTA-Serial1/0]ip address 10.1.1.1 30
步骤3:在PCB上配置IP地址
[RTB]interface GigabitEthernet 0/0 [RTB-GigabitEthernet0/0]ip address 192.168.2.1 30 [RTB]interface Serial 1/0 [RTB-Serial1/0]ip address 10.1.1.2 30
步骤4:在PCB上配置IP地址
2、在RTA上配置到达192.168.2.0/30网段的路由
[RTA]ip route-static 192.168.2.2 30 10.1.1.2
3、在RTB上配置到达192.168.1.0/30网段的路由
[RTB]ip route-static 192.168.1.1 30 10.1.1.1
4、在RTA配置本地用户以PAP方式验证对端RTB
步骤1:在RTA上创建本地用户和密码
[RTA]local-user RTB class network [RTA-luser-network-RTB]service-type ppp [RTA-luser-network-RTB]password simple pwdpwd
步骤2:将RTA的串行接口封装为PPP协议,并且配置验证方式为PAP
[RTA]interface Serial 1/0 [RTA-Serial1/0]link-protocol ppp [RTA-Serial1/0]ppp authentication-mode pap
5、在RTB上配置PAP验证时发来的用户名和密码
步骤1:将RTB的串行接口封装为PPP协议并且·配置PAP验证时发来的用户名和密码
[RTB]interface Serial 1/0 [RTB-Serial1/0]link [RTB-Serial1/0]link-protocol ppp [RTB-Serial1/0]ppp pap local-user RTB password simple pwdpwd
6、在PCA或PCB上通过ping命令检查PCB或PCA的互通性
步骤1:在PCA上ping PCB的IP地址
<H3C>ping 192.168.2.1 Ping 192.168.2.1 (192.168.2.1): 56 data bytes, press CTRL_C to break 56 bytes from 192.168.2.1: icmp_seq=0 ttl=254 time=1.310 ms 56 bytes from 192.168.2.1: icmp_seq=1 ttl=254 time=1.030 ms 56 bytes from 192.168.2.1: icmp_seq=2 ttl=254 time=0.934 ms 56 bytes from 192.168.2.1: icmp_seq=3 ttl=254 time=1.036 ms 56 bytes from 192.168.2.1: icmp_seq=4 ttl=254 time=1.079 ms
步骤2:在PCB上ping PCA的IP地址
<H3C>ping 192.168.1.1 Ping 192.168.1.1 (192.168.1.1): 56 data bytes, press CTRL_C to break 56 bytes from 192.168.1.1: icmp_seq=0 ttl=254 time=1.183 ms 56 bytes from 192.168.1.1: icmp_seq=1 ttl=254 time=1.085 ms 56 bytes from 192.168.1.1: icmp_seq=2 ttl=254 time=1.088 ms 56 bytes from 192.168.1.1: icmp_seq=3 ttl=254 time=1.185 ms 56 bytes from 192.168.1.1: icmp_seq=4 ttl=254 time=1.173 ms