天天看點

配置GRE隧道,并在隧道上運作靜态路由實作互通

配置GRE隧道,并在隧道上運作靜态路由實作互通
配置GRE隧道,并在隧道上運作靜态路由實作互通
配置GRE隧道,并在隧道上運作靜态路由實作互通

先配置基本網通,路由器間用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

配置GRE隧道,并在隧道上運作靜态路由實作互通

這裡down ,就寫入不了去對面私網的路由,能查指令看到,但是路由表中沒有。

down的原因1 實體鍊路不同,2 destination 2.2.2.1 位址不對 ,3 最坑的,

配置GRE隧道,并在隧道上運作靜态路由實作互通

有倆個類似的首字母的,自動補齊可能補錯,不注意看死活找不到錯誤在哪了,卡了我一個上午。

配置路由 

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。

繼續閱讀