问题
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]