RFC 2890 (rfc2890) - Page 3 of 7
Key and Sequence Number Extensions to GRE
Alternative Format: Original Text Document
RFC 2890 Key and Sequence Number Extensions to GRE September 2000
2.1. Key Field (4 octets)
The Key field contains a four octet number which was inserted by the
encapsulator. The actual method by which this Key is obtained is
beyond the scope of the document. The Key field is intended to be
used for identifying an individual traffic flow within a tunnel. For
example, packets may need to be routed based on context information
not present in the encapsulated data. The Key field provides this
context and defines a logical traffic flow between encapsulator and
decapsulator. Packets belonging to a traffic flow are encapsulated
using the same Key value and the decapsulating tunnel endpoint
identifies packets belonging to a traffic flow based on the Key Field
value.
2.2. Sequence Number (4 octets)
The Sequence Number field is a four byte field and is inserted by the
encapsulator when Sequence Number Present Bit is set. The Sequence
Number MUST be used by the receiver to establish the order in which
packets have been transmitted from the encapsulator to the receiver.
The intended use of the Sequence Field is to provide unreliable but
in-order delivery. If the Key present bit (bit 2) is set, the
sequence number is specific to the traffic flow identified by the Key
field. Note that packets without the sequence bit set can be
interleaved with packets with the sequence bit set.
The sequence number value ranges from 0 to (2**32)-1. The first
datagram is sent with a sequence number of 0. The sequence number is
thus a free running counter represented modulo 2**32. The receiver
maintains the sequence number value of the last successfully
decapsulated packet. Upon establishment of the GRE tunnel, this value
should be set to (2**32)-1.
When the decapsulator receives an out-of sequence packet it SHOULD be
silently discarded. A packet is considered an out-of-sequence packet
if the sequence number of the received packet is less than or equal
to the sequence number of last successfully decapsulated packet. The
sequence number of a received message is considered less than or
equal to the last successfully received sequence number if its value
lies in the range of the last received sequence number and the
preceding 2**31-1 values, inclusive.
If the received packet is an in-sequence packet, it is successfully
decapsulated. An in-sequence packet is one with a sequence number
exactly 1 greater than (modulo 2**32) the last successfully
decapsulated packet, or one in which the sequence number field is not
present (S bit not set).
Dommety Standards Track