
先配置基本网通,路由器间用OSPF,把2.2.2.0 3.3.3.0 网段宣告到area 0 ,但私网192 和10 不要宣告
tunnel配置
AR2上
interface Tunnel0/0/1
ip address 172.16.0.1 255.255.255.0
tunnel-protocol gre
source 2.2.2.1
destination 3.3.3.2
AR3上
interface Tunnel0/0/1
destination 2.2.2.1
ip address 172.16.0.2 255.255.255.0
tunnel-protocol gre
source 3.3.3.2
坑
这里down ,就写入不了去对面私网的路由,能查命令看到,但是路由表中没有。
down的原因1 物理链路不同,2 destination 2.2.2.1 地址不对 ,3 最坑的,
有俩个类似的首字母的,自动补齐可能补错,不注意看死活找不到错误在哪了,卡了我一个上午。
配置路由
AR2]ip route-static 10.0.0.0 255.255.255.0 Tunnel 0/0/1
[AR3]ip route-static 192.168.10.0 255.255.255.0 Tunnel 0/0/1
效果:PC1和PC2可以互通,通过tunnel。