MGRE实验

要求:

  • R5为ISP,只能进行IP地址配置;其所有的IP地址均为公有IP地址

  • R1和R5之间使用PPP的PAP认证,R5为主认证方

R2和R5之间使用PPP的chap认证,R5为主认证方

R3和R5之间使用HDLC封装

  • R1/R2/R3构建一个MGRE环境,R1为HUB;

R1/R4之间构建一个GRE环境

  • 整个私有网络基于RIP全网可达

  • 所有PC设置私有IP为源IP,可以访问R5环回

基本配置

r1

[r1-GigabitEthernet0/0/0]ip address 192.168.1.254 24

[r1-Serial1/0/0]ip address 15.0.0.1 24

[r1]ip route-static 0.0.0.0 0 15.0.0.5

r2

[r2-GigabitEthernet0/0/0]ip address 192.168.2.254 24

[r2-Serial2/0/0]ip address 25.0.0.2 24

[r2]ip route-static 0.0.0.0 0 25.0.0.5

r3

[r3-GigabitEthernet0/0/0]ip address 192.168.3.254 24

[r3-Serial3/0/0]ip address 35.0.0.3 24

[r3]ip route-static 0.0.0.0 0 35.0.0.5

r4

[r4-GigabitEthernet0/0/1]ip address 192.168.4.254 24

[r4-GigabitEthernet0/0/0]ip address 45.0.0.4 24

[r4]ip route-static 0.0.0.0 0 45.0.0.5

ISP

[ISP-Serial1/0/0]ip address 15.0.0.5 24

[ISP-Serial2/0/0]ip address 25.0.0.5 24

[ISP-Serial3/0/0]ip address 35.0.0.5 24

[ISP-GigabitEthernet0/0/0]ip address 45.0.0.5 24

[ISP-LoopBack0]ip address 5.5.5.5 32

PPP认证

接口封装类型,华为默认PPP;否则先修改接口类型

PAP认证

[ISP]aaa

[ISP-aaa]local-user admin password cipher 123456

[ISP-aaa]local-user admin service-type ppp

[ISP-Serial1/0/0]ppp authentication-mode pap

[r1-Serial1/0/0]ppp pap local-user admin password cipher 123456

重启接口

chap认证

[ISP]aaa

[ISP-aaa]local-user huawei password cipher 654321

[ISP-aaa]local-user huawei service-type ppp

[ISP-Serial2/0/0]ppp authentication-mode chap

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

[r2-Serial2/0/0]ppp chap password cipher 654321

重启接口

HDLC封装

[r3-Serial3/0/0]link-protocol hdlc

[ISP-Serial3/0/0]link-protocol hdlc

MGRE

hub

[r1-Tunnel0/0/0]ip address 192.168.5.1 24

[r1-Tunnel0/0/0]tunnel-protocol gre p2mp

[r1-Tunnel0/0/0]source 15.0.0.1

[r1-Tunnel0/0/0]nhrp redirect //开启重定向

r2

[r2-Tunnel0/0/0]ip address 192.168.5.2 24

[r2-Tunnel0/0/0]tunnel-protocol gre p2mp

[r2-Tunnel0/0/0]source Serial 2/0/0

[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register

[r2-Tunnel0/0/0]nhrp shortcut

r3

[r3-Tunnel0/0/0]ip address 192.168.5.3 24

[r3-Tunnel0/0/0]tunnel-protocol gre p2mp

[r3-Tunnel0/0/0]source Serial 3/0/0

[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register

[r3-Tunnel0/0/0]nhrp shortcut

GRE

r1

[r1-Tunnel0/0/1]ip address 192.168.6.1 24

[r1-Tunnel0/0/1]tunnel-protocol gre

[r1-Tunnel0/0/1]source 15.0.0.1

[r1-Tunnel0/0/1]destination 45.0.0.4

r2

[r4-Tunnel0/0/1]ip address 192.168.6.4 24

[r4-Tunnel0/0/1]tunnel-protocol gre

[r4-Tunnel0/0/1]source 45.0.0.4

[r4-Tunnel0/0/1]destination 15.0.0.1

RIP

r1

[r1-rip-1]version 2

[r1-rip-1]undo summary //华为没开启自动汇总功能,可不写

[r1-rip-1]network 192.168.1.0 //私网

[r1-rip-1]network 192.168.5.0 //隧道MGRE

[r1-rip-1]network 192.168.6.0 //隧道gre

[r1-Tunnel0/0/0]nhrp entry multicast dynamic //开启伪广播

[r1-Tunnel0/0/0]rip summary-address 192.168.0.0 255.255.252.0//

r2

[r2-rip-1]version 2

[r2-rip-1]undo summary

[r2-rip-1]network 192.168.2.0

[r2-rip-1]network 192.168.5.0

r3

[r3-rip-1]version 2

[r3-rip-1]undo summary

[r3-rip-1]network 192.168.3.0

[r3-rip-1]network 192.168.5.0

r4

[r4-rip-1]version 2

[r4-rip-1]undo summary

[r4-rip-1]network 192.168.4.0

[r4-rip-1]network 192.168.6.0

访问r5环回

[r1]acl 2000

[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255

[r1-Serial1/0/0]nat outbound 2000

//若再s1/0/0接口ping5.5.5.5,流量起始点为s1/0/0接口(在此接口被封装),跳过了nat outbound 2000 这步操作

。。。。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

beginner22

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

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

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

打赏作者

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

抵扣说明:

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

余额充值