So what exactly is the difference between Frame, Packet and Payload?
I've seen people use these terms interchangeably but what is the actual difference?
Network Engineering Stack Exchange is a question and answer site for network engineers. It only takes a minute to sign up.
Sign up to join this communitySo what exactly is the difference between Frame, Packet and Payload?
I've seen people use these terms interchangeably but what is the actual difference?
A Frame is a combination of the L2 header and the Data being carried
A Packet is a combination of the L3 header and the Data being carried.
In either case, the Data being carried is the payload of the Frame/Packet.
This animation will help illustrate the differences:
At any point in the animation, the DATA
is the Payload for the respective layer (Segment, Packet, Frame).
Within the Payload of the Segment is the application data put together by the application layers.
Within the Payload of the Packet is the L4 header (TCP, in the animation's case), as well as the application data.
Within the Payload of the Frame is the L3 header (IP, in the animation's case), the L4 header (TCP), as well as the application data
The term "frame" is used when referring to communications between the Media Access Control (MAC) layer header and trailer. Communications between devices use frames.
A "packet" is contained within the frame. For TCP/IP, this would include the TCP header information thru the MAC trailer.
The "payload" is the data area of the frame, which contains the information that is being sent or received. Size of the payload can invoke packet fragmentation, which splits the packets into several smaller and more manageable packets.
A frame is a layer 2 datagram. A packet is a layer 3 datagram. A payload is the data being transported by a layer2 and/or layer3 datagram minus any layer2 or layer3 overhead such as bits being used to encapsulate the payload.
An analogy might be a train where the whole train is a packet, made up of the engine and caboose (hehe I just said caboose). then there might be one or more train cars being frames. The payload is the stuff being transported by the train.
search for osi network layer model for more detail.