Cascade Valley Computer Networks

Deep Dive into Network Engineering Fundamentals

A comprehensive technical resource for engineers covering the evolution, architecture, and implementation of computer networks with focus on low-level protocols and TCP/IP stack internals.

7 OSI Layers
4 TCP/IP Layers
50+ Protocols
Application
Transport
Network
Link
Physical

History of Computer Networks

1960s

ARPANET Foundation

US Department of Defense funds ARPANET research. First packet-switching network implemented with IMP (Interface Message Processor) nodes at UCLA, Stanford, UCSB, and University of Utah.

Technical Specs: 50 kbps links, Host-to-Host Protocol, NCP (Network Control Protocol)
1970s

TCP/IP Development

Vint Cerf and Robert Kahn develop TCP/IP. Ethernet invented by Bob Metcalfe at Xerox PARC. First cross-network connections established.

Technical Specs: TCP v1-3 (1973-1977), TCP v4 (1978), Ethernet 2.94 Mbps, CSMA/CD
1980s

DNS and Standardization

Domain Name System (DNS) created. TCP/IP becomes standard (RFC 791, 792, 793). First commercial ISPs emerge.

Technical Specs: DNS (RFC 1034/1035), IPv4 addresses, TCP/UDP ports 0-65535
1990s

World Wide Web

Tim Berners-Lee creates HTTP, HTML, URLs at CERN. Mosaic browser released. Commercial internet explosion.

Technical Specs: HTTP/0.9 (1991), HTTP/1.0 (1996), HTTP/1.1 (1997), SSL/TLS
2000s

Modern Internet

IPv6 deployment begins. Mobile networks (3G/4G). Cloud computing and CDN networks. HTTP/2 and QUIC development.

Technical Specs: IPv6 (RFC 8200), HTTP/2 (2015), QUIC (RFC 9000), 5G networks

Network Types and Topologies

LAN (Local Area Network)

Range: 1-10 km
Speed: 10 Mbps - 10 Gbps
Technologies: Ethernet, Wi-Fi

High-speed networks connecting devices within a limited geographic area like offices, homes, or campuses.

# Ethernet Frame Structure
+----------+----------+---------+-----+----------+------+
| Destination | Source | Type | Payload | FCS |
| MAC (6B) | MAC (6B) | (2B) | (46-1500B) | (4B) |
+----------+----------+---------+-----+----------+------+

WAN (Wide Area Network)

Range: Global
Speed: 1 Mbps - 100 Gbps
Technologies: MPLS, SONET, Fiber

Large-scale networks spanning cities, countries, or continents using leased lines or satellite connections.

# MPLS Label Stack
+--------+--------+--------+--------+
| Label | EXP | S | TTL | Label | EXP | S | TTL |
| (20b) | (3b) | (1b) | (8b) | (20b) | (3b) | (1b) | (8b) |
+--------+--------+--------+--------+

METRO (Metropolitan Area Network)

Range: 10-100 km
Speed: 1 Gbps - 100 Gbps
Technologies: DWDM, Ethernet

High-speed backbone networks connecting multiple LANs within a city or metropolitan region.

# DWDM Channel Allocation
Channel | Wavelength (nm) | Frequency (THz)
--------|----------------|------------------
C21     | 1560.61        | 192.1
C22     | 1560.41        | 192.2
C23     | 1560.20        | 192.3

PAN (Personal Area Network)

Range: 1-10 m
Speed: 1 Mbps - 3 Gbps
Technologies: Bluetooth, Zigbee

Short-range networks for personal devices like smartphones, wearables, and peripherals.

# Bluetooth Packet Structure
+------+----------+----------+--------+
| Access Code | Header | Payload | CRC |
| (72/68 bits) | (54 bits) | (0-2745 bits) | (24 bits) |
+------+----------+----------+--------+

Network Topologies

Star Topology

All devices connect to a central hub/switch. Easy to manage, single point of failure.

Mesh Topology

Redundant connections between nodes. High reliability, complex routing.

Ring Topology

Devices connected in circular fashion. Token passing, deterministic access.

Bus Topology

Single shared medium. Simple, collision domain issues.

TCP/IP Protocol Suite

Application Layer

HTTP/HTTPS FTP SSH DNS SMTP

Transport Layer

TCP UDP SCTP

Internet Layer

IP ICMP IGMP ARP

IPv4 Header Structure

 0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |Version|  IHL  |Type of Service|          Total Length         |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |         Identification        |Flags|      Fragment Offset    |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  Time to Live |    Protocol   |         Header Checksum       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                         Source Address                        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                      Destination Address                      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                    Options (if any) ...                       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Version (4 bits): IPv4 = 4
IHL (4 bits): Header length in 32-bit words (5-15)
Type of Service (8 bits): DSCP + ECN for QoS
Total Length (16 bits): Entire packet size (header + data)
Identification (16 bits): Unique packet identifier
Flags (3 bits): DF, MF, Reserved
Fragment Offset (13 bits): Position in fragmented datagram

TCP Header Structure

 0                   1                   2                   3
   0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |          Source Port          |         Destination Port       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                        Sequence Number                        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                    Acknowledgment Number                      |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |  Data |           |U|A|P|R|S|F|                               |
  | Offset| Reserved  |R|C|S|S|Y|I|            Window             |
  |       |           |G|K|H|T|N|N|                               |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |           Checksum            |         Urgent Pointer        |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |                    Options (if any) ...                       |
  +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Source/Dest Port (16 bits each): Application endpoints
Sequence Number (32 bits): Byte position in data stream
Ack Number (32 bits): Next expected byte
Data Offset (4 bits): Header length in 32-bit words
Flags (6 bits): URG, ACK, PSH, RST, SYN, FIN
Window (16 bits): Flow control (bytes)

Three-Way Handshake

SYN SEQ=x

Client initiates connection with SYN flag

SYN-ACK SEQ=y, ACK=x+1

Server responds with SYN-ACK

ACK SEQ=x+1, ACK=y+1

Client acknowledges, connection established

Core Network Protocols

DNS (Domain Name System)

Port: 53 Transport: UDP/TCP RFC: 1035

Hierarchical distributed naming system for translating domain names to IP addresses.

# DNS Query Response Format
+---------------------+
| Header (12 bytes)   |
+---------------------+
| Question (variable) |
+---------------------+
| Answer (variable)   |
+---------------------+
| Authority (variable)|
+---------------------+
| Additional (variable)|
+---------------------+

DHCP (Dynamic Host Configuration)

Port: 67/68 Transport: UDP RFC: 2131

Automatically assigns IP addresses and network configuration to hosts.

# DHCP Message Types
DISCOVER    -> Client broadcast for servers
OFFER       -> Server response with IP offer
REQUEST     -> Client requests specific IP
ACK         -> Server confirms assignment

ICMP (Internet Control Message)

Protocol: 1 Transport: IP RFC: 792

Error reporting and diagnostic messages for IP networks.

# ICMP Types
Type 0: Echo Reply (ping response)
Type 3: Destination Unreachable
Type 8: Echo Request (ping)
Type 11: Time Exceeded

ARP (Address Resolution Protocol)

Protocol: 0x0806 Transport: Ethernet RFC: 826

Maps IP addresses to MAC addresses on local networks.

# ARP Packet Format
+----------+----------+---------+----------+
| Hardware | Protocol | HLEN    | PLEN     |
| Type     | Type     | (1 byte)| (1 byte) |
+----------+----------+---------+----------+
| Operation| Sender MAC| Sender IP| Target   |
| (2 bytes)| (6 bytes)| (4 bytes)| MAC/IP  |
+----------+----------+---------+----------+