MGRE实验

一、实验内容:

二、实验分析:

第一点要求R5为ISP设备只能配置公有IP地址,不能对他进行任何其他操作。第二点要求我们在R1-R5之间配置ppp的pap认证,且R5为主认证方;R2-R5之间配置ppp的chap认证,且R5为主认证方;R3-R5之间更改为以HDLC方式封装。第三点要求我们以R1为中心R2,R3为成员的基础上搭建一个MGRE环境且还要以R1,R4为基础搭建一个点到点的GRE环境。第四点要求配置rip实现pc间的通讯。最后要求所有的pc可以与R5的环回通讯,这就要求配置nat来完成要求。

三、实验步骤:

注意:串口的接入要在路由器上加接口

方法如下:

右键-->设置-->找到2sa接口卡--> 拖拽到上方-->关闭即可

 

 

第一步:IP地址规划

设备地址网关/接口
PC1192.168.1.2/24192.168.1.1/24
PC2192.168.2.2/24192.168.2.1/24
PC3192.168.3.2/24192.168.3.1/24
PC4192.168.4.2/24192.168.4.1/24
R115.1.1.1/24S4/0/0
R225.1.1.2/24S4/0/0
R335.1.1.3/24S4/0/0
R445.1.1.4/24S4/0/0
R515.1.1.5/24S3/0/0
25.1.1.5/24S3/0/1
35.1.1.5/24S4/0/0
45.1.1.5/24G0/0/0
5.5.5.5.5/24LOOPBACK0

 Tunnel地址:

设备地址
R110.1.1.1/24
R210.1.1.2/24
R310.1.1.3/24
R410.1.1.4/24

第二步:IP地址配置

以R1和R5为例

R1配置

<Huawei>sys
Enter system view, return user view with Ctrl+Z.
<Huawei>sysname R1
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
Jul 20 2023 16:47:38-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[6]:The line protocol
 IP on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R1-GigabitEthernet0/0/0]int s4/0/0
[R1-Serial4/0/0]ip add 15.1.1.1 24
[R1-Serial4/0/0]

 R5配置

<Huawei>
<Huawei>sys
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R5
[R5]int s3/0/0
[R5-Serial3/0/0]ip add 15.1.1.5 24
[R5-Serial3/0/0]
Jul 20 2023 16:54:47-08:00 R5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol PPP
 IPCP on the interface Serial3/0/0 has entered the UP state. 
[R5-Serial3/0/0]int s3/0/1
[R5-Serial3/0/1]ip add 25.1.1.5 24
[R5-Serial3/0/1]
Jul 20 2023 16:55:09-08:00 R5 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol PPP
 IPCP on the interface Serial3/0/1 has entered the UP state. 
[R5-Serial3/0/1]int s4/0/0
[R5-Serial4/0/0]ip add 35.1.1.5 24
[R5-Serial4/0/0]
Jul 20 2023 16:55:32-08:00 R5 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol PPP
 IPCP on the interface Serial4/0/0 has entered the UP state. 
[R5-Serial4/0/0]int g0/0/0
[R5-GigabitEthernet0/0/0]ip add 45.1.1.5 24
Jul 20 2023 16:55:55-08:00 R5 %%01IFNET/4/LINK_STATE(l)[3]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R5-Serial3/0/0]int loop1
[R5-LoopBack1]ip add 5.5.5.5 24
[R5-LoopBack1]

第三步:分别给R1-R4配置缺省路由,以R1为例

[R1]ip route-static 0.0.0.0 0 15.1.1.5

第四步:分别给R1-R4进行NAT配置,以R1为例

[R1]acl 2000
[R1-acl-basic-2000]rule 1 permit source any
[R1-acl-basic-2000]q
[R1]inter s4/0/0
[R1-Serial4/0/0]nat outbound 2000

第五步:根据题目要求进行PAP认证配置

主认证方(R5)配置

[R5]aaa
[R5-aaa]local-user huawei password cipher 123
[R5-aaa]local-user huawei service-type ppp 
[R5]interface s4/0/0
[R5-Serial3/0/0]ppp authentication-mode pap 

被认证方(R1)配置

[R1]interface s4/0/0 
[R1-Serial4/0/0]ppp pap local-user huawei password cipher 123

第六步:根据题目要求进行CHAP认证配置

主认证方(R5)配置

[R5]aaa
[R5-aaa]local-user huawei password cipher 123
[R5-aaa]local-user huawei service-type ppp 
[R5]interface s3/0/1
[R5-Serial3/0/1]ppp authentication-mode chap

被认证方(R2)配置

[R2]interface s4/0/0
[R2-Serial4/0/0]ppp chap user huawei
[R2-Serial4/0/0]ppp chap password cipher 123

第七步:HDCL封装

R3配置

[R3]inter s4/0/0
[R3-Serial4/0/0]link-protocol hdlc

R5配置

[R5]interface s4/0/0
[R5-Serial3/0/0]link-protocol hdlc

第八步:MGRE环境配置(R1-R3)

中心点配置(R1)

[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]ip address 10.1.1.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R1-Tunnel0/0/0]source 15.1.1.1
[R1-Tunnel0/0/0]nhrp network-id 100 

非中心点配置(R2为例)

[R2]interface Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 10.1.1.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R2-Tunnel0/0/0]source s4/0/0
[R2-Tunnel0/0/0]nhrp entry 10.1.1.1 15.1.1.1 register 
[R2-Tunnel0/0/0]nhrp network-id 100 

第九步:GRE配置(R1与R4间)

R1为例

[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ip address 20.1.1.1 24
[R1-Tunnel0/0/1]tunnel-protocol gre 
[R1-Tunnel0/0/1]source 15.1.1.1
[R1-Tunnel0/0/1]destination 45.1.1.4

第十步:RIP配置

R1配置

[R1]rip 1
[R1-rip-1]version 2
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 10.0.0.0
[R1-rip-1]network 20.0.0.0
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]nhrp entry multicast dynamic 
[R1-Tunnel0/0/0]undo rip split-horizon   

R2配置

[R2]rip 1
[R2-rip-1]version 2
[R2-rip-1]network 192.168.2.0
[R2-rip-1]network 10.0.0.0

R3配置

[R3]rip 1
[R3-rip-1]version 2
[R3-rip-1]network 192.168.3.0
[R3-rip-1]network 10.0.0.0

R4配置
 

[R4]rip 1
[R4-rip-1]version 2
[R4-rip-1]network 20.0.0.0
[R4-rip-1]network 192.168.4.0

第十一步:验证

PC4 ping PC1

 

PC4 ping R5 的环回

 

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

溢彩风华

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值