CCNA online course

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.

DevicePrimary functionTypical layer associationExample use
Network interface cardConnects a device to Ethernet or Wi-FiPhysical and data linkLaptop Wi-Fi adapter or desktop Ethernet adapter
SwitchForwards Ethernet frames, generally using MAC addressesData linkConnects office computers on a LAN
RouterForwards IP packets between separate networksNetworkConnects a LAN to an ISP or another site
Wireless access pointProvides Wi-Fi clients access to a wired networkPhysical and data linkProvides wireless coverage in an office
FirewallApplies traffic-control and security policiesSeveral layers, depending on featuresBlocks unauthorized inbound connections
ModemConverts signals for a particular provider access technologyPhysical and data linkConnects 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

MediumCharacteristicsTypical use
Copper EthernetUses 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 opticUses 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 radioProvides 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

TypeTypical coverageExampleCommon technologies
PANA person’s immediate areaPhone connected to a wearableBluetooth and other short-range technologies
LANHome, office, room, or buildingOffice Ethernet networkEthernet and switching
WLANA local area served wirelesslyHome Wi-FiWi-Fi and wireless access points
MANA city or metropolitan regionInterconnected municipal or campus-area sitesProvider or metro Ethernet services
WANLarge geographic areasCompany branches connected across countriesLeased circuits, provider networks, VPNs, and Internet connections
InternetGlobal interconnection of networksA website reached from a home LANTCP/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 typeDestination locationPrimary addressing usedInfrastructure involved
Local deliverySame local network or subnetDestination IP plus local MAC addressNetwork interface, switch, and possibly access point
Remote deliveryAnother subnet or networkDestination IP for routing; gateway MAC on the local linkNetwork 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, /24 is equivalent to 255.255.255.0 for 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 layerTCP/IP layerPrimary purposeExamples
7. ApplicationApplicationProvides network services to applicationsHTTP, HTTPS, DNS, DHCP, email protocols
6. PresentationApplicationRepresents, formats, compresses, or encrypts dataData encoding and encryption functions
5. SessionApplicationManages conversations or sessionsSession control functions
4. TransportTransportProvides end-to-end delivery, ports, and optional reliabilityTCP and UDP
3. NetworkInternetProvides logical addressing and routingIP, routers, and ICMP
2. Data linkLink or Network accessUses local frames, MAC addresses, and link access rulesEthernet, Wi-Fi, switches, and network interface cards
1. PhysicalLink or Network accessTransmits bits as electrical, optical, or radio signalsCopper, 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

MetricWhat it measuresEffect on users
BandwidthThe theoretical capacity of a linkHigher capacity can support more simultaneous traffic, but does not guarantee fast applications
ThroughputThe actual rate of successfully delivered dataShows what applications really receive after overhead, congestion, and errors
LatencyThe time required for data to travel between pointsHigh latency makes interactive applications feel slow
JitterVariation in packet delayUnstable delay can disrupt voice and video
Packet lossPackets that fail to reach their destinationCan cause retransmissions, poor audio, frozen video, or failed applications
DuplexWhether communication is one-way at a time or simultaneous in both directionsA duplex mismatch can cause severe performance problems
Link speedThe negotiated or configured rate of a connectionA 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

  1. A user enters a domain name in a browser.
  2. The client asks DNS for the domain’s IP address.
  3. The client compares the destination with its local subnet. If the destination is remote, it sends the traffic to the default gateway.
  4. A switch forwards the local frame, and routers forward the packet across networks.
  5. 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 -a

ipconfig /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

TermDefinitionWhy it matters
HostAn endpoint device connected to a networkHosts originate or receive application traffic
ServerA system that provides a service or resourceCentral services support many clients
ClientA device or application that requests a serviceIt initiates requests to servers or peers
FrameA data-link-layer unit, commonly used by EthernetSwitches forward local frames
PacketA network-layer unit, commonly associated with IPRouters forward packets between networks
LANA network serving a limited locationDefines a common local scope
WANA network connecting sites across large distancesSupports branch and remote-site communication
ProtocolA defined set of communication rulesAllows 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.