Skip to main content

CompTIA A+

How Data Travels Across a Network(OBJ.2.0)

15 min read

Every time a user opens a website, sends an email, streams a video, prints a document, or accesses a shared file, data must travel between devices. This communication may occur across a small local network or pass through many routers and networks before reaching a destination on the other side of the world.

Network communication happens quickly, but it involves several steps. Data is divided into smaller units, labeled with addressing information, transmitted through network devices, and reassembled when it reaches its destination. Understanding this process helps technicians troubleshoot slow connections, failed communication, poor voice quality, and other common network problems.

Data Is Divided into Smaller Units

A computer does not normally transmit an entire file or message across a network as one large block of information. Before transmission, the data is divided into smaller units.

These smaller units are commonly referred to as packets. Breaking information into packets makes network communication more efficient and reliable.

For example, imagine that a user downloads a large image from a website. Instead of sending the entire image as one continuous piece of data, the server divides it into many smaller packets. Each packet travels across the network and is reassembled by the user’s computer.

Using smaller units provides several advantages. Multiple devices can share the same network connection, lost information can be retransmitted without resending the entire file, and network devices can process data more efficiently.

Packets

A packet is a unit of data that travels across an Internet Protocol network. It contains part of the original information along with addressing and control information.

A packet commonly contains:

  • A source IP address

  • A destination IP address

  • Part of the transmitted data

  • Information used to identify and process the packet

The source IP address identifies the device that sent the packet. The destination IP address identifies the device that is intended to receive it.

Packets created from the same file or message may not always follow the exact same route. Each packet may be forwarded through different network devices depending on network availability, congestion, and routing decisions. The receiving device uses control information to place the data back into the correct order.

Frames

When a packet travels across a local network, it is placed inside another unit called a frame.

A frame is a unit of data used for communication across a local network connection, such as Ethernet or Wi-Fi. Frames contain the information required to move data between devices on the current network segment.

An Ethernet frame commonly contains:

  • A source MAC address

  • A destination MAC address

  • The packet being transported

  • Error-detection information

The packet contains IP addressing information that helps move data between networks. The frame contains MAC addressing information that helps move the packet across the local network.

A useful way to understand the relationship is to think of a packet as a letter and the frame as the envelope used to deliver that letter across one portion of its journey. The packet remains the main piece of information, while the frame may change as the packet moves from one network connection to another.

Packets vs. Frames

Packets and frames are closely related, but they serve different purposes.

A packet uses IP addresses to identify the original source and final destination across one or more networks. A frame uses MAC addresses to deliver data between devices on the current local network.

When a packet moves through a router, the router removes the existing frame, examines the destination IP address, and determines where the packet should go next. The router then places the packet inside a new frame for the next network connection.

Because of this process, the source and destination MAC addresses can change during transmission. The source and destination IP addresses normally remain associated with the original sending and receiving devices, although technologies such as Network Address Translation can modify IP information.

Encapsulation

Encapsulation is the process of adding addressing and control information to data as it moves through the networking process.

When an application creates information to send across a network, each networking layer adds its own information. The original data is eventually placed inside a packet, and the packet is placed inside a frame.

A simplified encapsulation process is:

  1. An application creates data.

  2. Transport information is added.

  3. Source and destination IP addresses are added to create a packet.

  4. Source and destination MAC addresses are added to create a frame.

  5. The frame is transmitted as electrical, light, or radio signals.

When the information reaches its destination, the receiving device performs the reverse process. It removes the frame information, processes the packet, and passes the original data to the correct application. This reverse process is called de-encapsulation.

Source and Destination Addresses

Network communication requires addresses so information can be delivered to the correct device.

The source address identifies where the data originated. The destination address identifies where the data should be delivered.

Two important types of addresses are used during network communication:

  • Internet Protocol addresses

  • Media Access Control addresses

An IP address identifies a device and its location on an IP network. IP addresses are used when data must travel between different networks.

A MAC address identifies a network interface on a local network. Switches use MAC addresses to forward frames to the correct connected device.

Source and Destination IP Addresses

The source IP address identifies the device that originally sent the packet. The destination IP address identifies the final device that should receive it.

For example, a computer with the IP address 192.168.1.25 may request a webpage from a web server. The computer places its own address in the source IP field and the web server’s address in the destination IP field.

When the web server responds, the addresses are reversed. The web server becomes the source, and the user’s computer becomes the destination.

Routers examine the destination IP address to determine where a packet should be forwarded. Each router moves the packet closer to its final destination.

Source and Destination MAC Addresses

MAC addresses are used to deliver frames across a local network.

Suppose a laptop sends data to its default gateway. The frame may contain the laptop’s MAC address as the source and the router’s MAC address as the destination.

The router receives the frame, removes the packet, and forwards it toward the next network. To do this, the router creates a new frame with new source and destination MAC addresses.

This process continues each time the packet moves through a new local network segment.

Switches examine destination MAC addresses and use a MAC address table to determine which physical port should receive a frame.

Create a free account to keep reading

The full lesson is free — no credit card required.

Continue reading free