🌐 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

  1. Reception: Physical layer receives bits, reconstructs frame
  2. Frame Check: Verify FCS/CRC, check destination MAC
  3. Decapsulation: Remove link-layer header, extract IP packet
  4. Header Validation: Verify checksum, check TTL (decrement by 1)
  5. Routing Decision: Consult routing table for next hop
  6. Fragmentation: If needed, fragment packet to fit MTU
  7. Encapsulation: Add new link-layer header for next hop
  8. 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
  1. TCP connection on port 179
  2. OPEN message exchange
  3. KEEPALIVE messages
  4. UPDATE messages for routing
  5. 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
  1. Highest LOCAL_PREF
  2. Shortest AS_PATH
  3. Lowest ORIGIN type
  4. Lowest MED
  5. eBGP over iBGP
  6. Lowest IGP metric
  7. Oldest route
  8. 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

AIPv4 address1
AAAAIPv6 address28
CNAMECanonical name5
MXMail exchange15
NSName server2
PTRPointer (reverse)12
SOAStart of authority6
SRVService locator33
TXTText record16
DNSKEYDNSSEC public key48

DNS Resolution Process

  1. Recursive query to resolver
  2. Resolver checks cache
  3. Query root servers (. β†’ NS)
  4. Query TLD servers (.com β†’ NS)
  5. Query authoritative servers
  6. Return IP address
  7. 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
  1. CLOSED: No connection
  2. LISTEN: Waiting for SYN
  3. SYN-SENT: Sent SYN, waiting ACK
  4. SYN-RECEIVED: Received SYN, sent SYN-ACK
  5. ESTABLISHED: Connection open
Connection Termination
  1. FIN-WAIT-1: Sent FIN, waiting ACK
  2. FIN-WAIT-2: Received ACK, waiting FIN
  3. CLOSE-WAIT: Received FIN, must close
  4. LAST-ACK: Sent FIN, waiting ACK
  5. TIME-WAIT: Wait 2MSL before CLOSED
  6. 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

  1. ClientHello: Supported versions, cipher suites, key_share
  2. ServerHello: Selected version, cipher suite, key_share
  3. Server Parameters: EncryptedExtensions, CertificateRequest
  4. Server Authentication: Certificate, CertificateVerify
  5. Server Finished: Finished message
  6. Client Authentication: Certificate, CertificateVerify
  7. Client Finished: Finished message
  8. 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

← Back to Wiki ← Networking Guide