Extended Brain Storage

# Encapsulation of Protocols

Posted on July 20, 2013

Encapsulation and bytes overhead of protocols related to ISO/OSI reference model…

### Ethernet Frame Details

Calculation of the size of an Ethernet frame is equal to the sum of the size of its fields:

where:

• Preamble – a 56-bit synchronizing pattern (seven octets = 7B)
• SFD – an 8-bit Start of Frame Delimiter (one octet = 1B)
• DMAC – a 48-bit Destination MAC address (six octets = 6B)
• SMAC – a 48-bit Source MAC address (six octets = 6B)
• IEEE 802.1Q – a 32-bit IEEE 802.1Q header (four octets = 4B)
only present when “VLAN tagging” is used (not considered here)
• EtherType – a 16-bit sometimes Length or Size (two octet = 2B)
• Data – or Payload of variable size of minimum 46B and maximum 1500B
• FCS – a 32-bit frame check sequence or cyclic redundancy check (CRC) (four octets = 4B)

Note: Technically, there is an IFG (12B) following the CRC32 field. Considering that IEEE 802.1Q is not used, the minimal size of the Data field within the Ethernet frame is 46B and the maximal size is 1500B.

### Minimal and Maximal Possible Overhead

Minimal Ethernet protocol overhead occurs for maximal size of Data:

Maximal Ethernet protocol overhead occurs for minimal size of Data:

### IPsec (in Tunnel Mode) Using UDP as Transport Protocol

                                 ------------------
064b (08B)                       | UDP |   Data   |
..........                  -----------------------
160b (20B)                  | IP |      Data      |
..........            -------------------------------------------
192b (24B)            | ESP |        Data         | ESP trailer |
..........       ------------------------------------------------
160b (20B)       | IP |           Data            |
.......... ------------------------------------------------
208b (26B) | Eth |              Data              | CRC32 |
.......... ------------------------------------------------
784b (98B) ... Total ...


### IPsec (in Tunnel Mode) Using TCP as Transport Protocol

                                 ------------------
160b (20B)                       | TCP |   Data   |
..........                  -----------------------
160b (20B)                  | IP |      Data      |
..........            -------------------------------------------
192b (24B)            | ESP |        Data         | ESP trailer |
..........       ------------------------------------------------
160b (20B)       | IP |           Data            |
.......... ------------------------------------------------
208b (26B) | Eth |              Data              | CRC32 |
.......... ------------------------------------------------
880b (110B) ... Total ...