1、计算机网络实验报告 实验组号: 课程: 班级: 实验名称: 姓 名__________ 实 验 日 期: 学 号_____________ 实验报告日期: 同组人姓名_________________ 报 告 退 发: ( 订正 、
2、重做 ) 同组人学号_ _______________________ 教 师 审 批 签 字:通过 不通过 实验八 PPP认证 实验1: PPP pap认证 【实验名称】 PPP PAP认证 【实验目的】 掌握PPP PAP认证的过程及配置 【背景描述】 你是公司的网络管理员,公司为了满足不断增长的业务需求,甓请了专线接入,你的客户端路由器与ISP进行链路协商时要验证身份,配置路由器保证链路建立并考虑其安全性。 【实验功能】 在链路协商时保证安全验证。链路协商用户名、密码以明文的方式传输。 【实验拓扑】
3、Ra Rb 【实验设备】 R1762(2台) 【实验步骤】 步骤1.基本配置 Ra的基本配置: R1762-1-1(config)#hostname Ra !配置路由器主机名 Ra(config)#interface serial 1/2 !配置广域网接口 Ra(config-if)#clock rate 64000 !在DCE端配置时钟 Ra(config-if)#ip address 1.1.1.1 255.255.255.0 !配置接口地址 Ra(config-if)#no shutdown !启用该接口 Rb的基本配置:
4、 Red-Giant(config)#hostname Rb!配置路由器主机名 Rb(config)#interface serial 1/2 !配置广域网接口 Rb(config-if)#ip address 1.1.1.2 255.255.255.0 !配置接口地址 Rb(config-if)#no shutdown !启用该接口 验证测试1:检查配置信息 Ra#show ip interface brief R1762-8-1#sho ip int b Interface IP-Address(Pri)
5、 OK? Status serial 1/2 1.1.1.1/24 YES UP serial 1/3 no address YES DOWN FastEthernet 1/0 no address YES DOWN FastEthernet 1/1 no address YES DOWN
6、 [记录实验结果] Rb#show ip interface brief R1762-8-2#sh ip int b Interface IP-Address(Pri) OK? serial 1/2 1.1.1.2/24 YES serial 1/3 no address YES FastEthernet 1/0 no address YES
7、 FastEthernet 1/1 no address YES [记录实验结果] 验证测试2:使用PING命令测试两台路由器可以相互通信 R1762-8-1#ping 1.1.1.2 Sending 5, 100-byte ICMP Echoes to 1.1.1.2, timeout is 2 seconds: < press Ctrl+C to break > !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 30/30/30
8、 ms [记录实验结果] R1762-8-2#ping 1.1.1.1 [记录实验结果] 步骤2.配置PPP PAP认证 在验证方的配置如下:(把Ra看作为验证方) Ra(config)#int s 1/2 Ra(config-if)#encapsulation ppp !接口下封装PPP协议 Ra(config-if)# ppp authentication pap !PPP启用PAP认证方式 Ra(config)#username Rb password 0 star !在验证方配置被验证方用户名,密码 注: 1、命令执行后会
9、有提示信息:Apr 20 15:14:59 R1762-8-1 %7:%LINE PROTOCOL CHANGE: Interfa ce serial 1/2, changed state to DOWN 2、此时在Rb的配置界面下,使用ping命令发现两台路由器不通了。如果随后在Rb上也封装PPP,那么两台路由器又可以互通了。 在被验证方的配置(把Rb看作被验证方) Rb(config)#int s 1/2 Rb(config-if)#encapsulation ppp !接口下封装PPP协议 Rb(config-if)# ppp pap sent-username Rb
10、 password 0 star !配置PAP认证的用户名 [记录实验结果] 【注意事项】 在DCE端要配置时钟 Rb(config)#username Ra password 0 rg !username后面的参数是对方的主机名。 在接口下封装PPP debug ppp authentication 在路由器物理层UP,链路尚未建立的情况下打开才有信息输出,本实验的实质是链路层协商建立的安全性,该信息出现在连路协商的过程中。 【学习心得】在配置时钟的时候要在DCE端配置,通过 Rb#show interface s 1/2 可以快速的确定现在所处的
11、端口是否是DCE端。 实验2 PPP CHAP认证 1.实训目的 掌握 PPP CHAP 认证的过程及配置。 2.实训环境。如图所示。 PPP CHAP 认证实训环境 3.实训内容 你是公司的网络管理员,公司为了满足不断增长的业务需求,申请了专线接入,你的客户端 路由器与 ISP 进行链路协商时要验证身份,配置路由器保证链路建立并考虑其安全性。 【实验设备】 R2624(2台)。 4.实训操作步骤: (1)、基本配置 R1762-1-1(config)#hostname Ra ! 配置路由器主机名 Ra(config)# Ra(conf
12、ig)# interface serial 1/2 Ra(config-if)#ip address 1.1.1.1 255.255.255.0 Ra(config-if)#clock rate 64000 ! 在 DCE 端配置时钟 Ra(config-if)#no shutdown R1762-1-2(config)#hostname Rb ! 配置路由器主机名 Rb(config)# Rb(config)# interface serial 1/2 Rb(config-if)#ip address 1.1.1.2 255.255.255.0 ! 配置接口地
13、址 Rb(config-if)#no shutdown ! 启用该接口 验证测试1: (以 Ra 为例)查看配置信息 Rb#sh int s1/2 [参考配置信息] %UPDOWN: Interface Serial1, changed state to up1 Serial1 is up, line protocol is up Hardware is HDLC4530B Internet address is 1.1.1.1/24 MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec, rely 255/255, load 1
14、/255 Encapsulation HDLC, loopback not set, keepalive set (10 sec) Last input never, output never, output hang never Last clearing of "show interface" counters never Input queue: 0/75/0 (size/max/drops); Total output drops: 0 Queueing strategy: weighted fair Output queue: 0/64/0 (size/threshold/
15、drops) Conversations 0/2 ( %UPDOWN: Line protocol on Interface Serial1, changed state to upactive/max active) Reserved Conversations 0/0 (allocated/max allocated) 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 0 packets input, 0 bytes, 0 no buffer
16、Received 0 broadcasts 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort 6 packets output, 452 bytes, 0 underruns 0 output errors, 0 collisions, 3 interface resets 0 output buffer failures, 0 output buffers swapped out 0 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=down
17、[记录实验结果] 验证测试2:在路由器的特权模式下,使用PING命令测试两台路由器的连通性。 [记录实验结果] (2)、配置 PPP CHAP 认证 在验证方作如下配置:把Ra看作为验证方 Ra(config)# username Rb password 0 star ! 以对方的主机名作为用户名,密码和对方的路由器 一致 Ra(config)#interface serial 1/2 Ra(config-if)# encapsulation ppp ! 接口下封装 PPP Ra(config-if)#ppp authentication chap ! P
18、PP 启用 CHAP 方式验证 在被验证方作如下配置:把Rb看作为被验证方 Rb(config)#username Ra password 0 star ! 以对方的主机名作为用户名,密码和对方的路由器一致 Ra(config)#interface serial 1/2 Rb(config-if)# encapsulation ppp ! 接口下封装 PPP 验证测试 Ra#debug ppp authentication ! 观察 CHAP 验证过程 [参考配置信息] PPP Serial1: Send CHAP challenge id=2 to
19、remote PPP Serial1: CHAP response id=2 received from Rb PPP Serial1: Send CHAP success id=2 to remote PPP Serial1: remote passed CHAP authentication [记录实验结果] Rb#debug ppp authentication [参考配置信息] PPP Serial1: CHAP challenge from Ra PPP Serial1: Passed CHAP authenticatiIn with remote..
20、 [记录实验结果] 5.实训小结 1) 在 DCl 端要配置时钟; 2) Ra(config)#username Rb password 0 star !username 后面的参数是对方的主机 名; 3) Rb(config)#username Ra password 0 star !username 后面的参数是对方的主机 名; 4) 在接口下封装 ppp; 5) Debug ppp authentication 在路由器物理层 up,链路尚未建立的情况下打开才有信息输出,本实验的实质是链路层协商建立的安全性,该信息出现在链路协商的过程中。 Rb#sh
21、run ! 路由器 Ra 配置 Building configuration... 【参考配置】 interface Serial1/2 ip address 1.1.1.1 255.255.255.0 encapsulatiIn ppp ppp auth chap [记录实验结果] Ra#sh run ! 路由器 R. 配置 【参考配置】 Building configuration... Current configuration: ! version 6.14(2) ! hostname "R." ! username Ra password
22、 7 08103B1400 ! ip su.net-zerI ! interface Fastlthernet0 no ip address shutdIwn ! interface Fastlthernet1 no ip address shutdIwn ! interface Fastlthernet2 nI ip address shutdIwn ! interface Fastlthernet3 no ip address shutdIwn ! interface Serial0 no ip address shutdown ! interface Serial1 ip address 1.1.1.2 255.255.255.0 encapsulatiIn ppp clock rate 64000 ! voice-port 0 ! voice-port 1 ! voice-port 2 ! voice-port 3 ip classless ! line con 0 line 1 8 line aux 0 line vty 0 4 login [记录实验结果] 8






