π WHAT IS THE INTERNET
The complete technical architecture, protocols, infrastructure, and operation of the global network of networks.
π Definition
The Internet is a globally distributed network of interconnected computer networks that use standardized communication protocols to exchange data. It is not a single entity but rather a decentralized infrastructure comprising millions of private, public, academic, business, and government networks.
π§ FUNDAMENTAL CONCEPTS
Core Principles
Packet Switching
Data is broken into discrete blocks called packets that travel independently across the network and are reassembled at the destination.
End-to-End Principle
Network intelligence resides at the endpoints (hosts) rather than in the network itself, keeping the core network simple and dumb.
Redundancy
Multiple paths between any two points ensure network resilience and continued operation despite individual component failures.
Decentralization
No single point of control or failure; the network operates through distributed consensus and cooperation.
π TECHNICAL ARCHITECTURE
TCP/IP Protocol Suite
| Layer | Protocols | Function | PDU |
|---|---|---|---|
| Application | HTTP, HTTPS, FTP, SMTP, DNS, SSH, DHCP | Network services to applications | Data |
| Transport | TCP, UDP, SCTP, DCCP | End-to-end communication, reliability | Segment/Datagram |
| Internet | IP (IPv4/IPv6), ICMP, IPsec | Logical addressing, routing | Packet |
| Link | Ethernet, Wi-Fi, PPP, ARP | Physical transmission, MAC addressing | Frame |
π’ IP ADDRESSING SYSTEM
IPv4 Addressing
Structure
32-bit address (4 octets) expressed in dotted-decimal notation: 192.168.1.1
Binary: 11000000.10101000.00000001.00000001 Decimal: 192 . 168 . 1 . 1
Classes (Historical)
- Class A: 1.0.0.0 - 126.255.255.255
- Class B: 128.0.0.0 - 191.255.255.255
- Class C: 192.0.0.0 - 223.255.255.255
- Class D: 224.0.0.0 - 239.255.255.255 (Multicast)
- Class E: 240.0.0.0 - 255.255.255.255 (Reserved)
CIDR Notation
Classless Inter-Domain Routing: 192.168.1.0/24
192.168.1.0/24 = 256 addresses 192.168.1.0/25 = 128 addresses 192.168.1.0/26 = 64 addresses 192.168.1.0/30 = 4 addresses
Private Ranges (RFC 1918)
- 10.0.0.0/8 (16,777,216 addresses)
- 172.16.0.0/12 (1,048,576 addresses)
- 192.168.0.0/16 (65,536 addresses)
IPv6 Addressing
Structure
128-bit address (8 hextets) expressed in hexadecimal: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Full: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 Compressed: 2001:db8:85a3::8a2e:370:7334
Address Types
- Global Unicast: 2000::/3 (public addresses)
- Unique Local: fc00::/7 (private addresses)
- Link-Local: fe80::/10 (local network only)
- Multicast: ff00::/8 (one-to-many)
- Anycast: From unicast range (nearest of many)
Special Addresses
- ::/128 - Unspecified address
- ::1/128 - Loopback address
- ff02::1 - All nodes on local link
- ff02::2 - All routers on local link
Advantages
- 340 undecillion addresses (3.4Γ10Β³βΈ)
- Built-in IPsec support
- Stateless address autoconfiguration
- Improved multicast and anycast
- Simplified header format
π PACKET SWITCHING DETAILED
Packet Structure and Journey
IP Packet Header (IPv4)
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 IHL > 5) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Packet Processing at Each Hop
- Reception: Physical layer receives bits, reconstructs frame
- Frame Check: Verify FCS/CRC, check destination MAC
- Decapsulation: Remove link-layer header, extract IP packet
- Header Validation: Verify checksum, check TTL (decrement by 1)
- Routing Decision: Consult routing table for next hop
- Fragmentation: If needed, fragment packet to fit MTU
- Encapsulation: Add new link-layer header for next hop
- Transmission: Queue for transmission on outgoing interface
πΊοΈ ROUTING PROTOCOLS
Autonomous Systems and Routing
| Protocol | Type | Scope | Algorithm | Metric |
|---|---|---|---|---|
| RIP | Distance Vector | IGP | Bellman-Ford | Hop Count |
| OSPF | Link State | IGP | Dijkstra SPF | Cost (bandwidth) |
| EIGRP | Hybrid | IGP | DUAL | Composite metric |
| IS-IS | Link State | IGP | Dijkstra SPF | Cost (default 10) |
| BGP | Path Vector | EGP | Path selection | Attributes (AS_PATH, etc.) |
BGP Detailed Operation
Neighbor Establishment
- TCP connection on port 179
- OPEN message exchange
- KEEPALIVE messages
- UPDATE messages for routing
- NOTIFICATION for errors
Path Attributes
- AS_PATH: Sequence of ASes
- NEXT_HOP: Next hop IP
- LOCAL_PREF: Local preference
- MED: Multi-Exit Discriminator
- COMMUNITIES: Route tagging
Route Selection
- Highest LOCAL_PREF
- Shortest AS_PATH
- Lowest ORIGIN type
- Lowest MED
- eBGP over iBGP
- Lowest IGP metric
- Oldest route
- Lowest router ID
π DNS ARCHITECTURE
Domain Name System Hierarchy
[Root]
|
+-----------+-----------+
| |
[.com] [.org]
| |
+---+---+ +---+---+
| | | |
[google] [example] [wikipedia] [ietf]
| | | |
[www] [mail] [en] [www]
DNS Message Format
DNS Header (12 bytes) βββ ID (16 bits) βββ Flags (QR, Opcode, AA, TC, RD, RA, Z, RCODE) βββ QDCOUNT (questions) βββ ANCOUNT (answers) βββ NSCOUNT (authority) βββ ARCOUNT (additional) Question Section βββ QNAME (domain name) βββ QTYPE (record type) βββ QCLASS (class) Answer/Authority/Additional Sections βββ NAME (domain) βββ TYPE (record type) βββ CLASS (class) βββ TTL (time to live) βββ RDLENGTH (data length) βββ RDATA (record data)
Record Types
| A | IPv4 address | 1 |
| AAAA | IPv6 address | 28 |
| CNAME | Canonical name | 5 |
| MX | Mail exchange | 15 |
| NS | Name server | 2 |
| PTR | Pointer (reverse) | 12 |
| SOA | Start of authority | 6 |
| SRV | Service locator | 33 |
| TXT | Text record | 16 |
| DNSKEY | DNSSEC public key | 48 |
DNS Resolution Process
- Recursive query to resolver
- Resolver checks cache
- Query root servers (. β NS)
- Query TLD servers (.com β NS)
- Query authoritative servers
- Return IP address
- Cache response (respect TTL)
π PHYSICAL INFRASTRUCTURE
Network Topology and Media
Transmission Media
- Twisted Pair: Cat5e/Cat6/Cat7 (1Gbps-10Gbps)
- Coaxial Cable: DOCSIS 3.1 (10Gbps)
- Fiber Optic: Single-mode/Multi-mode (100Gbps+)
- Wireless: Wi-Fi 6E/7, 5G NR, Satellite
- Microwave: Point-to-point links
Network Devices
- Hub: Layer 1 repeater (obsolete)
- Switch: Layer 2 frame forwarding
- Router: Layer 3 packet routing
- Firewall: Stateful packet inspection
- Load Balancer: Traffic distribution
- NAT Gateway: Address translation
Data Center Architecture
- Spine-Leaf: Clos network topology
- TOR Switching: Top-of-Rack design
- Fabric Path: TRILL/SPB protocols
- VXLAN: Network virtualization
- BGP EVPN: Ethernet VPN control plane
β‘ PROTOCOLS IN DEPTH
TCP Protocol Mechanics
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 data offset > 5) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Data | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
TCP State Machine
Connection Establishment
- CLOSED: No connection
- LISTEN: Waiting for SYN
- SYN-SENT: Sent SYN, waiting ACK
- SYN-RECEIVED: Received SYN, sent SYN-ACK
- ESTABLISHED: Connection open
Connection Termination
- FIN-WAIT-1: Sent FIN, waiting ACK
- FIN-WAIT-2: Received ACK, waiting FIN
- CLOSE-WAIT: Received FIN, must close
- LAST-ACK: Sent FIN, waiting ACK
- TIME-WAIT: Wait 2MSL before CLOSED
- CLOSED: Connection closed
Flow Control
- Sliding Window: Dynamic window size
- Receive Window: rwnd in TCP header
- Zero Window: Stop sending when rwnd=0
- Window Scaling: Option for >64KB windows
- Silly Window Syndrome: Avoid small segments
Congestion Control Algorithms
Tahoe (1988)
- Slow Start: cwnd exponential growth
- Congestion Avoidance: AIMD
- Fast Retransmit: 3 duplicate ACKs
- cwnd reset to 1 MSS on loss
Reno (1990)
- Fast Recovery after Fast Retransmit
- cwnd = ssthresh after recovery
- Better performance than Tahoe
- Still resets on timeout
CUBIC (2008)
- Cubic function for window growth
- Less aggressive than Reno
- Better for high-BDP networks
- Default in Linux since 2.6.19
BBR (2016)
- Bottleneck Bandwidth and RTT
- Models delivery rate and RTT
- Reduces bufferbloat
- Google-developed
π SECURITY ARCHITECTURE
Cryptographic Protocols
TLS 1.3 Handshake
- ClientHello: Supported versions, cipher suites, key_share
- ServerHello: Selected version, cipher suite, key_share
- Server Parameters: EncryptedExtensions, CertificateRequest
- Server Authentication: Certificate, CertificateVerify
- Server Finished: Finished message
- Client Authentication: Certificate, CertificateVerify
- Client Finished: Finished message
- Application Data: Encrypted with derived keys
Key Exchange Methods
- RSA: Static key exchange (deprecated)
- DH/DHE: Diffie-Hellman (finite field)
- ECDH/ECDHE: Elliptic Curve DH
- PSK: Pre-Shared Key
- SRP: Secure Remote Password
Cipher Suites
- Key Exchange: ECDHE_RSA, ECDHE_ECDSA
- Authentication: RSA, ECDSA
- Bulk Encryption: AES-GCM, CHACHA20-POLY1305
- Hash Function: SHA256, SHA384
π INTERNET GOVERNANCE
Standardization Bodies
IETF
Internet Engineering Task Force
- Develops Internet Standards (RFCs)
- Working groups by topic
- Consensus-based process
- Produces RFC 822, 791, 793, etc.
ICANN
Internet Corporation for Assigned Names and Numbers
- Manages DNS root zone
- IP address allocation
- Protocol parameter registry
- gTLD management
IANA
Internet Assigned Numbers Authority
- IP address space allocation
- DNS root zone management
- Protocol number assignments
- Maintains registries
RIRs
Regional Internet Registries
- ARIN: North America
- RIPE NCC: Europe, Middle East
- APNIC: Asia-Pacific
- LACNIC: Latin America
- AFRINIC: Africa
π FUTURE DEVELOPMENTS
QUIC Protocol
- Transport over UDP
- Integrated TLS 1.3
- 0-RTT connection establishment
- Multiplexing without head-of-line blocking
- Connection migration
- HTTP/3 over QUIC
IPv6 Enhancements
- Segment Routing over IPv6
- SRv6 network programming
- IPv6-only networks
- 464XLAT for IPv4 compatibility
- MAP-T/MAP-E transition
Network Programmability
- P4 programming language
- Software-defined networking
- Network function virtualization
- Intent-based networking
- Telemetry and observability
Quantum-Resistant Cryptography
- Post-quantum algorithms
- Lattice-based cryptography
- Hash-based signatures
- Code-based cryptography
- Multivariate cryptography
π Internet Statistics
β’ Total IPv4 addresses: 4.3 billion (exhausted 2011)
β’ Total IPv6 addresses: 340 undecillion (3.4Γ10Β³βΈ)
β’ Global Internet users: 5.3 billion (66% penetration)
β’ Websites: 1.8 billion active
β’ Daily emails: 333 billion sent
β’ Internet traffic: 4.8 ZB/year (2022)
β’ Undersea cables: 1.3 million km total
β’ Peak BGP routes: ~950,000 IPv4 prefixes