Network Fundamentals
Computer Networks: LANs, the Internet, and Communication Protocols
1. Network Fundamentals
A computer network connects devices so they can exchange information. Networks rely on agreed rules and formats—called protocols—to identify devices, prepare information for transmission, direct it to its destination, and check whether it arrived correctly.
A useful distinction is between:
Local Area Networks (LANs): Networks connecting devices within a limited area, such as a home, office, or campus. Ethernet is a common LAN technology.
Networks of networks: Larger systems connecting many separate networks. The internet is the best-known example, and TCP/IP provides the main addressing and communication protocols used across it.
Communication within a LAN and communication across the internet involve different kinds of addressing. A device may use one identifier to communicate locally and another to communicate across interconnected networks.
2. The Telephone Network as an Analogy
The traditional telephone system, known as POTS (Plain Old Telephone System), provides a helpful comparison for understanding digital networks.
Circuit switching
In the older telephone system, operators connected callers by plugging wires into a switchboard. This created a physical path between the caller and recipient. Later, mechanical switching was largely replaced by electronic switching, but the basic idea of creating a connection remained.
A traditional telephone call works approximately as follows:
A caller looks up a recipient’s name and finds the associated telephone number.
The telephone network uses that number to direct the call.
A continuous circuit is reserved for the conversation.
The circuit remains allocated while the people are talking.
When the call ends, the circuit is released for other users.
If all available circuits are in use, a caller may hear a message that all circuits are busy. This means that the network cannot currently allocate a path for another call.
Telephone numbers illustrate hierarchical addressing. A local call may need only a local number, while calls farther away require an area code or country code. The additional parts of the number tell the system how to look beyond its local range.
How the analogy helps—and where it differs
Like telephone networks, computer networks use identifiers, switching devices, and rules to direct information. However, a long-lived circuit is poorly suited to many forms of computer data transmission. A data transfer must be divided, directed, checked, and reassembled reliably; it cannot simply rely on holding one continuous path open for the entire exchange.
Traditional telephone connections also used an analog local loop, even as digital technologies became important elsewhere in the telephone system. The telephone analogy is therefore useful for thinking about names, numbers, and routes, but computer networks use different mechanisms to move data.
3. Packet Switching
Packet switching is the process of dividing information into smaller units, sending those units through a network, and reassembling them at the destination. A unit of data is commonly called a packet; on a local network, packet information is carried inside a frame.
Rather than reserving a continuous circuit, packet-switched networks send packets separately. Different packets can travel through the network as independent units, and the receiver reconstructs the original information.
General process
An application provides information to the network software.
The software divides it into smaller pieces.
Protocol information is added to each piece. This can identify the sender and recipient, indicate the piece’s place in the sequence, and provide information for checking errors.
A physical network interface sends the resulting frames onto the network.
The destination’s interface checks whether a frame is addressed to it and passes it to the appropriate software.
The receiving software checks the data and its order. It may request that a damaged or missing packet be sent again.
Once all necessary pieces are received, the software removes the added addressing information, reassembles the data, and delivers it to the intended application.
A simplified Ethernet frame contains a destination address, a source address, a field indicating the type of its payload, the data itself, and a CRC checksum. The checksum helps detect whether the frame was corrupted in transmission.
Packet switching makes it practical to share network capacity among many communications. It also means that networks need protocols to manage packet formats, addressing, ordering, and error detection.
4. Protocols and Ethernet on a LAN
A protocol is an agreed method for carrying out a communication task, including the formats and rules participants must follow. Protocols determine such things as how data is divided, how information is labeled, and how devices respond to received data.
Ethernet is a widely used protocol family for connecting devices on a LAN. Each Ethernet network interface has a MAC address—short for Media Access Control address—a hardware-level identifier associated with the interface.
MAC addresses
A MAC address is 48 bits long, allowing 248 possible values.
Ethernet interfaces are generally assigned addresses intended to be globally unique.
A MAC address identifies an interface for communication on a local network.
Both PCs and Macintosh computers can have MAC addresses; “MAC” here does not mean Macintosh.
Devices on an Ethernet LAN use MAC addresses to send frames to one another. Interfaces receive traffic on the network and determine whether a frame is addressed to them. This is different from the internet-facing IP address discussed later: MAC addresses support local delivery, while IP addresses support communication across networks.
MAC addresses can also be used in access controls. For example, a network may require a device to be registered before it can use certain services, or a home router may restrict access to devices with approved MAC addresses. Such controls are not foolproof: someone able to observe local network traffic may attempt to capture it, a practice often called sniffing.
Collisions and network extension
When devices share a transmission medium, their transmissions can interfere or collide. Ethernet systems use mechanisms to detect or manage such conflicts. The physical properties of a LAN also limit how far signals can travel over a segment of cable. A traditional Ethernet segment is often described as being limited to about 100 meters; extending connectivity beyond that distance requires additional networking equipment.
Switches connect devices or network segments and direct frames within a LAN.
Bridges connect LAN segments.
Routers connect separate networks and forward traffic between them.
These devices allow networks to expand beyond the limits of a single cable segment and help direct traffic to the appropriate destination.
5. Names on Local Networks
People often assign names to computers on a LAN, but local computer naming is distinct from internet domain-name resolution. Some Windows networks retain naming and sharing mechanisms that developed separately from TCP/IP.
Terms such as NetBIOS, NetBEUI, and Windows Internet Naming Service (WINS) may appear in discussions of older or Windows-specific local networking. These mechanisms have historically supported name resolution and network sharing, including access to Windows file shares. Although modern Windows networks also use TCP/IP, remnants of older naming conventions can still appear in practice.
A computer’s local network name and its internet domain name need not be identical. This can make network administration more complicated: one machine may have one name for a local file share and another name in the internet’s DNS system.
6. The Internet and TCP/IP
The internet is a network of networks. It connects separate LANs and other networks so that devices with different architectures can exchange data.
The TCP/IP protocol suite provides key rules for addressing and communication across interconnected networks:
IP (Internet Protocol) addresses devices and helps direct packets between networks.
TCP (Transmission Control Protocol) helps provide reliable, ordered delivery.
UDP (User Datagram Protocol) provides a lighter-weight way to send data when reliability checks are not required or are handled elsewhere.
The development of TCP/IP began in the early 1970s in connection with the ARPA research network. That network eventually developed into the modern internet.
7. IP Addresses and IPv4
An IP address identifies a device or network interface for communication using the Internet Protocol. The widely used older version, IPv4, uses a 32-bit address, providing roughly 4 billion possible address values.
IPv4 addresses are commonly written as four decimal numbers separated by periods. This format is called dotted-decimal notation or a dotted quad. For example, $192.168.1.1$ is an IPv4 address. Each of the four parts represents an 8-bit portion, or octet, of the address.
Because the available IPv4 address space has been exhausted, IPv6 was introduced with a much larger address space. IPv4 remains important because it continues to be widely used.
Network and host portions
An IP address can be understood as having two logical parts:
The network portion identifies the network to which a device belongs.
The host portion identifies a device within that network.
This resembles a telephone number: an area code identifies a broad region, while the local number identifies a particular telephone within it. Two separate networks can use the same host portion, just as the same local telephone number can exist in different area codes.
A device needs to determine whether a recipient is on its own LAN or on another network. If the recipient is local, the device can send the data within the LAN. If the recipient is remote, the data must be passed to a router or gateway for forwarding.
8. Subnet Masks and Local-versus-Remote Decisions
A subnet mask indicates which bits of an IP address belong to the network portion and which belong to the host portion. It is written in dotted-decimal form, like an IPv4 address.
Conceptually, the device combines the IP address with the subnet mask using the logical operation AND. This identifies the network portion of the address. It can then compare the sender’s network with the recipient’s network:
If both addresses belong to the same local network, the device sends the data locally.
If the recipient belongs to a different network, the device forwards the data to a gateway or router.
For example, if a device on a local network needs to send data to $192.168.6.10$, it checks the network portion defined by its subnet mask. If the destination does not belong to the same local network, the packet is sent to a router for onward delivery.
A home gateway commonly combines local-network routing with a connection to an Internet Service Provider (ISP). It directs local traffic appropriately and forwards traffic intended for outside networks.
9. IPv4 Address Classes, Private Networks, and NAT
Early IPv4 address allocation used classful networking, which divided addresses into Classes A, B, and C. These classes provided network and host portions of different sizes:
Class A: Intended for very large networks. A relatively small number of network identifiers could each support many hosts.
Class B: Intended for medium-sized networks.
Class C: Intended for smaller networks, with fewer host addresses per network.
For example, the historical class system treated addresses beginning with $48$ as belonging to a particular large network allocation. Classful networking was workable when relatively few networks existed, but it often wasted addresses. A network might receive a block much larger than it needed, while smaller blocks could be insufficient for growing organizations.
Reserved and private IPv4 addresses
Some IPv4 ranges have special purposes:
Addresses in
$127.x.x.x$are used for loopback. A loopback address directs traffic back to the same computer, which is useful for testing and some software tasks.Ranges including
$10.x.x.x$and$192.168.x.x$are reserved for private networks, such as home and office LANs. These addresses are not used as globally routable public addresses.
A private network commonly uses Network Address Translation (NAT). A router translates between the private addresses used by local devices and a public address provided by the ISP. This allows multiple devices on a home network to share that public address when communicating with the internet.
Classless Inter-Domain Routing
The older class system was replaced by Classless Inter-Domain Routing (CIDR). CIDR allows the boundary between network and host portions to fall at positions other than the traditional class boundaries. This makes address allocation more flexible and reduces the waste of address space.
CIDR notation uses a slash followed by the number of bits used for the network portion. For example, a $ /20$ network uses 20 bits to identify the network; the remaining bits are available for host addresses. A corresponding subnet mask is $255.255.240.0$, and the network can support approximately 4,094 usable host addresses under the conventional calculation.
Although class names still appear in older explanations and references, CIDR is the more flexible approach used for allocating and routing IP address blocks.
10. Dynamic and Static IP Addresses
An IP address can be static or dynamic:
A static IP address is assigned on a lasting basis and changes relatively infrequently. Servers that need to be found reliably, such as web servers, commonly use stable addresses.
A dynamic IP address is assigned when needed and may change. Client devices such as personal computers often use dynamic addresses because they usually do not need to be permanently discoverable.
A client sending a request provides its current IP address as part of the communication, allowing a server to send a response back to the correct address.
DHCP (Dynamic Host Configuration Protocol) automatically assigns IP configuration to devices when they join a network. An ISP or local network can use DHCP so that devices receive addresses without requiring each one to be configured manually.
11. DNS: Resolving Internet Names
People generally find websites using names rather than numeric IP addresses. The Domain Name System (DNS) matches human-readable domain and host names to IP addresses.
DNS is analogous to a directory that maps names to telephone numbers. A computer needs the corresponding IP address to send traffic to a named internet resource.
DNS hierarchy and lookup
DNS is distributed and hierarchical rather than held in a single directory. A lookup may involve several sources:
A computer can check its local DNS cache or hosts file. The hosts file is a locally stored list of name-to-address associations, similar to a small personal directory.
If the answer is not available locally, the request can go to a DNS resolver, commonly provided by an ISP or another network service.
The resolver consults other DNS servers as needed, following the DNS hierarchy to find the relevant information.
Once the address is found, it is returned to the requesting computer, which can then contact the destination.
Organizations can operate DNS servers for names within their domains, while other DNS servers provide information farther up the hierarchy. Caching and redundancy help DNS handle many requests and avoid depending on a single server.
The DNS system includes root servers at the top of the hierarchy. There are 13 logically identified root-server systems, with multiple physical instances and replicas providing redundancy. Root servers help direct queries toward the appropriate top-level domain system, such as .com or .edu; they are part of a larger chain of resolution rather than a single directory containing every internet address.
DNS information must also be updated when a domain’s address changes. A new address may take time to appear consistently around the world because DNS records are cached and updates propagate over time.
Domain names and oversight
A top-level domain (TLD) is the final major component of a domain name, such as .com or .edu. Country-code top-level domains (ccTLDs) use country codes in the DNS naming system.
The Internet Assigned Numbers Authority (IANA) coordinates important aspects of internet names and number assignments, including information about top-level domains and the organizations responsible for their registries. Registry organizations may provide a WHOIS lookup service, which can reveal registration information associated with a domain. For example, an organization may maintain registration records for names within .edu.
Fully qualified domain names
A fully qualified domain name (FQDN) specifies a host’s full name within the DNS hierarchy. It combines the host name with its domain.
If the host is named
jupiterinmydomain.com, its FQDN isjupiter.mydomain.com.If it is part of a subdomain called
accounting, its FQDN isjupiter.accounting.mydomain.com.
An FQDN is the readable name associated with a network resource; DNS resolves that name to an IP address.
12. ARP: Connecting IP Addresses to MAC Addresses
IP addresses are used to route traffic across networks, while Ethernet uses MAC addresses to deliver frames on a LAN. Address Resolution Protocol (ARP) helps connect these two addressing systems on a local network.
Each device maintains an ARP cache containing mappings between local IP addresses and MAC addresses. If a device needs the MAC address associated with a local IP address and does not already have the mapping, it sends a request on the LAN. The device using that IP address can respond with its MAC address, allowing the sender to update its cache and deliver the Ethernet frame.
The overall sequence is therefore:
DNS resolves a domain name to an IP address when a name is used.
IP determines whether the destination is local or remote.
If the destination is local, ARP helps find its MAC address for Ethernet delivery.
If the destination is remote, the packet is sent to a router, which forwards it toward the destination network.
This illustrates why networking uses multiple kinds of addresses: each serves a different stage of communication.
13. TCP and UDP: Reliability and Efficiency
IP helps address and route packets, but applications also need ways to manage how data is delivered. Two important transport protocols are TCP and UDP.
TCP
Transmission Control Protocol (TCP) is connection-oriented and designed for reliable, ordered delivery. Before exchanging data, sender and receiver perform a series of communication steps called a handshake to establish that both sides are ready.
TCP then helps ensure that:
Data arrives at the intended recipient.
Missing data can be detected and retransmitted.
Corrupted data can be identified.
Data is reassembled in the correct order.
TCP adds communication overhead because the sender and receiver exchange information to establish communication and monitor delivery. This overhead is useful when completeness and accuracy matter—for example, when transferring a spreadsheet or other file that must arrive intact.
UDP
User Datagram Protocol (UDP) is a simpler, lower-overhead alternative. It does not itself provide TCP’s delivery confirmations, ordering guarantees, or retransmission process. This makes UDP less reliable at the transport-protocol level, but often more efficient.
UDP can suit audio or video streaming, where occasional missing or out-of-order data may have little effect on the overall experience. In such cases, receiving data quickly can matter more than retransmitting every missing piece. Other parts of an application may provide whatever additional reliability is needed.
The choice between TCP and UDP depends on the application’s priorities: TCP emphasizes reliable, ordered delivery, while UDP minimizes delivery-management overhead.
14. How the Pieces Work Together
A typical exchange between a computer and an internet service combines several protocols and types of addressing:
An application identifies the destination using a domain name.
DNS finds the IP address associated with that name.
IP compares the destination address with the sender’s own network information, using the subnet mask to determine whether the destination is local or remote.
For a remote destination, the packet is sent to a gateway or router, which forwards it toward the destination network.
On each local Ethernet network involved, MAC addresses support delivery of frames between neighboring devices. ARP can find the relevant local MAC address from an IP address.
TCP or UDP manages the transport of application data, depending on whether the application prioritizes reliability or lower overhead.
At the destination, the data is passed through the corresponding networking processes and delivered to the intended application.
Network communication depends on several cooperating systems: DNS maps names to IP addresses, IP directs packets between networks, Ethernet and MAC addresses support local delivery, ARP links local IP addresses to MAC addresses, and TCP or UDP manages transport behavior.

Ask anything
We've read this whole study set, so questions about it get the best answers.