Learning paths › CCNA › 1. Network Fundamentals
Network Fundamentals
Explore the core building blocks of networking: routers, switches, firewalls, and campus topology designs.
About 16 minutes
Why it matters
Every later topic, from VLANs to routing, assumes you can picture the path a packet takes through a campus network. This lesson gives you that picture: what each box does and where it sits.
How Computer Networks Operate
A network moves data between endpoints through intermediary devices: switches inside a LAN, routers between LANs, firewalls wherever policy has to be enforced.
Switching and routing are two different decisions about the same packet. A switch reads the destination MAC address and keeps the frame inside one broadcast domain; a router reads the destination IP address, rewrites the Layer 2 header and sends the packet into a different one.
A host works out local-or-remote by itself, by ANDing the destination address with its own subnet mask. Local means ARP for the destination; remote means send the frame to the default gateway with the final destination IP still in place.
The campus hierarchy - access, distribution, core - exists so that a broadcast, a failure or a configuration mistake has a boundary it cannot cross.
One Packet, Two Different Decisions
PC-A (192.168.10.5/24, gateway 192.168.10.1) opens a connection to a server at 192.168.20.9. Follow what each device decides:
1. PC-A ANDs 192.168.20.9 with its own mask, 255.255.255.0. The result, 192.168.20.0, is not its own network, so the destination is remote. It builds a frame with destination IP 192.168.20.9 and destination MAC of the gateway - which it ARPs for if it does not already have it.
2. The access switch reads only the destination MAC. It finds the gateway's MAC in its table for that VLAN and forwards out one port. The IP header is untouched; the switch never looked at it.
3. The router strips the frame, looks up 192.168.20.9 in its routing table, decrements the TTL, builds a new frame with its own MAC as source and the server's (or the next router's) MAC as destination, and sends it out the chosen interface.
4. The server replies to 192.168.10.5, which is remote from its point of view, so the reply takes the same decision again in the other direction - over whatever path its own routing table chooses, which need not be the path the request took.
The addresses that survive end to end are the IP addresses. The MAC addresses are rewritten at every router, which is why a MAC address from three hops away never appears in a switch's table.
Collision Domains, Broadcast Domains, and Why the Tiers Exist
A hub repeated every bit to every port: one collision domain, and the more hosts you added the less each one could send. A switch gives each port its own collision domain and buffers frames, so two hosts can transmit at the same time and full duplex becomes possible - collisions cannot occur on a full-duplex link at all.
What a switch does not do is stop a broadcast. An ARP request, a DHCP Discover or a Windows name lookup reaches every port in the VLAN, and every host spends CPU on it. That cost grows with the number of hosts, which is the real argument for segmentation: a VLAN per group, and a router between them.
The hierarchy applies the same logic to failures. Access switches terminate the hosts, so a user's loop or a flooding NIC is contained there. Distribution aggregates the access layer, and it is where the Layer 2 to Layer 3 boundary, first-hop redundancy and most filtering live. The core connects distribution blocks to each other and carries no policy, because every feature added to the core is a feature in the path of all traffic.
The Components, and What Each One's Absence Looks Like
• Layer 2 switch: hosts have link lights and can reach each other inside the VLAN, and nothing outside it.
• Router or Layer 3 switch: each VLAN works internally and no VLAN can reach another; ping to the gateway address fails because there is no gateway.
• Firewall: traffic flows that policy says should not, and there is no state table to explain which side opened a connection.
• Access point and WLC: wired hosts are fine, wireless clients associate and get no address, or get an address in the wrong VLAN because the WLAN-to-VLAN mapping is wrong.
• Endpoints and servers: the things the network exists for, and the only place the user's symptom actually appears.
• PoE: a phone or AP with a correct configuration that does not power on. show power inline tells you whether the port is offering power and how much of the switch's budget is left.
LANs, WANs, and Who Asks Whom
Two words describe scale, and they are not about speed: • A LAN covers one site - an office, a building, a campus - and the organisation owns the cabling and the switches. • A WAN spans distance using circuits or services bought from a provider, which is why WAN links are slower and more expensive per bit and why designs economise on them.
Two words describe who initiates: • Client/server: the client asks, the server holds the resource and answers. One machine is the authority, which is why its failure is everybody's failure. • Peer-to-peer: each machine is both, which removes the single point of failure and removes the single point of administration with it.
And two more describe the devices themselves. End devices - PCs, phones, servers, printers - are where data originates or terminates. Intermediary devices - switches, routers, firewalls, access points - exist only to move it, which is why a user's symptom appears on an end device and its cause almost never does.
Topology is the shape of the links. A star puts every device on one central switch: simple, and the switch is a single point of failure. A full mesh gives every device a direct link to every other: resilient to several failures at once, and the number of links grows as the square of the number of devices, which is why it appears between a handful of core routers and never on an access layer. Bandwidth is what a link can carry in a given time; throughput is what it actually carries once overhead, errors and congestion have taken their share, and the gap between the two is where most "the network is slow" complaints live.
Reading an Unfamiliar Network From the Devices
Four commands, in this order, reconstruct most of a topology you were not given:
1. show ip interface brief - which interfaces exist, which have addresses, which are up/up. An interface that is administratively down is somebody's decision, not a fault.
2. show cdp neighbors - the device and port on the far end of each link. Run it on each neighbour in turn and you have the diagram.
3. show mac address-table - where the hosts are. A port with hundreds of MACs is an uplink to another switch; a port with one is an access port with a host on it.
4. show ip route - which subnets this router believes it can reach, and by what source: C for connected, S for static, O for OSPF, with the administrative distance and metric in brackets.
The pattern worth remembering: Layer 2 questions are answered by the MAC address table and the interface status, Layer 3 questions by the routing table. Asking the wrong table is how an afternoon disappears.
What Each Device Decides, and On What Evidence
Device: Switch (Layer 2) · Reads: Destination MAC in the frame · Forwarding table: MAC address table, learned from source MACs · Boundary it creates: One collision domain per port
Device: Router (Layer 3) · Reads: Destination IP in the packet · Forwarding table: Routing table, longest prefix match · Boundary it creates: One broadcast domain per interface
Device: Firewall · Reads: Addresses, ports and connection state · Forwarding table: Policy rules plus a state table · Boundary it creates: A trust boundary between zones
Device: Access point · Reads: 802.11 frames, bridged to 802.3 · Forwarding table: MAC table plus the WLAN-to-VLAN mapping · Boundary it creates: One shared radio medium, half duplex
Topology Architectures and Why Each Is Chosen
Design: Two-tier (collapsed core) · Shape: Access switches uplink to one distribution/core pair · What it is for: One site, few distribution blocks - a separate core would only add hops
Design: Three-tier · Shape: Access to distribution to core · What it is for: Several distribution blocks, kept from meshing with each other
Design: Spine-leaf · Shape: Every leaf connects to every spine; hosts attach only to leaves · What it is for: Data centre east-west traffic: every host pair is the same number of hops apart
Design: SOHO · Shape: One box combining router, switch and access point · What it is for: A handful of hosts, one subnet, one uplink
Design: WAN · Shape: Sites joined over a provider circuit or an Internet VPN · What it is for: Distance. The link is leased, so the design conserves bandwidth
Design: On-premises vs cloud · Shape: Services in your own racks, or reached across a WAN link · What it is for: Where the service lives changes which link a failure takes out
The words you need
Router — A Layer 3 device that forwards packets between IP subnets using a routing table, rewriting the frame's Layer 2 header at every hop.
Switch — A Layer 2 device that learns source MAC addresses per port and forwards frames within a broadcast domain without touching the IP header.
Firewall — A device that permits or denies traffic by policy and tracks connection state, so a reply is allowed because a matching request was seen leaving.
Default gateway — The router address on a host's own subnet that the host sends packets to when the destination is not local.
Collision domain — A set of interfaces that must contend for one medium. A switch gives every port its own collision domain, which is what makes full duplex possible.
Broadcast domain — The set of ports a broadcast frame reaches. One VLAN is one broadcast domain, and leaving it requires a router.
Access / distribution / core — The three campus tiers: hosts attach at access, aggregation and policy sit at distribution, and the core does nothing but move traffic between distribution blocks quickly.
Wireless LAN Controller (WLC) — The device that configures and manages lightweight access points centrally, so a WLAN-to-VLAN mapping is defined once rather than per AP.
Network foundations: follow the destination through each layer — Understand the mechanism
A host creates an application message and carries it through transport, IP and link-layer encapsulation. An Ethernet switch normally selects a local forwarding port from the destination MAC and VLAN. A router selects an IP next hop from the destination prefix and its forwarding state. A firewall applies policy at its configured enforcement point; routing and permission are separate decisions.
The OSI model is a way to describe functions, not seven physical boxes a packet must visit. A single device can perform switching, routing and security functions. Identify the actual operation instead of assigning every device exactly one layer.
Network foundations: follow the destination through each layer — Worked example: reach a server beyond the subnet
A client sends HTTPS to a remote subnet through its gateway. The packet destination identifies the server; the first Ethernet destination identifies the local gateway. After routing, a new link-layer frame carries that packet toward the next hop. NAT, if present, is a separate transformation that must be accounted for at its observation point.
A working local switch port does not prove a remote application works. Check addressing, gateway resolution, route selection, policy, listening service and return path in order, recording which observation supports each conclusion.
Network foundations: follow the destination through each layer — Verify the result and avoid the trap
Draw the client, local VLAN, gateway, routed links and server. Label the destination MAC on the first link and the destination IP before any translation. Compare a local test with a remote test to isolate the first failing boundary.
The commands from this module
Each of these appeared above. Run them here so they are in your fingers, not just your notes.
show ip interface brief
show interfaces status
show mac address-table
show ip route
show cdp neighborsA command that changes something usually prints nothing — verify with the matching show command.
Takeaways
- A switch forwards on the destination MAC and never looks at the IP header; a router forwards on the destination IP and rewrites the MAC header at every hop.
- Routing leaves the source and destination IP addresses alone - only NAT changes those - and decrements the TTL by one per hop.
- A host decides local or remote by ANDing the destination with its own mask, so a wrong mask stops it ever handing the frame to the router, and a wrong gateway lets its own subnet work and nothing else.
- The access, distribution and core tiers exist to give a broadcast, a loop or a mistake a boundary it cannot cross.
Next: Network Devices
More free lessons in 1. Network Fundamentals
- Network Devices
- Cables & Interfaces
- TCP/IP & OSI Models
- Switch Interfaces
- IPv4 Header
- Wireless RF & Frequencies
- IEEE 802.11 Standards & Wi-Fi Generations
- Cisco IOS CLI
- Ethernet Switching 1
- Ethernet Switching 2
- IPv4 Addressing
- IPv4 Configuration
- Subnetting Basics
- Finding Subnets Fast
- VLSM Subnetting
- IPv6 Addressing & Representation
- Network Diagnostics
- IPv6 Address Scopes & Types
- IPv6 Configuration & EUI-64