版权声明:欢迎提问:[email protected] https://blog.csdn.net/include_heqile/article/details/88813585
GRE
隧道是四种常见隧道协议之一,这四种常见隧道协议分别是:
- 第2层转发(
L2F
)- 他是思科为支持虚拟专用拨号网络(
VPDN
)而开发的第一种隧道协议,VPDN
让设备能够通过拨号连接安全地访问公司网络
- 他是思科为支持虚拟专用拨号网络(
- 点到点隧道协议(
PPTP
)- 点到点隧道(PPTP)是微软和其他一些厂商开发的,让远程网络能够安全地将数据传输到公司网络
- 第2层隧道协议(
L2TP
)- 也是思科和微软联合开发的,用于取代
L2F
和PPTP
,它集以上两个协议的特点于一身
- 也是思科和微软联合开发的,用于取代
- 通用路由选择封装(
GRE
)GRE
也是一种思科专用的隧道协议,它可以建立虚拟的点到点链路,使得可在IP
隧道中封装各种协议分组
GRE隧道的配置
配置命令:
-
使用命令
interface tunnel number
创建逻辑隧道接口,number
最大值为21.4
亿 -
int s0/0/0 ip address 63.1.1.1 255.255.255.252 int tunnel 0 tunnel mode gre ip ip address 192.168.10.1 255.255.255.0 tunnel source interface tunnel destination 63.1.1.2
-
配置隧道的另一端
int s0/0/0 ip address 63.1.1.2 255.255.255.252 int tunnel 0 ip address 192.168.10.2 255.255.255.0 tunnel source interface tunnel destination 63.1.1.1
验证GRE
隧道
- show ip int brief
- show interface tunnel 0
这篇博客讲的很详细:
https://blog.csdn.net/alone_map/article/details/51849115
不过在添加路由的时候不是写tunnel0
,而是隧道对面的IP