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:
“There are some circles in America where it seems to be more socially acceptable to carry a hand-gun than a packet of cigarettes.”
—Katharine Whitehorn (b. 1926)
“When a house is tottering to its fall,
The strain lies heaviest on the weakest part,
One tiny crack throughout the structure spreads,
And its own weight soon brings it toppling down.”
—Ovid (Publius Ovidius Naso)