GRE路由协议

上传人:豆浆 文档编号:57430761 上传时间:2018-10-21 格式:PPT 页数:42 大小:836.50KB
返回 下载 相关 举报
GRE路由协议_第1页
第1页 / 共42页
GRE路由协议_第2页
第2页 / 共42页
GRE路由协议_第3页
第3页 / 共42页
GRE路由协议_第4页
第4页 / 共42页
GRE路由协议_第5页
第5页 / 共42页
点击查看更多>>
资源描述

《GRE路由协议》由会员分享,可在线阅读,更多相关《GRE路由协议(42页珍藏版)》请在金锄头文库上搜索。

1、起始页面,GRE,GRE-3,课程学习要求,通过对本课程的学习希望学员能达到以下要求: 理解GRE 的原理和应用范围 掌握GRE 的功能和配置 了解GRE的报文格式,GRE-4,GRE原理,GRE(Generic Routing Encapsulation):通用路由封装协议。 GRE是VPN的第三层隧道协议,采用了隧道(Tunnel)技术。 Tunnel是虚拟的点对点连接,即点对点连接的虚拟接口。,B协议 例如:IP,A协议 例如:IPX,A协议 例如:IPX,隧道,注:A、B协议可以是相同或不同的协议,GRE-5,封装过程,GRE-6,IP in IP的报文格式,乘客协议 运载协议或封装协

2、议 运输协议,新IP头部的长度为20字节 GRE头部的长度为420字节(根据实际配置而定)。,原IP数据包(含IP头和数据),GRE-7,解封装过程,网络层发现IP头的协议号为47,剥离新IP头部并提交GRE模块。 GRE模块剥离GRE头部后,数据包由网络层继续处理。 网络层剥离IP头部,将数据提交上层进行处理。,GRE-8,GRE协议应用范围,1、多协议、多业务本地网通过单一骨干网传输 。 2、扩大了包含步跳数限制协议(RIP)的应用范围 。 3、组建VPN。,GRE-9,配置GRE创建Tunnel端口,interface tunnel tunnel_number,创建虚拟Tunnel接口,

3、no interface tunnel tunnel_number,删除一个Tunnel接口,GRE-10,配置GRE配置Tunnel接口,ip address ip_addr mask,定义Tunnel接口的IP地址,tunnel source source_ip,定义Tunnel通道的源地址,tunnel destination dest_ip,定义Tunnel通道的目的地址,GRE-11,配置GRE配置Tunnel接口(可选),tunnel mode gre,定义Tunnel接口报文的封装模式,tunnel key key_number,定义Tunnel接口的密钥,GRE-12,配置GR

4、E配置Tunnel接口(可选),tunnel checksum,定义Tunnel接口使用校验和校验,tunnel sequence-datagrams,定义Tunnel接口进行数据报文序列号同步,GRE-13,举例一 直连设备间的GRE,确保10.1.1.1和20.1.1.1可以通过以太口PING通 修改路由配置、添加Tunnel口 验证10.1.1.1和20.1.1.1可以通过Tunnel口PING通,GRE-14,举例一(配置A),hostname A ! interface Loopback0 ip address 10.1.1.1 255.255.255.0 ! interface F

5、astEthernet0/0 ip address 1.1.1.1 255.255.255.0 !,GRE-15,举例一(配置A 续),interface Tunnel1 ip address 100.1.1.1 255.255.255.0 tunnel source 1.1.1.1 tunnel destination 1.1.1.2 ! ip route 20.1.1.0 255.255.255.0 100.1.1.2 !,T0 100.1.1.1,F0/0 1.1.1.1,F0/0 1.1.1.2,L0 10.1.1.1,L0 20.1.1.1,A,B,T0 100.1.1.2,GRE-

6、16,举例一(配置B),T0 100.1.1.1,F0/0 1.1.1.1,F0/0 1.1.1.2,L0 10.1.1.1,L0 20.1.1.1,A,B,T0 100.1.1.2,hostname B ! interface Loopback0 ip address 20.1.1.1 255.255.255.0 ! interface FastEthernet0/0 ip address 1.1.1.1 255.255.255.0 !,GRE-17,举例一(配置B 续),interface Tunnel1 ip address 100.1.1.2 255.255.255.0 tunnel

7、source 1.1.1.2 tunnel destination 1.1.1.1 ! ip route 10.1.1.0 255.255.255.0 100.1.1.1 !,GRE-18,2002-1-1 04:58:07 IP FastEthernet0/0: TX - src=1.1.1.1, dst=1.1.1.2, len=108, gate=1.1.1.2 45 00 00 6C 03 D4 00 00 FF 2F B3 8A 01 01 01 0101 01 01 02 00 00 08 00 45 00 00 54 03 D2 00 00 FF 01 97 D3 0A 01 0

8、1 01 -从接口发出去的数据包经过GRE封装(协议号47) 2002-1-1 04:58:07 IP FastEthernet0/0: RX - src=1.1.1.2, dst=1.1.1.1, len=108 45 00 00 6C 02 85 00 00 FF 2F B4 D9 01 01 01 02 01 01 01 01 00 00 08 00 45 00 00 54 02 83 00 00 FF 01 99 22 14 01 01 01 -从接口收到的数据包经过GRE封装(协议号47),举例一(debug信息),debug ip raw PING 20.1.1.1 (20.1.1

9、.1): 56 data bytes ! 1 packets transmitted, 1 packets received, 0% packet loss A#2002-1-1 04:58:07 IP Tunnel1: TX - src=10.1.1.1, dst=20.1.1.1, len=84, gate=100.1.1.2 45 00 00 54 03 D2 00 00 FF 01 97 D3 0A 01 01 0114 01 01 01 08 00 5D D3 00 1D 00 00 49 DA 5B 26 04 05 06 07 08 09 0A 0B 2002-1-1 04:58

10、:07 IP FastEthernet0/0: TX - src=1.1.1.1, dst=1.1.1.2, len=108, gate=1.1.1.2 45 00 00 6C 03 D4 00 00 FF 2F B3 8A 01 01 01 0101 01 01 02 00 00 08 00 45 00 00 54 03 D2 00 00 FF 01 97 D3 0A 01 01 01 从接口发出去的数据包经过GRE封装(协议号47) 2002-1-1 04:58:07 IP FastEthernet0/0: RX - src=1.1.1.2, dst=1.1.1.1, len=108 45

11、 00 00 6C 02 85 00 00 FF 2F B4 D9 01 01 01 02 01 01 01 01 00 00 08 00 45 00 00 54 02 83 00 00 FF 01 99 22 14 01 01 01 从接口收到的数据包经过GRE封装(协议号47) 2002-1-1 04:58:07 IP Tunnel1: RX - src=20.1.1.1, dst=10.1.1.1, len=84 45 00 00 54 02 83 00 00 FF 01 99 22 14 01 01 010A 01 01 01 00 00 65 D3 00 1D 00 00 49 DA

12、 5B 26 04 05 06 07 08 09 0A 0B,GRE-19,举例二 跨设备间的GRE,确保192.168.2.1和192.168.3.1可以通过以太口PING通 修改路由配置、添加Tunnel口 验证192.168.2.1和192.168.3.1可以通过Tunnel口PING通,GRE-20,举例二(配置2750),hostname 2750 ! interface Loopback0 ip address 192.168.2.1 255.255.255.0 ! interface FastEthernet0/0 ip address 1.1.1.1 255.255.255.0

13、 ! ip route 2.2.2.0 255.255.255.0 1.1.1.2 !,GRE-21,举例二(配置2750 续),interface Tunnel0 ip address 100.1.1.1 255.255.255.0 tunnel source 1.1.1.1 tunnel destination 2.2.2.1 tunnel key 123456 ! router rip network 192.168.2.0 255.255.255.0 network 100.1.1.0 255.255.255.0 version 2 !,GRE-22,举例二(配置1750),hostn

14、ame 1750 ! interface FastEthernet0/0 ip address 1.1.1.2 255.255.255.0 ! interface Ethernet1/1 ip address 2.2.2.2 255.255.255.0 !,GRE-23,举例二(配置A),hostname A ! interface Loopback0 ip address 192.168.3.1 255.255.255.0 ! interface FastEthernet0/0 ip address 2.2.2.1 255.255.255.0 ! ip route 1.1.1.0 255.2

15、55.255.0 2.2.2.2 !,GRE-24,举例二(配置A 续),interface Tunnel0 ip address 100.1.1.2 255.255.255.0 tunnel source 2.2.2.1 tunnel destination 1.1.1.1 tunnel key 123456 ! router rip network 100.1.1.0 255.255.255.0 network 192.168.3.0 255.255.255.0 version 2 !,GRE-25,举例二(show 信息),A#sh ip route Codes: C - connect

16、ed, S - static, R - RIP, B - BGP D - BEIGRP, DEX - external BEIGRP, O - OSPF, OIA - OSPF inter area ON1 - OSPF NSSA external type 1, ON2 - OSPF NSSA external type 2 OE1 - OSPF external type 1, OE2 - OSPF external type 2 S 1.1.1.0/24 1,0 via 2.2.2.2 C 2.2.2.0/24 is directly connected, FastEthernet0/0 C 100.1.1.0/24 is directly connected, Tunnel0 R 192.168.2.0/24 120,1 via 100.1.1.1(on Tunnel0) -网络实际拓扑有两跳,但通过GRE隧道后隐藏了当中的部分 C 192.168.3.0/24 is directly connected, Loopback0,

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 高等教育 > 其它相关文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号