当前位置:网站首页>二层封装技术(HDLC、PPP--PAP\CHAP、GRE)实验练习
二层封装技术(HDLC、PPP--PAP\CHAP、GRE)实验练习
2022-07-26 22:48:00 【不大聪明¿】
目录
实验要求:

HDLC
HDLC---高级链路控制协议 --- 属于点到点网络类型 -- 没有二层单播(唯一)地址,物理网线为串线链路, --- 各家厂商该技术均为私有,华为默认串线链路不是HDLC
实验要求R1--R2之间使用HDLC封装
R1

R2

[R1]interface s4/0/0
[R1-Serial4/0/0]link-protocol hdlc
PPP---PAP认证与CHAP认证
PPP -- 点到点协议 -- 属于点到点网络类型 --- 华为设备默认串口封装技术,HDLC的升级版。
升级点:拨号
1、直连间,ip地址不在同一网段也可正常通讯;在PPP协商初期,相互共享接口ip地址,生成直连的32位主机路由
2、认证 -- 身份核实
3、建立虚连接,分配ip地址
认证中就包括PAP与CHAP,PHP--明文(不加密)CHAP--挑战质询握手协议--密文
实验中要求:R2-R3采用PAP认证,R2-R4采用CHAP认证,其中R2均为主认证方
R2与R3 PAP认证


主认证方
[ISP]aaa (主认证方—服务端)
[ISP-aaa]local-user a privilege level 15 password cipher 123
[ISP-aaa]local-user a service-type ppp
[ISP]interface s3/0/0 (连接客户端的接口)
[ISP-Serial3/0/0]ppp authentication-mode pap
被认证方
[R3]int s4/0/0
[R3-Serial4/0/0]ppp pap local-user a password cipher 123
R2与R4 CHAP认证


主认证方
[ISP]aaa
[ISP-aaa]local-user b password cipher 123
[ISP-aaa]local-user b service-type ppp
[ISP]interface Serial 4/0/1
[ISP-Serial 4/0/1]link-protocol ppp
[ISP-Serial 4/0/1]ppp authentication-mode chap被认证方
[R4]interface Serial 4/0/0
[R4-Serial 4/0/0]link-protocol ppp
[R4-Serial 4/0/0]ppp chap user b
[R4-Serial 4/0/0]ppp chap password cipher 123
MGRE
MGRE--所有节点存在同一个MA网段,且为中心到站点结构。该结构中,默认仅中心站点需要固定公有ip地址,分支站点地址可变化, 大大降低的管理难度,资源占有量,成本
NHRP:下一跳路径发现协议,存在服务端和客户端,服务端需要固定公有ip地址,客户端ip地址可变,客户端在本地公有ip变化后,主动向服务端进行注册,服务端生成MAP,MAP中记录客户端的公有ip与tunnel的ip地址对应关系,若其他客户端需要访问另一个客户端,可以到服务端下载该MAP。
中心站点R1配置

[R1]interface Tunnel 0/0/0 (创建通道接口)
[R1-Tunnel0/0/0]ip add 10.1.1.1 24 (配置虚拟IP地址)
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp (定义封装方式)
[R1-Tunnel0/0/0]source 12.1.1.1(源物理IP)
[R1-Tunnel0/0/0]
[R1-Tunnel0/0/0]nhrp entry multicast dynamic(本地成为NHRP中心,同时可以进行伪广播)
[R1-Tunnel0/0/0]nhrp network-id 100(默认为0号,该网段内所有节点tunnel接口必须为相同域)
分支站点配置

[R3]int t0/0/0
[R3-Tunnel0/0/0]ip add 10.1.1.2 24
[R3-Tunnel0/0/0]tunnel-protocol gre p2mp
[R3-Tunnel0/0/0]source Serial 4/0/0 (分支站点ip地址不固定)[R3-Tunnel0/0/0]nhrp network-id 100
[R3-Tunnel0/0/0]nhrp entry 10.1.1.1 12.1.1.1 register (分支需要到中心站点注册)
路由配置 ---RIP V2
通过RIP补齐路由(以R1为例)

[R1]rip 1
[R1-rip-1]ver 2
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 10.0.0.0
因为此RIP是为了进行虚拟网络的收敛,而不是物理网络的收敛。物理网络无法实现动态路由,因为中间的R2,也就是ISP,所以宣告时不宣告物理网段。
NAT地址转化
实验要求能访问R2的环回,也就是访问公网,此时就需要地址转化
以R1为例

[R1]acl 2000
[R1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[R1-acl-basic-2000]int s4/0/0
[R1-Serial4/0/0]nat outbound 2000
此时我们可以用PC1去ping R2的环回进行测试

至此完成实验所有要求 ,试验结束
边栏推荐
- Text to image intensive reading of paper gr-gan: gradually refine text to image generation
- Use ECs and OSS to set up personal network disk
- uuid和索引建立规则
- MySQL installation
- 力扣获取第二大的成绩
- a元素的伪类
- STM32_HAL_SUMMARY_NOTE
- 机器学习概述
- 指针常量与常量指针详细讲解
- 2022 open source work of the latest text generated image research (papers with code)
猜你喜欢

Homework 1-4 learning notes
![[FPGA tutorial case 28] one of DDS direct digital frequency synthesizers based on FPGA -- principle introduction](/img/bf/ce4bc33d2a0fc7fe57105e20fbafcf.png)
[FPGA tutorial case 28] one of DDS direct digital frequency synthesizers based on FPGA -- principle introduction

MySQL multi table query

测开基础 日常刷题 (持续更新ing...)

【数据库课程设计】SQLServer数据库课程设计(学生宿舍管理),课设报告+源码+数据库关系图

a元素的伪类

读写分离、主从同步一文搞定

Transport layer --------- TCP (II)

STM32 HAL库串口(UART/USART)调试经验(一)——串口通信基础知识+HAL库代码理解

MVCC及其原理详解
随机推荐
[详解C语言]一文带你认识C语言,让你醍醐灌顶
[cann training camp] enter media data processing 1
[translation] reduced precision in tensorrt
shell课程总结
Share 29 chrome plug-ins, and there is always one for you
MySQL common statements
[untitled]
count(*)为什么很慢
MySQL index
Desktop solution summary
How can smart people leave without offending others?
Solution: various error reports and pit stepping and pit avoidance records encountered in the alchemist cultivation plan pytoch+deeplearning (II)
Solution: various error reporting and pit stepping and pit avoiding records encountered in the alchemist cultivation plan pytoch+deeplearning (III)
[translation] explicit and implicit batch in tensorrt
Enumerated valueof() method stepping on the pit
Introduction to network - Introduction to Enterprise Networking & basic knowledge of network
IO function of standard C library
The gradient descent method and Newton method are used to calculate the open radical
Autojs learning - realize the display of date and lunar time
introduction