L2TP Packet Structure
An L2TP packet consists of :
Bits 0–15 | Bits 16–31 |
---|---|
Flags and Version Info | Length (opt) |
Tunnel ID | Session ID |
Ns (opt) | Nr (opt) |
Offset Size (opt) | Offset Pad (opt)...... |
Payload data |
Field meanings:
- Flags and version
- control flags indicating data/control packet and presence of length, sequence, and offset fields.
- Length (optional)
- Total length of the message in bytes, present only when length flag is set.
- Tunnel ID
- Indicates the identifier for the control connection.
- Session ID
- Indicates the identifier for a session within a tunnel.
- Ns (optional)
- sequence number for this data or control message, beginning at zero and incrementing by one (modulo 216) for each message sent. Present only when sequence flag set.
- Nr (optional)
- sequence number for expected message to be received. Nr is set to the Ns of the last in-order message received plus one (modulo 216). In data messages, Nr is reserved and, if present (as indicated by the S bit), MUST be ignored upon receipt..
- Offset Size (optional)
- Specifies where payload data is located past the L2TP header. If the offset field is present, the L2TP header ends after the last byte of the offset padding. This field exists if the offset flag is set.
- Offset Pad (optional)
- Variable length, as specified by the offset size. Contents of this field are undefined.
- Payload data
- Variable length (Max payload size = Max size of UDP packet − size of L2TP header)
Read more about this topic: Layer 2 Tunneling Protocol
Famous quotes containing the words packet and/or structure:
“we know our end
A packet of worm-seed, a garden of spent tissues.”
—Allen Tate (18991979)
“Each structure and institution here was so primitive that you could at once refer it to its source; but our buildings commonly suggest neither their origin nor their purpose.”
—Henry David Thoreau (18171862)