7 Network Working Group S. Hanks
8 Request for Comments: 1702 NetSmiths, Ltd.
9 Category: Informational T. Li
16 Generic Routing Encapsulation over IPv4 networks
20 This memo provides information for the Internet community. This memo
21 does not specify an Internet standard of any kind. Distribution of
22 this memo is unlimited.
26 In an earlier memo [RFC 1701], we described GRE, a mechanism for
27 encapsulating arbitrary packets within an arbitrary transport
28 protocol. This is a companion memo which describes the use of GRE
29 with IP. This memo addresses the case of using IP as the delivery
30 protocol or the payload protocol and the special case of IP as both
31 the delivery and payload. This memo also describes using IP
32 addresses and autonomous system numbers as part of a GRE source
35 IP as a delivery protocol
37 GRE packets which are encapsulated within IP will use IP protocol
40 IP as a payload protocol
42 IP packets will be encapsulated with a Protocol Type field of 0x800.
44 For the Address Family value of 0x800, the Routing Information field
45 will consist of a list of IP addresses and indicates an IP source
46 route. The first octet of the Routing Information field constitute a
47 8 bit integer offset from the start of the Source Route Entry (SRE),
48 called the SRE Offset. The SRE Offset indicates the first octet of
49 the next IP address. The SRE Length field consists of the total
50 length of the IP Address List in octets.
58 Hanks, Li, Farinacci & Traina [Page 1]
60 RFC 1702 GRE over IPv4 networks October 1994
66 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
67 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
68 | Address Family | SRE Offset | SRE Length |
69 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
71 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
73 For the Address Family value of 0xfffe, the Routing Information field
74 will consist of a list of Autonomous System numbers and indicates an
75 AS source route. The third octet of the Routing Information field
76 contains an 8 bit unsigned integer offset from the start of the
77 Source Route Entry (SRE), called the SRE Offset. The SRE Offset
78 indicates the first octet of the next AS number. THe SRE Length
79 field consists of the total length of the AS Number list in octets.
82 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
83 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
84 | Address Family | SRE Offset | SRE Length |
85 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
87 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
89 IP as both delivery and payload protocol
91 When IP is encapsulated in IP, the TTL, TOS, and IP security options
92 MAY be copied from the payload packet into the same fields in the
93 delivery packet. The payload packet's TTL MUST be decremented when
94 the packet is decapsulated to insure that no packet lives forever.
98 When a system is processing a SRE with an Address Family indicating
99 an IP source route, it MUST use the SRE Offset to determine the next
100 destination IP address. If the next IP destination is this system,
101 the SRE Offset field should be increased by four (the size of an IP
102 address). If the SRE Offset is equal to the SRE Length in this SRE,
103 then the Offset field in the GRE header should be adjusted to point
104 to the next SRE (if any). This should be repeated until the next IP
105 destination is not this system or until the entire SRE has been
108 If the source route is incomplete, then the Strict Source Route bit
109 is checked. If the source route is a strict source route and the
110 next IP destination is NOT an adjacent system, the packet MUST be
114 Hanks, Li, Farinacci & Traina [Page 2]
116 RFC 1702 GRE over IPv4 networks October 1994
119 dropped. Otherwise, the system should use the IP address indicated
120 by the Offset field to replace the destination address in the
121 delivery header and forward the packet.
123 Autonomous system source routes
125 When a system is processing a SRE with an Address Family indicating
126 an AS source route, it MUST use the SRE Offset field to determine the
127 next autonomous system. If the next autonomous system is the local
128 autonomous system, the SRE Offset field should be increased by two
129 (the size of an autonomous system number). If the SRE Offset is
130 equal to the SRE Length in this SRE, then the Offset field in the GRE
131 header should be adjusted to point to the next SRE (if any). This
132 should be repeated until the next autonomous system number is not
133 equal to the local autonomous system number or until the entire SRE
136 If the source route is incomplete, then the Strict Source Route bit
137 is checked. If the source route is a strict source route and the
138 next autonomous system is NOT an adjacent autonomous system, the
139 packet should be dropped. Otherwise, the system should use the
140 autonomous system number indicated by the SRE Offset field to replace
141 the destination address in the delivery header and forward the
142 packet. The exact mechanism for determining the next delivery
143 destination address given the AS number is outside of the scope of
146 Security Considerations
148 Security issues are not discussed in this memo.
170 Hanks, Li, Farinacci & Traina [Page 3]
172 RFC 1702 GRE over IPv4 networks October 1994
182 EMail: stan@netsmiths.com
198 EMail: dino@cisco.com
211 Hanks, S., Li, T, Farinacci, D., and P. Traina, "Generic Routing
212 Encapsulation", RFC 1701, NetSmiths, Ltd., and cisco Systems,
226 Hanks, Li, Farinacci & Traina [Page 4]