通用路由封装

通用路由封装(,縮寫:GRE)是一种可以在虚拟点对点链路中封装多种网络层协议的隧道协议。由思科系统开发,在中定义。

协议栈举例
从上面的图表可以看出,协议封装(非特指GRE)打破了OSI模型中定义的分层。这可以被看成两个不同协议栈中间的分割器,一个承载另一个。

报文头
GRE报文头结构如下图所示。[最新的RFC 2784 && RFC 2890]

  • C:校验码标记位,标为1为代表启用校验码。
  • K:键码标记位,标为1为代表启用键码。
  • S:序列号标记位,标为1为代表启用序列号。
  • Reserved1、Reserved2:预留,默认为填0。
  • Version:版本号,默认值为0。
  • Protocol Type:负载得网络层以太类型。
  • Checksum:校验码,C位启用时可用。为GRE头与负载的校验码。
  • Key:键码,K位启用时可用。特定用语所需的键值。
  • Sequence Number,序列号,S位启用时可用。为GRE数据包的发送序列号。

参考资料
外部链接

  • RFCs

** RFC 1701 — Generic Routing Encapsulation (GRE) (INFORMATIONAL)
** RFC 1702 — Generic Routing Encapsulation over IPv4 networks (INFORMATIONAL)
** RFC 2784 — Generic Routing Encapsulation (GRE) (PROPOSED STANDARD - Updated by RFC 2890)
** RFC 2890 — Key and Sequence Number Extensions to GRE (PROPOSED STANDARD)

  • Cisco Systems

** [https://web.archive.org/web/20110403084614/http://www.cisco.com/en/US/tech/tk827/tk369/tk287/tsd_technology_support_sub-protocol_home.html Generic Routing Encapsulation], Subprotocol homepage at Cisco
** [http://docwiki.cisco.com/wiki/Internetworking_Terms:_Generic_Routing_Encapsulation_%28GRE%29 Generic Routing Encapsulation] , Entry in Cisco DocWiki (formerly known as the "Internetworking Technology Handbook")

评论 (0)

  • 还没有评论,来抢沙发吧。