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:
“The captain was a duck
With a packet on his back,
And when the ship began to move
The captain said, Quack! Quack!”
—Mother Goose (fl. 17th18th century. I saw a ship a-sailing (l. 1316)
“Why does philosophy use concepts and why does faith use symbols if both try to express the same ultimate? The answer, of course, is that the relation to the ultimate is not the same in each case. The philosophical relation is in principle a detached description of the basic structure in which the ultimate manifests itself. The relation of faith is in principle an involved expression of concern about the meaning of the ultimate for the faithful.”
—Paul Tillich (18861965)