您的位置:首页 > 其它

PPP协议实验报告

2007-12-24 18:46 211 查看
1.1 [/b]实验任务[/b][/b]
在路由器上配置PPP协议,同时配置PAP认证和CHAP认证

1.2 [/b]实验环境和网络拓扑[/b][/b]
[align=center][/align]



1.3 [/b]完成标准[/b][/b]
(1) 按照拓扑图配置PPP协议,配置PAP和CHAP认证,保证各认证内网络连通性
(2) 配置路由,完成全网的连通性

2[/b].详细操作步骤[/b][/b]

Step 1: [/b]配置路由器的接口[/b]IP[/b]和[/b]PPP[/b]协议及认证[/b][/b]

路由器R1配置如下:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ho R1
R1(config)#int lo 0 //配置Loopback 0地址
R1(config-if)#ip add 1.1.1.1 255.0.0.0
R1(config-if)#int s1/0 //配置接口IP
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#
*Dec 23 10:04:26.663: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Dec 23 10:04:27.663: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
*Dec 23 10:04:55.395: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
*Dec 23 10:05:05.383: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
R1(config-if)#encapsulation ppp //更改串口封装协议为PPP
R1(config-if)#ppp pap sent-username r1 password 0 1234 //配置PAP认证所需用户名和密码
R1(config-if)#exit
R1(config)#
*Dec 23 10:07:17.319: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to down
*Dec 23 10:07:38.923: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up

路由器R2配置如下:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ho R2
R2(config)#int s1/0 //配置接口IP
R2(config-if)#ip add 192.168.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#
*Dec 23 10:04:50.783: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Dec 23 10:04:51.783: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
R2(config-if)#int s1/1 //配置接口IP
R2(config-if)#ip add 202.193.1.1 255.255.255.0
R2(config-if)#no shut
R2(config-if)#
*Dec 23 10:05:17.939: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
*Dec 23 10:05:18.939: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
R2(config-if)#exit
R2(config)#
R2(config)#int s1/0
R2(config-if)#encapsulation ppp //更改串口封装协议为PPP
R2(config-if)#ppp authentication pap //在接口上启用PAP认证
R2(config-if)# exit
R2(config)#username r1 password 0 1234 //添加被认证用户名和密码
R2(config)#username r3 password 0 4321 //添加被认证用户名和密码
R2(config)#int s1/1
R2(config-if)#encapsulation ppp //更改串口封装协议为PPP
R2(config-if)#ppp authentication chap //在接口上启用CHAP认证
R2(config-if)#exit
R2(config)#
*Dec 23 10:10:29.395: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1,
changed state to up

路由器R3配置如下:
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#ho R3
R3(config)#int lo 0 //配置Loopback 0地址
R3(config-if)#ip add 3.3.3.3 255.0.0.0
R3(config-if)#int s1/1 //配置接口IP
R3(config-if)#ip add 202.193.1.2 255.255.255.0
R3(config-if)#no shut
R3(config-if)#
*Dec 23 10:05:53.775: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
*Dec 23 10:05:54.775: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
R3(config-if)#encapsulation ppp //更改串口封装协议为PPP
R3(config-if)#ppp authentication chap //在接口上启用CHAP认证
R3(config-if)#exit
R3(config)#username r2 password 0 4321 //配置CHAP认证所需用户名和密码
R3(config)#
*Dec 23 10:10:29.631: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up

Step 2: [/b]配置路由,检查路由表[/b][/b]

路由器R1配置如下:
R1(config-router)#network 192.168.1.0 //支连网段路由
R1(config-router)#network 1.1.1.0 //到Loopback的路由
R1(config-router)#version 2 no auto-summary //启用RIP版本2,去除自动汇总
R1(config)#do show ip route

C 1.0.0.0/8 is directly connected, Loopback0
R 3.0.0.0/8 [120/2] via 192.168.1.2, 00:00:01, Serial1/0
R 202.193.1.0/24 [120/1] via 192.168.1.2, 00:00:01, Serial1/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, Serial1/0
C 192.168.1.2/32 is directly connected, Serial1/0

路由器R2配置如下:
R2(config)#router rip
R2(config-router)#netw 192.168.1.0 //支连网段路由
R2(config-router)#netw 202.193.1.0 //支连网段路由
R2(config-router)#version 2 no auto-summary
R2(config)#do show ip route

R 1.0.0.0/8 [120/1] via 192.168.1.1, 00:00:22, Serial1/0
R 3.0.0.0/8 [120/1] via 202.193.1.2, 00:00:19, Serial1/1
202.193.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 202.193.1.2/32 is directly connected, Serial1/1
C 202.193.1.0/24 is directly connected, Serial1/1
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.1/32 is directly connected, Serial1/0
C 192.168.1.0/24 is directly connected, Serial1/0

路由器R3配置如下:
R3(config)#router rip
R3(config-router)#netw 202.193.1.0 //支连网段路由
R3(config-router)#netw 3.3.3.0
R3(config-router)#version 2 no auto-summary
R3(config)#do show ip route

R 1.0.0.0/8 [120/2] via 202.193.1.1, 00:00:18, Serial1/1
C 3.0.0.0/8 is directly connected, Loopback0
202.193.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 202.193.1.0/24 is directly connected, Serial1/1
C 202.193.1.1/32 is directly connected, Serial1/1
R 192.168.1.0/24 [120/1] via 202.193.1.1, 00:00:18, Serial1/1

Step 3: [/b]检查网络连通性和[/b]PPP[/b]设置信息[/b][/b]

路由器R1连通性如下:
R1(config)#do ping 192.168.1.1
//本地接口地址
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/98/212 ms
R1(config)#do ping 192.168.1.2
//在R2上与本地接口相连的接口
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 32/72/148 ms
R1(config)#do ping 202.193.1.1
//在R2上与R3相连的接口
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.193.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/68/200 ms
R1(config)#do ping 202.193.1.2
//在R3上的接口
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 202.193.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 52/124/292 ms
R1(config)#do ping 3.3.3.3
//R3的Loopback地址
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/102/216 ms

路由器R2接口信息和调试信息如下:
R2(config)#do show int s1/0 //显示串口1/0信息
Serial1/0 is up, line protocol is up
Hardware is M4T
Internet address is 192.168.1.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation PPP, LCP Open //封装协议PPP,LCP打开
Open: CDPCP, IPCP, crc 16, loopback not set
Keepalive set (10 sec)
Restart-Delay is 0 secs
Last input 00:00:21, output 00:00:03, output hang never
Last clearing of "show interface" counters 00:06:05
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 1158 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
128 packets input, 7548 bytes, 0 no buffer
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
131 packets output, 7966 bytes, 0 underruns
0 output errors, 0 collisions, 7 interface resets
0 output buffer failures, 0 output buffers swapped out
7 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up

R2(config)#do debug ppp packet //调试PPP包信息
PPP packet display debugging is on
R2(config)#
*Dec 23 10:13:38.947: Se1/0 LCP-FS: I ECHOREQ [Open] id 22 len 12 magic 0x000A70
28
*Dec 23 10:13:38.947: Se1/0 LCP-FS: O ECHOREP [Open] id 22 len 12 magic 0x00172D
F0
*Dec 23 10:13:39.287: Se1/1 PPP: I pkt type 0x0021, datagramsize 56 link[ip]
*Dec 23 10:13:42.375: Se1/0 PPP: O pkt type 0x0021, datagramsize 76
*Dec 23 10:13:43.815: Se1/1 PPP: O pkt type 0x0021, datagramsize 76
*Dec 23 10:13:48.227: Se1/0 PPP: I pkt type 0x0021, datagramsize 56 link[ip]
*Dec 23 10:13:54.411: Se1/1 LCP: O ECHOREQ [Open] id 14 len 12 magic 0x0019CE43
*Dec 23 10:13:54.463: Se1/1 LCP-FS: I ECHOREP [Open] id 14 len 12 magic 0x00152E
42
*Dec 23 10:13:54.463: Se1/1 LCP-FS: Received id 14, sent id 14, line up
*Dec 23 10:13:54.555: Se1/1 LCP-FS: I ECHOREQ [Open] id 13 len 12 magic 0x00152E
42
*Dec 23 10:13:54.555: Se1/1 LCP-FS: O ECHOREP [Open] id 13 len 12 magic 0x0019CE
43
*Dec 23 10:14:03.727: Se1/1 PPP: I pkt type 0x0207, datagramsize 285 link[cdp]
R2(config)# do no debug ppp parcket
PPP packet display debugging is off

路由器R3连通性如下:
R3(config)#do ping 192.168.1.1
//R1物理串口IP
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/113/188 ms
R3(config)#do ping 1.1.1.1
//R1 Loopback地址
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 48/112/244 ms

3[/b].实验总结[/b][/b]
PPP(Point to Point Protocol点对点协议)是在SLIP(Serial Line Internet Protocol串行线路网际互连协议)基础上发展起来的在广域网中比较常用的数据链路层封装协议。
l 与SILP协议相比,PPP协议优点有:支持同步、异步串行链路;支持多种网络层协议;支持各种连续参数的协商;支持错误检测;支持用户认证;允许进行数据压缩。
l PPP协议的组成有:封装方式;LCP(Link Control Protocols 链路控制协议)和NCP(Network Control Protocols 网络控制协议)
l LCP协议中重要协商项有:MRU(Maximum Receive Unit 最大接受单元);Magic Number(魔术字);认证方式;链路压缩;和多链路捆绑
l NCP协议主要协商参数有:IP地址和TCP/IP头压缩
l PPP协议支持的两种认证方式:PAP(Password Authentication Protocol 密码认证协议)和CHAP(Challenge Hand Authentication Protocol 质询握手认证协议)
l PPP多链路捆绑(Multilink-group Interface)的优点有:增加带宽;负载分担和利用分片降低时延本文出自 “゛﹊天命嘻哈” 博客,转载请与作者联系!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: