Lesson
What Is a Computer Network?
Learning objective
Explain why networks exist and identify the ingredients required for communication.
Text alternative: The source PC sends a local frame through a switch to its router. The router reads the packet destination, chooses another network, and places the packet in a new frame for the path to the destination server.
The decisions behind communication
For communication to work, the source host must identify the destination, choose a usable communication medium, and follow shared protocols. The source creates the data. The destination is the intended receiver. A medium—such as copper, fiber, or radio—carries signals. Protocols are agreed rules for how devices format, address, send, receive, and interpret those signals.
Consider a PC sending a small request to a server on another IPv4 network. The packet keeps the PC's source IP address and the server's destination IP address. The PC compares the destination with its own network information and decides that the server is remote, so the next hop is its default router. For IPv4, the PC can use ARP to learn the router interface's MAC address. It then places the packet inside an Ethernet frame addressed to that next-hop MAC address.
Frames and packets solve different parts of the trip. A frame carries data across one local link and uses link-layer addresses such as MAC addresses. A packet carries network-layer addresses across connected networks. At a router, the incoming frame ends. The router examines the packet's destination IP address, chooses a route, and builds a new frame for the next link.
The devices therefore make different forwarding decisions:
- A host decides whether the destination is local or remote and chooses the next hop.
- A switch primarily reads the frame's destination MAC address and uses its MAC address table to select a port. Broadcasts and unknown destinations may be sent out multiple ports.
- A router removes the incoming link-layer frame, reads the destination IP address, and uses its routing table to choose the next network and next hop.
- The destination host accepts traffic addressed to it and passes the data to the relevant protocol or application.
Interactive packet journey
Free account
Continue this lesson for free
Unlock the remaining explanation, Wireshark checks, quizzes, interview answers, and saved progress. No payment required.
Continue with Google or email