1 2 3 4 5 6 7Network Working Group S. Hanks 8Request for Comments: 1702 NetSmiths, Ltd. 9Category: Informational T. Li 10 D. Farinacci 11 P. Traina 12 cisco Systems 13 October 1994 14 15 16 Generic Routing Encapsulation over IPv4 networks 17 18Status of this Memo 19 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. 23 24Introduction 25 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 33 route. 34 35IP as a delivery protocol 36 37 GRE packets which are encapsulated within IP will use IP protocol 38 type 47. 39 40IP as a payload protocol 41 42 IP packets will be encapsulated with a Protocol Type field of 0x800. 43 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. 51 52 53 54 55 56 57 58Hanks, Li, Farinacci & Traina [Page 1] 59 60RFC 1702 GRE over IPv4 networks October 1994 61 62 63 This has the form: 64 65 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 70 | IP Address List ... 71 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 72 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. 80 81 0 1 2 3 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 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 86 | AS Number List ... 87 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 88 89IP as both delivery and payload protocol 90 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. 95 96IP source routes 97 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 106 processed. 107 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 111 112 113 114Hanks, Li, Farinacci & Traina [Page 2] 115 116RFC 1702 GRE over IPv4 networks October 1994 117 118 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. 122 123Autonomous system source routes 124 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 134 has been processed. 135 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 144 this document. 145 146Security Considerations 147 148 Security issues are not discussed in this memo. 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170Hanks, Li, Farinacci & Traina [Page 3] 171 172RFC 1702 GRE over IPv4 networks October 1994 173 174 175Authors' Addresses 176 177 Stan Hanks 178 NetSmiths, Ltd. 179 2025 Lincoln Highway 180 Edison, NJ 08817 181 182 EMail: stan@netsmiths.com 183 184 185 Tony Li 186 cisco Systems, Inc. 187 1525 O'Brien Drive 188 Menlo Park, CA 94025 189 190 EMail: tli@cisco.com 191 192 193 Dino Farinacci 194 cisco Systems, Inc. 195 1525 O'Brien Drive 196 Menlo Park, CA 94025 197 198 EMail: dino@cisco.com 199 200 201 Paul Traina 202 cisco Systems, Inc. 203 1525 O'Brien Drive 204 Menlo Park, CA 94025 205 206 EMail: pst@cisco.com 207 208References 209 210 RFC 1701 211 Hanks, S., Li, T, Farinacci, D., and P. Traina, "Generic Routing 212 Encapsulation", RFC 1701, NetSmiths, Ltd., and cisco Systems, 213 October 1994. 214 215 216 217 218 219 220 221 222 223 224 225 226Hanks, Li, Farinacci & Traina [Page 4] 227 228