title: 第六章 广域网技术
date: 2022-03-17T19:59:05Z
lastmod: 2023-06-01T15:59:16Z
tags: [WAN基础,HDLC,PPP,PAP,CHAP,PPP链路捆绑]
第六章 广域网技术
WAN基础
基础术语
最后一公里<本地环路>、中心局co、责任分割点、DTE/DCE、串行/并行、上行/下行、同步/异步、背靠背连接
HDLC
高速数据链路控制
R1(config)#int s1/0
R1(config-if)#no sh
R1(config-if)#encapsulation hdlc
R1(config-if)#ip add 192.168.1.2 255.255.255.0
PPP
定义
port-to-port protocol 点对点协议,应用最成熟、最广泛的点对点拓扑协议,一般不同的厂商的链路封装都采用ppp
功能
- 点对点数据封装
- 用户认证
- 链路捆绑
- 数据压缩
子协议
- NCP协议:网络控制协议,面向网络层
- LCP协议:链路控制协议,实现链路协商
协商
graph LR
id1[dead]
id2[established]
id3[authenticatie]
id4[network]
id5[LCP]
id6[LCP认证]
id7[NCP]
subgraph 1
id1 --> id2 --> id3 --> id4
end
subgraph 2
id2 -.- id5
id3 -.- id6
id4 -.- id7
end
部署
R1(config)#int s1/0
R1(config-if)#no sh
R1(config-if)#encapsulation ppp
R1(config-if)#ip add 192.168.3.5 255.255.255.0
PPP安全认证
PAP
-
password authentication protocol 密码认证协议
-
明文传输
-
两次握手
-
单向认证<也可双向>
-
graph LR client -----------> server
-
配置:
//服务器端 username 账号 password 密码 int s1/0 ppp authentication pap //客户端配置 int s1/0 ppp pap sent-username 账号 password 密码 //PAP同时支持单向和双向认证,明文认证,不建议使用
CHAP
- 三次握手
-
sequenceDiagram R1->>R2: chap requeit 请求 R2->>R1:挑战包abc R1->>R2:R2挑战信息+随机数+ID
R1:挑战包信息abc+随机数通过MD5算法算出结果,128bit或160bit,R2收到后与自己算的结果对比
-
哈希算法特征(MD5/SHA1):
- 不可逆:无法根据最终值得到原有值
- 固定输出:无论输入是多少,输出永远是128bit或160bit
- 雪崩效应:若输入有变动,输出绝对有变动
-
配置
-
//R1配置 R1(config)#username R2 password cisco R1(config)#int s1/0 R1(config-if)#encapsulation ppp R1(config-if)#ppp authentication chap //R2配置 R2(config)#username R1 password cisco R2(config)#int s1/0 R2(config-if)#encapsulation ppp R2(config-if)#ppp authentication chap
-
PPP链路捆绑
部署
R1(config)#int s1/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp multilink //开启ppp捆绑
R1(config-if)#ppp multilink group 1 //将接口放入捆绑组
R1(config)#int multilink1
R1(config-if)#ip address 12.1.1.1 255.255.255.0
//查看配置信息
show int multilink1
show ip int brief