Somewhere in the header of every GRE tunnel sits a four-byte field called a Key, and it has never locked anything. RFC 1701 gave it that name in October 1994 along with a vague hint of authority; RFC 2890, six years later, told the truth. The Key identifies a logical traffic flow inside a tunnel and, in the specification's own words, is “not involved in any sort of security, despite its name.” The Sequence Number beside it orders packets within that flow. Neither field authenticates a sender — and an attacker who can inject a plausible future sequence can make honest packets look stale.
Summary
- RFC 1701 handed GRE an optional four-octet Key and murmured that a receiver might use it to authenticate a packet's source — then defined no way to create, distribute, protect or check that claim.
- RFC 2890 drew the line properly: the Key identifies one logical traffic flow inside a tunnel and, “despite its name,” carries no security role. Sequence Number orders that flow; delivery stays unreliable.
- Anyone able to inject an arbitrary Sequence value can push receiver state forward and make legitimate packets look old. Classification and ordering become trustworthy only when a separate protection layer covers the GRE header and payload.
A key named before anyone knew what it opened
The word key arrives carrying luggage. In ordinary speech it opens something. In cryptography it selects or enables a protected transformation. In access control it stands for a credential. A packet field wearing that name can therefore acquire authority in an operator's mind long before the protocol has earned it — and GRE's history is the cleanest record of that hazard anyone could ask for.
RFC 1701, published as an Informational document in October 1994, proposed a general way to carry one network-layer protocol over another. A delivery header wrapped a GRE header, which in turn described the payload. The header could carry a checksum, routing information, a four-octet Key and a four-octet Sequence Number.
For the Key, the document offered a shrug dressed as a sentence: a receiver might use it to authenticate the packet's source. The techniques for deciding authenticity lived outside the specification. No algorithm generated the value. No exchange bound it to an endpoint. No freshness rule stopped reuse. No integrity mechanism stopped an intermediary from editing it. No failure procedure separated a guessed value from a compromised one.
That sentence was not an authentication protocol waiting to be switched on. It was an unfilled interface — a socket with nothing plugged into it. Two implementations could put the same four bytes on the wire and assign them incompatible evidentiary weight, each sincerely convinced it was following the RFC.
Sequence Number had the same unfinished shape. RFC 1701 said a receiver might use the unsigned 32-bit value to establish transmission order, then left both generation and reception semantics outside the document. The field had a location but not yet an interoperable state machine — a seat with no rules about who may sit in it.
RFC 2784 chose restraint over ambition
RFC 2784 took a different approach in March 2000. It described the intersection of GRE behaviour already deployed by multiple vendors and placed that small common form on the standards track. Its base header kept the Checksum-present bit, Version and Protocol Type. Protocol Type told the decapsulator what kind of payload followed. The earlier Key, Sequence and Routing positions were not silently reinterpreted.
Instead, bits 1 through 5 became a compatibility boundary. A receiver had to discard a packet with any of them set unless it implemented RFC 1701. A transmitter following only RFC 2784 sent the reserved positions as zero. Separate interoperability sections explained how older transmitters and receivers could meet the new base.
This was restraint, not erasure. The common header included what cross-vendor running code could already share. Optional meaning that lacked the new contract stayed visibly outside that compatibility set. A parser did not guess from a vendor name, a tunnel address or an operator's good intentions.
The design also kept GRE's authority narrow. The protocol specified encapsulation and decapsulation. It did not decide when a packet ought to enter the tunnel. That admission decision belonged to configuration and the surrounding control systems — and it still does.
RFC 2890 made the Key useful by making it less grand
Six months later, RFC 2890 updated the base. It reused the RFC 1701 bit positions: K announced a four-octet Key; S announced a four-octet Sequence Number. The extension was wire-compatible with the earlier layout but no longer left the fields' central duties to imagination.
The encapsulator inserts the Key. How it obtains the number remains outside the RFC. The decapsulator uses that number to identify an individual traffic flow within the tunnel, particularly when the encapsulated data lacks the context needed for routing or treatment. Packets belonging to one flow carry the same value. The field creates a logical relationship between two tunnel endpoints.
That relationship is useful precisely because it is local. One outer tunnel can carry traffic that the receiving endpoint must direct into different contexts. A small number is cheaper than copying an entire control-plane explanation into every payload. The receiver needs only a deterministic mapping from the received value and tunnel context to its own flow state.
It proves no more than that. Anyone capable of inserting or altering a packet can copy a four-byte number. The value is not secret, carries no signature and says nothing about why the sender was entitled to select the flow. RFC 2890 closes the ambiguity in its Security Considerations: the Key field is not involved in any sort of security, despite its name.
The correction did not rename the field. It did something operationally stronger: it fixed the field's claim. A Key could select context without being allowed to impersonate a credential.
Sequence Number bought order, not delivery
The S extension added an executable receiver history. The encapsulator sends a free-running counter from zero through 2^32−1 and wraps modulo 2^32. The receiver remembers the number of the last packet it successfully decapsulated. When K is present, that state is specific to the logical flow identified by the Key.
A packet exactly one step ahead is in sequence. A sufficiently old or duplicate value is out of sequence and should be discarded silently. A value ahead that leaves a gap exposes missing or reordered traffic. The receiver may hold a small number of such packets in a per-flow buffer, wait briefly for the gap and then release what it has in order. When the wait or the buffer limit ends, it can skip the missing numbers and advance.
The document names the result carefully: unreliable but in-order delivery. Sequence does not retransmit a missing payload. It cannot promise that the network will deliver every datagram. Bounded buffering only decides how long the decapsulator delays a newer packet in case an older one is still on the way.
Nor does S impose one total order on the whole tunnel. Packets without a Sequence Number may be interleaved with packets that carry one. With K present, separate Keys maintain separate sequence histories. “Newer” therefore means newer within the selected receiver context, not universally newer than every GRE packet observed on the link.
This distinction matters to evidence. A gap proves that the receiver did not successfully decapsulate every preceding number in that flow state. It does not by itself say whether a packet was lost, reordered beyond the buffer, filtered, forged, reset with the tunnel or never transmitted at all.
A forged future can erase a legitimate present
The security failure follows directly from the otherwise useful state machine. Suppose the receiver last accepted Sequence 40. A malicious packet carrying the right tunnel addresses, a copied Key and a much later Sequence value reaches the decapsulator first. If no external mechanism authenticates the header, the receiver can advance its memory into the injected future. Legitimate packets that follow now look old and are discarded.
RFC 2890 identifies arbitrary Sequence injection as a denial-of-service path. Its remedy is not a more impressive Key value or a larger counter. It requires IP security protection for the GRE header and the tunneled payload. The decisive property is coverage: provenance and integrity must include the very fields that drive receiver state.
That is why Sequence Number is not anti-replay protection. An anti-replay window is meaningful only after a packet has been authenticated as belonging to the protected association. Without that prior test, the attacker gets to write the evidence against which later packets will be judged.
Encryption is a separate question again. A protected tunnel may authenticate without concealing a payload, or may provide both properties, depending on the surrounding mechanism and policy. GRE's K and S bits choose neither. A successful flow lookup says nothing whatsoever about confidentiality.
RFC 9601 arrived in 2024 and did not inflate the Key
The base GRE specification did not stop evolving. RFC 9601, published in 2024, is recorded as another update to RFC 2784. It places GRE used between IP headers inside the modern rules for propagating Explicit Congestion Notification and adds safe ingress configuration requirements when the outer delivery protocol is IPv4 or IPv6.
That update is orthogonal to RFC 2890. ECN asks how congestion evidence crosses inner and outer IP headers. Key asks which logical flow context the endpoints select. Sequence asks how a receiver orders packets within the applicable flow. Protection asks whether the header and payload came from an accepted security association without alteration. One tunnel can exercise all four responsibilities, but no field inherits the authority of the others.
RFC 9601 also notes that GRE itself has no dynamic tunnel setup or configuration mechanism. Other control-plane protocols or static configuration may create the relationship. A packet capture can show K and S on the wire; it cannot, by itself, recover the agreement that assigned the Key or authorised the peer.
The honest operational question
An operator should never ask only, “Does the GRE key match?” The useful questions are layered. Which outer endpoint and configured tunnel supplied the namespace? Which local flow does the number select? Was K expected on this packet? Is S required for this flow? What was the previous accepted value, what gap or wrap occurred, and was the header inside an authenticated integrity boundary?
Counters need the same discipline. A rise in out-of-sequence discards may reflect reordering, duplication, buffer pressure, a state reset, inconsistent endpoint configuration or hostile injection. The counter records a receiver decision. It does not contain its own cause.
The historical achievement of RFC 2890 was therefore not that GRE acquired stronger-sounding fields. It was that running endpoints acquired smaller, testable claims. A Key could name context. A Sequence Number could order what that context received. Security remained a separate obligation whose evidence had to surround both.
The Key never locked the tunnel. It only ever named which conversation was happening inside it — and the industry is better off for having finally written that down.
Sources
Member Briefing
Read the full trend briefing
Members read the full briefing with the source notes behind every finding.
Strategic Circle
A daily briefing in your language, built from changes we have verified.
Join for USD 20/monthCancel anytime.
Members also get the full research library, a daily briefing on the networks they follow and the private forum.






