Ethernet frames and packets: what’s the difference?

...and why does it matter?

Network Networking Ethernet
Martyn Williams/IDGNS

When discussing Ethernet data, the terms frame and packet are often used interchangeably. Frames and packets are the electronic containers that carry our data from point-to-point by navigating LANs and WANs and, as they both serve similar functions, their differences are often misunderstood.

So what’s the difference?

To simplify matters, imagine frames and packets as envelopes of information that are going to be sent from one person to another. The key difference between a frame and a packet is how they encapsulate the information and that depends on where the information is being sent.

Frames explained

Imagine a company with inter-department mail where a person can send documents to another person within their private/local organization. The contents are placed in an internal envelope and the sender writes their name and department in the “From” field, then writes the recipient’s name and department in the “To” field. 

When the envelope is sent, the mail room recognizes the internal-use envelope, reads the destination name and department, uses a directory to translate that information into a physical location (building/office) and delivers it to the recipient. The envelope never leaves the private/local organization and all of the movement is handled by local resources familiar with the environment.

An inter-office envelope cannot be sent outside of the company because the envelope does not have a mailing address. To send the contents to an office outside of the local area, the inter-office envelope will need to be placed inside a postal envelope and labeled with a proper postal address.

An Ethernet frame works in a similar way. It is a container for data with a source and destination address to deliver information, called the payload, between two locations on the same network. Instead of a name and department, the source and destination address of a frame are the MAC (Media Access Controller) address of a computer, tablet, IP Phone, IoT device, etc. This is an ID number that is unique to every Ethernet device in the entire world.

Frames are generated at Layer 2 of the TCP/IP stack by the network interface device with a payload size that depends on the type of data being transmitted. The frame is sent onto the network where an Ethernet switch checks the destination address of the frame against a MAC lookup table in its memory. The lookup table tells the switch which physical port, i.e., RJ45 port, is associated with the device whose MAC address matches destination address of the frame.

The switch will forward the frame to the physical port determined by the lookup table. If the cable is connected directly to the destination device the transmission is complete. If the cable is connected to another switch, the next switch will repeat the lookup and forward process until the frame reaches the intended destination.

Remember - all of this is happening on Layer 2 switches in the LAN. Like inter-department mail, a frame cannot be sent outside of the local/private network onto the internet because it does not have the proper address. To send data to a device on a different network or to an internet server, a frame must be built into a packet.

Posting packets

Much like the example where the inter-department envelope needs to placed inside a postal envelope to send it to a different office, an Ethernet frame is encapsulated with additional information to create an IP packet.

Whereas MAC addresses of a network devices are unique and permanent, IP addresses are usually temporally assigned to a network device and change as the device connects to different networks. For example, the IP address of a tablet will change each time it is connected to a different Wi-Fi network.

Packets are created at Layer 3 of the network and allow information to be exchanged between different LANs, typically via routers. A router interconnects small networks (LANs) together allowing for information exchange on a much larger scale using IP addresses for packet forwarding instead of MAC addresses.

Layer 3 packets allow routers to provide inter-network data transmission (Internet) using IP addresses that identify the network and the temporary address of the device on the network. Once inside a network, intra-network (LAN) data forwarding is handled by Layer 2 switches that read the MAC address of the frame to forward it to the destination device where the Ethernet controller extracts the data payload completing the process of transferring information between devices on different networks.

Why does it matter?

The differences between frames and packets are important when choosing Ethernet test equipment for data and performance testing. Different data transmission testers may appear very similar in appearance and function because they test the ability of networks to transmit data without errors. However, different testers operate on different types of networks.

Some are limited to operating on Layer 2 networks (LANs) and these may provide helpful as no network configuration process is required to perform prior testing. Layer 2 testing is performed with frames using MAC addresses which are unique to every network device, so as long as the main and remote units of the tester are on the same LAN, the network will ensure they can communicate with each other.

However, when there is a need to test between different networks or across the Internet, a transmission tester that can generate IP packets is required. When testing at Layer 3 and higher, configuring the two handsets to locate each other can be daunting. Because IP addresses are not unique to devices in different networks, users need to have a detailed understanding of the network at each location to ensure the tester handsets can communicate and not create conflicts with other devices on the network.

To summarize, Layer 3-4 tests are best used for testing bandwidth between networks (WANs) and Layer 2 tests are best for testing bandwidth between devices within the same network (LANs).

Copyright © 2017 IDG Communications, Inc.

The 10 most powerful companies in enterprise networking 2022