Course 2

Bits and Bytes of Networking

TCP/IP & OSI models · IP addressing & subnetting · Ethernet · Transport layer · Application services · Troubleshooting

1  ·  TCP/IP & OSI Models

Key Concepts

  • The OSI model (Open Systems Interconnection) is a conceptual 7-layer framework for understanding how network communication works. It's a teaching tool - real protocols don't map perfectly to it.
  • The TCP/IP model (4 layers) is the practical implementation used on the internet today. It merges OSI layers 5-7 into one Application layer.
  • Encapsulation - each layer wraps data with its own header (and sometimes trailer) as it travels down the stack toward the wire.
  • Decapsulation - headers are stripped at each layer as data moves up the stack at the receiving end.
  • A PDU (Protocol Data Unit) is the name for data at each layer: bit → frame → packet → segment → data.
  • Mnemonic (top→bottom): "All People Seem To Need Data Processing" → Application, Presentation, Session, Transport, Network, Data Link, Physical.

OSI Model - 7 Layers

# Layer PDU Key Protocols / Devices Role
7 Application Data HTTP, HTTPS, FTP, DNS, SMTP, SSH User-facing network services
6 Presentation Data TLS/SSL, JPEG, MP3, ASCII Encoding, encryption, compression
5 Session Data NetBIOS, RPC, SIP Establish, manage & tear down sessions
4 Transport Segment / Datagram TCP, UDP - ports End-to-end delivery, flow & error control
3 Network Packet IP, ICMP, ARP* - Routers Logical addressing & routing
2 Data Link Frame Ethernet, Wi-Fi (802.11) - Switches MAC addressing, framing, error detection
1 Physical Bit Cables, hubs, repeaters, NICs Raw bit transmission over physical media

TCP/IP Model - 4 Layers

TCP/IP LayerMaps to OSIKey Protocols
Application7, 6, 5HTTP, HTTPS, DNS, DHCP, FTP, SMTP, SSH, Telnet
Transport4TCP, UDP
Internet3IP (v4/v6), ICMP, OSPF, BGP
Link (Network Access)2, 1Ethernet, Wi-Fi, ARP, PPP

Encapsulation Flow

Application data → HTTP payload
+ TCP/UDP header = Segment
+ IP header = Packet
+ Ethernet hdr/trailer= Frame
Transmitted as Bits (0s and 1s)

Key Terms

PDUProtocol Data Unit - the name for data at each OSI layer
EncapsulationWrapping data with headers as it moves down the stack toward the wire
DecapsulationStripping headers as data moves up the stack at the destination
MTUMaximum Transmission Unit - largest frame payload allowed; 1500 bytes for standard Ethernet
PayloadThe data portion of a PDU (everything after the headers)
ProtocolA set of rules that govern communication between devices
  1. At which OSI layer does a switch operate?
  2. What is the PDU at the Network layer called?
  3. Which TCP/IP layer combines OSI layers 5, 6, and 7?
  4. What does the Transport layer add to data during encapsulation?
  5. Which OSI layer handles encryption and data formatting (e.g., JPEG, TLS)?
  6. Name two differences between the OSI model and the TCP/IP model.
  1. Layer 2 - Data Link (switches use MAC addresses to forward frames)
  2. Packet
  3. The Application layer
  4. A TCP or UDP header (creating a segment or datagram), which adds source/destination port numbers and sequencing info
  5. Layer 6 - Presentation
  6. OSI has 7 layers; TCP/IP has 4. OSI is conceptual/academic; TCP/IP is the working model used on the real internet. OSI separates Session/Presentation/Application; TCP/IP merges them.

2  ·  Network Layer & IP Addressing

IPv4 Basics

  • 32-bit address written as four octets in dotted-decimal notation (e.g., 192.168.1.100).
  • Each octet ranges from 0–255.
  • Two portions: network part (identifies the subnet) + host part (identifies the device).
  • The subnet mask determines where the network/host boundary falls. Written as dotted-decimal (e.g., 255.255.255.0) or CIDR prefix (/24 = 24 network bits).
  • The logical AND of an IP and its mask gives the network address.

Address Classes (classful - historical context)

ClassFirst Octet RangeDefault MaskNotes
A1 – 126/8 (255.0.0.0)Large networks; 126 networks × ~16M hosts
B128 – 191/16 (255.255.0.0)Medium networks; 16,384 networks × 65,534 hosts
C192 – 223/24 (255.255.255.0)Small networks; 2M networks × 254 hosts
D224 – 239-Multicast only
E240 – 255-Experimental / reserved
Today we use CIDR (Classless Inter-Domain Routing) - subnet masks aren't tied to class boundaries. This dramatically slowed IPv4 exhaustion.

Special / Private Ranges

RangeCIDRPurpose
10.0.0.0 – 10.255.255.255/8Private (RFC 1918)
172.16.0.0 – 172.31.255.255/12Private (RFC 1918)
192.168.0.0 – 192.168.255.255/16Private (RFC 1918)
127.0.0.0 – 127.255.255.255/8Loopback - 127.0.0.1 = localhost
169.254.0.0 – 169.254.255.255/16APIPA - self-assigned when DHCP fails
0.0.0.0-Unspecified / default route
255.255.255.255-Limited broadcast

Subnetting Math

Host bits = 32 – prefix length
Total addresses = 2 ^ (host bits)
Usable hosts = 2 ^ (host bits) – 2
Network address = all host bits = 0 (first address)
Broadcast address= all host bits = 1 (last address)
First usable host= network address + 1
Last usable host = broadcast address – 1

Worked Example - 192.168.1.0 /26

Prefix /26 → subnet mask 255.255.255.192
Host bits 32 – 26 = 6
Total addresses2⁶ = 64
Usable hosts 64 – 2 = 62
Network address192.168.1.0
Broadcast 192.168.1.63
First host 192.168.1.1
Last host 192.168.1.62

Common CIDR Prefix Reference

PrefixSubnet MaskAddressesUsable Hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/32255.255.255.25511 (host route)

IPv6 Basics

  • 128-bit address - written as 8 groups of 4 hex digits separated by colons.
  • Leading zeros within a group can be omitted; consecutive all-zero groups can be replaced with :: (once per address).
  • ::1 - loopback (equivalent to IPv4 127.0.0.1)
  • fe80::/10 - link-local (auto-configured, not routable)
  • 2000::/3 - global unicast (public routable range)
  • No broadcast - replaced by multicast and anycast.
  • IPv6 uses NDP (Neighbor Discovery Protocol) instead of ARP.

IPv6 Address Compression - Rules

Rule 1 Drop leading zeros within each group - 0db8db8  ·  00011  ·  00000
Rule 2 Replace the longest consecutive run of all-zero groups with :: - only once per address
Tiebreaker When two runs are equal length, :: goes to the leftmost run

Worked Examples

Full AddressStep 1 - strip leading zerosStep 2 - apply ::
2001:0db8:0000:0000:0000:0000:0000:0001 2001:db8:0:0:0:0:0:1 2001:db8::1
0000:0000:0000:0000:0000:0000:0000:0001 0:0:0:0:0:0:0:1 ::1
fe80:0000:0000:0000:0200:f8ff:fe21:67cf fe80:0:0:0:200:f8ff:fe21:67cf fe80::200:f8ff:fe21:67cf
2001:0db8:0000:0000:0001:0000:0000:0001 2001:db8:0:0:1:0:0:1 2001:db8::1:0:0:1  (tie at pos 2 & 5 → leftmost wins)

IPv6 Compression Practice

0 / 8
Has leading zeros
All-zero group

Routing Concepts

  • Default gateway - the router IP your device sends traffic to when the destination is outside the local subnet.
  • Routing table - an ordered list of network prefixes and their next-hop addresses. Routers consult this for every packet.
  • TTL (Time To Live) - decremented by each router. Packet is dropped at 0 to prevent routing loops. Starting value is typically 64 (Linux/Mac) or 128 (Windows).
  • Static routes - manually configured; predictable but don't auto-adjust to failures.
  • Dynamic routing - protocols like OSPF (interior), BGP (exterior), and EIGRP automatically discover routes and adapt to changes.
  1. What is the subnet mask for a /26 prefix?
  2. How many usable hosts does a /28 network provide?
  3. What is the network address for host 10.0.1.100 on a /27 network?
  4. A host shows the address 169.254.1.50. What does this indicate?
  5. You need to subnet a /24 into blocks of exactly 30 usable hosts. What prefix length do you use?
  6. What is the broadcast address of 192.168.10.64/26?
  1. 255.255.255.192
  2. 14 (2⁴ – 2 = 14)
  3. /27 block size = 32. 100 ÷ 32 = 3 remainder 4 → block starts at 96. Network address: 10.0.1.96
  4. DHCP failed or no DHCP server was reachable. The host auto-assigned an APIPA address (169.254.0.0/16).
  5. /27 (2⁵ – 2 = 30 usable hosts)
  6. Block starts at .64, size = 64 addresses. Broadcast = .64 + 63 = 192.168.10.127

3  ·  Data Link Layer & Ethernet

MAC Addresses

  • 48-bit (6-byte) address burned into the NIC by the manufacturer. Written in hex - e.g., AA:BB:CC:DD:EE:FF.
  • First 3 bytes = OUI (Organizationally Unique Identifier) - identifies the manufacturer.
  • Last 3 bytes = device-unique identifier assigned by the manufacturer.
  • Broadcast MAC: FF:FF:FF:FF:FF:FF - received by every device on the segment.
  • MACs operate only within a single network segment (they're not routed).
  • Can be spoofed in software - important for security.

Ethernet Frame Structure

FieldSizePurpose
Preamble7 bytesAlternating 1/0 bits for clock synchronization
SFD (Start Frame Delimiter)1 byteMarks end of preamble, start of frame
Destination MAC6 bytesWho should receive this frame
Source MAC6 bytesWho sent this frame
EtherType / Length2 bytes0x0800=IPv4 · 0x0806=ARP · 0x86DD=IPv6
Payload (data)46–1500 bytesIP packet or other upper-layer data
FCS (Frame Check Sequence)4 bytesCRC checksum for error detection
The minimum Ethernet frame payload is 46 bytes. If data is smaller, padding is added. Maximum payload = MTU = 1500 bytes.

ARP - Address Resolution Protocol

  • Resolves IP addresses to MAC addresses on the local network (Layer 3 → Layer 2).
  • ARP Request: broadcast to FF:FF:FF:FF:FF:FF asking "Who has 192.168.1.1?"
  • ARP Reply: unicast response "I have 192.168.1.1 - my MAC is AA:BB:CC:DD:EE:FF"
  • Mappings are stored in the ARP cache (view with arp -a) to avoid repeated lookups.
  • Gratuitous ARP: a device broadcasts its own IP→MAC mapping. Used in failover/HA and (maliciously) for ARP spoofing.

Switches vs Hubs

Hub (Layer 1)Broadcasts all traffic to all ports. Every device shares one collision domain. No intelligence - just a repeater.
Switch (Layer 2)Learns MAC addresses and builds a MAC address table. Forwards frames only to the relevant port. Each port = its own collision domain.
Collision domainSegment where only one device can transmit at a time. Switches isolate collision domains per port.
Broadcast domainAll devices that receive a broadcast frame. A switch creates one broadcast domain (unless VLANs are used).
CSMA/CDCarrier Sense Multiple Access / Collision Detection - half-duplex Ethernet mechanism to detect and handle collisions (hubs/legacy). Modern switches are full-duplex and don't use it.

VLANs

  • Virtual LANs logically segment a switch into separate broadcast domains without needing separate physical hardware.
  • IEEE 802.1Q - standard for VLAN tagging; inserts a 4-byte tag into the Ethernet frame.
  • Access port: carries traffic for a single VLAN; used for end devices.
  • Trunk port: carries traffic for multiple VLANs between switches or switch-to-router; tags identify the VLAN.
  • Native VLAN: traffic on a trunk port that arrives untagged is assigned to the native VLAN (default VLAN 1).
  1. What protocol maps an IP address to a MAC address?
  2. How many bytes is a MAC address, and how is it written?
  3. What is the broadcast MAC address?
  4. What is the maximum payload size of an Ethernet frame, and what is this called?
  5. What does the OUI in a MAC address tell you?
  6. How does a switch differ from a hub in terms of collision domains?
  1. ARP (Address Resolution Protocol)
  2. 6 bytes (48 bits), written as 6 pairs of hex digits separated by colons or dashes (e.g., AA:BB:CC:DD:EE:FF)
  3. FF:FF:FF:FF:FF:FF
  4. 1500 bytes - this is the MTU (Maximum Transmission Unit) for standard Ethernet
  5. The first 3 bytes (OUI) identify the device manufacturer (e.g., Intel, Cisco)
  6. Each port on a switch is its own collision domain; only one device can collide with itself. A hub has a single shared collision domain for all ports.

4  ·  Transport Layer - TCP vs UDP

TCP vs UDP

FeatureTCPUDP
ConnectionConnection-oriented (handshake)Connectionless (fire and forget)
ReliabilityGuaranteed delivery, retransmits lost segmentsNo guarantee - best effort
OrderingSequence numbers ensure in-order deliveryNo ordering
Flow controlYes - sliding windowNo
SpeedSlower (overhead)Faster (minimal overhead)
Use casesHTTP, HTTPS, SSH, FTP, email - reliability criticalDNS, DHCP, VoIP, streaming, gaming - speed critical
Header size20 bytes minimum8 bytes

TCP Three-Way Handshake

Step 1 - Client → ServerSYN (synchronize - "I want to connect")
Step 2 - Server → ClientSYN-ACK (synchronize-acknowledge - "OK, ready")
Step 3 - Client → ServerACK (acknowledge - "Connection established")
Connection teardown uses a four-way FIN exchange: FIN → ACK → FIN → ACK. Either side can initiate.

TCP Flags

SYNSynchronize - initiates a connection
ACKAcknowledge - confirms receipt of data
FINFinish - gracefully closes a connection
RSTReset - abruptly terminates a connection
PSHPush - send buffered data immediately to the application
URGUrgent - data should be prioritized

Port Numbers

Well-known0 – 1,023 - reserved for common system services
Registered1,024 – 49,151 - registered by applications (e.g., databases)
Dynamic/ephemeral49,152 – 65,535 - assigned temporarily to client-side connections

Common Port Numbers to Memorize

Port(s)ProtocolTransportNotes
20 / 21FTPTCP20 = data, 21 = control
22SSH / SCP / SFTPTCPSecure remote shell & file transfer
23TelnetTCPUnencrypted - avoid; use SSH instead
25SMTPTCPSending email between mail servers
53DNSTCP+UDPUDP for queries; TCP for zone transfers and large responses
67 / 68DHCPUDP67 = server, 68 = client
80HTTPTCPUnencrypted web traffic
110POP3TCPReceive email (downloads to client)
123NTPUDPNetwork Time Protocol
143IMAPTCPReceive email (syncs with server)
161 / 162SNMPUDP161 = queries, 162 = traps
389LDAPTCPDirectory lookups (Active Directory)
443HTTPSTCPHTTP over TLS
445SMBTCPWindows file sharing
465 / 587SMTPS / SubmissionTCPSecure/authenticated email sending
636LDAPSTCPLDAP over TLS
993 / 995IMAPS / POP3STCPSecure email retrieval
1433MS SQL ServerTCP
3306MySQLTCP
3389RDPTCPRemote Desktop Protocol (Windows)
5432PostgreSQLTCP
5900VNCTCPRemote desktop (cross-platform)
8080 / 8443HTTP / HTTPS altTCPCommon non-privileged web service ports
  1. Walk through the TCP three-way handshake in order.
  2. What port does HTTPS use, and what does it add over HTTP?
  3. Which protocol would you use for live video streaming, and why?
  4. What port does RDP use?
  5. A firewall blocks all traffic to port 22. What functionality is lost?
  6. What are the three port number ranges and their boundaries?
  1. Client sends SYN → Server replies SYN-ACK → Client sends ACK. Connection is now established.
  2. Port 443. HTTPS = HTTP wrapped in TLS, which provides encryption, authentication (server certificate), and data integrity.
  3. UDP - because it's faster (no handshake, no retransmission) and a dropped frame is less noticeable than jitter caused by waiting for retransmits.
  4. 3389
  5. SSH access is lost, meaning secure remote shell, SCP file transfers, and SFTP would all be blocked.
  6. Well-known: 0–1023 | Registered: 1024–49151 | Dynamic/ephemeral: 49152–65535

5  ·  Application Layer Services - DNS, DHCP, NAT, HTTP

DNS - Domain Name System

  • Translates human-readable hostnames (example.com) into IP addresses. Often called "the phonebook of the internet."
  • Hierarchical structure: root (.) → TLD (.com) → authoritative nameserver → record.
  • DNS queries use UDP port 53 (most common); TCP port 53 for large responses and zone transfers.
  • TTL (Time To Live): how long a record is cached before re-querying.

DNS Record Types

TypeMaps / ReturnsExample
AHostname → IPv4 addressexample.com → 93.184.216.34
AAAAHostname → IPv6 addressexample.com → 2606:2800:220:1:248:1893:25c8:1946
CNAMEAlias → canonical namewww.example.com → example.com
MXDomain → mail server(s)example.com → mail.example.com (priority 10)
PTRIP → hostname (reverse lookup)34.216.184.93.in-addr.arpa → example.com
NSDomain → authoritative nameserver(s)example.com → ns1.example.com
SOAZone metadata - serial, refresh, retry, expireEach zone has exactly one
TXTFree-form textSPF, DKIM, domain verification

DNS Resolution Process

1. Check local cacheBrowser / OS cache
2. Check /etc/hostsLocal override file
3. Query recursive resolverISP DNS or 8.8.8.8 (Google)
4. Resolver → rootRoot returns TLD nameserver address
5. Resolver → TLDTLD returns authoritative NS address
6. Resolver → authoritative NSReturns the actual A/AAAA record
7. Resolver caches + repliesClient gets the IP, answer cached per TTL

DHCP - Dynamic Host Configuration Protocol

  • Automatically assigns IP configuration to devices on a network.
  • Assigns: IP address, subnet mask, default gateway, DNS servers, and a lease time.
  • Uses UDP: client listens on port 68, server on port 67.
  • Initial discovery uses broadcasts (source: 0.0.0.0, dest: 255.255.255.255).

DORA Process

D - Discover Client broadcasts "Anyone have an IP for me?"
O - Offer Server replies with an available IP lease offer
R - Request Client broadcasts "I'll take 192.168.1.50 from Server X"
A - AcknowledgeServer confirms "It's yours until [lease time]"
  • Lease renewal: client tries to renew at 50% of lease time (T1), then again at 87.5% (T2).
  • DHCP reservation: server assigns a fixed IP based on the client's MAC address.
  • DHCP relay agent: forwards DHCP broadcasts across router boundaries so one server can serve multiple subnets.

NAT - Network Address Translation

  • Translates private IP addresses to a public IP (and back) as packets cross the router. Extends IPv4 address space.
  • Static NAT: one-to-one mapping - one private IP always maps to one specific public IP.
  • Dynamic NAT: many-to-many - private IPs share a pool of public IPs.
  • PAT (Port Address Translation) / NAT overload / masquerade: many-to-one - all private devices share a single public IP, differentiated by port numbers. This is what home routers do.
Inside localInside globalExplanation
192.168.1.10:50001203.0.113.5:10001Private IP:port → public IP:port (PAT)
192.168.1.11:50002203.0.113.5:10002Different port used on the same public IP

HTTP / HTTPS

  • HTTP methods: GET (retrieve), POST (submit), PUT (replace), PATCH (partial update), DELETE, HEAD (headers only), OPTIONS (capabilities).
  • HTTPS = HTTP + TLS - adds encryption, server authentication via certificates, and data integrity (port 443).

HTTP Status Codes

RangeCategoryCommon Codes
1xxInformational100 Continue, 101 Switching Protocols
2xxSuccess200 OK · 201 Created · 204 No Content
3xxRedirection301 Moved Permanently · 302 Found · 304 Not Modified
4xxClient Error400 Bad Request · 401 Unauthorized · 403 Forbidden · 404 Not Found · 429 Too Many Requests
5xxServer Error500 Internal Server Error · 502 Bad Gateway · 503 Service Unavailable · 504 Gateway Timeout
  1. What DNS record type maps a hostname to an IPv4 address?
  2. Spell out and explain each step of the DHCP DORA process.
  3. An HTTP response returns status 403. What does this mean, and what's the difference from 401?
  4. What type of NAT is used in a typical home router? How does it allow multiple devices to share one IP?
  5. You try to access a site by IP and it works, but using the domain name it fails. What is the likely problem?
  6. What is the DNS TTL and why does it matter for troubleshooting?
  1. A record
  2. Discover (client broadcasts looking for a DHCP server) → Offer (server offers an IP lease) → Request (client formally requests that specific offer) → Acknowledge (server confirms the lease)
  3. 403 = Forbidden (you are authenticated but not permitted to access the resource). 401 = Unauthorized (authentication is required and was not provided or failed - misleading name).
  4. PAT (Port Address Translation) / NAT overload. The router translates each private IP:port pair to the public IP with a unique port number, tracking each session in the NAT table.
  5. DNS resolution is failing. The IP-based request bypasses DNS entirely. Check the DNS configuration or try nslookup / dig on the domain.
  6. TTL is how long a DNS record is cached. A low TTL means changes propagate quickly but cause more DNS queries. A high TTL reduces queries but means stale entries linger longer after a change - important when troubleshooting after a DNS update.

6  ·  Connectivity, VPNs & Troubleshooting Tools

Systematic Connectivity Troubleshooting

Step 1Physical - check cable, NIC link light, Wi-Fi signal
Step 2IP config - ipconfig / ip addr - verify IP/mask/GW/DNS
Step 3Loopback - ping 127.0.0.1 - tests TCP/IP stack itself
Step 4Default gateway - ping 192.168.1.1 - tests local LAN
Step 5External IP - ping 8.8.8.8 - tests routing & internet
Step 6DNS - ping google.com or nslookup google.com - tests name resolution
Step 7Path - traceroute / tracert - identify where packets stop

Windows Troubleshooting Commands

ipconfig                 # Show IP configuration (all adapters)
ipconfig /all            # Detailed - includes MAC, DHCP server, lease times
ipconfig /release        # Release DHCP lease
ipconfig /renew          # Request new DHCP lease
ipconfig /flushdns       # Clear the local DNS cache

ping 8.8.8.8             # Test ICMP connectivity
ping -t 8.8.8.8         # Continuous ping (Ctrl+C to stop)
ping -n 10 8.8.8.8     # Send exactly 10 packets

tracert google.com       # Trace route hop-by-hop
pathping google.com      # Combined ping + tracert with statistics

nslookup google.com     # DNS lookup
nslookup -type=MX gmail.com  # Query specific record type

arp -a                   # Show ARP table (IP ↔ MAC mappings)
route print             # Show routing table
netstat -an             # Show all connections and listening ports
netstat -b              # Show which executable owns each connection

Linux / macOS Commands

ip addr                  # Show IP addresses (modern Linux)
ip route                 # Show routing table
ifconfig                 # Show IP config (legacy, still common on macOS)

ping -c 4 8.8.8.8       # Send 4 ICMP echo requests
traceroute google.com   # Trace route (Linux/macOS)

dig google.com          # Detailed DNS lookup
dig MX gmail.com        # Query MX records
dig +short google.com  # Just the answer
nslookup google.com     # Simpler DNS lookup

ss -tulpn               # Show listening ports and processes (modern)
netstat -tulpn          # Same, legacy command

arp -n                   # Show ARP table
curl -I https://example.com  # Show HTTP response headers only
tcpdump -i eth0 -n     # Capture packets on interface eth0

VPNs - Virtual Private Networks

  • Purpose: create an encrypted tunnel over an untrusted network (the internet), allowing secure communication as if on a private network.
  • Site-to-site VPN: connects two entire networks (e.g., HQ ↔ branch office). Always-on tunnel between routers/firewalls.
  • Remote access VPN: individual device connects to a corporate network. The user's device gets a virtual IP on the remote subnet.
  • Split tunneling: only traffic destined for the remote network goes through the VPN; other traffic goes direct. Reduces VPN load but reduces security.

VPN Protocols

IPsecLayer 3. Two modes: Tunnel (encrypts entire packet, used for site-to-site) vs Transport (encrypts payload only). Often combined with IKEv2.
SSL/TLS VPNRuns over TCP/443. Works through firewalls that block non-HTTP. Common for remote access (e.g., OpenVPN, Cisco AnyConnect).
WireGuardModern, minimal codebase, fast. Uses UDP. Increasingly replacing OpenVPN in new deployments.
L2TP/IPsecL2TP provides the tunnel (Layer 2), IPsec provides encryption. Built into most OSes.
PPTPOld, insecure - should not be used. Only included for historical/exam context.

Proxy Servers

Forward proxySits between clients and the internet. Can filter, cache, and log outbound requests. Clients know about it.
Reverse proxySits in front of servers (e.g., Nginx, HAProxy). Handles load balancing, SSL termination, and caching. Clients don't know the backend servers.

Firewalls

StatelessFilters based on static rules (src/dst IP, port, protocol). Each packet is evaluated independently - no awareness of connection state.
StatefulTracks the state of active connections (connection table). Allows return traffic for established sessions automatically. More secure.
NGFWNext-Generation Firewall - adds deep packet inspection, application awareness, IDS/IPS, and user identity into a stateful firewall.

Wireless Troubleshooting Notes

  • 2.4 GHz non-overlapping channels: 1, 6, 11 (US). Use these to avoid co-channel interference.
  • 5 GHz: more channels, less interference, shorter range.
  • RSSI (Received Signal Strength Indicator): measure of signal strength. More negative = weaker (e.g., -70 dBm is weaker than -50 dBm).
  • Authentication failures: wrong passphrase, expired certificate (WPA2-Enterprise), or mismatch in security standard.
  • Check DHCP exhaustion if new devices can't get an IP - the pool may be full.
  1. What command shows the ARP cache on Windows? On Linux?
  2. You can ping 8.8.8.8 successfully but cannot load google.com in a browser. What is most likely wrong and what command would you run next?
  3. What does ipconfig /flushdns do and when would you use it?
  4. What is the difference between a site-to-site VPN and a remote access VPN?
  5. A stateless firewall rule permits TCP traffic from any source to port 80. Why might a stateful firewall be preferable here?
  6. What are the non-overlapping channels on the 2.4 GHz band (US), and why does this matter?
  1. Windows: arp -a. Linux: arp -n or ip neigh
  2. DNS resolution is failing - the device can reach the internet but can't translate domain names to IPs. Run nslookup google.com or dig google.com to verify.
  3. It clears the local DNS resolver cache. Useful when DNS records have changed (e.g., server migration) but the old cached entry is still being used.
  4. Site-to-site connects two full networks permanently (e.g., two offices), handled by router/firewall appliances. Remote access VPN connects a single user's device to a network, typically initiated on-demand by the user.
  5. A stateful firewall automatically permits the TCP reply traffic (RST, ACK, established sessions) for connections it initiated, and blocks unsolicited inbound packets. A stateless firewall would need explicit rules for return traffic, creating security gaps.
  6. Channels 1, 6, and 11 are the only three non-overlapping 20 MHz channels in the US 2.4 GHz band. Using the same or adjacent channels as a neighbor causes co-channel or adjacent-channel interference, reducing throughput.

7  ·  What Actually Matters - Key Takeaways

The mental model - OSI layers for troubleshooting

Use the 4-layer TCP/IP model bottom-up. Every real-world problem maps to one of these layers - it stops you from chasing DNS when the cable is unplugged.

1  Physical Is the cable / signal good?
2  Data Link Is the MAC address / switch doing its job?
3  Network Is IP routing correct?
4  Transport Is the right port open? Is the connection establishing?
5  Application Is the service itself responding?

IP addressing & subnetting - needs to be automatic

  • CIDR notation, what the prefix length means, how to derive the network address, broadcast address, and usable host range from any prefix.
  • Memorize the private RFC 1918 ranges cold: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
  • Understanding why subnetting exists - traffic segmentation, security boundaries, broadcast domain control - matters more long-term than binary math speed. But the math still needs to be solid.

TCP vs UDP - know when each is appropriate

TCP Connection-oriented. Three-way handshake (SYN → SYN-ACK → ACK), guaranteed delivery, ordered, flow-controlled. Used where integrity matters - HTTP, SSH, FTP.
UDP Fire-and-forget. No handshake, low overhead. Used where speed matters more than perfection - DNS queries, streaming, VoIP, gaming.
Knowing which protocol is involved tells you what kind of problem to look for.

DNS - the system everything depends on

  • Resolution chain: recursive resolver → root → TLD → authoritative.
  • Record types in practical priority order: A (IPv4), AAAA (IPv6), CNAME (alias), MX (mail routing), PTR (reverse lookup), NS (delegation).
  • TTL as an operational lever - lower it before migrations so changes propagate quickly.
  • The real skill: isolating "is this DNS or connectivity?" quickly with nslookup or dig.

DHCP - understand the lease lifecycle

  • DORA: Discover → Offer → Request → Acknowledge. Discover and Request are broadcasts; Offer and Acknowledge come from the server.
  • Lease renewal behavior: client tries at 50% of lease time (T1), then at 87.5% (T2).
  • Reservations (MAC-to-IP binding) give devices a stable address without full static config.
  • IP helper addresses forward DHCP broadcasts across subnets so one server can serve multiple VLANs.

NAT - the bridge between private and public

  • PAT (the common form) maps many internal hosts to one public IP via port tracking.
  • The NAT table is what makes return traffic work - if the entry times out or the device reboots, return traffic has nowhere to go.
  • Inbound connections to NATted hosts require explicit port forwarding rules.

Routing fundamentals

  • Static routes: manually configured, predictable, fragile at scale.
  • Dynamic routing protocols (OSPF interior, BGP exterior): know the names and use cases even before you configure them.
  • The default gateway is the "if I don't know where else to send it" rule.
  • TTL is both a routing safety mechanism (drops loops) and the engine behind traceroute.

Troubleshooting tools - daily instruments

pingLayer 3 reachability, round-trip time
traceroute / tracertPath mapping - find where packets stop
nslookup / digDNS verification independent of the browser
netstat / ssWhat's listening, what's connected
ipconfig / ip addrLocal config sanity check
Ping the gateway Fails → local problem
Gateway OK, destination fails Somewhere in the path
IP works, hostname fails DNS
That sequence gets you to the answer faster than reaching for any individual tool first.

IPv6 - know it well enough to work with it

  • 128-bit addresses, colon-hex notation. Two compression rules: drop leading zeros per group; replace the longest consecutive all-zero run with :: once (leftmost on ties).
  • Address types that matter: global unicast (2000::/3, publicly routable), link-local (fe80::/10, auto-configured, non-routable, always present on every interface), loopback (::1).
  • No broadcast - replaced by multicast. No NAT needed at scale.
  • Dual-stack is the real-world transition reality - most production networks run both IPv4 and IPv6 simultaneously.

The bigger picture

Networks are layered systems and every problem has a layer. Verify each layer before assuming the problem is higher up. That instinct - checking bottom-up systematically before jumping to conclusions - is worth more than memorizing any individual fact on this list.
Quiz Me
1 / 6

0 / 6

correct