Network Fundamentals
The bedrock of everything else. By the end of this module you'll understand how data moves across networks and you'll have configured your first Cisco router.
1.1 What is a network?
A network is two or more devices that share data over a medium (copper, fiber, or radio waves). The smallest network is two laptops connected by one cable. The biggest is the Internet — a network of networks.
Why we need them: share resources, communicate, and centralize services.
1.2 Network components
| Device | Job | OSI Layer |
|---|---|---|
| Hub | Dumb repeater — sends every signal to every port. Obsolete. | 1 |
| Switch | Forwards Ethernet frames based on MAC addresses. The LAN workhorse. | 2 |
| Router | Forwards IP packets between different networks. | 3 |
| Firewall | Inspects traffic against security policy. | 3–7 |
| Access Point | Bridges wireless clients into the wired LAN. | 1–2 |
| Wireless LAN Controller | Centrally manages many APs. | 2–7 |
[PC]---\ /---[Server]
\---[Switch]---[Router]---[ISP]---
[PC]---/ \---[Internet]
Topologies
- Star — every device connects to a central switch (most common LAN)
- Mesh — every device connects to every other (resilient WANs)
- Bus / Ring — legacy, rare today
- Hybrid — mix of the above (most real networks)
1.3 The OSI model (memorize!)
Mnemonic: "Please Do Not Throw Sausage Pizza Away" (bottom→top)
| # | Layer | Job | Examples |
|---|---|---|---|
| 7 | Application | User-facing protocols | HTTP, DNS, SSH |
| 6 | Presentation | Format/encrypt data | TLS, JPEG, ASCII |
| 5 | Session | Open/close conversations | NetBIOS, RPC |
| 4 | Transport | End-to-end delivery, ports | TCP, UDP |
| 3 | Network | Logical addressing, routing | IP, ICMP, OSPF |
| 2 | Data Link | Physical addressing on a link | Ethernet, MAC, ARP |
| 1 | Physical | Bits on the wire | Cables, Wi-Fi radio |
Encapsulation & PDU names
Data going down the stack gets wrapped in headers. The Protocol Data Unit (PDU) at each layer has a name:
[ App data ] (Layer 7)
[ TCP hdr | App data ] (Layer 4 — "Segment")
[ IP hdr | TCP hdr | App data ] (Layer 3 — "Packet")
[ Eth hdr | IP hdr | TCP hdr | App data | FCS ] (Layer 2 — "Frame")
[ 10101010101010101... ] (Layer 1 — "Bits")
Drill: Data → Segment → Packet → Frame → Bits.
1.4 Cables & physical layer
| Cable | Use | Max distance |
|---|---|---|
| Cat 5e / Cat 6 UTP | Standard Ethernet copper, RJ-45 | 100 m |
| Straight-through | PC↔switch, switch↔router | — |
| Crossover | Switch↔switch, PC↔PC (rare; auto-MDIX) | — |
| Console (rollover, light blue) | Laptop ↔ Cisco console port | — |
| Multimode Fiber (orange/aqua) | Short campus runs | ~550 m @ 1G |
| Single-mode Fiber (yellow) | Long haul | 40+ km |
1.5 IPv4 addressing
32 bits, written as 4 octets in dotted decimal: 192.168.1.10.
Every IP has a network portion and a host portion, defined by the subnet mask. CIDR notation puts the number of network bits after a slash: /24 = 255.255.255.0.
Powers of 2 (memorize)
2¹=2 2²=4 2³=8 2⁴=16 2⁵=32 2⁶=64 2⁷=128 2⁸=256
Private (RFC 1918) ranges
10.0.0.0/8172.16.0.0/12(172.16.0.0 – 172.31.255.255)192.168.0.0/16
Special addresses
127.0.0.0/8— loopback169.254.0.0/16— APIPA (when DHCP fails)255.255.255.255— limited broadcast0.0.0.0— "any" / default route
1.6 Subnetting (the topic everyone fears — let's kill it)
Example: 192.168.10.0/26
- /26 mask =
255.255.255.192→ interesting octet = 4th, value 192 - Magic number = 256 − 192 = 64
- Subnets:
.0,.64,.128,.192 - For
.64subnet: network =.64, broadcast =.127, hosts =.65–.126
Hosts per subnet
Hosts = 2^(host bits) − 2 (network + broadcast addresses don't count).
Common masks (memorize)
| CIDR | Mask | Hosts |
|---|---|---|
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
1.7 IPv6 essentials
- 128 bits, written as 8 groups of 4 hex digits
- Drop leading zeros in each group
- Replace ONE run of all-zero groups with
::(only once per address)
Example: 2001:0db8:0000:0000:0000:0000:0000:0001 → 2001:db8::1
Address types
2000::/3— Global Unicast (public)fe80::/10— Link-Local (auto, never routed)fc00::/7— Unique Local (like RFC1918)ff00::/8— Multicast (no broadcast in IPv6!)::1— Loopback
1.8 TCP vs UDP
| Feature | TCP | UDP |
|---|---|---|
| Connection | 3-way handshake (SYN, SYN-ACK, ACK) | Connectionless |
| Reliability | ACKs, retransmits, ordering | None |
| Speed | Slower | Fast |
| Use | HTTP, SSH, SMTP, FTP | DNS, DHCP, VoIP, video, SNMP |
Well-known ports (memorize)
| Port | Protocol | Port | Protocol |
|---|---|---|---|
| 20/21 | FTP | 110 | POP3 |
| 22 | SSH | 123 | NTP |
| 23 | Telnet | 143 | IMAP |
| 25 | SMTP | 161/162 | SNMP |
| 53 | DNS | 443 | HTTPS |
| 67/68 | DHCP | 514 | Syslog |
| 69 | TFTP | 80 | HTTP |
1.9 Wireless basics
- SSID — the network name
- 2.4 GHz — longer range, more interference, only 3 non-overlapping channels (1, 6, 11)
- 5 GHz — shorter range, faster, many channels
- 6 GHz — Wi-Fi 6E
- Security: WEP (broken) → WPA → WPA2 → WPA3 (current best)
🧪 Lab: Your First Cisco Network
Tool: Cisco Packet Tracer (free with NetAcad account). GNS3 / CML also work — commands are identical.
Time: ~45 minutes.
Topology
PC1 (192.168.1.10/24) PC2 (192.168.2.10/24)
| |
[ Switch1 ] [ Switch2 ]
| |
----G0/0--- [ Router R1 ] ---G0/1----
192.168.1.1 192.168.2.1
Build it
- Drag two 2960 switches, one 2911 router, two PCs onto the canvas.
- Cable with copper straight-through:
- PC1 ↔ Switch1 (Fa0 ↔ Fa0/1)
- PC2 ↔ Switch2 (Fa0 ↔ Fa0/1)
- Switch1 Fa0/2 ↔ R1 Gi0/0
- Switch2 Fa0/2 ↔ R1 Gi0/1
Step 1 — Configure the PCs
Click PC1 → Desktop → IP Configuration:
IP Address: 192.168.1.10
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
Repeat for PC2 with 192.168.2.10 and gateway 192.168.2.1.
Step 2 — Configure R1 (the CCNA core skill)
Click R1 → CLI tab → press Enter:
enable
configure terminal
hostname R1
no ip domain-lookup
enable secret Cisco123!
! ----- Console line -----
line console 0
password ConPass!
login
logging synchronous
exit
! ----- SSH setup -----
ip domain-name lab.local
crypto key generate rsa modulus 1024
username admin secret AdminPass!
line vty 0 4
login local
transport input ssh
exit
service password-encryption
! ----- Interfaces -----
interface GigabitEthernet0/0
description LAN-to-Switch1
ip address 192.168.1.1 255.255.255.0
no shutdown
exit
interface GigabitEthernet0/1
description LAN-to-Switch2
ip address 192.168.2.1 255.255.255.0
no shutdown
exit
banner motd #Authorized access only!#
end
write memory ! SAVE — without this you lose everything on reboot
Step 3 — Verify
From R1's CLI:
show ip interface brief ! all interfaces — both should be up/up
show running-config ! the live config
show ip route ! routing table — should show two connected /24 routes
show version ! IOS version, uptime, model
From PC1's Desktop → Command Prompt:
ping 192.168.1.1 # gateway — must work
ping 192.168.2.1 # router's far interface — must work
ping 192.168.2.10 # PC2 — the moment of truth
tracert 192.168.2.10 # should show 1 hop (R1) then PC2
🧯 Troubleshooting checklist
show ip interface brief— interface up/up?- Correct default gateway on the PC?
- IPs in the same subnet as their gateway?
- Forgot
no shutdown? - Cable wired correctly? (green dots in PT)
🎁 Bonus challenges
- Add a third LAN
192.168.3.0/24on R1's loopback (interface loopback 0) and ping it from PC1. - SSH into R1 from PC2. Use
admin / AdminPass!. - Use
show mac address-tableon Switch1 — see PC1's MAC learned dynamically.
❓ Module 1 Quiz
20 exam-style questions. Pick answers, hit Submit, get instant feedback with explanations. Score saves automatically.
🧠 Module 1 Cheatsheet
OSI (top → bottom)
7 App · 6 Pres · 5 Sess · 4 Trans · 3 Net · 2 DLL · 1 Phy
PDUs: Data → Segment → Packet → Frame → Bits
Powers of 2
2 4 8 16 32 64 128 256
Subnet masks
| /N | Mask | Hosts |
|---|---|---|
| /24 | 255.255.255.0 | 254 |
| /25 | .128 | 126 |
| /26 | .192 | 62 |
| /27 | .224 | 30 |
| /28 | .240 | 14 |
| /29 | .248 | 6 |
| /30 | .252 | 2 |
Magic number
MN = 256 − mask. Subnets jump by MN in the interesting octet.
RFC 1918 private ranges
10.0.0.0/8 · 172.16.0.0/12 · 192.168.0.0/16
Specials
127/8 loopback · 169.254/16 APIPA · 255.255.255.255 broadcast
Top ports
22 SSH · 23 Telnet · 25 SMTP · 53 DNS · 67/68 DHCP · 69 TFTP · 80 HTTP · 123 NTP · 161 SNMP · 443 HTTPS · 514 Syslog
IPv6
128 bits hex · :: collapses ONE zero run · fe80::/10 link-local · 2000::/3 global · ::1 loopback · ff00::/8 multicast
Essential router commands
enable
configure terminal
hostname X
interface gi0/0
ip address A.B.C.D MASK
no shutdown
end
copy running-config startup-config ! save!
show ip interface brief
show running-config
show ip route