Ip地址规划配置接口及环回IP地址
R1与r5 之间ppp的pap认证
[r1]aaa
[r1-aaa]local-user dxl password cipher 123456
[r1-aaa]local-user dxl service-type ppp
[r1]int s4/0/0
[r1-Serial4/0/0]ppp authentication-mode pap
[r5-Serial3/0/0]ppp pap local-user dxl password cipher 123456
R2与r5之间ppp的chap认证
[r2]aaa
[r2-aaa]local-user dxl password cipher 123456
[r2-aaa]local-user dxl service-type ppp
[r2-aaa]int s4/0/0
[r2-Serial4/0/0]ppp authentication-mode chap
[r5-Serial3/0/1]ppp chap user dxl
[r5-Serial3/0/1]ppp chap password cipher 123456
R3与r5之间hdlc封装
[r5]int s4/0/0
[r5-Serial4/0/0]link-protocol hdlc
[r3]int s4/0/0
[r3-Serial4/0/0]link-protocol hdlc
R1与r4为点到点的GRE
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip address 192.168.5.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre
[r1-Tunnel0/0/0]source 1.1.1.1
[r1-Tunnel0/0/0]description 3.3.3.1
[r4]int Tunnel 0/0/0
[r4-Tunnel0/0/0]ip address 192.168.5.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre
[r4-Tunnel0/0/0]source 3.3.3.1
[r4-Tunnel0/0/0]destination 1.1.1.1
缺省
[r1]ip route-static 0.0.0.0 0 2.2.2.1
[r2]ip route-static 0.0.0.0 0 6.6.6.1
[r3]ip route-static 0.0.0.0 0 8.8.8.1
[r4]ip route-static 0.0.0.0 0 4.4.4.1
R1,r2与r3的MGRE环境配置
[r1]int t0/0/1
[r1-Tunnel0/0/1]ip ad 192.168.6.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre p2mp
[r1-Tunnel0/0/1]source 1.1.1.1
[r1-Tunnel0/0/1]nhrp network-id 100
[r2]int t0/0/0
[r2-Tunnel0/0/0]ip ad 192.168.6.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source Serial 4/0/0
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 192.168.6.1 1.1.1.1 register
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip ad 192.168.6.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source Serial 4/0/0
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 192.168.6.1 1.1.1.1 register
Rip配置
[r1]rip
[r1-rip-1]v 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.6.0
[r2]rip
[r2-rip-1]v 2
[r2-rip-1]network 192.168.6.0
[r2-rip-1]network 192.168.4.0
[r3]rip
[r3-rip-1]v 2
[r3-rip-1]network 192.168.6.0
[r3-rip-1]network 192.168.3.0
[r4]rip
[r4-rip-1]v 2
[r4-rip-1]network 192.168.2.0
[r4-rip-1]network 192.168.5.0
Nat私网转公网
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r4-acl-basic-2000]q
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]nat outbound 2000
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r3-acl-basic-2000]q
[r3]int s4/0/0
[r3-Serial4/0/0]nat outbound 2000
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[r2-acl-basic-2000]q
[r2]int s4/0/0
[r2-Serial4/0/0]nat outbound 2000
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]q
[r1]int s4/0/0
[r1-Serial4/0/0]nat outbound 2000
部分实验截图: