华为(M)GRE,PPP入门

问题

1、R5为ISP,只能进行ip地址配置;其所有接口配置为公有ip地址
2、R1与R5间使用PPP的PAP认证,R5为主认证方;R2与R5间使用PPP的chap认证,R5为主认证方;R3与R5间使用HDLC封装
3、R1/2/3构建一个MGRE环境,R1为中心站点;R1/4间为点到点GRE
4、整个私有网络基于RIP全网可达
5、所有pc私有地址为源ip时,可以正常访问R5环回

解答如下:
在这里插入图片描述r1配置如下:

<Huawei>system-view 
[Huawei]sysname r1
[r1]int ser 2/0/0
[r1-Serial2/0/0]link-protocol ppp
[r1-Serial2/0/0]ppp pap local-user huawei password cipher 123456
[r1-Serial2/0/0]ip address 200.1.1.2 24
[r1-Serial2/0/0]q
[r1]int  GigabitEthernet 0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.10.1 24
[r1-Serial2/0/0]q
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 192.168.50.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre
[r1-Tunnel0/0/0]source 200.1.1.2
[r1-Tunnel0/0/0] destination 200.1.4.2
[r1-Tunnel0/0/0]q
[r1]ip route-static 192.168.40.0 24 192.168.50.2
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.10.0 0.0.0.255
[r1-acl-basic-2000]int ser2/0/0
[r1-Serial2/0/0]nat outbound 2000
[r1-Serial2/0/0]
[r1]int Tunnel 0/0/1
[r1-Tunnel0/0/1]ip address 20.1.1.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p	
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r1-Tunnel0/0/1]nhrp entry multicast dynamic 
[r1-Tunnel0/0/1]nhrp network-id 100
[r1-Tunnel0/0/1]source 100.1.1.2
[r1-Tunnel0/0/1]undo rip split-horizon
[r1-Tunnel0/0/1]
[r1]rip 1
[r1-rip-1]version 2
[r1-rip-1]undo summary 
[r1-rip-1]network 192.168.10.0
[r1-rip-1]network 20.0.0.0
[r1-rip-1]network 10.0.0.0

r2配置如下:

<Huawei>system-view 
[Huawei]sysn r2
[r2]int ser 2/0/0
[r2-Serial2/0/0]ip address 200.1.2.2 24
[r2-Serial2/0/0]
[r2-Serial2/0/0]int gi 0/0/1
[r2-GigabitEthernet0/0/1]ip address 192.168.20.1 24
[r2-GigabitEthernet0/0/1]q
[r2]int ser 2/0/0
[r2-Serial2/0/0]ppp chap user huasan	
[r2-Serial2/0/0]ppp chap password cipher 123456
[r2-Serial2/0/0]
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.20.0 0.0.0.255
[r2-acl-basic-2000]int ser2/0/0
[r2-Serial2/0/0]nat outbound 2000
[r2-Serial2/0/0]
[r2]int Tunnel 0/0/1
[r2-Tunnel0/0/1]ip address 20.1.1.2 24	
[r2-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r2-Tunnel0/0/1]source ser2/0/0
[r2-Tunnel0/0/1]nhrp network-id 100	
[r2-Tunnel0/0/1] nhrp entry 20.1.1.1 200.1.1.2 register
[r2-Tunnel0/0/1]q
[r2]rip 1
[r2-rip-1]version 2	
[r2-rip-1]undo summary 
[r2-rip-1]network 20.0.0.0
[r2-rip-1]network 192.168.20.0
[r2-rip-1]

r3配置如下:

<Huawei>system-view 
[r3]int ser 2/0/0
[r3-Serial2/0/0]ip address 200.1.3.2 24
[r3-Serial2/0/0]int gi 0/0/1
[r3-GigabitEthernet0/0/1]ip address 192.168.30.1 24
[r3-GigabitEthernet0/0/1]
[r3]int Serial 2/0/0
[r3-Serial2/0/0]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
Jul  7 2021 11:56:21-08:00 r3 %%01IFNET/4/CHANGE_ENCAP(l)[0]:The user performed 
the configuration that will change the encapsulation protocol of the link and then selected Y. 
[r3-Serial2/0/0]
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.30.0 0.0.0.255
[r3-acl-basic-2000]int ser2/0/0
[r3-Serial2/0/0]nat outbound 2000
[r3]int Tunnel 0/0/1
[r3-Tunnel0/0/1]ip address 20.1.1.3 24
[r3-Tunnel0/0/1]tunnel-protocol gre p2mp 
[r3-Tunnel0/0/1]nhrp network-id 100
[r3-Tunnel0/0/1]nhrp entry 20.1.1.1 200.1.1.2 register	
[r3-Tunnel0/0/1]source ser 2/0/0
[r3-Tunnel0/0/1]q
[r3]rip 1 
[r3-rip-1]version 2
[r3-rip-1]undo summary 
[r3-rip-1]network 20.0.0.0
[r3-rip-1]network 192.168.30.0
[r3-rip-1]

r4配置如下:

<Huawei>system-view 
[Huawei]sysn r4
[r4]int gi 0/0/0
[r4-GigabitEthernet0/0/0]ip address 200.1.4.2 24 
[r4-GigabitEthernet0/0/0]int gi 0/0/1
[r4-GigabitEthernet0/0/1]ip address 192.168.40.1 24
[r4]int Tunnel 0/0/0
[r4-Tunnel0/0/0]ip address 192.168.50.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre
[r4-Tunnel0/0/0]source 200.1.4.2	
[r4-Tunnel0/0/0] destination 200.1.1.2
[r4]ip route-static 192.168.10.0 24 192.168.50.1
[r4-Tunnel0/0/0]q
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.40.0 0.0.0.255
[r4-acl-basic-2000]int ser2/0/0
[r4-Serial2/0/0]nat outbound 2000
[r4-Serial2/0/0]
[r4]rip 1 
[r4-rip-1]version 2
[r4-rip-1]undo summary 
[r4-rip-1]network 10.0.0.0
[r4-rip-1]network 192.168.40.0
[r4-rip-1]

r5配置如下:

<Huawei>sys	
<Huawei>system-view 
[Huawei]sysn r5
[r5]int ser 1/0/1
[r5-Serial1/0/1]ip address 200.1.2.1 24
[r5-Serial1/0/1]int ser 2/0/0
[r5-Serial2/0/0]ip address 200.1.4.1 24
[r5-Serial2/0/0]q
[r5]aaa
[r5-aaa]local-user huawei password cipher 123456
Info: Add a new user.
[r5-aaa]lo	
[r5-aaa]local-user huawei service-type ppp
[r5-aaa]int ser 1/0/0
[r5-Serial1/0/0]link-protocol ppp
[r5-Serial1/0/0]ppp authentication-mode pap
[r5-Serial1/0/0]ip ad	
[r5-Serial1/0/0]ip address 200.1.1.1 24
[r5-Serial2/0/0]int gi 0/0/0
[r5-GigabitEthernet0/0/0]ip address 200.1.4.1 24 
[r5-Serial1/0/0]
[r5]aaa
[r5-aaa]lo	
[r5-aaa]local-user huasan password cipher 123456
Info: Add a new user.
[r5-aaa]local-user huasan service-type ppp
[r5-aaa]int ser 1/0/1
[r5-Serial1/0/1]ppp authentication-mode chap
[r5-Serial1/0/1]
[r5]int ser 2/0/0	
[r5-Serial2/0/0]link-protocol h	
[r5-Serial2/0/0]link-protocol hdlc 
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
[r5-Serial2/0/0]

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

小时候不乖的

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

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

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

打赏作者

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

抵扣说明:

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

余额充值