Computer Networks Explained: Fundamentals, Types, Components, and Communication
Learn computer networking fundamentals, including devices, network types, topologies, protocols, OSI layers, addressing, performance, security, and troubleshooting.
A computer network is a group of connected devices that communicate and share resources. Devices may exchange data, use shared applications, access the Internet, or use services such as printing, file storage, authentication, and name resolution.
A standalone computer can run applications and store files by itself. It becomes part of a network when a network interface connects it to other devices and communication rules allow those devices to exchange information.
Why Networks Are Used
- Communication: Support messaging, voice calls, video meetings, and other forms of collaboration.
- File sharing: Allow users to access documents from shared storage or file servers.
- Shared Internet access: Let many devices use one connection to an Internet service provider.
- Shared applications: Provide access to web, database, business, and cloud applications.
- Centralized administration: Help administrators manage users, devices, security policies, and updates.
- Remote access: Connect users to services and systems in other buildings, cities, or countries.
Everyday Examples of Networks
- Home Wi-Fi: Phones, laptops, televisions, printers, and smart devices connect through a wireless router. The router usually provides local addressing, Internet access, and the default gateway.
- Small-office network: Employee computers, printers, servers, and wireless access points connect to switches. A router or firewall connects the office to the Internet.
- School or campus network: Multiple buildings may contain separate local networks connected by a larger campus infrastructure.
- Enterprise network: A company may connect offices, data centers, cloud services, remote workers, voice systems, and security tools.
- The Internet: The Internet is a global interconnection of independent networks. Home LANs, campus networks, and enterprise WANs can connect to it through providers and routers.
Endpoints and Infrastructure Devices
An end device, also called a host, is a device at the edge of a network that sends or receives data. Examples include desktop PCs, laptops, phones, servers, network printers, IP phones, cameras, sensors, and other IoT devices.
Intermediary devices connect endpoints and move, filter, or control traffic between them.
| Device | Primary function | Typical layer association | Example use |
|---|---|---|---|
| Network interface card | Connects a device to Ethernet or Wi-Fi | Physical and data link | Laptop Wi-Fi adapter or desktop Ethernet adapter |
| Switch | Forwards Ethernet frames, generally using MAC addresses | Data link | Connects office computers on a LAN |
| Router | Forwards IP packets between separate networks | Network | Connects a LAN to an ISP or another site |
| Wireless access point | Provides Wi-Fi clients access to a wired network | Physical and data link | Provides wireless coverage in an office |
| Firewall | Applies traffic-control and security policies | Several layers, depending on features | Blocks unauthorized inbound connections |
| Modem | Converts signals for a particular provider access technology | Physical and data link | Connects a home network to a cable or DSL service |
A consumer wireless router often combines several roles: wireless access point, Ethernet switch, router, firewall, DHCP server, and sometimes modem. In larger networks, these functions are commonly provided by separate devices.
Transmission Media
| Medium | Characteristics | Typical use |
|---|---|---|
| Copper Ethernet | Uses electrical signals; practical, inexpensive, and commonly used for short LAN connections. It can be affected by electromagnetic interference and has distance limits. | Desktop connections, switches, IP phones, and access points |
| Fiber optic | Uses light; supports long distances, high speeds, and strong resistance to electromagnetic interference. It generally costs more and requires appropriate optical equipment. | Building backbones, data centers, and provider links |
| Wireless radio | Provides mobility without a cable, but performance depends on distance, obstacles, interference, channel use, and signal quality. | Phones, laptops, tablets, and IoT devices |
Network Size and Scope
| Type | Typical coverage | Example | Common technologies |
|---|---|---|---|
| PAN | A person’s immediate area | Phone connected to a wearable | Bluetooth and other short-range technologies |
| LAN | Home, office, room, or building | Office Ethernet network | Ethernet and switching |
| WLAN | A local area served wirelessly | Home Wi-Fi | Wi-Fi and wireless access points |
| MAN | A city or metropolitan region | Interconnected municipal or campus-area sites | Provider or metro Ethernet services |
| WAN | Large geographic areas | Company branches connected across countries | Leased circuits, provider networks, VPNs, and Internet connections |
| Internet | Global interconnection of networks | A website reached from a home LAN | TCP/IP, routers, providers, and many underlying link technologies |
A LAN normally covers a limited location. A WAN connects separate LANs across distance. The Internet is not one large LAN; it is a collection of interconnected networks that use routers and common protocols.
Network Topology
Topology describes the layout or communication structure of a network. Physical topology shows where cables, radios, and devices are located. Logical topology shows how traffic flows, which devices share a network, and how addressing or forwarding decisions organize communication.
Common Topologies
- Star: Endpoints connect to a central switch or access point. This is the common design for modern Ethernet LANs. A single endpoint cable can fail without usually affecting others, but failure of the central device can affect many connections.
- Bus: Devices share one main communication path. It uses less central equipment but has limited scalability and can be difficult to troubleshoot. It is uncommon in modern switched Ethernet LANs.
- Ring: Devices form a loop. A break can disrupt communication unless the design includes a protection mechanism.
- Mesh: Devices have multiple interconnections. Mesh designs can provide strong resilience but require more links, equipment, configuration, and cost.
- Hybrid: Combines two or more designs, such as star-connected buildings joined by redundant mesh-like provider links.
Topology affects resilience, cost, scalability, and troubleshooting. More redundant paths can improve availability, but they also increase design complexity and may require loop-prevention mechanisms.
How Data Travels
Applications usually produce more data than a network sends as one indivisible block. Network protocols divide data into smaller units. Breaking data into units makes transmission, error handling, sharing of link capacity, and forwarding more practical.
At a basic level, an application on a source host creates data. Protocols add control information, and the host sends the result through its network interface. On an Ethernet LAN, the local unit is a frame. A frame commonly carries an IP packet. A switch examines local Ethernet information and forwards the frame toward the destination interface.
If the destination is outside the source host’s local subnet, the source sends the frame to its default gateway. The gateway router removes the local frame information, examines the destination IP address, selects a route, and creates a new link-layer frame for the next network. Routers repeat this process until the packet reaches the destination network.
| Communication type | Destination location | Primary addressing used | Infrastructure involved |
|---|---|---|---|
| Local delivery | Same local network or subnet | Destination IP plus local MAC address | Network interface, switch, and possibly access point |
| Remote delivery | Another subnet or network | Destination IP for routing; gateway MAC on the local link | Network interface, switch, default gateway, and one or more routers |
Addressing information tells devices where data should go. The sender must determine whether the destination is local or remote and then use the appropriate local delivery or routing behavior.
Addresses and Naming
- MAC address: A link-layer identifier associated with a network interface. Switches use MAC addresses to forward Ethernet frames on a local network. A MAC address is not a universal Internet location.
- IP address: A logical address assigned to an interface on an IP network. Routers use destination IP addresses to forward packets between networks.
- Subnet mask or prefix length: Identifies which bits represent the network portion and which represent the host portion of an IP address. For example,
/24is equivalent to255.255.255.0for IPv4. - Default gateway: The local router address used when a destination is outside the host’s local network.
- DNS: The Domain Name System translates human-readable names such as a website domain into IP addresses. It avoids requiring users to remember numeric addresses.
Common client settings include an IP address, subnet mask or prefix, default gateway, and DNS server. DHCP can supply these settings automatically.
Protocols and Standards
A protocol is an agreed set of rules for communication. Protocols define such details as message format, addressing, timing, error handling, and what happens when communication succeeds or fails.
TCP/IP is both a practical protocol suite and a way of organizing modern network communication. Recognizable examples include:
- Ethernet: Wired LAN communication.
- Wi-Fi: Wireless LAN communication.
- IP: Logical addressing and routing.
- TCP: Reliable, connection-oriented transport with sequencing and retransmission.
- UDP: Lightweight transport without TCP’s built-in delivery guarantees.
- HTTP and HTTPS: Web communication; HTTPS adds protection using encryption and authentication mechanisms.
- DHCP: Automatic IP configuration.
- DNS: Name resolution.
- ICMP: Network control and diagnostic messages, including those used by ping.
Standards organizations help create interoperable technologies. The IEEE develops many LAN and wireless standards, the IETF publishes Internet standards and RFCs, and the ISO develops international standards, including the OSI reference model.
Layered Network Models
Networking is described in layers so complex communication can be divided into manageable responsibilities. A change in one layer can often occur without redesigning every other layer. Layers also provide a useful troubleshooting structure.
| OSI layer | TCP/IP layer | Primary purpose | Examples |
|---|---|---|---|
| 7. Application | Application | Provides network services to applications | HTTP, HTTPS, DNS, DHCP, email protocols |
| 6. Presentation | Application | Represents, formats, compresses, or encrypts data | Data encoding and encryption functions |
| 5. Session | Application | Manages conversations or sessions | Session control functions |
| 4. Transport | Transport | Provides end-to-end delivery, ports, and optional reliability | TCP and UDP |
| 3. Network | Internet | Provides logical addressing and routing | IP, routers, and ICMP |
| 2. Data link | Link or Network access | Uses local frames, MAC addresses, and link access rules | Ethernet, Wi-Fi, switches, and network interface cards |
| 1. Physical | Link or Network access | Transmits bits as electrical, optical, or radio signals | Copper, fiber, radio, connectors, and signals |
The OSI model has seven conceptual layers. The TCP/IP model groups some OSI functions together and reflects the protocol suite used by Internet networks. For a related layer-by-layer reference, see OSI Reference Model.
Client-Server and Peer-to-Peer Communication
In the client-server model, a client requests a service and a server provides it. A browser is a client when it requests a web page. A web server responds with application content. Other examples include email servers, file servers, print servers, DNS servers, and authentication servers.
Client-server designs centralize management, data, access control, and backups. They can offer consistent service, but a failed or overloaded server can affect many clients unless redundancy is provided.
In peer-to-peer communication, devices can act as both clients and providers. A computer might share a folder or printer directly with another computer. Peer-to-peer sharing can be simple and inexpensive for small groups, but it usually provides less centralized administration, auditing, backup control, and predictable service availability.
Common Network Services
- DHCP: Automatically assigns IP addresses, prefixes or masks, gateways, DNS servers, and other options.
- DNS: Resolves names to IP addresses and can provide other records used by applications.
- Web and application services: Deliver websites, APIs, databases, business applications, and cloud workloads.
- File and print services: Provide shared documents and network printing.
- Email services: Send, receive, store, and retrieve electronic mail.
- Authentication and directory services: Verify identities and organize users, devices, groups, and access policies.
Basic Network Performance Concepts
| Metric | What it measures | Effect on users |
|---|---|---|
| Bandwidth | The theoretical capacity of a link | Higher capacity can support more simultaneous traffic, but does not guarantee fast applications |
| Throughput | The actual rate of successfully delivered data | Shows what applications really receive after overhead, congestion, and errors |
| Latency | The time required for data to travel between points | High latency makes interactive applications feel slow |
| Jitter | Variation in packet delay | Unstable delay can disrupt voice and video |
| Packet loss | Packets that fail to reach their destination | Can cause retransmissions, poor audio, frozen video, or failed applications |
| Duplex | Whether communication is one-way at a time or simultaneous in both directions | A duplex mismatch can cause severe performance problems |
| Link speed | The negotiated or configured rate of a connection | A faulty cable or interface may negotiate a lower speed |
Advertised bandwidth is not the same as application performance. Protocol overhead, Wi-Fi contention, congestion, server capacity, latency, packet loss, and other users all affect throughput and responsiveness.
Availability, Security, and Reliability
Networks require controlled access and protection of data. Authentication verifies identity, while authorization determines what an authenticated user or device may do. Encryption protects data from being read by unauthorized parties. Segmentation separates traffic into controlled zones, and firewalls enforce traffic policies between those zones.
Good fundamentals include strong unique passwords, multi-factor authentication where available, secure wireless settings, timely software and firmware updates, malware protection, phishing awareness, least-privilege access, and encrypted protocols such as HTTPS. Redundant links, backup devices, tested recovery procedures, and regular data backups improve reliability and availability.
Common risks include unauthorized access, malware, phishing, weak passwords, exposed services, outdated software, misconfiguration, and insecure wireless settings. Security is a continuing process rather than a single device or configuration.
Practical Network Examples
Accessing a Website
- A user enters a domain name in a browser.
- The client asks DNS for the domain’s IP address.
- The client compares the destination with its local subnet. If the destination is remote, it sends the traffic to the default gateway.
- A switch forwards the local frame, and routers forward the packet across networks.
- The web server receives the request and responds. HTTPS protects the application conversation.
Printing a Document
The computer identifies a printer by name or IP address. If both devices are on the same subnet, a switch forwards local Ethernet traffic. If the printer is on another subnet, the computer sends the traffic to its default gateway for routing.
Wired and Wireless Access
A desktop may use Ethernet for stable, low-interference connectivity, while a phone uses Wi-Fi for mobility. Both can access the same LAN and Internet services through switches, wireless access points, routers, and security controls.
Basic Connectivity Verification
Check from the nearest layer outward: physical connection, interface status, local addressing, local reachability, gateway reachability, remote IP reachability, and finally name resolution and application access.
Windows IP configuration check:
ipconfig /all
Linux interface and address check:
ip addr
macOS interface check where applicable:
ifconfig
Basic reachability test:
ping <destination>
Route path test:
Windows: tracert <destination>
Linux/macOS: traceroute <destination>
DNS lookup:
nslookup <domain>
Neighbor or ARP cache:
arp -aipconfig /all displays adapter status, IPv4 or IPv6 addresses, masks, gateways, DNS servers, and DHCP information. ping tests basic IP reachability and response time. A route-path command shows the sequence of routed hops. nslookup helps separate DNS problems from general IP connectivity problems. arp -a displays cached local IP-to-MAC mappings.
Step-by-Step Troubleshooting
No Network Resource Is Reachable
- Confirm power, cable connection, link lights, adapter status, and Wi-Fi association.
- Check whether the wireless client is in range and connected to the intended network.
- Inspect the IP configuration and determine whether DHCP supplied valid settings.
- Likely causes include a disconnected cable, disabled adapter, incorrect Wi-Fi connection, or failed DHCP assignment.
Local Devices Work but Internet Sites Do Not
- Verify the default gateway.
- Ping the default gateway.
- Check router or firewall connectivity to the ISP.
- Likely causes include a missing gateway, router outage, ISP issue, or outbound firewall policy.
An IP Address Works but a Website Name Does Not
- Run
nslookup <domain>. - Review configured DNS server addresses.
- Compare name-based access with direct IP-based access where appropriate.
- Likely causes include incorrect DNS configuration, an unavailable DNS server, or a missing or incorrect DNS record.
Slow Network or Unstable Video Calls
- Determine whether the problem is wired, wireless, local, or Internet-wide.
- Measure latency and packet loss with
ping. - Check Wi-Fi signal strength, interference, congestion, and negotiated link speed.
- Look for high bandwidth usage, overloaded equipment, faulty cables, or faulty interfaces.
IP Address Present but Local Communication Fails
- Confirm that both devices are in the same subnet when local communication is expected.
- Check VLAN membership and wireless client-isolation settings.
- Inspect ARP or neighbor information.
- Review host firewall rules and check for duplicate IP addresses.
Common Network Terms
| Term | Definition | Why it matters |
|---|---|---|
| Host | An endpoint device connected to a network | Hosts originate or receive application traffic |
| Server | A system that provides a service or resource | Central services support many clients |
| Client | A device or application that requests a service | It initiates requests to servers or peers |
| Frame | A data-link-layer unit, commonly used by Ethernet | Switches forward local frames |
| Packet | A network-layer unit, commonly associated with IP | Routers forward packets between networks |
| LAN | A network serving a limited location | Defines a common local scope |
| WAN | A network connecting sites across large distances | Supports branch and remote-site communication |
| Protocol | A defined set of communication rules | Allows independent systems to interoperate |
Key CCNA Takeaways
- Switches primarily forward local Ethernet frames using MAC addresses.
- Routers forward IP packets between different networks.
- A host uses its subnet information to decide whether a destination is local or remote.
- The default gateway is used for remote destinations.
- DNS resolves names; it does not replace IP routing.
- Frames are associated with the data-link layer, while packets are associated with the network layer.
- Layers provide a framework for understanding encapsulation, device roles, protocols, and troubleshooting.
- Bandwidth, throughput, latency, jitter, loss, duplex, and link speed describe different aspects of performance.