1、配置公网环境
配置IP地址
[r3]int s4/0/0
[r3-Serial4/0/0]ip add 34.0.0.1 24
[isp]int s4/0/0
[isp-Serial4/0/0]ip add 34.0.0.2 24
[isp-Serial4/0/0]int s4/0/1
[isp-Serial4/0/1]ip add 45.0.0.2 24
[isp-Serial4/0/1]int s3/0/0
[isp-Serial3/0/0]ip add 46.0.0.2 24
[isp-Serial3/0/0]int g0/0/0
[isp-GigabitEthernet0/0/0]ip add 47.0.0.2 24
[isp]int lo0
[isp-LoopBack0]ip add 4.4.4.4 24 ( 配置环回地址 )
[r5]int s4/0/0
[r5-Serial4/0/0]ip add 45.0.0.1 24
[r6]int s4/0/0
[r6-Serial4/0/0]ip add 46.0.0.1 24
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 47.0.0.1 24
配置缺省路由
[r3]ip route-static 0.0.0.0 0 34.0.0.2
[r5]ip route-static 0.0.0.0 0 45.0.0.2
[r6]ip route-static 0.0.0.0 0 46.0.0.2
[r7]ip route-static 0.0.0.0 0 47.0.0.2
配置MGRE环境
中心站点
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 172.16.1.1 29
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source 34.0.0.1
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
分支站点
[r5]int t0/0/0
[r5-Tunnel0/0/0]ip add 172.16.1.2 29
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source Serial 4/0/0
[r5-Tunnel0/0/0]nhrp network-id 100
[r5-Tunnel0/0/0]nhrp entry 172.16.1.1 34.0.0.1 register
[r5]int lo0
[r5-LoopBack0]ip add 172.16.2.1 24 ( 配置环回地址 )
[r6]int t0/0/0
[r6-Tunnel0/0/0]ip add 172.16.1.3 29
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source Serial 4/0/0
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0