Tag: IP

Frame, packet and segment sizes or TCP/IP without fragmentation

It appeared to be really complicated to find relative information about sizes of transmission units in different levels of TCP/IP stack and completely impossible to find a united chart with their comparison. So, here it is.

Layer Protocol Header Size Recommended size with header included without protocol extensions, ensuring no segmentation on all underlying layers Maximum size of transmission unit with protocol extensions
Transport TCP 20-60B 1480 Bit 1 GB
UDP 8 B 1480 Bit 65535 B
Network IPv4 20 B – 60 B 1500 Bit* 65535 B
IPv6 40 B – infinite 1500 Bit 4 GB
Data link 10/100 Ethernet 18 B 1542 bit 1542 bit
1/10 GB Ethernet 18 B 1542 bit 9000 bit**
10/100 GB Ethernet 18 B 1542 bit 64000 bit***
802.11 (WIFI) 34 B 2312 bit 2312 bit

* Fragmentation is widely used in IP protocols

** Jumbo frames are used on high-rate data link protocols, like Gigabit Ethernet or higher

*** is called Super jumbo frame. Not practically used and may not be profitable on a links lower than 10Gbit Ethernet

IPv4 intermediate zeros omitting

Eventually, intermediate zeros can be omitted in IPv4 also.

[slava@tiamat ~]$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.068 ms
— 127.0.0.1 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1398ms
rtt min/avg/max/mdev = 0.040/0.054/0.068/0.014 ms
[slava@tiamat ~]$ ping 127.1
PING 127.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.060 ms
— 127.1 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1314ms
rtt min/avg/max/mdev = 0.060/0.065/0.070/0.005 ms

Apparently, it inserts maximum possible amount (1 or 2) of intermediate zeros before last octet:

[slava@tiamat ~]$ ping 127.255
PING 127.255 (127.0.0.255) 56(84) bytes of data.
64 bytes from 127.0.0.255: icmp_seq=1 ttl=64 time=0.064 ms
— 127.255 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2786ms
rtt min/avg/max/mdev = 0.063/0.065/0.068/0.002 ms

[slava@tiamat ~]$ ping 198.41.4
PING 198.41.4 (198.41.0.4) 56(84) bytes of data.
64 bytes from 198.41.0.4: icmp_seq=1 ttl=56 time=155 ms

— 198.41.4 ping statistics —
2 packets transmitted, 2 received, 0% packet loss, time 1514ms
rtt min/avg/max/mdev = 155.323/155.361/155.400/0.396 ms