The payload of an IP packet is typically a TCP segment or a UDP datagram A UDP datagram consists of a UDP header and the transported data The size of a UDP header is 8 bytes This means an IP packet with an empty UDP datagram as payload takes at least 28 (IPv4) or 48 (IPv6) bytes, but may take more bytes Hence a >UDP packet can be of any length IP then gets the UDP packet and fragments it Theoretically, the maximum size of an UDP packet is 64K, this is derived from the length field in UDP packet which is 16 bit only If the application has data longer than 64K, it The UDP header has four parts, each of two bytes That means we get the following interpretation of the header (a) Source port number = = 1586 (b) Destination port number = 000D16 = 13 (c) Total length = 001C16 = 28 bytes (d) Since the header is 8 bytes the data length is 28 – 8 = bytes
Tcp Ip Packet Headers