1,ip配置
R1
[Huawei]interface Serial 4/0/0
[Huawei-Serial4/0/0]ip address 15.0.0.1 24
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 24
R2
[Huawei]interface Serial 4/0/0
[Huawei-Serial4/0/0]ip address 25.0.0.1 24
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.1 24
R3
[Huawei]interface Serial 4/0/0
[Huawei-Serial4/0/0]ip address 35.0.0.1 24
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.3.1 24
R4
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 45.0.0.1 24、
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 192.168.4.1 24
R5
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]ip address 45.0.0.2 24
[Huawei]interface Serial 3/0/0
[Huawei-Serial3/0/0]ip address 15.0.0.2 24
[Huawei]interface Serial 3/0/1
[Huawei-Serial3/0/1]ip address 25.0.0.2 24
[Huawei-Serial3/0/1]interface Serial 4/0/0
[Huawei-Serial4/0/0]ip address 35.0.0.2 24
[Huawei]interface LoopBack 0
[Huawei-LoopBack0]ip address 5.5.5.5 24
2,缺省路由配置
R1
[Huawei]ip route-static 0.0.0.0 0 15.0.0.2
R2
[Huawei]ip route-static 0.0.0.0 0 25.0.0.2
R3
[Huawei]ip route-static 0.0.0.0 0 35.0.0.2
R4
[Huawei]ip route-static 0.0.0.0 0 45.0.0.2
3,hdlc配置
R3
[Huawei]interface Serial 4/0/0
[Huawei-Serial4/0/0]link-protocol hdlc
R5
[Huawei]interface Serial 3/0/0
[Huawei-Serial3/0/0]link-protocol hdlc
4,pap配置
R1
[R1]interface Serial 4/0/0
[R1-Serial4/0/0]ppp pap local-user huawei password cipher 123456
R5
[Huawei-aaa]local-user huawei password cipher 123456
[Huawei-aaa]local-user huawei service-type ppp
[Huawei]interface Serial 3/0/0
[Huawei-Serial/0/0]ppp authentication-mode pap
5,chap配置
R2
[R2]interface Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 192.168.5.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[Huawei]interface Serial 4/0/0
[Huawei-Serial4/0/0]ppp chap user nanjing
[Huawei-Serial4/0/0]ppp chap password cipher 111
R5
[Huawei-aaa]local-user nanjing password cipher 111
[Huawei-aaa]local-user nanjing service-type ppp
[Huawei]interface Serial 3/0/1
[Huawei-Serial3/0/1]ppp authentication-mode chap
6,MGRE 配置
R1
[R1]interface Tunnel 0/0/0
[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]interface Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 192.168.5.2 24
[R2-Tunnel0/0/0]source Serial 4/0/0
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[R2-Tunnel0/0/0]nhrp shortcut
R3
[R3]interface Tunnel 0/0/0
[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 4/0/0
[R3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[R3-Tunnel0/0/0]nhrp shortcut
R4
[R4]interface Tunnel 0/0/0
[R4-Tunnel0/0/0]ip address 192.168.5.4 24
[R4-Tunnel0/0/0]tunnel-protocol gre p2mp
[R4-Tunnel0/0/0]source GigabitEthernet 0/0/0
[R4-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[R4-Tunnel0/0/0]nhrp shortcut
7, rip配置
R1
[R1]RIP 1
[R1-rip-1]version 2
[R1-rip-1]network 192.168.5.0
[R1-rip-1]network 192.168.1.0
[R1]interface Tunnel 0/0/0
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]rip summary-address 192.168.0.0 255.255.0.0
R2
[R2]rip 1
[R2-rip-1]version 2
[R2-rip-1]network 192.168.2.0
[R2-rip-1]network 192.168.5.0
R3
[R3]rip 1
[R3-rip-1]version 2
[R3-rip-1]network 192.168.3.0
[R3-rip-1]network 192.168.5.0
R4
[R4]rip 1
[R4-rip-1]version 2
[R4-rip-1]network 192.168.4.0
[R4-rip-1]network 192.168.5.0
8,nat:easy-ip配置
R1
[R1]acl 2000
[R1-acl-basic-2000]rule permit source any
[R1]interface Serial 4/0/0
[R1-Serial4/0/0]nat outbound 2000
R2
[R2]acl 2000
[R2-acl-basic-2000]rule permit source any
[R2]interface Serial 4/0/0
[R2-Serial4/0/0]nat outbound 2000
R3
[R3]acl 2000
[R3-acl-basic-2000]rule permit source any
[R3]interface Serial 4/0/0
[R3-Serial4/0/0]nat outbound 2000
R4
[R4]acl 2000
[R4-acl-basic-2000]rule permit source any
[R4]interface GigabitEthernet 0/0/0
[R4-GigabitEthernet0/0/0]nat outbound 2000
pap认证
chap认证
pc都可以ping通R5的环回
rip全网可达