What is TCP URG

URG (Urgent) is a TCP flag that marks data as high-priority, signaling the receiver to process it ahead of normal data. In practice, it is almost never used and its behavior varies between operating systems.

How is it supposed to work?

When the URG flag is set, the TCP header's urgent pointer field indicates where the urgent data ends within the packet. The receiving application can read this urgent data out-of-band — separately from the normal data stream — allowing it to act on high-priority signals without waiting for buffered data to be processed first.

The original use case was sending interrupt signals over a TCP connection, like Ctrl+C in a Telnet session.

Why is it almost never used?

Two problems killed URG in practice:

  • Inconsistent implementations — BSD and Linux disagree on whether the urgent pointer points to the last byte of urgent data or the byte after it. RFC 793 and RFC 1122 gave conflicting guidance.
  • Better alternatives exist — applications that need out-of-band signaling use separate connections or application-level framing instead of relying on a TCP feature that behaves differently across systems.

Why it matters

URG is a historical artifact from TCP's original design in RFC 793. You'll see the urgent pointer field in every TCP header (it's always present, usually set to zero). Understanding that it exists but is effectively unused helps you interpret packet captures correctly and explains why TCP headers contain a field that serves no practical purpose in modern networking.