米葫芦网

RFC1702 - Generic Routing Encapsulation over IPv4 networks

热度:10℃ 发布时间:2024-11-18 01:35:39

Network Working Group S. Hanks
Request for Comments: 1702 NetSmiths, Ltd.
Category: Informational T. Li
D. Farinacci
P. Traina
cisco Systems
October 1994
Generic Routing Encapsulation over IPv4 networks
Status of this Memo
This memo provides information for the Internet community. This memo
does not specify an Internet standard of any kind. Distribution of
this memo is unlimited.
IntrodUCtion
In an earlier memo [RFC1701], we described GRE, a mechanism for
encapsulating arbitrary packets within an arbitrary transport
protocol. This is a companion memo which describes the use of GRE
with IP. This memo addresses the case of using IP as the delivery
protocol or the payload protocol and the special case of IP as both
the delivery and payload. This memo also describes using IP
addresses and autonomous system numbers as part of a GRE source
route.
IP as a delivery protocol
GRE packets which are encapsulated within IP will use IP protocol
type 47.
IP as a payload protocol
IP packets will be encapsulated with a Protocol Type field of 0x800.
For the Address Family value of 0x800, the Routing Information field
will consist of a list of IP addresses and indicates an IP source
route. The first octet of the Routing Information field constitute a
8 bit integer offset from the start of the Source Route Entry (SRE),
called the SRE Offset. The SRE Offset indicates the first octet of
the next IP address. The SRE Length field consists of the total
length of the IP Address List in octets.
This has the form:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Address Family SRE Offset SRE Length
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IP Address List ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
For the Address Family value of 0xfffe, the Routing Information field
will consist of a list of Autonomous System numbers and indicates an
AS source route. The third octet of the Routing Information field
contains an 8 bit unsigned integer offset from the start of the
Source Route Entry (SRE), called the SRE Offset. The SRE Offset
indicates the first octet of the next AS number. THe SRE Length
field consists of the total length of the AS Number list in octets.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Address Family SRE Offset SRE Length
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
AS Number List ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
IP as both delivery and payload protocol
When IP is encapsulated in IP, the TTL, TOS, and IP security options
MAY be copied from the payload packet into the same fields in the
delivery packet. The payload packet"s TTL MUST be decremented when
the packet is decapsulated to insure that no packet lives forever.
IP source routes
When a system is processing a SRE with an Address Family indicating
an IP source route, it MUST use the SRE Offset to determine the next
destination IP address. If the next IP destination is this system,
the SRE Offset field should be increased by four (the size of an IP
address). If the SRE Offset is equal to the SRE Length in this SRE,
then the Offset field in the GRE header should be adjusted to point
to the next SRE (if any). This should be repeated until the next IP
destination is not this system or until the entire SRE has been
processed.
If the source route is incomplete, then the Strict Source Route bit
is checked. If the source route is a strict source route and the
next IP destination is NOT an adjacent system, the packet MUST be
dropped. Otherwise, the system should use the IP address indicated
by the Offset field to replace the destination address in the
delivery header and forward the packet.
Autonomous system source routes
When a system is processing a SRE with an Address Family indicating
an AS source route, it MUST use the SRE Offset field to determine the
next autonomous system. If the next autonomous system is the local
autonomous system, the SRE Offset field should be increased by two
(the size of an autonomous system number). If the SRE Offset is
equal to the SRE Length in this SRE, then the Offset field in the GRE
header should be adjusted to point to the next SRE (if any). This
should be repeated until the next autonomous system number is not
equal to the local autonomous system number or until the entire SRE
has been processed.
If the source route is incomplete, then the Strict Source Route bit
is checked. If the source route is a strict source route and the
next autonomous system is NOT an adjacent autonomous system, the
packet should be dropped. Otherwise, the system should use the
autonomous system number indicated by the SRE Offset field to replace
the destination address in the delivery header and forward the
packet. The exact mechanism for determining the next delivery
destination address given the AS number is outside of the scope of
this document.
Security Considerations
Security issues are not discussed in this memo.
Authors" Addresses
Stan Hanks
NetSmiths, Ltd.
2025 Lincoln Highway
Edison, NJ 08817
EMail: stan@netsmiths.com
Tony Li
cisco Systems, Inc.
1525 O"Brien Drive
Menlo Park, CA 94025
EMail: tli@cisco.com
Dino Farinacci
cisco Systems, Inc.
1525 O"Brien Drive
Menlo Park, CA 94025
EMail: dino@cisco.com
Paul Traina
cisco Systems, Inc.
1525 O"Brien Drive
Menlo Park, CA 94025
EMail: pst@cisco.com
References
RFC1701
Hanks, S., Li, T, Farinacci, D., and P. Traina, "Generic Routing
Encapsulation", RFC1701, NetSmiths, Ltd., and cisco Systems,
October 1994.

网友评论
评论
发 布

更多软件教程
  • 软件教程推荐
更多+
Greenfoot设置中文的方法

Greenfoot设置中文的方法

Greenfoot是一款简单易用的Java开发环境,该软件界面清爽简约,既可以作为一个开发框使用,也能够作为集成开发环境使用,操作起来十分简单。这款软件支持多种语言,但是默认的语言是英文,因此将该软件下载到电脑上的时候,会发现软件的界面语言是英文版本的,这对于英语基础较差的朋友来说,使用这款软件就会...

07-05

Egret UI Editor修改快捷键的方法

Egret UI Editor修改快捷键的方法

Egret UI Editor是一款开源的2D游戏开发代码编辑软件,其主要功能是针对Egret项目中的Exml皮肤文件进行可视化编辑,功能十分强大。我们在使用这款软件的过程中,可以将一些常用操作设置快捷键,这样就可以简化编程,从而提高代码编辑的工作效率。但是这款软件在日常生活中使用得不多,并且专业性...

07-05

KittenCode新建项目的方法

KittenCode新建项目的方法

KittenCode是一款十分专业的编程软件,该软件给用户提供了可视化的操作界面,支持Python语言的编程开发以及第三方库管理,并且提供了很多实用的工具,功能十分强大。我们在使用这款软件进行编程开发的过程中,最基本、最常做的操作就是新建项目,因此我们很有必要掌握新建项目的方法。但是这款软件的专业性...

07-05

Thonny设置中文的方法

Thonny设置中文的方法

Thonny是一款十分专业的Python编辑软件,该软件界面清爽简单,给用户提供了丰富的编程工具,具备代码补全、语法错误显示等功能,非常的适合新手使用。该软件还支持多种语言,所以在下载这款软件的时候,有时候下载到电脑中的软件是英文版本的,这对于英语基础较差的小伙伴来说,使用这款软件就会变得十分困难,...

07-05

最新软件下载