null第十六章
HDLC和PPP第十六章
HDLC和PPPWAN 概述WAN 概述广域网连接的场所
根据用户不同的需求提供不同的连接
方案
气瓶 现场处置方案 .pdf气瓶 现场处置方案 .doc见习基地管理方案.doc关于群访事件的化解方案建筑工地扬尘治理专项方案下载
Service Provider广域网连接类型: 物理层广域网连接类型: 物理层点到点专线同步串口Telephone
Company电路交换异步串口Service
Provider分组交换连接同步串口专线专线点到点的链接方式;提供专用的永久连接;当经常与多个地点连接时,使用专线是主要的方法。
点到点专线同步串口电路交换电路交换被广泛使用于电话公司的网络中,ISDN、PSTN就是广域网电路交换的一个例子。
主要用于把临时的远程用户和移动用户连接到局域网,还常用于高速线路的备份。Telephone
Company电路交换异步串口分组交换连接分组交换连接广域网的一种交换方式,网络设备共享一条点到点的线路,将数据包从源端经过通信网络传送到目的地址;帧中继,X.25都是广域网分组交换技术的实例
帧中继是一种节省成本的方法,通过虚电路与其他站点连接,帧中继大多由通信公司服务供应商实现。Service
Provider分组交换连接同步串口HDLCHDLCHDLC:是在同步数据链路控制封装
协议
离婚协议模板下载合伙人协议 下载渠道分销协议免费下载敬业协议下载授课协议下载
发展而来的数据链路层协议。
HDLC是CISCO串行线路的缺省封装协议,只允许CISCO专用设备的连接,与其他的供应商的设备不兼容。
如果与没有运行CISOC IOS的设备连接应当使用PPP。HDLC 帧格式HDLC 帧格式FlagAddressControlDataFCSFlagHDLC支持单一的协议环境 FlagAddressControlProprietaryDataFCSFlagCisco HDLCCisco的 HDLC 具有proprietary 字节提供对多协议环境的支持HDLC 命令HDLC 命令Router(config-if)#encapsulation hdlc启用HDLC封装
HDLC是同步串口的缺省封装格式广域网帧的封装格式广域网帧的封装格式最常用的两个点对点广域网封装协议是HDLC、PPP
PPP:用于在链路建立过程当中检查链路质量;另外,还支持PAP和CHAP密码验证
HDLC:是思科串行线路的缺省协议,只允许点对点的连接
如果连接的是非CISCO设备,就需要使用其他的数据封装类型。如FR,PPPPPP协议作用PPP协议作用 能够控制数据链路的建立;
能够对广域网的IP地址进行分配和管理;
允许同时采用多种网络层路由协议;
能够配置和测试数据链路;
能够有效进行错误检测;
在80年代末,人们在串行线路协议(SLIP)基础上开发PPP协议来解决远程互联网连接的问题。
PPP 综述PPP 综述PPP 可以通过 NCP 携带多个协议的数据包
PPP 可以通过 LCP 建立和控制连接 PPP EncapsulationTCP/IP
Novell IPX
AppleTalkMultiple protocol encapsulations using NCPs in PPP Link setup and control using LCP in PPP PPP 验证概述PPP 验证概述两种 PPP 验证协议: PAP 和 CHAPPPP 会话的建立
链路建立
验证阶段(可选)
网路层协议连接Dialup or Circuit-Switched NetworkPPP验证PPP验证在PPP会话中,验证是可选的。
如果需要验证,则须通信双方的路由器要交换彼此的验证信息。
可以选择使用密码验证协议PAP或询问握手验证协议CHAP;在一般情况下,CHAP是首选协议。选择 PPP 验证协议选择 PPP 验证协议密码明文传输
验证两端是同等的Remote Router
(SantaCruz)Central-Site Router (HQ)Hostname: santacruz
Password: boardwalk username santacruz
password boardwalk PAP
2-Way Handshake“santacruz, boardwalk”Accept/Reject密码验证协议PAP密码验证协议PAPPAP:两次握手,密码在链路上是明文传输的;连接建立后,需要不停地在链路上反复发送用户名和密码;远程节点受到登录尝试的频率和定时的即制。
选择 PPP 验证协议选择 PPP 验证协议密码是加密的远程路由器
(SantaCruz)中心路由器
(HQ)Hostname: santacruz
Password: boardwalk Username: santacruz
Password: boardwalk CHAP
3-Way Handshake询问响应接受/拒绝密码验证协议CHAP密码验证协议CHAPRemote user
John Run PPPUse CHAPResponseAccept or rejectChallengeRequest for challenge Local user
databaseName: john Password: urbiz单向CHAP认证第一步 拔号者发起CHAP呼叫第一步 拔号者发起CHAP呼叫766-13640-1User dials inppp authentication CHAP
LCP协商CHAP认证方式和MD5算法
第二步 向拔号者发送挑战信息第二步 向拔号者发送挑战信息01random3640-1idUser dials in766-13640-11,建立挑战数据包;随机数,认证名…
2,将序列号保存在访问服务器中;
3,向呼叫方发送挑战数据包;第三步拔号者处理挑战消息第三步拔号者处理挑战消息MD5hash01random3640-1iduser pass
3640-1 pc1User dials in766-13640-1拔号者处理CHAP挑战数据包;
1,将序列号放入MD5散列生成器;
2,将随机数放入MD5散列生成器;
3,用访问服务器的认证名比较口令
4,将密码放入MD5散列生成器
第四步 拔号者向访问服务器发送挑战应答第四步 拔号者向访问服务器发送挑战应答0102random3640-1ididhash766-1user pass
3640-1 pc1User dials in766-13640-1MD5hash发送应答包给访问服务器;第五步 访问服务器检查拔号者发过来的应答数据包第五步 访问服务器检查拔号者发过来的应答数据包0102random3640-1ididhash766-1user pass
766-1 pc1user pass
3640-1 pc1=?User dials in766-13640-1MD5hash第六步 访问服务器向
拔号者发送认证通过/失败的消息第六步 访问服务器向
拔号者发送认证通过/失败的消息010203random3640-1ididhash766-1id“Welcome in”user pass
766-1 pc1user pass
3640-1 pc1User dials in766-13640-1MD5hashConfiguring CHAP ExampleConfiguring CHAP Examplehostname left
username right password sameone
int async 0
encapsulation ppp
ppp authentication CHAP
hostname right
username left password sameone
int async 0
encapsulation ppp
ppp authentication CHAP
Left routerRight
router配置 PPP 验证总述配置 PPP 验证总述Service ProviderVerify who
you are.Router to Be Authenticated
(The router that initiated the call.)
ppp encapsulation
hostname username / password
ppp authenticationAuthenticating Router
(The router that received the call.)
ppp encapsulation
hostname
username / password
ppp authenticationEnabling PPPEnabling PPP AuthenticationEnabling PPPEnabling PPP Authentication配置 PPP配置 PPPRouter(config-if)#encapsulation ppp激活 PPP 验证配置 PPP 验证配置 PPP 验证Router(config)#hostname name给路由器命名Router(config)#username name password password提供需要验证的对方路由器的名称和密码配置 PPP 验证配置 PPP 验证Router(config-if)#ppp authentication {chap | chap pap | pap chap | pap}激活 PAP 或 CHAP 验证CHAP 配置举例CHAP 配置举例hostname left
username right password sameone
!
int serial 0
ip address 10.0.1.1 255.255.255.0
encapsulation ppp
ppp authentication CHAP
hostname right
username left password sameone
!
int serial 0
ip address 10.0.1.2 255.255.255.0
encapsulation ppp
ppp authentication CHAP
Left routerRight
routerPSTN/ISDN查看 HDLC 和 PPP 的封装查看 HDLC 和 PPP 的封装Router#show interface s0
Serial0 is up, line protocol is up
Hardware is HD64570
Internet address is 10.140.1.2/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, rely 255/255, load 1/255
Encapsulation PPP, loopback not set, keepalive set (10 sec)
LCP Open
Open: IPCP, CDPCP
Last input 00:00:05, output 00:00:05, output hang never
Last clearing of "show interface" counters never
Queueing strategy: fifo
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
38021 packets input, 5656110 bytes, 0 no buffer
Received 23488 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
38097 packets output, 2135697 bytes, 0 underruns
0 output errors, 0 collisions, 6045 interface resets
0 output buffer failures, 0 output buffers swapped out
482 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
本章总结本章总结完成本章的学习后,你应该能够掌握:
在广域网的串行口上配置PPP 协议
在一个 PPP 连接内配置PAP和CHAP验证
查看点到点的 PPP 协议配置情况问题回顾问题回顾1. 在Cisco路由器上有哪三中广域网连接类型?
2. PPP有哪两种封装协议,它们有哪些优缺点?