天天看点

重温GRE隧道❄️

重温GRE VPN

GRE VPN(Generic Routing Encapsulation)是指通用路由封装协议GRE协议。它提供了将一种协议的报文封装在另一种协议报文中的机制,使报文能够在tunnel(隧道)中传输。

重温GRE隧道❄️

  • 支持多种协议和多播
  • 能够用来创建弹性的VPN
  • 支持多点隧道

  • 缺乏加密机制
  • 没有标准的控制协议来保持GRE隧道(通常使用协议和keepalive)
  • 隧道很消耗CPU
  • 出现问题要进行DEBUG很困难
  • MTU和IP分片是一个问题

Tunnel 是一个虚拟的点对点的连接,提供了一条通路使封装的数据报文能够在这个通路上传输,并且在一个Tunnel 的两端分别对数据报进行封装及解封装。

重温GRE隧道❄️

重温GRE隧道❄️

1️⃣R2、R3运行GRE VPN

2️⃣R2、R3启用EIGRP协议

3️⃣PC1、PC2通信走GRE隧道

IP地址配置过程与不再赘述

🐑R2配置

interface Ethernet0/0

ip address 12.1.1.2 255.255.255.0


interface Tunnel0

tunnel mode gre ip //默认封装

ip address 172.16.1.2 255.255.255.0

tunnel source Ethernet0/0        //也可写IP

tunnel destination 13.1.1.3


router eigrp 1

network 172.16.1.2 0.0.0.0

network 192.168.1.254 0.0.0.0      

🐑R3配置

interface Ethernet0/1

ip address 13.1.1.3 255.255.255.0


interface Tunnel0

tunnel mode gre ip

ip address 172.16.1.3 255.255.255.0

tunnel source Ethernet0/0

tunnel destination 12.1.1.2


router eigrp 1

network 172.16.1.3 0.0.0.0

network 192.168.2.254 0.0.0.0

no auto-summary      

继续阅读