实验需求
IP规划
基础配置
R1
[Huawei]ip route-static 0.0.0.0 0.0.0.0 14.1.1.2
[Huawei]ip route-static 0.0.0.0 0.0.0.0 14.1.1.2
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 255.255.255.0
[Huawei-GigabitEthernet0/0/0]q
[Huawei]acl 2000
[Huawei]rule 5 permit source 192.168.1.0 0.0.0.255
[Huawei]interface s4/0/0
[Huawei-Serial4/0/0]link-protocol hdlc
[Huawei-Serial4/0/0]ip address 14.1.1.1 255.255.255.0
[Huawei-Serial4/0/0]nat outbound 2000
[Huawei]rip
[Huawei-rip-1]version 2
[Huawei-rip-1]network 192.168.1.0
[Huawei-rip-1]network 192.168.4.0
[Huawei]interface Tunnel 0/0/0
[Huawei-Tunnel0/0/0]interface Tunnel0/0/0
[Huawei-Tunnel0/0/0]ip address 192.168.4.1 255.255.255.0
[Huawei-Tunnel0/0/0]undo rip split-horizon
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp
[Huawei-Tunnel0/0/0]source 14.1.1.1
[Huawei-Tunnel0/0/0]nhrp entry multicast dynamic
[Huawei-Tunnel0/0/0]nhrp network-id 100
R2
[Huawei]ip route-static 0.0.0.0 0.0.0.0 24.1.1.2
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.2.1 255.255.255.0
[Huawei]interface s4/0/0
[Huawei-Serial4/0/0]link-protocol ppp
[Huawei-Serial4/0/0] ppp pap local-user a password cipher 123456
[Huawei-Serial4/0/0]ip address 24.1.1.1 255.255.255.0
[Huawei-Serial4/0/0] nat outbound 2000
[Huawei]rip
[Huawei-rip-1]version 2
[Huawei-rip-1]network 192.168.2.0
[Huawei-rip-1]network 192.168.4.0
[Huawei]interface Tunnel 0/0/0
[Huawei-Tunnel0/0/0]ip address 192.168.4.2 255.255.255.0
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp
[Huawei-Tunnel0/0/0]source Serial4/0/0
[Huawei-Tunnel0/0/0]nhrp network-id 100
[Huawei-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register
R3
[Huawei]ip route-static 0.0.0.0 0.0.0.0 34.1.1.2
[Huawei]interface g0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.3.1 255.255.255.0
[Huawei]acl 2000
[Huawei-acl-basic-2000]rule 5 permit source 192.168.3.0 0.0.0.255
[Huawei]interface s4/0/0
[Huawei-Serial4/0/0]link-protocol ppp
[Huawei-Serial4/0/0]ppp chap password cipher 654321
[Huawei-Serial4/0/0]ip address 34.1.1.1 255.255.255.0
[Huawei-Serial4/0/0]nat outbound 2000
[Huawei]rip
[Huawei-rip-1]
[Huawei-rip-1]version 2
[Huawei-rip-1]network 192.168.3.0
[Huawei-rip-1]network 192.168.4.0
[Huawei]interface Tunnel 0/0/0
[Huawei-Tunnel0/0/0]interface Tunnel0/0/0
[Huawei-Tunnel0/0/0]ip address 192.168.4.3 255.255.255.0
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp
[Huawei-Tunnel0/0/0]source Serial4/0/0
[Huawei-Tunnel0/0/0]nhrp network-id 100
[Huawei-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register
R4
[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip address 3.3.3.3 255.255.255.0
[Huawei]interface s3/0/0
[Huawei-Serial3/0/0]interface Serial3/0/0
[Huawei-Serial3/0/0]link-protocol hdlc
[Huawei-Serial3/0/0]ip address 14.1.1.2 255.255.255.0
[Huawei-Serial3/0/0]q
[Huawei]interface s3/0/1
[Huawei-Serial3/0/1]interface Serial3/0/1
[Huawei-Serial3/0/1]link-protocol ppp
[Huawei-Serial3/0/1]ppp authentication-mode pap
[Huawei-Serial3/0/1]ip address 24.1.1.2 255.255.255.0
[Huawei-Serial3/0/1]q
[Huawei]interface s4/0/0
[Huawei-Serial4/0/0]display this
[Huawei-Serial4/0/0]interface Serial4/0/0
[Huawei-Serial4/0/0]link-protocol ppp
[Huawei-Serial4/0/0]ppp authentication-mode chap
[Huawei-Serial4/0/0]ip address 34.1.1.2 255.255.255.0
实验结果