IP地址
r1
r2
r3
r4
hdlc封装
pap认证
r2
r3
chap认证
r2
r4
MGRE
主认证
[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 192.168.4.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 12.1.1.1
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]nhrp netw
[r1-Tunnel0/0/0]nhrp network-id 100
被认证r3
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 192.168.4.2 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source s4/0/0
[r3-Tunnel0/0/0]nhrp entry 192.168.4.1 12.1.1.1 register
[r3-Tunnel0/0/0]nhrp network-id 100
被认证r4
[r4]int Tunnel 0/0/0
[r4-Tunnel0/0/0]ip add 192.168.4.3 24
[r4-Tunnel0/0/0]tunnel-protocol gre p2mp
[r4-Tunnel0/0/0]source s4/0/0
[r4-Tunnel0/0/0]nhrp entry 192.168.4.1 12.1.1.1 register
[r4-Tunnel0/0/0]nhrp network-id 100
rip宣告(宣告tunnel接口的ip因为tunnel口才是私网)
r1
r3
r4
ping检验
pc1 1.2 ping pc2 2.2