Computer Networking, Internet Architecture, and Communication Protocols Study Guide

Fundamentals of Computer Networks and the Internet

  • Definitions of Core System Terms:

    • Net / Network: A system of interconnected computers, devices, and servers that share resources and data.

    • Internet: A global network of interconnected computers and devices that communicate with each other using standardized protocols.

    • Computing Device: A physical machine capable of running a program (e.g., computers, tablets, servers, routers, smart sensors).

    • Computing System: A group of computing devices and programs working together for a common purpose.

    • Computing Network: A group of interconnected computing devices capable of sending or receiving data.

    • Path: The series of direct connections between computing devices on a network, starting with a sender and ending with a receiver.

    • Protocol: An agreed-upon set of rules that specify the behavior of a system.

  • Structural Complexity and Topologies:

    • 2-Device Network: Requires only a physical connection and a shared data format.

    • 3-Device Network: Requires an addressing scheme so that devices can distinguish which data is intended for them.

    • 6+ Device Topologies:

    • Ring Topology: Each device connects to two neighboring devices, forming a circular ring.

    • Mesh Topology: Every device is connected directly to every other device on the network.

    • Star Topology: One central node/device connects directly to all other devices.

    • Bus Topology: All devices connect to a single shared central transmission line.

    • Tree Topology: A branching, hierarchical layout combining star and bus elements.

  • Geographic Network Classification:

    • LAN (Local Area Network): Covers a small geographical area, such as a home, school, or office building.

    • WAN (Wide Area Network): Spans large geographical regions (cities, countries, globe); composed of multiple interconnected LANs connected via leased telecommunication lines.

    • DCN (Data Center Network): Specialized high-performance network used inside data centers where minimal latency and ultra-fast inter-server communication are required.

Physical Infrastructure and Media Types

  • Physical Transmission Mediums:

    • Twisted Pair Copper Cables (Ethernet / CAT5):

    • Originates from landline telephone copper infrastructure.

    • Contains four twisted pairs (eight individual wires) of copper wire.

    • Transmits binary data (11s and 00s) using pulses of electricity (voltage or current).

    • Operates under standard Ethernet specifications.

    • Maximum Transmission Distance: 330ft330\,\text{ft}.

    • Bandwidth Capacity: 1Gbps1\,\text{Gbps}.

    • Vulnerabilities: Susceptible to electromagnetic interference.

    • Applications: Common in both local LANs and national WANs.

  

  • Fiber-Optic Cables:

    • Contains optical fibers that carry pulses of light (intensity of light) rather than electrical signals.

    • Coated with protective plastic layers and encased in a durable outer sheath.

    • Follows Ethernet standards for data formatting.

    • Maximum Transmission Distance: 50miles50\,\text{miles} per segment without amplification.

    • Bandwidth Capacity: Up to 26Tbps26\,\text{Tbps} (measured in early 2020).

    • Primary Use: Transoceanic lines connecting continents across oceans, as well as high-speed city networks.

    • Financial Costs: Tonga-to-Fiji undersea cable cost approximately $30million\$30\,\text{million}; Google FASTER cable (US to Tokyo) cost $300million\$300\,\text{million}.

/

  

  

  • Wireless Connections (Wi-Fi / Radio):

    • Eliminates initial physical cabling; internal wireless cards convert binary data into electromagnetic radio waves sent through the air.

    • Operational Distance: 75100ft75\text{--}100\,\text{ft} inside obstacle-heavy office environments; up to 1000ft1000\,\text{ft} in open fields.

    • Bandwidth Capacity: Theoretical maximum 1.3Gbps1.3\,\text{Gbps} (slower in practical conditions).

    • Wireless Access Points (WAPs): Intercept radio waves, convert them back to binary data, and transfer them onto wired copper/fiber infrastructure.

  

  • Summary Comparison Table of Network Media:

    • Wireless | Medium: Radio | Max Distance: 100ft100\,\text{ft} | Bandwidth: 1.3Gbps1.3\,\text{Gbps} | Notes: Slower in real-world conditions.

    • Twisted Pair Copper | Medium: Electricity | Max Distance: 330ft330\,\text{ft} | Bandwidth: 1Gbps1\,\text{Gbps} | Notes: Susceptible to interference.

    • Fiber-Optic Cable | Medium: Light | Max Distance: 50miles50\,\text{miles} | Bandwidth: 26Tbps26\,\text{Tbps} | Notes: Expensive installation cost.

Data Transmission Metrics: Bit Rate, Bandwidth, and Latency

  • Signal Encoding (Line Coding):

    • All network communication relies on binary streams (11s and 00s).

    • Line Coding: The technique of converting binary data into time-based electromagnetic or optical signals.

    • Example: Transmitting decimal 55 (1012101_2):

    • Multi-wire Internal Transfer: Uses 3 wires concurrently (Wire 1 ON, Wire 2 OFF, Wire 3 ON).

    • Single-wire Serial Transfer: Transmits over 3 consecutive time intervals over 1 line (Interval 1: ON pulse + wait, Interval 2: OFF/nothing + wait, Interval 3: ON pulse + wait).

  • Bit Rate Units and Scales:

    • Bit Rate: The speed at which data is transmitted, measured in bits per second (bps).

    • Historical Bit Rate: Early Internet modems operated at 75bps75\,\text{bps}.

    • Kilobit (Kbps): 10001=103bits1000^1 = 10^3\,\text{bits} (1,000bits1,000\,\text{bits}).

    • Megabit (Mbps): 10002=106bits1000^2 = 10^6\,\text{bits} (1,000,000bits1,000,000\,\text{bits}). A 10Mbps10\,\text{Mbps} connection transfers one bit every 100ns100\,\text{ns} (0.0000001s0.0000001\,\text{s}).

    • Gigabit (Gbps): 10003=109bits1000^3 = 10^9\,\text{bits} (1,000,000,000bits1,000,000,000\,\text{bits}).

    • Terabit (Tbps): 10004=1012bits1000^4 = 10^{12}\,\text{bits} (1,000,000,000,000bits1,000,000,000,000\,\text{bits}).

    • Petabit (Pbps): 10005=1015bits1000^5 = 10^{15}\,\text{bits} (1,000,000,000,000,000bits1,000,000,000,000,000\,\text{bits}).

  • Bandwidth Thresholds:

    • Bandwidth: The theoretical maximum bit rate of a transmission system.

    • Broadband Internet: Standard definition requiring a minimum bandwidth of 256Kbps256\,\text{Kbps}.

    • Global Broadband Access: As of 2016, only 40%40\% of residents in developing nations had access to broadband Internet.

  • Latency and Physical Constraints:

    • Latency: The time delay between sending a message and receiving it, measured in milliseconds (ms).

    • Round-Trip Latency Calculation:     Round-Trip Latency=Outbound Travel Time+Inbound ACK Travel Time\text{Round-Trip Latency} = \text{Outbound Travel Time} + \text{Inbound ACK Travel Time}

    • Example: Request travel time = 30ms30\,\text{ms}, Response ACK travel time = 40ms40\,\text{ms}. Total round-trip latency = 70ms70\,\text{ms}.

    • Speed of Light Limitation: Electromagnetic and light signals travel at approximately 1ft/ns1\,\text{ft/ns}. The physical distance between Los Angeles and Tokyo requires a absolute theoretical minimum latency of 30ms30\,\text{ms}.

  • Network Speed Measurement:

    • Network speed depends on both bandwidth and latency.

    • Modern connections are often asymmetric: Download speeds (e.g., 39.09Mbps39.09\,\text{Mbps}) are higher than upload speeds (e.g., 5.85Mbps5.85\,\text{Mbps}) because user activities are dominated by downloading content.

  Internet Protocol (IP) and Addressing Hierarchy

  • IP Address Functionality:

    • Every device on the Internet requires a unique IP address to send and receive messages.

    • Sender IP addresses are included in headers so destination systems can reply.

  • IPv4 vs. IPv6 Architecture:

    • IPv4 Architecture:

    • 32-bit binary address written as 4 decimal numbers separated by dots (octets).

    • Octet range: 00 to 255255 (28=2562^8 = 256 values per octet).

    • Total IPv4 Address Space:       232=4,294,967,296addresses2^{32} = 4,294,967,296\,\text{addresses}

    • Representation Example: 74.125.20.113.

    • IPv6 Architecture:

    • 128-bit binary address represented as 8 hexadecimal blocks separated by colons.

    • Block range: 0000 to FFFF (216=65,5362^{16} = 65,536 values per block, where FFFF equals 65,53565,535 in decimal).

    • Hexadecimal Block Calculation:       FFFF16=(15×163)+(15×162)+(15×161)+(15×160)=65,535\text{FFFF}_{16} = (15 \times 16^3) + (15 \times 16^2) + (15 \times 16^1) + (15 \times 16^0) = 65,535       2161=65,5352^{16} - 1 = 65,535

    • Total IPv6 Address Space:       2128=340,282,366,920,938,000,000,000,000,000,000,000,000addresses2^{128} = 340,282,366,920,938,000,000,000,000,000,000,000,000\,\text{addresses}       (340 undecillion addresses).

    • Representation Example: 2001:0db8:0000:0042:0000:8a2e:0370:7334.

  • Dynamic vs. Static Addressing:

    • Dynamic IP: Assigned temporarily by Internet Service Providers (ISPs) using an available pool; changes per session or per network location.

    • Static IP: Permanently fixed IP address assigned to servers to maintain reachable network locations.

  • IP Address Hierarchy and Subnetting:

    • Structure: Network ID (first sequence of bits) + Host/Node ID (final sequence of bits).

    • ISP Hierarchy Example (24.147.242.217):

    • First 16 bits (24.147): Comcast network.

    • Final 16 bits (242.217): Individual home computer.

    • Departmental Subnet Example (141.213.127.13):

    • 141.213: University of Michigan network.

    • 127: UMich Medicine department subnetwork.

    • 13: Specific laboratory computer.

    • Subnetting at Bit Level (10001101 11010101 01111111 00001101):

    • First 16 bits: University network.

    • Next 2 bits: Identifies 22=42^2 = 4 distinct departments.

    • Final 14 bits: Identifies up to 214=16,3842^{14} = 16,384 individual host computers per department.

Network Redundancy and Fault Tolerance

  • Principles of Redundancy:

    • Redundancy: Adding extra communication paths and hardware components so data can traverse alternative routes if a link fails.

    • Oakland to New York Routing Paths:

    • Path 1 (Direct/Short): Oakland -> Austin -> New York.

    • Path 2 (Alternative): Oakland -> Austin -> Tampa -> New York.

  • Fault Tolerance and Single Points of Failure:

    • Fault-Tolerant System: A system designed to continue functioning without interruption despite individual component failures.

    • Single Point of Failure: A component whose individual failure causes the complete breakdown of the entire system.

  • Subsea Cable Real-World Case Studies:

    • High Redundancy Regions: The North Atlantic Ocean has dozens of submarine cables connecting North America and Europe, eliminating single points of failure across the ocean.

  

  • Low Redundancy Regions: South Pacific islands rely on minimal physical cable links.

  

  • Tonga Cable Cut (2019): An anchor drag severed the single undersea fiber cable connecting Tonga to Fiji, disrupting national Internet access for 11 days. Satellite internet was brought in as low-bandwidth backup (graceful degradation).

  • Georgia Cable Cut (2011): An elderly woman digging for scrap metal cut a landline fiber cable with a shovel, causing Armenia to lose Internet access for 5 hours.

  • Global Cable Cut Rate: Undersea fiber optic cables experience accidental cuts approximately once every 3 days worldwide.

Transport Layer Protocols: TCP vs. UDP

  • Packet Transmission Fundamentals:

    • Datastream: Information broken down into smaller chunks for transmission over IP networks.

    • Packet: A discrete chunk of data transmitted across a network.

    • Packet Metadata: Additional header information attached to packets (source/destination IP addresses, sequence numbers, checksums) used for routing and message reassembly.

  • User Datagram Protocol (UDP):

    • Lightweight, connectionless transport protocol operating on top of IP.

    • Features: Fast, low-latency, minimal overhead. Does not perform retransmission of dropped packets, reordering, or connection handshakes (often termed an Unreliable Data Protocol).

    • Target Use Cases: Real-time applications where speed is prioritized over losslessness (e.g., live video streaming, voice calls, multi-player online gaming, DNS queries).

    • UDP Segment Layout:

    • Header Size: Fixed 8 bytes (64bits64\,\text{bits}).

    • Source Port (2 bytes / 16 bits) & Destination Port (2 bytes / 16 bits): Port numbers direct traffic to virtual endpoints on a device.

  

- **Segment Length** (2 bytes / 16 bits): Stores total byte length of segment (header + data). Maximum theoretical segment size:

      2161=65,535bytes2^{16} - 1 = 65,535\,\text{bytes} - Checksum (2 bytes / 16 bits): Field used to verify packet data integrity.

  • Step-by-Step UDP Checksum Verification:

    • Sender Algorithm:

    1. Encodes text string "Hola" into binary using ASCII/UTF-8:

      • 'H' = 01001000

      • 'o' = 01101111

      • 'l' = 01101100

      • 'a' = 01100001

    2. Groups bytes into 16-bit blocks: 0100100001101111 and 0110000101101100.

    3. Sums 16-bit blocks:        01001000011011112(18,54310)+01101100011000012(27,74510)10110100110100002(46,28810)\begin{aligned} 0100100001101111_2 &(18,543_{10}) \\ + 0110110001100001_2 &(27,745_{10}) \\ \hline 1011010011010000_2 &(46,288_{10}) \end{aligned}

    4. Inserts 1011010011010000 into Checksum field.

    • Receiver Detection of Corrupted Packet ("Mola"):

    1. Corrupted 'M' binary: 01001101.

    2. Grouped 16-bit blocks: 0100110101101111 and 0110110001100001.

    3. Recalculates sum:        01001101011011112(19,82310)+01101100011000012(27,74510)10111001110100002(47,56810)\begin{aligned} 0100110101101111_2 &(19,823_{10}) \\ + 0110110001100001_2 &(27,745_{10}) \\ \hline 1011100111010000_2 &(47,568_{10}) \end{aligned}

    4. Compares calculated checksum (1011100111010000) with packet checksum (1011010011010000). Because values differ, packet corruption is confirmed and discarded.

  • Transmission Control Protocol (TCP):

    • Connection-oriented, reliable transport protocol operating on top of IP (TCP/IP stack).

    • Header Size: Variable between 20 bytes and 60 bytes.

    • Features: Guarantees packet order, data integrity, and delivery via acknowledgments and retransmissions.

    • Protocol Lifecycle:


      • Establish Connection (3-Way Handshake):

        • Step 1: Client sends TCP packet with SYN flag set to 11 (SYN).

        • Step 2: Server responds with packet containing SYN = 11 and ACK = 11 (SYN-ACK).

        • Step 3: Client replies with packet containing ACK flag set to 11 (ACK).

      • Data Transmission and Tracking:

        • Each segment carries a 32-bit Sequence Number and Acknowledgement Number.

        • Receiver increments Acknowledgement Number by total payload bytes received.

        • Timeout Retransmission: Sender places outgoing packets in a timer queue. If timer expires before receiving an ACK, sender retransmits packet.

        • Handling Out-of-Order Packets: Receiver uses sequence numbers to buffer and resequence packets into original order.

      • Terminating Connection:

        • Initiating host sends packet with FIN flag set to 11 (FIN).

        • Remote host responds with ACK followed by FIN.

        • Initiating host confirms with final ACK to close socket.

The Domain Name System (DNS)

  • Functionality:

    • Acts as a distributed phonebook translating human-readable domain names into IP addresses.

  • Domain Anatomy:

    • Structure: [third-level-domain].[second-level-domain].[top-level-domain]

    • Top-Level Domain (TLD): Managed global endings such as .com, .org, .edu.

    • Second-Level Domain: Specific organizational name registered under TLD (e.g., wikipedia, khanacademy).

    • Third-Level Domain (Subdomain): Specific server partition assigned by domain owner (e.g., www, es, m).

  • Resolving a Domain Name (DNS Resolution Steps):

    1. Local Browser Cache: Checks locally stored mapping history (chrome://net-internals/#dns).

    2. ISP Resolver Cache: Queries Internet Service Provider's shared lookup cache.

    3. Root Name Servers: ISP queries root servers to direct to the appropriate TLD server.

    4. TLD Name Servers: Directs ISP to host name servers managing specific domain records.

    5. Host Name Servers: Returns exact authoritative IP address to ISP and user device.

  

The World Wide Web and HTTP

  • Distinction between Web and Internet:

    • Internet: The underlying physical network infrastructure and core IP protocols.

    • World Wide Web (WWW): An application network of HTML documents, media, and files linked via URLs running on top of the Internet.

HTTP Transmission Sequence:

  1. User Directs Browser to URL: Enters address starting with http:// or https://.

  2. DNS Mapping: Resolves host domain to numeric IP.

  3. Browser Transmits HTTP Request

text HTTP/1.1 200 OK Content-Type: text/html; charset=UTF-8 Content-Length: 208

…      ```

  • HTTP Status Codes: 200 OK (Successful request), 404 File Not Found (Missing document error).

  1. Rendering Content: Browser interprets HTML markup and executes external scripts/styles.

  

  

System Scalability and Load Testing

  • Scalability Factors:

    • Scalable System: A system that maintains performance without crashing as load or user volume increases.

    • Network Drivers: Open protocol standards, dynamic IP routing, and 128-bit IPv6 address spaces support network scaling.

  • Physical Scalability Bottlenecks:

    • Local access link bandwidth limitations.

    • Router Throughput: Consumer routers handle 1 Gbps\,\text{1 Gbps} throughput; enterprise routers handle up to 10Gbps10\,\text{Gbps}.

    • Wi-Fi Access Point Device Limits: Routers typically cap simultaneous connections around 250devices250\,\text{devices}.

  • Real-World Load Spikes:

    • Khan Academy Traffic Spike (March 2020): Remote learning due to COVID-19 caused a 250%250\% load increase. The student assignment notification queue accumulated a massive task backlog until engineers increased processing capacity.

  

  

  • Pokémon Go Launch (Summer 2016): Engineers performed load testing at 5×5\times estimated worst-case traffic. On launch day, actual traffic reached 50×50\times estimates, overwhelming Cloud Datastore transaction limits.

  

Internet Governance, Protocols, and Social Dilemmas

  • Standards Organizations & Protocol Classifications:

    • IETF (Internet Engineering Task Force): Open international organization that develops and maintains open Internet standards and protocols (TCP/IP, HTTP, DNS).

    • Open Protocols: Non-proprietary standards accessible to all developers and manufacturers, ensuring full device interoperability.

    • Proprietary Protocols: Controlled exclusively by a single company, limiting communication between devices of different vendor ecosystems.

  • Internet Policy Dilemmas:

    • Net Neutrality: Principle that Internet service providers must treat all data equally, without favoring, throttling, blocking, or charging extra for specific services or websites.

    • Internet Censorship: Control or suppression of published or accessed content on the Internet by authorities or institutions. Used for legal protection, but can also limit free expression.