×××的GER協議

wKiom1OEFW7hOcs8AACU313qlss577.jpg

實驗要求:

R1R3兩臺設備是benet公司的兩家分公司出口設備,要求兩家分公司可以通過互聯網彼此通信;

實驗計劃:

R1R3外網口公網地址互爲源和目標建立點到點的一條隧道,使得R1R3設備下掛的私網數據直接從該隧道通過,實現私網的通信;(隧道的原理就是,利用公網的線路做隧道協議,將私網的數據報包裹在隧道協議裏,通過公網傳輸)

實驗步驟:

配置IP

R1(config)#int fa0/0

R1(config-if)#ip address 12.0.0.1 255.255.255.0

R1(config-if)#no shut

R1(config-if)#int loo 0

R1(config-if)#ip address 192.168.10.1 255.255.255.0

R1(config-if)#no shut

 

 

R2(config)#int fa0/0

R2(config-if)#ip address 12.0.0.2 255.255.255.0

R2(config-if)#no shut

 

R2(config-if)#int fa0/1

R2(config-if)#ip address 23.0.0.2 255.255.255.0

R2(config-if)#no shut

 

R3(config)#int fa0/1

R3(config-if)#ip address 23.0.0.3 255.255.255.0

R3(config-if)#no shut

 

R3(config)#int loo 0

R3(config-if)#ip address 192.168.30.1 255.255.255.0

R3(config-if)#no shut

 

R1R3做默認路由:

R1(config)#ip route 0.0.0.0 0.0.0.0 12.0.0.2

R3(config)#ip route 0.0.0.0 0.0.0.0 23.0.0.2

驗證網絡互通:

wKioL1OEFVDQ388zAADEaQbHJ6I248.jpg 

配置GER隧道:

R1(config)#interface tunnel 1

R1(config-if)#ip address 172.16.1.1 255.255.255.0

R1(config-if)#keepalive 5 3   //開啓端口探測(隧道一端對另一端5秒進行一次探測;總共探測3次)

R1(config-if)#tunnel source 12.0.0.1

R1(config-if)#tunnel destination 23.0.0.3

R1(config-if)#no shut

 

R3(config)#interface tunnel 1

*Mar  1 00:11:55.019: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to down

   :此時該接口是down狀態是因爲,還沒進行配置。

R3(config-if)#ip address 172.10.1.2 255.255.255.0

R3(config-if)#keepalive 5 3

R3(config-if)#tunnel source 23.0.0.3

R3(config-if)#tunnel destination 12.0.0.1

*Mar  1 00:12:42.379: %LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel1, changed state to up

   注:此時該接口是UP狀態是因爲,此時該接口激活但是在探測3次,每次5秒後,隧道對端還沒激活的話就變爲down狀態。

R3(config-if)#no shut

 

指定數據定向於隧道(優先於默認路由):

R1(config)#ip route 192.168.30.0 255.255.255.0 tunnel 1

R3(config)#ip route 192.168.10.0 255.255.255.0 tunnel 1

驗證:

R1#ping 192.168.30.1 source loo 0

wKiom1OEFZDjTAexAADpyLvRtMU572.jpg 

End

求證:interface tunnel 1的地址配置在不同網段是否可行????

R3interface tunnel 1地址改正:

R3(config)#interface tunnel 1

R3(config-if)#ip address 172.16.2.1 255.255.255.0

R3(config-if)#no shut

驗證:

wKioL1OEFbTwOMm7AAD-tlxHkhw696.jpg 

以上證實interface tunnel 1不在同一網段可行。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章