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)
“One theme links together these new proposals for family policythe idea that the family is exceedingly durable. Changes in structure and function and individual roles are not to be confused with the collapse of the family. Families remain more important in the lives of children than other institutions. Family ties are stronger and more vital than many of us imagine in the perennial atmosphere of crisis surrounding the subject.”
—Joseph Featherstone (20th century)