Network Fundamentals

Master the building blocks of networking - OSI model, TCP/IP, addressing, and subnetting

The OSI Reference Model

The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes network communication into 7 distinct layers. Understanding this model is fundamental to troubleshooting and designing networks.

Why the OSI Model Matters

The OSI model provides a common language for networking professionals. When troubleshooting, you can isolate problems to specific layers, making resolution faster and more efficient.

The Seven Layers Explained

┌─────────────────────────────────────────────────────────────┐ │ Layer 7: APPLICATION │ │ User interface, network services │ │ Protocols: HTTP, FTP, SMTP, DNS, DHCP, Telnet, SSH │ │ PDU: Data │ ├─────────────────────────────────────────────────────────────┤ │ Layer 6: PRESENTATION │ │ Data formatting, encryption, compression │ │ Formats: JPEG, GIF, ASCII, SSL/TLS, MPEG │ │ PDU: Data │ ├─────────────────────────────────────────────────────────────┤ │ Layer 5: SESSION │ │ Establishes, manages, terminates sessions │ │ Protocols: NetBIOS, RPC, SQL, NFS │ │ PDU: Data │ ├─────────────────────────────────────────────────────────────┤ │ Layer 4: TRANSPORT │ │ End-to-end connections, reliability, flow control │ │ Protocols: TCP (reliable), UDP (fast) │ │ PDU: Segment (TCP) / Datagram (UDP) │ ├─────────────────────────────────────────────────────────────┤ │ Layer 3: NETWORK │ │ Logical addressing, routing, path determination │ │ Protocols: IP, ICMP, OSPF, EIGRP, BGP │ │ PDU: Packet │ ├─────────────────────────────────────────────────────────────┤ │ Layer 2: DATA LINK │ │ Physical addressing, frame sequencing, error detection │ │ Protocols: Ethernet, PPP, Frame Relay, 802.11 │ │ PDU: Frame │ ├─────────────────────────────────────────────────────────────┤ │ Layer 1: PHYSICAL │ │ Physical transmission of bits │ │ Media: Cables, hubs, repeaters, fiber optics │ │ PDU: Bits │ └─────────────────────────────────────────────────────────────┘

CCNA Exam Tip

Memorize the layers and their PDUs! Common mnemonics:

  • Top to Bottom: "All People Seem To Need Data Processing"
  • Bottom to Top: "Please Do Not Throw Sausage Pizza Away"

Layer Details

Layer Name PDU Function Devices
7 Application Data Network services to applications Gateways, Firewalls
6 Presentation Data Data translation, encryption Gateways
5 Session Data Session management Gateways
4 Transport Segment End-to-end delivery Gateways, Firewalls
3 Network Packet Logical addressing, routing Routers, L3 Switches
2 Data Link Frame Physical addressing, switching Switches, Bridges
1 Physical Bits Bit transmission Hubs, Cables, NICs

Key Points to Remember

  • Encapsulation: Data is wrapped with headers as it moves down the layers
  • De-encapsulation: Headers are removed as data moves up at the receiver
  • Switches operate at Layer 2 (use MAC addresses)
  • Routers operate at Layer 3 (use IP addresses)
  • Each layer only communicates with adjacent layers

TCP/IP Model

The TCP/IP model is the practical implementation model used on the internet and modern networks. It has 4 layers that map to the OSI model.

OSI Model (7 Layers)

  • Application
  • Presentation
  • Session
  • Transport
  • Network
  • Data Link
  • Physical

TCP/IP Model (4 Layers)

  • Application (OSI 5-7)
  •  
  •  
  • Transport (OSI 4)
  • Internet (OSI 3)
  • Network Access (OSI 1-2)
  •  

TCP vs UDP

Feature TCP UDP
Connection Connection-oriented Connectionless
Reliability Guaranteed delivery Best-effort delivery
Ordering Ordered delivery No ordering
Flow Control Yes (windowing) No
Speed Slower (overhead) Faster
Header Size 20-60 bytes 8 bytes
Use Cases HTTP, FTP, SSH, Email DNS, DHCP, VoIP, Streaming

TCP Three-Way Handshake

Client Server │ │ │──────────── SYN (seq=100) ─────────────>│ │ │ │<───────── SYN-ACK (seq=300, ack=101) ───│ │ │ │──────────── ACK (ack=301) ─────────────>│ │ │ │ Connection Established │ │ │

TCP Connection Process

  1. SYN: Client sends synchronization request
  2. SYN-ACK: Server acknowledges and sends its own SYN
  3. ACK: Client acknowledges server's SYN

Connection termination uses a four-way handshake: FIN, ACK, FIN, ACK

Common Port Numbers

Port Protocol Service Description
20TCPFTP DataFile transfer data
21TCPFTP ControlFile transfer commands
22TCPSSHSecure Shell
23TCPTelnetRemote terminal (insecure)
25TCPSMTPEmail sending
53TCP/UDPDNSDomain Name System
67/68UDPDHCPDynamic IP assignment
80TCPHTTPWeb traffic
110TCPPOP3Email retrieval
143TCPIMAPEmail management
161/162UDPSNMPNetwork monitoring
443TCPHTTPSSecure web traffic
514UDPSyslogSystem logging

CCNA Exam Tip

Know the port ranges:

  • Well-known ports: 0-1023 (reserved for common services)
  • Registered ports: 1024-49151 (user applications)
  • Dynamic/Private ports: 49152-65535 (temporary connections)

IP Addressing

IPv4 addresses are 32-bit numbers written in dotted decimal notation (e.g., 192.168.1.1). Understanding IP addressing is crucial for network design and troubleshooting.

IPv4 Address Classes

Class First Octet Default Mask Networks Hosts/Network Purpose
A 1-126 255.0.0.0 (/8) 126 16,777,214 Large organizations
B 128-191 255.255.0.0 (/16) 16,384 65,534 Medium organizations
C 192-223 255.255.255.0 (/24) 2,097,152 254 Small organizations
D 224-239 N/A N/A N/A Multicast
E 240-255 N/A N/A N/A Experimental

Private IP Address Ranges (RFC 1918)

Private Addresses

These addresses are not routable on the internet and can be reused in any private network:

  • Class A: 10.0.0.0 - 10.255.255.255 (10.0.0.0/8)
  • Class B: 172.16.0.0 - 172.31.255.255 (172.16.0.0/12)
  • Class C: 192.168.0.0 - 192.168.255.255 (192.168.0.0/16)

Special IP Addresses

Address Purpose Description
0.0.0.0 Default Route Represents all networks (used in routing)
127.0.0.0/8 Loopback Testing local TCP/IP stack (127.0.0.1)
169.254.0.0/16 APIPA Auto-assigned when DHCP fails
255.255.255.255 Limited Broadcast Broadcast to all hosts on local network

Subnetting

Subnetting divides a network into smaller subnetworks. This improves security, reduces broadcast traffic, and makes efficient use of IP addresses.

Subnet Mask Reference Chart

CIDR Subnet Mask Total IPs Usable Hosts Block Size
/24255.255.255.0256254256
/25255.255.255.128128126128
/26255.255.255.192646264
/27255.255.255.224323032
/28255.255.255.240161416
/29255.255.255.248868
/30255.255.255.252424
/31255.255.255.25422*2
/32255.255.255.25511*1

Subnetting Formulas

Essential Formulas

  • Number of hosts: 2n - 2 (where n = host bits)
  • Number of subnets: 2n (where n = borrowed bits)
  • Block size: 256 - subnet mask value in the interesting octet

Subnetting Example

Example: Find network details for 192.168.10.67/26

Step 1: /26 means 255.255.255.192

Step 2: Block size = 256 - 192 = 64

Step 3: Network boundaries: 0, 64, 128, 192

Step 4: 67 falls between 64 and 128


Results:

  • Network Address: 192.168.10.64
  • First Host: 192.168.10.65
  • Last Host: 192.168.10.126
  • Broadcast: 192.168.10.127
  • Usable Hosts: 62

CCNA Exam Tip

Practice subnetting until you can do it quickly! The exam has multiple subnetting questions and you need to be fast. Remember:

  • The network address has all host bits = 0
  • The broadcast address has all host bits = 1
  • /30 is perfect for point-to-point links (2 usable hosts)

IPv6 Addressing

IPv6 uses 128-bit addresses written in hexadecimal, providing virtually unlimited addresses. It was created to solve IPv4 address exhaustion.

IPv6 Address Format

Full Address: 2001:0db8:0000:0000:0000:0000:0000:0001 Leading zeros: 2001:db8:0:0:0:0:0:1 Compressed: 2001:db8::1 Structure: [ Network Prefix (64 bits) ][ Interface ID (64 bits) ]

IPv6 Address Types

Type Prefix Description
Global Unicast2000::/3Routable on internet (like public IPv4)
Link-LocalFE80::/10Auto-configured, not routable
Unique LocalFC00::/7Private addresses (like RFC 1918)
MulticastFF00::/8One-to-many communication
Loopback::1Localhost
Unspecified::All zeros (like 0.0.0.0)

Key IPv6 Multicast Addresses

  • FF02::1 - All nodes (link-local)
  • FF02::2 - All routers (link-local)
  • FF02::5 - OSPF routers
  • FF02::6 - OSPF DR routers

IPv6 Key Differences from IPv4

  • No broadcast - uses multicast instead
  • No ARP - uses Neighbor Discovery Protocol (NDP)
  • Auto-configuration with SLAAC
  • No NAT needed (enough addresses for everyone)
  • Built-in IPsec support

Ethernet Fundamentals

Ethernet is the most common LAN technology, operating at Layer 1 and Layer 2 of the OSI model.

Ethernet Frame Structure

┌────────────┬───────────┬───────────┬──────┬─────────────┬─────┐ │ Preamble │ Dest MAC │ Src MAC │ Type │ Data │ FCS │ │ 8 bytes │ 6 bytes │ 6 bytes │ 2 B │ 46-1500 B │ 4 B │ └────────────┴───────────┴───────────┴──────┴─────────────┴─────┘

MAC Address Format

Understanding MAC Addresses

MAC addresses are 48-bit hardware addresses burned into NICs:

AA:BB:CC:DD:EE:FF or AA-BB-CC-DD-EE-FF

  • First 24 bits (OUI): Manufacturer identifier
  • Last 24 bits: Unique device identifier
  • Broadcast MAC: FF:FF:FF:FF:FF:FF

Ethernet Standards

Standard Speed Cable Type Max Distance
10BASE-T10 MbpsCat 3 UTP100m
100BASE-TX100 MbpsCat 5 UTP100m
1000BASE-T1 GbpsCat 5e/6 UTP100m
10GBASE-T10 GbpsCat 6a/7 UTP100m
1000BASE-SX1 GbpsMultimode Fiber550m
1000BASE-LX1 GbpsSingle-mode Fiber5km

Network Devices

Device Comparison

Device OSI Layer Addressing Function
Hub Layer 1 None Repeats signals to all ports (obsolete)
Switch Layer 2 MAC addresses Forwards frames based on MAC table
Router Layer 3 IP addresses Routes packets between networks
L3 Switch Layer 2-3 MAC + IP Switching + routing capabilities
Firewall Layer 3-7 IP + Ports Filters traffic based on rules

Collision Domains vs Broadcast Domains

  • Collision Domain: Network segment where collisions can occur. Each switch port = separate collision domain.
  • Broadcast Domain: Network segment where broadcasts reach all devices. Routers separate broadcast domains.

Cables and Connectors

Copper Cabling

Category Max Speed Max Bandwidth Use Case
Cat 5100 Mbps100 MHzFast Ethernet
Cat 5e1 Gbps100 MHzGigabit Ethernet
Cat 610 Gbps (55m)250 MHz10G short runs
Cat 6a10 Gbps500 MHz10G Ethernet
Cat 710 Gbps600 MHzData centers

Cable Types

Straight-Through Cable

Both ends same wiring (T568A or T568B)

Use: Different device types

  • PC to Switch
  • Router to Switch

Crossover Cable

Different wiring on each end

Use: Same device types

  • Switch to Switch
  • PC to PC
  • Router to Router

CCNA Exam Tip

Modern devices with Auto-MDIX can automatically detect and adjust for cable type. However, you should still know when to use straight-through vs crossover cables for the exam!

Fiber Optic Cables

Single-Mode Fiber (SMF)

  • Small core (8-10 microns)
  • One light path
  • Long distances (up to 100km)
  • More expensive
  • Yellow jacket typically

Multimode Fiber (MMF)

  • Larger core (50-62.5 microns)
  • Multiple light paths
  • Shorter distances (up to 2km)
  • Less expensive
  • Orange/aqua jacket