gre vpn隧道实验 ospf

优质老薛主机推荐:15%终身付款折扣:xwseo15 25%首次付款折扣 : xwseo115 点击下图进入购买

gre vpn隧道实验 ospf

抓包分析我们发现有外层和内层进行封装数据,可以理解为套娃,就是说套起来外面有包裹,和邮寄快递差不多,起始地,目的地至于快递里包装的啥不需要知道,因为套娃封装了。数据包通过外层的公网数据包传输,到了私网将公网的数据包拆除,露出私网数据包,从而到达目的地。

配置如下:

AR1配置:

<AR1>dis cu
#
sysname AR1
#
interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0
#
interface LoopBack0
ip address 192.168.1.1 255.255.255.0
#
interface Tunnel0/0/0
ip address 16.1.1.1 255.255.255.0
tunnel-protocol gre
source 12.1.1.1
destination 23.1.1.3
#
ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 16.1.1.1 0.0.0.0
network 192.168.1.1 0.0.0.0
#
ip route-static 23.1.1.0 255.255.255.0 12.1.1.2

AR2配置:

<AR2>dis cu
#
sysname AR2
#
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 23.1.1.2 255.255.255.0

AR3配置:

<AR3>dis cu
#
sysname AR3
#
interface GigabitEthernet0/0/0
ip address 23.1.1.3 255.255.255.0
#
interface LoopBack0
ip address 192.168.3.1 255.255.255.0
#
interface Tunnel0/0/0
ip address 16.1.1.3 255.255.255.0
tunnel-protocol gre
source 23.1.1.3
destination 12.1.1.1
#
ospf 1 router-id 2.2.2.2
area 0.0.0.0
network 16.1.1.3 0.0.0.0
network 192.168.3.1 0.0.0.0
#
ip route-static 12.1.1.0 255.255.255.0 23.1.1.2

验证现象:

赞 (0)
分享到:更多 ()