TechKnowSurge
CompTIA Network+ 1.1 Cisco CCNA 3.2 Cisco CCST Networking 4.4 Cisco CCNA 1.13 Cisco CCNA 1.1 Cisco CCST Networking 4.5
VideoNetworkFree

Packets and Frames

Packets and frames work together to move data across networks, with IP addressing handling end-to-end delivery while Ethernet frames manage local segment transmission. As data travels through routers across different network technologies, the packet stays consistent while the frame is stripped and rebuilt at each hop.

Complete this video to capture a CTF flag worth 1 point.

About this video

At the core of network communication is the relationship between two structures that operate at different scopes: the IP packet and the data link frame. The packet operates at Layer 3 and contains the payload along with a source and destination IP address, which together guide the data to its final destination regardless of how many intermediate networks it must cross. The frame operates at Layer 2, wrapping the packet with locally meaningful addressing — typically source and destination MAC addresses in an Ethernet environment — along with a trailer used for error checking. MAC addresses are only relevant within a single local network segment and cannot be used to locate devices globally, which is precisely why IP addressing exists as a separate, persistent layer above them. As data travels from one network to another, the packet remains essentially the same throughout the entire journey, but the frame is discarded and recreated at each router. When a device sends data, it builds a frame addressed to the local router's MAC address and transmits it across the LAN. The router receives the frame, strips away the Layer 2 information, and then constructs a new frame appropriate for the next link — which may use an entirely different protocol with no MAC addresses at all. This process repeats at every hop until the packet reaches the destination network, where a final frame delivers it to the target device. This architecture also accounts for the diversity of technologies used across global networks. Different regions, carriers, and physical media rely on different Layer 2 protocols, and the packet-and-frame model accommodates all of them without requiring any changes to the end-to-end packet. The practical distinction maps cleanly onto the equipment involved: switches and hubs operate at Layer 2 and forward frames, while routers operate at Layer 3 and route packets. Understanding this separation — Ethernet framing for local delivery, IP addressing for global routing — is foundational to how modern networking functions and sets the stage for a deeper examination of the full OSI model.

What you'll learn

What's covered

Packets and Frames Interaction

Aligned to

CompTIA Network+
1.1 Explain concepts related to the Open Systems Interconnection (OSI) reference model.
Cisco CCNA
3.2 Determine how a router makes a forwarding decision by default
1.13 Describe switching concepts
1.1 Explain the role and function of network components
Cisco CCST Networking
4.4 Explain basic routing concepts
4.5 Explain basic switching concepts

Key terms

Encapsulation
The process of wrapping data with protocol headers as it passes down the layers of the OSI model.
Packet
A unit of data formatted for transmission over a network, containing a header, payload, and sometimes a trailer.
Frame
The unit of data used at Layer 2 (Data Link layer) of the OSI model, containing source and destination MAC addresses, a payload (the encapsulated Layer 3 packet), and a frame check sequence for error detection. Frames are how switches and other Layer 2 devices think about and forward data.
Media Access Control
MAC
A sublayer of the Data Link layer that controls how devices on a network gain access to a medium and transmit data.
IP Address
A numerical label assigned to each device connected to a network that uses the Internet Protocol.
Layer 2
The Data Link layer of the OSI model, responsible for MAC addressing and frame delivery on a local network.
Layer 3
The Network layer of the OSI model, responsible for logical addressing and routing packets between networks.
Router
A network device that forwards data packets between networks based on IP addresses.
Switch
A network device that connects devices within a LAN and forwards traffic based on MAC addresses.
Payload
The actual data content of a packet or message, excluding headers and metadata.

Transcript

The Packet and the Frame

We take our packet and we put it into a frame for local delivery. The interplay between those is kind of strange, but it lets us do a lot of cool things.

Here at the top, we have a packet. This packet first of all includes a payload. The payload is the information that needs to be delivered to the end machine, and we need to be able to deliver that to the end machine. So we have a source IP address and a destination IP address, and what's most critical about the delivery here is the destination IP address. There's also some other information that helps this be delivered. That's the packet right there; it's what's going to get it to its final destination.

But we do need to deliver it across the local area network. So what we do is encapsulate this packet with a frame. The frame is down here, and the frame contains this local area network addressing. In this case right here it's Ethernet, so it's a destination MAC address and a source MAC address. It tells a little bit of information about what's being delivered, and then the payload — the payload is the packet. So the packet gets fitted into the frame. And then there's also a little end here that does some error checking.

Why the Packet Is Needed

We talked about several weaknesses within LAN protocols. One of those weaknesses is that there are collisions that can happen on this network. We have security concerns over what's happening within this network. We also have broadcasts that happen that just can't happen on a global scale. And we have the addressing: these MAC addresses are just not findable on a global scale, and that's why we have those IP addresses.

There is another concern that we haven't addressed yet either, and that is that there are different technologies at work when you're communicating across this planet. Different countries develop things at different rates. Even within one of the countries, there are a lot of different technologies that can be used and implemented.

So take our connection between our end users here — let's say they want to communicate back and forth. There could be one set of technologies and protocols being used here, another set that gets beamed through radio waves across the ocean, or maybe up to satellites, or perhaps it's going under — there are some cables going under the ocean — or whatever the case, however it's getting across there. And then perhaps we have another set of protocols that are happening here and another set that are happening here. We've got another set here and another set here. So we've got lots of different types of protocols at work.

Crossing the Network

Here's a little different view into that same concept. What we have right here is a LAN, and we also have a LAN over here. Let's say these are both communicating Ethernet, so we've got Ethernet over here and over here that are communicating, because that's pretty common that we have it set up that way. But then in between, on these WAN links right here, we have a different protocol that's being communicated. Maybe it's a protocol that doesn't even use MAC addresses.

So this computer wants to communicate with this computer over here. What it needs to do first of all is assemble the packet. It's got data that it wants to deliver, and so it adds the packet information on here. We're just going to call this L3, because it's layer 3 — we're going to address that here in a second, but let's just call it L3 for now.

Now it has created the packet, and the packet is going to be what's delivered from this computer all the way to that computer, so the packet is going to remain the same. But it needs to deliver it on the local area network first, to this router. So what it does is figure out what the router's MAC address is and attach that to create this frame, and then it adds the trailer. Now we have a complete frame that's going to be sent out onto the network and delivered to this router.

Once it gets to this router, that router has no need for that layer 2 anymore, and it will remove that, and it will just have the packet. So now we have the packet over here, and what will happen is that a new layer 2 will be added so it can be sent across this link, with whatever technology that is. Then it will be sent to this router right here. This router will once again get rid of that layer 2 information, because it's no longer needed, and so then it's got the packet, and what it will do now is add a new layer 2 so that it's sent across this new link to this other router. That router in turn also removes the L2 information here and keeps that packet, and then it needs to send it into this network, so we'll add a new layer 2 to it so that it can be sent to this machine right here.

The big key with this is that the packet that's in here, this layer 3 and this data right here, remains the same for the most part as it traverses this network. There are a couple of things that change, but we're not going to be concerned with that right now. It relatively remains the same throughout this whole transition. But the layer 2 part of this will constantly change between each one of those links. It'll be added here, and then changed again, and then changed again, and then changed again. So it'll go through four variations, that layer 2 or L2 side of this.

Ethernet Versus IP

So what are the differences? Let's take a look at Ethernet versus IP.

  • The Ethernet protocol uses MAC addresses. IP, which is called internet protocol, uses IP addresses.
  • With the Ethernet protocol we call it a frame. With the internet protocol we call them packets.
  • With Ethernet protocols we forward those: as it comes into the hub or comes into the switch, it gets forwarded onto the next device. Internet protocol gets routed. It's just a terminology difference here.
  • Then we have a hub or a switch, which is the equipment that operates on the Ethernet level here, and we've got a router that operates on this level. There is more equipment than just this, but we're just going to call it your hub or your switch at this point in time over here, versus a router over here.
  • And then we call this layer 2 and we call this layer 3.

Now, I haven't really got into layer 2 and layer 3 at this point in time, nor am I going to get in depth into this at this point in time, but just realise that there are many different layers here. We're going to get even more in depth, but I just wanted you to get a concept of this Ethernet protocol versus internet protocol and the interplay between the two. In actuality, the OSI model has seven layers total, so we'll talk about all seven layers here eventually, but for now we'll just stick with layer 2 and layer 3.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →