User Tools

Site Tools


doc:networking:datagram.structures

Datagram Structures

Please read Datagram and OSI model.

OSI Layer 2

OSI Layer 2 datagrams are called frames.

Ethernet

Wireless LAN

ATM cell

Layer 2 datagrams of the ATM protocol are called cells.

PPP

The PPP (Point-to-point protocol) is a somewhat of a partial Layer 2 protocol. It is always used in conjunction with a second Layer 2 protocol, working as a carrier.

PPP Header or Field or Tag
Field Version Type Code Session-ID Length PPP protocol Payload
Bit 4 4 8 16 16 16 x

Such PPP frames are encapsulated into the carrier frame: common are Ethernet and ATM. So we talk about

  • PPPoE Frame: TODO (or simply combine the already given information)
  • PPPoA Cell: TODO (or simply combine the already given information)

But since ATM protocol is ever present, you only seldom have pure PPPoE over the whole distance from your Modem to the DSLAM. You have ATM as well as Ethernet. And this gives you two possibilities to combine the two protocols. You can either encapsulate or bridge:

  • Pure PPPoE: it is being claimed that many VDSL2 connections relinquish the ATM protocols, and use pure PPPoE.

OSI Layer 3

Datagrams at OSI Layer 2 are called packets.

IP

ICMP

OSI Layer 4

Some OSI Layer 4 datagrams are referred to as packets. TCP datagrams are called segments. By definition UDP datagrams remain datagrams because they are stateless but are often referred to as packets.

TCP

UDP

Datagram Structure

Protocol Header Size in Bytes Total Size in Bytes
Ethernet frame 38–42 Size: 84–1542Bytes, Jumbo frame up to 9042
Wireless LAN ?? 23??
IPv4 Packet 20–60 Size: 20– (20-byte header + 0 bytes data) 65.535
IPv6 Packet 40 fixed, Optional Extension Header possible up to 65.535
TCP Segment 20–60 up to 65.535
UDP Packet 4–8 with IPv4 and 6–8 with IPv6 up to 65.535

Example

TCP segment in IPv4 packet in Ethernet frame

Ethernet Octets
Preamble 7
Start of frame delimiter 1
MAC destination 6
MAC source 6
802.1Q tag (opt.) 4
Ethertype or length 2 IPv4 Bits
Payload 46 -1500 Version 4
Header Length 4
Differentiated Services Code Point 6
Explicit Congestion Notification 2
Total Length 16
Identification 16
Flags 3
Fragment Offset 13
Time to Live 8
Protocol 8
Header Checksum 16
Source IP Address 32
Destination IP Address 32
Options ( if Header Length > 5 ) ?
Payload 1440-1480 Bytes TCP Bits
Source Port 16
Destination Port 16
Sequence number 32
Acknowledgment number 32
Data offset 4
Reserved 4
Flag 8
Window Size 16
Checksum 16
Urgent pointer 16
Options (if Data Offset > 5) varies
padding 8
Payload Payload
CRC 4
Interframe gap 12
doc/networking/datagram.structures.txt · Last modified: 2012/11/30 16:13 by uvray313