Computer networks connect devices so they can exchange information, share resources, and access services. They power everyday activities such as sending emails, streaming videos, joining video calls, printing documents wirelessly, and accessing websites. Although these activities may seem different, they rely on the same basic principle: devices follow agreed-upon rules to transmit data across connected systems.
A computer network consists of two or more computing devices connected through wired or wireless communication links. These devices may include computers, smartphones, servers, printers, routers, and smart appliances. Some networks operate within a single room or building, while others connect devices across countries and continents.
Understanding computer networks requires examining three closely related aspects: their types, their architecture, and the processes that allow devices to communicate. Network types describe the scope and purpose of a network, architecture explains how its components are organized, and communication protocols define how information moves between devices.
What is a computer network?
A computer network is a system of interconnected devices that exchange data using communication technologies and established protocols. A connection may use an Ethernet cable, fiber-optic cable, Wi-Fi radio signals, or another transmission medium.
Networks allow devices to perform tasks that would be difficult or inefficient in isolation. Employees can access shared files, students can use online learning platforms, and businesses can operate applications hosted on remote servers. Networks also enable distributed computing, in which multiple computers cooperate to complete tasks or provide services.
Most networks contain several fundamental components.
- End devices: Computers, phones, servers, printers, and other devices that send or receive data.
- Transmission media: The physical or wireless paths that carry information between devices.
- Networking devices: Equipment such as switches, routers, wireless access points, and modems that connect devices or direct traffic.
- Network protocols: Rules that determine how data is formatted, transmitted, received, and interpreted.
- Network software: Operating systems, applications, and management tools that use or control network resources.
These components work together. For example, when someone opens a website on a laptop, the browser creates a request, the laptop sends data through its network connection, networking equipment forwards the request toward the destination, and a server returns the requested content.
The network does not need to understand the meaning of every message it carries. Its primary responsibility is to deliver data according to the relevant protocols and network conditions.
Types of computer networks
Computer networks are commonly classified by the geographic area they cover, the devices they connect, and the purposes they serve. The boundaries between categories are not always strict, and a single network may belong to several categories at once.
Personal area networks (PANs)
A personal area network connects devices within a small area around an individual. It typically supports short-range communication between personal electronics.
For example, a smartphone may connect to wireless earbuds through Bluetooth, communicate with a smartwatch, or share an internet connection with a nearby laptop. These connections form a small network centered on the user’s devices.
PANs generally emphasize convenience, low power consumption, and short-range connectivity. They may use Bluetooth, USB, or other technologies, depending on the devices and application.
Local area networks (LANs)
A local area network connects devices within a limited area, such as a home, office, school, or laboratory. LANs commonly use Ethernet cables, Wi-Fi, or a combination of both.
In a home network, a router may connect laptops, televisions, phones, and other devices. Within an office, a LAN may allow employees to access shared printers, internal applications, and file servers.
LANs are usually managed by an individual, household, business, or institution. They often provide relatively high data-transfer speeds and low communication delays over short distances.
A wireless local area network, or WLAN, is a LAN that uses wireless connections, most commonly Wi-Fi. The terms are closely related, but LAN describes the network’s scope, whereas WLAN specifies a wireless implementation.
Metropolitan area networks (MANs)
A metropolitan area network connects multiple networks across a city or a similarly sized geographic region. It may link university campuses, government buildings, business offices, or other sites.
For example, an organization with offices in several parts of a city may use a metropolitan network to connect its local networks. The connections might rely on fiber-optic infrastructure operated by a telecommunications provider.
MANs occupy a middle ground between local networks and wide area networks. In practice, the term is less prominent in everyday networking than LAN and WAN, and some metropolitan deployments are described instead by their underlying technology or service.
Wide area networks (WANs)
A wide area network connects devices or smaller networks across large geographic distances. It may span multiple cities, countries, or continents.
Businesses use WANs to connect branch offices, data centers, and remote employees. Telecommunications providers operate infrastructure that carries traffic between distant networks, often using fiber-optic cables, leased connections, and other long-distance technologies.
The internet is the most familiar example of a global network built from interconnected networks, although it is not simply one privately controlled WAN. It is a vast collection of independently operated networks that exchange traffic using common protocols.
WAN connections often involve more networking equipment, longer transmission paths, and greater communication delays than connections within a typical LAN.
Other important network categories
Geographic size is only one way to classify networks. Several other categories describe how networks are used or organized.
A storage area network (SAN) provides specialized, high-speed connectivity between servers and storage systems. It allows computing systems to access shared storage through a dedicated storage network.
A virtual private network (VPN) creates an encrypted or otherwise protected logical connection across an underlying network, often the public internet. VPNs can help remote employees access organizational resources or protect traffic between devices and a VPN service. A VPN does not automatically make all online activity anonymous or eliminate every security risk.
A wireless sensor network connects sensors that collect and exchange information about conditions such as temperature, pressure, movement, or air quality. Such networks are used in industrial monitoring, agriculture, environmental research, and building automation.
An intranet is a private network or set of internal services intended for an organization. An extranet extends selected access to authorized external parties, such as suppliers or business partners. These terms describe access and purpose rather than geographic coverage.
The categories overlap. A business might use a LAN inside each office, a WAN to connect offices, a VPN for remote access, and a SAN to connect servers to storage.
Computer network architecture
Network architecture describes how a network is structured, how its components interact, and where responsibilities are assigned. Two particularly important distinctions are the organization of communicating devices and the layered design of network protocols.
Client-server and peer-to-peer networks
In a client-server architecture, some computers or software systems provide services, while other devices request them. A device or application making a request is called a client; the system responding is called a server.
When someone signs in to an online banking service, for example, a client application sends requests to servers that process authentication, retrieve account information, and return responses. Servers may also communicate with databases and other services to complete the request.
This arrangement centralizes many responsibilities, making it easier to manage access, maintain data, apply updates, and enforce security policies. However, a server can become a bottleneck or a point of failure if the system lacks sufficient capacity or redundancy. Large services often address these problems by distributing workloads across multiple servers.
In a peer-to-peer architecture, devices can communicate and share resources directly without relying on one central server for every interaction. A peer may act as both a requester and a provider of data.
Peer-to-peer designs can distribute workloads and reduce dependence on a central service. However, they may make coordination, access control, and consistent management more difficult. Some systems combine peer-to-peer communication with centralized services for tasks such as discovering other devices or coordinating activity.
These architectures are not mutually exclusive. A network can use client-server applications for some tasks and peer-to-peer communication for others.
Network topologies
A network’s topology describes how its devices and connections are arranged. The physical topology concerns actual cabling and equipment, while the logical topology describes how data moves through the network. The two do not always match.
A star topology connects devices to a central switch or access point. It is common in modern Ethernet LANs and many Wi-Fi networks. A failed individual cable may disconnect one device without affecting the others, but failure of the central device can disrupt much of the network.
A bus topology connects multiple devices to a shared communication line. Because devices share the same medium, they must coordinate access to avoid interfering with one another. Traditional shared-coaxial Ethernet used this arrangement, but it is uncommon in modern office LANs.
A ring topology connects devices in a loop, with each device linked to neighboring devices. Depending on the technology, data may travel around the ring in one or both directions. Ring arrangements can support predictable communication patterns, although their resilience depends on how the network handles failed links or devices.
A mesh topology provides multiple connections between devices or network nodes. A full mesh connects every node directly to every other node, while a partial mesh provides selected redundant paths. Mesh arrangements can improve resilience because traffic may be rerouted when a link fails, but additional connections increase complexity and cost.
Real networks often combine these patterns. A home may use a star-shaped Ethernet network, a wireless mesh system for broader coverage, and connections to a service provider’s much larger network.
The layered architecture of network communication
Network communication is complex because it involves many distinct tasks, from applications requesting information to electrical signals or radio waves carrying bits. Layered architecture divides these tasks into manageable responsibilities.
The two most widely discussed models are the OSI model and the TCP/IP model.
The OSI model describes networking in seven layers:
- Physical: Transmits raw bits through electrical signals, light, or radio waves.
- Data link: Moves frames between devices on the same local link and handles functions such as local addressing and error detection.
- Network: Routes packets between networks using logical addresses.
- Transport: Provides communication between applications, including reliability and delivery controls when supported by the protocol.
- Session: Describes the establishment, management, and termination of communication sessions.
- Presentation: Describes how data is represented, encoded, compressed, or encrypted.
- Application: Supports network services used by applications, such as web access and email.
The OSI model is primarily a conceptual framework for understanding networking functions. Real protocols do not always fit neatly into one layer, and some functions associated with the session and presentation layers are implemented within application protocols or libraries.
The TCP/IP model reflects the architecture used by the internet more directly. A common version has four layers:
- Link: Communication over the local network connection, including technologies such as Ethernet and Wi-Fi.
- Internet: Addressing and routing packets between networks, primarily through IP.
- Transport: Communication between applications using protocols such as TCP and UDP.
- Application: Protocols and services such as HTTP, DNS, and email protocols.
Some descriptions divide the link layer into separate physical and data-link layers, producing a five-layer teaching model. These differences reflect how networking functions are grouped, not fundamentally different ways the internet operates.
Layering makes it possible for technologies to evolve independently. A web browser can use HTTP without needing to know whether its data crosses a Wi-Fi link, an Ethernet cable, or a fiber-optic connection. Each layer relies on the services below it while providing services to the layer above.
How computer networks communicate
Network communication begins when an application needs to exchange information with another system. The information may be a web request, a message, a file, a video stream, or a command sent to a remote device.
The sending and receiving systems must use compatible protocols, and the intervening network must provide a path for the data. Communication can be divided into several stages, although the exact sequence depends on the application and the protocols involved.
Data is divided into manageable units
Applications produce data in forms that may be much larger than the units carried by a particular network link. Protocols organize this data into manageable units, often called segments, datagrams, or packets, depending on the layer and protocol.
For example, TCP divides a stream of application data into segments. IP carries data in packets, which are commonly called IP packets. At the local network level, Ethernet and Wi-Fi carry frames.
These terms are related but not interchangeable. Each describes a unit of data at a particular layer. A single application message may be divided into multiple transport segments, carried in IP packets, and transmitted in link-layer frames.
Each layer may add a header containing control information. A header can identify the intended destination, specify the protocol in use, support error detection, or provide information needed to reassemble the original data. This process is called encapsulation.
As data travels down the protocol layers, it receives the information needed for transmission. At the destination, the receiving system processes the corresponding headers and passes the recovered data upward to the appropriate application.
Devices use addresses to identify destinations
Networks need ways to identify both devices and the applications that should receive data.
An IP address identifies a network interface within the Internet Protocol addressing system. IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses. IP addresses allow packets to be directed across interconnected networks, although address assignment, translation, and routing can affect how a device is reached.
A MAC address is a link-layer address used by technologies such as Ethernet and Wi-Fi to identify interfaces on a local network. Its role differs from that of an IP address: MAC addressing supports delivery over a local link, while IP addressing supports communication across networks.
A port number identifies a particular transport-layer endpoint associated with an application or service. A computer can run a web browser, an email application, and other network programs at the same time. Port numbers help the operating system direct incoming transport traffic to the appropriate process or service.
A domain name, such as a website’s human-readable name, is easier for people to remember than a numerical IP address. The Domain Name System (DNS) translates domain names into records that can include IP addresses and other information needed to locate services.
These identifiers solve different problems. DNS helps discover the address associated with a name, IP addresses support routing, link-layer addresses support local delivery, and transport-layer ports help identify the receiving application.
Switches and routers move data through the network
Networking devices help data reach its destination by making forwarding decisions at different layers.
A network switch typically connects devices within a LAN. An Ethernet switch learns which MAC addresses are reachable through its ports and uses that information to forward frames toward their destinations. This reduces unnecessary delivery of ordinary unicast traffic to unrelated ports.
A router connects different IP networks. It examines packet headers, consults its routing information, and forwards packets toward the next appropriate destination. A router may connect a home LAN to an internet service provider, or it may form part of a large network operated by a telecommunications company.
Routers do not generally need to know the entire route that a packet will take. Each router makes a forwarding decision based on the destination address and its available routing information. The next router repeats the process, allowing the packet to cross multiple networks.
A wireless access point allows wireless devices to communicate with a local network over Wi-Fi. A modem adapts signals or performs other functions required by a particular access technology, such as cable or DSL. In many homes, one physical device combines routing, switching, wireless access, and modem functions.
The distinction matters because network equipment performs different jobs even when several functions are packaged into one unit.
What happens when someone opens a website
Opening a website illustrates how these mechanisms work together.
First, the browser identifies the server it needs to contact. If the browser does not already have usable DNS information, the system may send a DNS query to resolve the website’s domain name. The answer helps the client identify an address for the destination.
Next, the client establishes the necessary transport connection. When using TCP, this usually involves a handshake that establishes connection state and helps synchronize communication. If the website uses HTTPS, the client and server also perform the security procedures needed to establish encrypted communication, typically using TLS. Modern web protocols can also use QUIC, which provides transport functions over UDP and integrates TLS-based security.
The browser then sends an HTTP request, such as a request for a web page. The request is encapsulated within the relevant transport, IP, and link-layer protocols. On a local network, the device sends the data through Wi-Fi or Ethernet to the next network device, often a router.
As the packets move through the internet, routers forward them toward the server. Different packets in a communication may travel along different paths, depending on network routing and conditions. The destination server receives the data, processes the request, and sends a response.
The response travels back through the network to the client. The browser processes the returned information and displays the page. A modern website may require additional requests for scripts, stylesheets, images, fonts, and other resources, so loading a page can involve many separate exchanges.
The entire process depends on several layers cooperating correctly. DNS must provide useful name-resolution information, routing must deliver packets, transport mechanisms must support the communication, and the application protocol must define how requests and responses are interpreted.
The protocols that make networks interoperable
A network protocol is a set of rules governing communication. Protocols define matters such as message formats, addressing, timing, error handling, and the actions devices take when they receive particular information.
Without shared protocols, devices made by different manufacturers could not reliably interpret one another’s messages. Standardized protocols allow diverse hardware and software to communicate without requiring every device to use the same internal design.
Several protocols are especially important to understanding modern networks.
Internet Protocol (IP) provides addressing and packet delivery across interconnected networks. IP offers a best-effort service: it attempts to deliver packets according to network routing but does not itself guarantee that every packet arrives, arrives only once, or arrives in the original order.
Transmission Control Protocol (TCP) provides a reliable, ordered byte stream between communicating endpoints. It uses acknowledgments, retransmissions, sequence information, and flow and congestion control to manage data delivery. Applications do not receive TCP’s internal segment boundaries as part of the byte stream.
User Datagram Protocol (UDP) provides a simpler datagram-based transport service without TCP’s built-in delivery and ordering guarantees. Applications can use UDP when low overhead, message boundaries, or application-controlled recovery are important. Real-time communication and certain internet protocols use UDP, often with additional mechanisms at higher layers.
Hypertext Transfer Protocol (HTTP) defines how clients and servers exchange web-related requests and responses. HTTPS uses HTTP over a secure connection, commonly provided by TLS, to protect the confidentiality and integrity of transmitted data and authenticate the server.
Domain Name System (DNS) helps applications locate services by resolving domain names and other queries into records. Dynamic Host Configuration Protocol (DHCP) can automatically provide devices with network configuration information, such as an IP address, a subnet mask, a default gateway, and DNS server addresses.
These protocols complement one another rather than compete. A browser might use DNS to find a server, TCP or QUIC to support communication, IP to move packets between networks, and Ethernet or Wi-Fi to transmit data over the local connection.
How networks handle errors, congestion, and changing conditions
Networks operate in environments where links can fail, devices can disconnect, and traffic can exceed available capacity. Reliable communication therefore depends on more than simply sending data.
Error detection and retransmission
Signals can be affected by interference, damaged cables, radio noise, and other physical conditions. Protocols use techniques such as checksums and cyclic redundancy checks to detect certain kinds of corruption.
Error detection does not necessarily repair corrupted data. Depending on the protocol, the receiver may discard a damaged unit, request retransmission, or rely on a higher layer to recover the information.
TCP, for example, uses acknowledgments and retransmissions to recover from data loss under many conditions. Some link-layer technologies also retransmit damaged or unacknowledged frames. These mechanisms operate at different layers and address different parts of the communication process.
Flow control and congestion control
Flow control prevents a sender from overwhelming a receiver that cannot process incoming data quickly enough. TCP uses receiver-advertised limits to help regulate how much unacknowledged data the sender may have in flight.
Congestion control addresses a different problem: too much traffic competing for limited network capacity. When congestion develops, queues grow, delays increase, and packets may be dropped. TCP congestion-control algorithms adjust transmission rates in response to signals such as packet loss or changes in measured network behavior.
Without congestion control, aggressive senders could worsen network overload. By regulating traffic, transport protocols help shared networks remain usable for multiple communicating systems.
Latency, bandwidth, and throughput
Three measurements help explain why a network can feel slow even when it has a fast connection.
Bandwidth describes the data-carrying capacity of a link or connection, commonly expressed in bits per second. A connection with higher bandwidth can support a greater rate of data transfer under suitable conditions.
Latency is the time required for data to travel between endpoints or for a particular operation to complete. It is often measured using round-trip time, which records how long it takes for a message to reach a destination and a response to return. Distance, processing, and queuing can all contribute to latency.
Throughput is the actual rate at which data is transferred successfully over a period of time. It depends on bandwidth, protocol overhead, congestion, signal quality, and the capabilities of the sending and receiving systems.
A high-bandwidth connection can still perform poorly for an interactive application if latency is high. Conversely, a low-bandwidth connection may be sufficient for text messaging or simple remote control if delays are small and the data volume is modest.
The amount of data in transit also matters. Even on a fast link, a large transfer may take time because of finite capacity, while a small request can be delayed by several sequential exchanges.
Network security and the protection of data
Connecting devices creates opportunities for collaboration, but it also creates paths through which attackers may attempt to access systems or intercept information. Network security combines technical controls, careful configuration, monitoring, and sound operational practices.
Encryption transforms readable information into a form that unauthorized parties cannot readily interpret without the required keys. Properly implemented TLS can protect data exchanged between a client and server against eavesdropping and tampering while helping authenticate the server.
Authentication verifies an identity, while authorization determines what that identity is permitted to do. A user may successfully sign in to a network but still lack permission to access a particular file, application, or administrative function.
Firewalls enforce rules about which network traffic is allowed or blocked. Depending on their capabilities and configuration, they may inspect addresses, ports, connection state, or application-level information. Firewalls can reduce exposure, but they cannot eliminate every threat.
Network segmentation divides a network into separate areas with controlled communication between them. For example, an organization may isolate guest Wi-Fi from internal business systems. Segmentation can limit the movement of an attacker who compromises one device, provided the boundaries and access rules are properly designed.
Intrusion detection and prevention systems monitor traffic or system activity for patterns associated with malicious behavior. Such tools can help identify or block attacks, although their effectiveness depends on configuration, visibility, and the accuracy of their detection methods.
Security also depends on keeping software updated, removing unnecessary services, protecting credentials, and limiting administrative privileges. Encryption alone does not prevent compromised devices, stolen passwords, or attacks that exploit vulnerable software.
How modern networks work together
Computer networks are not isolated systems with sharply defined boundaries. They form interconnected layers of infrastructure, from short-range connections between personal devices to global systems that deliver applications across the internet.
A smartphone may connect to a home Wi-Fi network, which forwards traffic through a router to an internet service provider. The provider exchanges traffic with other networks, and routers along the path deliver packets toward a remote server. That server may run in a data center with its own local networks, load balancers, storage systems, and security controls.
Each part of this path can use different physical technologies while relying on compatible higher-level protocols. Ethernet, Wi-Fi, and fiber-optic links differ in how they carry signals, but IP allows packets to move across networks that use these different link technologies.
This separation of responsibilities is one of networking’s central strengths. Hardware can improve, transmission media can change, and applications can evolve without requiring every part of the system to be redesigned simultaneously. As long as the relevant protocols remain compatible and the network has a functioning path between endpoints, diverse systems can continue to exchange information.
Computer networks therefore work not because every device is identical, but because independently designed components follow shared rules. Network types determine the scale and purpose of connections, architecture organizes the participating systems, and communication protocols coordinate the movement and interpretation of data. Together, these principles make reliable communication possible across devices, organizations, and the global internet.