实验拓扑及相关要求:
IP地址配置:
ip规划如该拓扑上可视
缺省路由:
[r1]ip route-static 0.0.0.0 0 15.0.0.2
[r2]ip route-static 0.0.0.0 0 25.0.0.2
[r3]ip route-static 0.0.0.0 0 35.0.0.2[r4]ip route-static 0.0.0.0 0 45.0.0.2
公网内部均可通讯:
R1和R5之间使用PPP的PAP认证,R5为主认证方
[isp] aaa
[isp-aaa]local-user admin password cipher 123456
[isp-aaa]local-user admin service-type ppp
[isp-aaa]int s1/0/0
[isp-Serial1/0/0]ppp authentication-mode pap
[r1-Serial1/0/0]ppp pap
[r1-Serial1/0/0]ppp pap local admin password cipher 123456
验证(将r1的串线接口shutdown,然后在ping 15.0.0.2,再undo shutdown该串口,在测试):
R2和R5之间使用PPP的chap认证
[isp]int s 2/0/0
[isp-Serial2/0/0]ppp authentication-mode chap
[r2-Serial2/0/0]ppp chap user admin
[r2-Serial2/0/0]ppp chap password cipher 123456
R5为主认证方R3和R5之间使用HDLc封装
[r3-Serial3/0/0]link-protocol hdlc
[isp-Serial3/0/0]link-protocol hdlc
MGRE 环境:
[r1-Tunnel0/0/0]ip ad 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 entry multicast dynamic
[r2]int t 0/0/0
[r2-Tunnel0/0/0]ip add 192.168.5.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp
[r2-Tunnel0/0/0]source s2/0/0
[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[r3]int t 0/0/0
[r3-Tunnel0/0/0]ip ad 192.168.5.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source s 3/0/0
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[r4]int t 0/0/0
[r4-Tunnel0/0/0]ip add 192.168.6.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre
[r4-Tunnel0/0/0]source 45.0.0.1
[r4-Tunnel0/0/0]destination 15.0.0.1
[r1-Tunnel0/0/0]int t0/0/1
[r1-Tunnel0/0/1]ip ad 192.168.6.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre
[r1-Tunnel0/0/1]source 15.0.0.1
[r1-Tunnel0/0/1]destination 45.0.0.1
rip宣告配置:
[r1]rip 1
[r1-rip-1]v 2
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.5.0
[r1-rip-1]network 192.168.6.0
[r2]rip 1
[r2-rip-1]v 2
[r2-rip-1]net
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 192.168.5.0
[r3]rip 1
[r3-rip-1]v 2
[r3-rip-1]ne
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 192.168.5.0[r4]rip 1
[r4-rip-1]v 2
[r4-rip-1]ne
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.6.0
所有Pc设置私有P为源IP,可以访问R5环回
[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 s1/0/0
[r1-Serial1/0/0]nat outbound 2000
在其他每个私网路由器上都配置对应的nat抓取对应流量