网络类型、路由封装实验

该实验在华为模拟器中进行,涉及拓扑搭建、路由器接口IP配置,以及边界路由器到ISP的默认路由设置。实验还包括PAP和CHAP认证的测试,R3与R5间使用HDLC封装,R1与R4的GRE隧道建立,R1、R2、R3的MGRE环境配置,并通过RIP协议实现私有网络的全网可达。最后,对PC配置IP地址并测试网络连通性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

环境:华为模拟器
实验要求
在这里插入图片描述

1. 拓扑搭建

在这里插入图片描述

2. 配置各路由器物理接口IP地址

R1

[R1]int s4/0/0
[R1-Serial4/0/0]ip add 15.1.1.1 24

R2

[R2]int s4/0/0
[R2-Serial4/0/0]ip add 25.1.1.1 24

R3

[R3]int s4/0/0
[R3-Serial4/0/0]ip add 35.1.1.1 24

R4

[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 45.1.1.1 24

R5

[R5]int s3/0/0
[R5-Serial3/0/0]ip add 15.1.1.2 24
[R5-Serial3/0/0]int s3/0/1
[R5-Serial3/0/1]ip add 25.1.1.2 24
[R5-Serial3/0/1]int s4/0/0
[R5-Serial4/0/0]ip add 35.1.1.2 24
[R5-GigabitEthernet0/0/0]ip add 45.1.1.1 24
[R5-GigabitEthernet0/0/0]int lo1
[R5-LoopBack1]ip add 5.5.5.5 24

边界路由器到ISP通

将R1、R2、R3、R4当做内网的边界路由器,R5当做ISP运营商,所以边界路由器需要配置缺省路由指向自己公网的运营商设备

[R1]ip route-static 0.0.0.0 0 15.1.1.2
[R2]ip route-static 0.0.0.0 0 25.1.1.2
[R3]ip route-static 0.0.0.0 0 35.1.1.2
[R4]ip route-static 0.0.0.0 0 45.1.1.2

测试

R1 测试
在这里插入图片描述
R4测试
在这里插入图片描述

PAP认证

R5 主认证方

[R5]aaa
[R5-aaa]local-user xixi password cipher xixi123
Info: Add a new user.	
[R5-aaa]local-user xixi service-type ppp
[R5-aaa]int s3/0/0	连接客户端的接口
[R5-Serial3/0/0]link-protocol ppp
[R5-Serial3/0/0]ppp authentication-mode pap

此时被认证方R1pingR5的接口不通
在这里插入图片描述
被认证方R1

[R1]int s4/0/0
[R1-Serial4/0/0]link-protocol ppp	
[R1-Serial4/0/0]ppp pap local-user xixi password cipher xixi123

R1做完认证再次pingR5的接口
在这里插入图片描述

CHAP认证

R5主认证方

[R5]aaa	
[R5-aaa]local-user heihei password cipher heihei123
Info: Add a new user.
[R5-aaa]local-user heihei service-type ppp
[R5-aaa]int s3/0/1
[R5-Serial3/0/1]link-protocol ppp	
[R5-Serial3/0/1]ppp authentication-mode chap

被认证方

[R2]int s4/0/0
[R2-Serial4/0/0]link-protocol ppp
[R2-Serial4/0/0]ppp chap user heihei	
[R2-Serial4/0/0]ppp chap password cipher heihei123

R2完成认证ping连接R5的接口
在这里插入图片描述

R3与R5间使用HDLC封装

[R3-Serial4/0/0]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
[R5-Serial4/0/0]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y

R1与R4为GRE环境

R1

[R1]int Tunne0/0/0
[R1-Tunnel0/0/0]ip add 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre	
[R1-Tunnel0/0/0]source 15.1.1.1 
[R1-Tunnel0/0/0]destination 45.1.1.1

R4

[R4]int Tunnel 0/0/0
[R4-Tunnel0/0/0]ip add 10.1.1.2 24
[R4-Tunnel0/0/0]tunnel-protocol gre
[R4-Tunnel0/0/0]source 45.1.1.1
[R4-Tunnel0/0/0]destination 15.1.1.1 

R1、R2、R3为MGRE环境

R1

[R1]int Tunnel 0/0/1	创建tunnel口
[R1-Tunnel0/0/1]ip add 10.1.2.1 24	 配置IP地址
[R1-Tunnel0/0/1]tunnel-protocol gre p2mp 	修改接口模式为多点GRE
[R1-Tunnel0/0/1]source 15.1.1.1  定义公有源IP地址
[R1-Tunnel0/0/1]nhrp entry multicast dynamic 	本地成为NHRP中心,同时可以进行伪广播
[R1-Tunnel0/0/1]nhrp network-id 100

分支站点R2

[R2]int Tunnel 0/0/1
[R2-Tunnel0/0/1]ip add 10.1.2.2 24	
[R2-Tunnel0/0/1]tunnel-protocol gre p2mp 	
[R2-Tunnel0/0/1]source s4/0/0
[R2-Tunnel0/0/1]nhrp network-id 100
[R2-Tunnel0/0/1]nhrp entry 10.1.2.1 15.1.1.1 register 

分支站点R3

[R3]int Tunnel 0/0/1
[R3-Tunnel0/0/1]ip add 10.1.2.3 24
[R3-Tunnel0/0/1]tunnel-protocol gre p2mp 
[R3-Tunnel0/0/1]source s4/0/0
[R3-Tunnel0/0/1]nhrp network-id 100
[R3-Tunnel0/0/1]nhrp entry 10.1.2.1 15.1.1.1 register 

私有网络基于RIP全网可达

R1

[R1]rip 1
[R1-rip-1]ver 2	
[R1-rip-1]un summary 	
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 10.0.0.0

R2

[R2]rip 1
[R2-rip-1]ver 2	
[R2-rip-1]un summary 
[R2-rip-1]network 10.0.0.0
[R2-rip-1]network 192.168.2.0

R3

[R3]rip 1
[R3-rip-1] ver 2
[R3-rip-1]un summary 
[R3-rip-1]network 10.0.0.0 
[R3-rip-1]network 192.168.3.0

R4

[R4]rip 1
[R4-rip-1]ver 2	
[R4-rip-1]un summary 
[R4-rip-1]network 10.0.0.0	
[R4-rip-1]network 192.168.4.0

在这里插入图片描述
在这里插入图片描述
当拓扑结构为中心到站点(轴辐状、星型)——不是所有网点均为固定的公有IP、没法所有tunnel设备互相注册,只能通过关闭水平分割来实现路由的全网正常收敛;

[R1]int Tunnel 0/0/1
[R1-Tunnel0/0/1]undo rip split-horizon 

给PC配置IP地址

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

测试ping通性

在这里插入图片描述
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值