基于RIP的MGRE实验

一、实验拓扑

二:实验要求

  1. 利用MGRE VPN实现总部与分部间的互通

三:实验思路

  1. 按照图示配置各设备IP地址
  2. 在内外网出口设备上配置静态缺省路由,实现公网互通
  3. 配置公共隧道tunnel与NHRP
  4. 配置私网路由(静态/RIP/OSPF)
  5. 测试全网通

    先为各个设备配置合理IP地址:

 配置完成后dis查看:

 

为R5配ip并设置环回:

 

   接着配置缺省静态:

测试是否可以ping通:

R5为主认证方:

[r5]aaa
[r5-aaa]local-user huawei password cipher huawei
[r5-aaa]local-user huawei service-type ppp
[r5-aaa]quit
[r5]interface Serial 3/0/0
[r5-Serial3/0/0]ppp authentication-mode pap
 

R2为被认证方:

[r2]interface Serial 4/0/0

[r2-Serial4/0/0]ppp chap user huawei

[r2-Serial4/0/0]ppp chap password cipher huawei

R3与R5用HDLC封装:

R3:

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

R5:

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

R1,R2,R3构建一个MGRE环境,R1为中心站点,R1R4为点到点的GRE:

     R1:

   [r1]interface Tunnel 0/0/0
   [r1-Tunnel0/0/0]ip address 10.1.2.1 24
   [r1-Tunnel0/0/0]tunnel-protocol gre p2mp
   [r1-Tunnel0/0/0]source 15.1.1.1
Jul 20 2023 16:34:38-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.
[r1-Tunnel0/0/0]nhrp network-id 100
R2:

r2]interface Tunnel 0/0/0
[r2-Tunnel0/0/0]ip address 10.1.2.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source Serial 4/0/0
Jul 20 2023 21:01:06-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.
[r2-Tunnel0/0/0]nhrp entry 10.1.1.1 15.0.0.1 register
R3:

[r3]interface Tunnel 0/0/0
[r3-Tunnel0/0/0]ip address 10.1.2.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source Serial 4/0/0
Jul 20 2023 21:02:22-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/0 has entered the UP state.
[r3-Tunnel0/0/0]nhrp entry 10.1.2.1 15.1.1.1 register
 

GRE环境搭建

R1:

[r1]interface Tunnel 0/0/1
[r1-Tunnel0/0/1]ip address 10.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
Jul 20 2023 21:05:05-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/1 has entered the UP state.
R4:

[r4]interface Tunnel 0/0/1
[r4-Tunnel0/0/1]ip address 10.1.1.2 24
[r4-Tunnel0/0/1]tunnel-protocol gre  
[r4-Tunnel0/0/1]source 45.1.1.4
[r4-Tunnel0/0/1]destination 15.1.1.1
Jul 20 2023 21:06:07-08:00 r4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP on the interface Tunnel0/0/1 has entered the UP state.
 

整个私有网段基于RIP全网可达:

[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                  
 

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 192.168.4.0

[r4-rip-1]network 10.0.0.0

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值