Comprehensive Study Guide: Computer Networks Architecture, Protocols, and Performance

Fundamental Concepts of Computer Networks

  • Definition of a Computer Network:

    • A computer network is defined as a group of interconnected computers and computing devices.
    • The primary objective of a computer network is resource sharing among various connected devices, including hardware, software, files, and data services.
  • Web Request Communication Scenario:

    • A client machine utilizes a web browser application to request a web page (e.g., www.course.com/index.html) hosted on a remote web server.
    • The process requires three sequential steps:
    1. Server Location: The client computer must locate the destination web server across the network.
    2. Protocol Establishment: Communication protocols governing rules and syntax are established between client and server.
    3. Request/Response Execution: The web request is transmitted, processed by the server, and the requested data is sent back.
    • Hardware components, Operating System (OS) routines, and Network Applications on both host machines actively participate in this end-to-end communication sequence.
  • High-Level Abstraction Layers of Network Communication:

    • Communication subsystems are organized into three primary high-level architectural layers:
    1. Hardware Level
    2. Operating System Level
    3. Application Level

Three layers of network communications

  • Level 1: Hardware Level:

    • Represents the foundational physical layer of communication.
    • Physical links can be wired (network cabling) or unguided (wireless signals).
    • Utilizes a Network Adapter, commonly termed a Network Interface Card (NIC).
    • Each NIC contains a unique 48-bit48\text{-bit} (6-byte6\text{-byte}) Media Access Control (MAC) address hard-coded onto the card by the hardware manufacturer.
    • MAC addresses are physically etched onto the hardware and serve to uniquely identify a computer on a local network segment.
  • Level 2: Operating System Level:

    • Operating systems utilize Internet Protocol (IP) addresses to locate and route data to computers across global networks.
    • An IP address is a logical identifier assigned to a network connection when established (e.g., 32-bit32\text{-bit} IPv4 address or 128-bit128\text{-bit} IPv6 address).
    • MAC vs. IP Address Distinction:
    • MAC Address: Used exclusively to locate a computer on a local area network (LAN).
    • IP Address: Used to identify and locate a computer anywhere on the global Internet.
  • Level 3: Application Level:

    • Most network applications follow a Client/Server model.
    • Server Applications: Provide services (e.g., web server software, email server software).
    • Client Applications: Consume services (e.g., Google Chrome, Internet Explorer, Microsoft Outlook).
    • Servers listen for incoming client traffic at a predefined numerical port address (port number).
    • A port number uniquely identifies a specific service or application process on a target computer host.
    • Example: Addressing a web server by entering an IP address followed by a colon and the port number (e.g., 192.168.1.1:80).

Computer Network Components

  • Network Interface Card (NIC):
    • Contains physical hardware addresses used by lower-layer protocols to deliver frames to correct network hosts.
    • Wired NIC: Employs physical networking cables to transmit data signals.
    • Wireless NIC: Utilizes antennas and radio frequency technology to transmit electromagnetic signals.

Network Interface Card with MAC address FA32B9B137734 and 00A0CC5CFF5C

  • Hub:

    • A basic networking device that connects multiple Ethernet devices, causing them to operate as a single shared network segment.
    • Data Transmission (Broadcast): Inbound data packets arriving on one port are blindly repeated and broadcast to all other ports, regardless of the designated recipient.
    • Duplex Mode: Operates strictly in half-duplex mode (devices cannot send and receive data simultaneously).
    • Speed and Efficiency: High probability of network collisions, leading to reduced overall throughput and bandwidth degradation.
    • Security: Poor security; data packets are exposed to all connected devices on the hub, enabling unauthorized packet capture.
    • Use Case: Small, non-critical environments where speed and security are secondary.
  • Switch:

    • An intelligent networking device that forwards incoming frames directly to the specific destination port.
    • Data Transmission (Unicast): Maps MAC addresses to physical ports and sends frames exclusively to the port connected to the destination device.
    • Duplex Mode: Supports full-duplex operation, enabling simultaneous bi-directional data transmission without collisions.
    • Security: Enhanced security; frames are delivered strictly to the intended host port.
    • Hardware Specifications: Typically manufactured with physical port densities of 4, 5, 8, 16, 24, or 48 ports.
    • Use Case: Enterprise networks requiring high performance, privacy, and effective bandwidth management.
  • Transmission Cables and Connectors:

    • Twisted Pair Cable: High-speed cabling capable of data transmission rates of 1 Gbps1\,Gbps or higher (e.g., Category 5e, Category 6).
    • Coaxial Cable: Features a solid central conductor surrounded by insulation and metallic shielding; resembles television antenna wiring.
    • Fibre Optic Cable: High-speed transmission medium that converts digital data into light pulses. Delivers significantly higher bandwidth over long distances compared to copper media. Highly immune to electromagnetic interference (EMI), but more expensive to deploy and splice.
  • Router:

    • An intermediate networking device operating at the network layer to interconnect distinct, separate networks.
    • Primary device used to connect Local Area Networks (LANs) to Wide Area Networks (WANs) or the global Internet.
    • Performs packet routing and path selection based on logical IP destination addresses.

Features of Computer Networks

  • Communication Speed: Enables rapid, reliable, and high-speed interaction across distances (e.g., email, instant messaging, high-definition video conferencing).

  • File Sharing: Allows users across different workstations to share and transfer electronic files seamlessly over shared storage protocols.

  • Simplified Backup and Rollback: Files and databases are centralized on server hardware, allowing system administrators to schedule routine backups and perform data restorations efficiently from a central location.

  • Software and Hardware Resource Sharing:

    • Software Sharing: Enterprise applications can be hosted centrally on a server and accessed by authorized workstations across the network.
    • Hardware Sharing: Costly hardware peripherals (e.g., high-volume laser printers, storage arrays) are shared among many network clients.
  • Network Security: Network Operating Systems (NOS) enforce security protocols, managing access control lists (ACLs), user authentication, file permissions, and data privacy.

  • Scalability: The capacity to expand network infrastructure by seamlessly adding new hardware nodes, switches, users, and bandwidth capacity without disrupting existing communication.

Transmission Modes

  • Transmission Mode Definition: The direction of signal and data flow between two interconnected devices over a communication channel (also referred to as communication mode).

  • Simplex Mode:

    • Communication is strictly unidirectional.
    • Data flows in only one direction across the physical link.
    • A device can either transmit only or receive only; it cannot perform both actions.
    • Bandwidth Utilization: Station utilizes the total bandwidth of the communication channel for single-direction transmission.
    • Disadvantage: Complete absence of bi-directional interaction or receipt acknowledgment.
    • Example: Radio broadcasting stations transmitting signals to radio receivers.

Simplex Transmission One-Way Signal

  • Half-Duplex Mode:
    • Communication is bi-directional, but devices cannot send and receive data at the same time.
    • Hosts must take turns transmitting over the shared channel.
    • When host A is transmitting, host B must listen (channel occupied); simultaneous transmission causes signal collision and data corruption.
    • Bandwidth Utilization: Entire channel bandwidth is allocated to whichever device is actively transmitting.
    • Disadvantage: Delays introduced while waiting for the channel to become clear.
    • Example: Walkie-talkies operating on a shared frequency channel.

Half-Duplex Communication with Walkie-Talkies

  • Full-Duplex Mode:
    • Communication is fully bi-directional and simultaneous.
    • Both connected stations can send and receive data streams at the same time.
    • Channel capacity is divided between transmitter and receiver circuits (or uses separate physical pairs/frequencies).
    • Advantage: Zero waiting time; maximum operational efficiency.
    • Disadvantage: Requires more complex physical layer hardware and signal processing.
    • Example: Modern telephone systems and switched Ethernet networks.

Full-Duplex Simultaneous Communication

Computer Network Architectures

  • Definition: Computer Network Architecture defines the physical and logical layout of software, hardware, protocols, and transmission media in a network.

Client-Server Mode vs Peer to Peer Mode

  • Client/Server Architecture:

    • A centralized network design where client machines request services and resources from dedicated, high-performance central computers called servers.
    • Servers manage core operations including network security, directory services, administrative policies, and file systems.
    • Inter-client communication occurs through the central server.
    • Advantages:
    • Centralized management and security administration.
    • Robust access control, user authentication, and system monitoring.
    • High server processing power capable of handling large request volumes.
    • Ensured data integrity, consistency, and simplified server-side backups.
    • Disadvantages:
    • High initial cost for server hardware and operating system licensing.
    • Single Point of Failure (SPOF): Server downtime halts network-wide resource access.
    • Scalability requires continuous capital investment in server hardware upgrades.
    • Potential performance bottlenecks during peak request traffic.
  • Peer-to-Peer (P2P) Architecture:

    • A decentralized network layout where every connected node (peer) holds equal privileges, administrative rights, and responsibilities.
    • Contains no centralized or dedicated server.
    • Typically recommended for smaller networks containing up to 10 nodes.
    • Advantages:
    • Highly cost-effective; eliminates expensive server hardware and specialized OS licenses.
    • Direct resource sharing (files, bandwidth, storage) between peers.
    • Fault-tolerant; single-node failure does not bring down the rest of the network.
    • Distributed traffic load minimizes central bottlenecks.
    • Disadvantages:
    • Complex decentralized security; each peer can expose vulnerabilities.
    • Difficult administrative control over data backups and file version consistency.
    • Variable performance depending on individual peer device specifications.
    • Scaling increases network coordination overhead and traffic broadcast volume.

Network Types by Geographic Scale

  • Personal Area Network (PAN):

    • Coverage Range: Up to 10 m10\,m (typically centered within a person's immediate workspace).
    • Device Scale: Small, typically 2 to 10 devices.
    • Components: Laptops, smartphones, tablets, smartwatches, wireless headphones, Bluetooth peripherals.
    • Use Case: Syncing personal mobile devices, peripheral connectivity.
  • Local Area Network (LAN):

    • Coverage Range: Single room, home, office suite, or an entire office building.
    • Device Scale: 2 to 20 devices (home networks) up to thousands of endpoints (enterprise office LANs).
    • Speed: High data transfer rates ranging from 100 Mbps100\,Mbps to 10 Gbps10\,Gbps.
    • Components: Ethernet cabling, Wi-Fi Access Points, network switches, routers.
    • Use Case: Local printer, server, and file sharing.
  • Metropolitan Area Network (MAN):

    • Coverage Range: Spans an entire city or large university campus (up to 50 km50\,km).
    • Speed: Moderate to high speeds, frequently utilizing regional fiber-optic backbones.
    • Components: Enterprise routers, metropolitan optical switches, optical fiber infrastructure.
    • Use Case: Connecting municipal administrative offices, public library systems, or multi-campus university sites.
  • Wide Area Network (WAN):

    • Coverage Range: Covers vast geographical spans across regions, nations, or global continents.
    • Speed: Variable speed depending on transmission technologies (e.g., leased lines, fiber backbones, satellite links).
    • Components: High-end core routers, satellite transceivers, undersea optical cables.
    • Use Case: Multinational enterprise interconnections, global Internet backbones.
  • Network Classification Examples:

    • Bluetooth file transfer between phone and laptop: PAN
    • Office network sharing printers and local files on a floor: LAN
    • University interconnecting multi-campus networks across a city: MAN
    • International enterprise linking offices in New York, London, and Tokyo via leased lines: WAN
    • Smart home Bluetooth control of lighting and security: PAN
    • Internal hospital network sharing patient records across departments in a building: LAN
    • City government fiber network connecting libraries and public offices: MAN
    • Branch office accessing central database in another country via the Internet: WAN
    • Small office Wi-Fi router connecting laptops, desktops, and printers on a single floor: LAN

Network Topologies

  • Point-to-Point Topology:

    • The simplest topology, consisting of a direct, dedicated physical connection between exactly two nodes.
    • Implemented using a single dedicated cable (e.g., two PCs connected via Unshielded Twisted Pair (UTP) cable with RJ-45 connectors).
  • Bus Topology:

    • Nodes connect to a shared central cable known as the backbone cable or bus via individual drop lines and taps.
    • Uses Bayonet Neill-Concelman (BNC) connectors to attach network cables to host NIC cards.
    • Terminators: Essential hardware devices attached to both open ends of the physical bus. Terminators absorb electrical signals when they reach the end of the cable, preventing signal reflection (standing waves) which causes signal corruption.

Bus Topology Architecture

  • Token Bus Topology:
    • Combines physical bus cabling with a logical token ring pass mechanism.
    • A special control frame called a token circulates sequentially among nodes in a fixed logical sequence.
    • Only the host currently holding the token is permitted to transmit data frames over the physical bus medium.

Token Bus Architecture

  • Ring Topology:
    • Each node connects sequentially to exactly two neighboring nodes, forming a closed continuous ring.
    • Data frames flow sequentially in a single direction around the ring (half-duplex mode).
    • Does not require cable terminators because the cable loop is closed.
    • Offers higher operational speeds compared to bus topologies, but a break in the ring breaks the entire network segment unless redundant dual rings are used.

Token Ring Topology

  • Star Topology:
    • The most prevalent modern LAN topology.
    • All host nodes connect via individual dedicated cable runs to a central central point (typically an Ethernet switch).
    • No direct physical connections exist between workstation endpoints.
    • Traffic is received by the central switch and forwarded directly to the destination node's port.
    • Fault Isolation: Cable damage on a single host line isolates only that host; the remaining network functions uninterrupted.

Star Network Topology

  • Tree Topology:
    • A hierarchical layout extending the star topology by cascading multiple switches together in a branching structure.
    • Workstations attach to leaf switches, which link to intermediate distribution switches, culminating at a central root switch.
    • Failure Impact:
    • Failure of a single endpoint host affects only that host.
    • Failure of a branch switch takes down its subordinate connected segment.
    • Failure of the central root switch isolates sub-branches from each other, though internal local communication within individual branch switches remains functional.

Tree Network Topology

Network Security Principles, Threats, and Case Studies

  • Core Security Principles (CIA Triad):

    • Confidentiality: Assures that sensitive data is accessible strictly to authorized entities. Primary enforcement mechanism: Data Encryption.
    • Integrity: Guarantees that data remains unaltered, accurate, and authentic during transit and storage. Primary enforcement mechanisms: Cryptographic Hash Functions (e.g., SHA-256) and Digital Signatures.
    • Availability: Ensures network services, bandwidth, and resources remain continuously accessible to legitimate users when needed. Enforcement focus: Preventing Denial of Service (DoS) attacks and system redundancies.
  • Common Cyber Threats:

    • Malware: Malicious software binaries (viruses, computer worms, Trojan horses, ransomware) designed to infect, corrupt, or exfiltrate host data.
    • Phishing: Deceptive social engineering attacks disguising as trustworthy entities to trick users into revealing credentials or sensitive data.
    • Man-in-the-Middle (MitM) Attacks: Secretly intercepting, eavesdropping on, or altering active communication sessions between two unsuspecting network endpoints.
    • Denial of Service (DoS / DDoS): Flooding target network interfaces or servers with automated traffic to exhaust system resources and deny access to legitimate traffic.
  • Key Defensive Controls:

    • Firewalls: Hardware or software appliances enforcing rule-based inspection of incoming and outgoing traffic to isolate trusted networks from untrusted networks.
    • IDS / IPS: Intrusion Detection Systems monitor traffic for malicious patterns; Intrusion Prevention Systems actively drop inline malicious packets.
    • Virtual Private Networks (VPNs): Establish encrypted tunnels over untrusted public networks to secure data confidentiality for remote clients.
    • Network Segmentation: Isolating network zones into subnets to prevent lateral threat movement during a security breach.
    • Zero Trust Architecture: Modern security framework based on the mandate: "Never Trust, Always Verify", requiring strict identity verification for every host and user attempting resource access.
  • Historical Security Case Studies:

    • WannaCry Ransomware (2017):
    • Targeted Microsoft Windows systems globally using the leaked NSA EternalBlue exploit targeting the SMBv1 protocol vulnerability.
    • Encrypted system storage, demanding Bitcoin ransom payments.
    • Infected over 200,000200,000 computers across 150 nations, severely disrupting critical infrastructure including the UK National Health Service (NHS).
    • Equifax Data Breach (2017):
    • Threat actors exploited an unpatched security vulnerability in the open-source Apache Struts web framework.
    • Compromised private personal identification records (Social Security numbers, birth dates, home addresses) of approximately 147 million147\text{ million} individuals.
    • Target Corporate Breach (2013):
    • Hackers compromised credentials from a third-party Heating, Ventilation, and Air Conditioning (HVAC) vendor.
    • Inadequate network segmentation enabled lateral network traversal from vendor systems to Point-of-Sale (POS) networks, compromising payment card records of 40 million40\text{ million} customers.
    • Yahoo Data Breaches (2013–2014):
    • Spear phishing and weak security procedures led to compromise of all 3 billion3\text{ billion} registered global user accounts, exposing user names, email addresses, security questions, and hashed credentials.
    • Stuxnet Worm (2010):
    • Sophisticated cyber weapon taking advantage of multiple Windows zero-day vulnerabilities and Siemens Industrial Control System (ICS) software flaws.
    • Specially designed to target SCADA systems at Iran's Natanz nuclear enrichment facility, physically destroying centrifuges by altering motor rotational speeds.

Network Models and Layered Architecture Principles

  • Rationale for Layered Architecture:

    • Historical network implementations utilized monolithic, unstructured code bases that were difficult to debug, scale, or maintain.
    • Divide-and-Conquer Strategy: Complex networking functions are abstracted into structured, manageable, and self-contained functional layers.
    • Modularity and Layer Independence: Layers interact with adjacent layers through well-defined service interfaces. Internal layer implementations can be modified or upgraded without impacting adjacent layers.
  • Core Elements of Layered Architecture:

    • Service: Specific set of operations and capabilities provided by a given layer to the layer directly above it.
    • Protocol: Formal set of rules, syntax, and message exchange sequences used by peer entities operating at the same layer across different hosts.
    • Interface: Boundary mechanism through which data primitives and control information pass vertically between adjacent layers on the same host machine.

The Open Systems Interconnection (OSI) Reference Model

  • Overview: Formulated by the International Organization for Standardization (ISO) in 1984 as a 7-layer theoretical reference framework for computer network communication.

OSI Model 7 Layers Dataflow Diagram

  • OSI Model Layers (Bottom to Top):
    1. Layer 1: Physical Layer
    • Responsible for bit-level transmission across physical media.
    • Specifications include voltage levels, clock timing, physical connector types, line configuration, signal encoding, and transmission modes (simplex, half-duplex, full-duplex).
    1. Layer 2: Data Link Layer
    • Provides reliable node-to-node frame transfer over the physical layer.
    • Key functions: Framing (packaging raw bits into structured frames), Physical Addressing (inserting source and destination MAC addresses), Error Control (adding Cyclic Redundancy Check (CRC) trailers to detect bit errors), and Access Control (media access rules for shared links).
    1. Layer 3: Network Layer
    • Handles host-to-host internetwork delivery across different networks.
    • Key functions: Logical Addressing (assigning unique IP addresses), Routing (computing optimal end-to-end paths across intermediate routers), and Packetizing (encapsulating transport segments into IP packets).
    1. Layer 4: Transport Layer
    • Ensures end-to-end process-to-process message delivery and reliability.
    • Key functions: Service-Point Addressing (assigning source and destination port numbers), Segmentation & Reassembly (splitting large payloads into numbered segments with sequence numbers), Flow Control (preventing receiver buffer overflow), and Connection Management.
    1. Layer 5: Session Layer
    • Manages communication sessions between network applications.
    • Handles session establishment, maintenance, graceful termination, and session checkpointing for recovery during transfer failures.
    1. Layer 6: Presentation Layer
    • Manages data formatting, syntax mapping, and data representation.
    • Key functions: Data Translation (converting between character sets/encodings like ASCII and EBCDIC), Encryption/Decryption, and Data Compression.
    1. Layer 7: Application Layer
    • Provides software service interfaces directly to user applications.
    • Services include File Transfer, Access, and Management (FTAM), Directory Services (DNS), and Electronic Mail services (SMTP).

The TCP/IP Protocol Suite

  • Overview: The practical 4-layer operational model of the global Internet, developed prior to the OSI model.

TCP/IP vs OSI Model Comparison

  • TCP/IP Layers & Protocols:
    1. Network Interface Layer (Combines OSI Physical and Data Link Layers):
    • Encapsulates IP datagrams into hardware frames and maps IP addresses to physical MAC addresses.
    • Protocols: Ethernet, Token Ring, Wi-Fi (802.11802.11).
    1. Network/Internet Layer:
    • Internet Protocol (IP): Core connectionless protocol providing logical host addressing, datagram routing, and fragmentation.
    • Address Resolution Protocol (ARP): Resolves known IPv4 addresses to unknown physical MAC addresses.
      • ARP Request: Broadcast frame sent to all hosts on the local network.
      • ARP Reply: Unicast frame returned by the host possessing the matching IP address, returning its MAC address.
    • Internet Control Message Protocol (ICMP): Diagnostic and error-reporting protocol used by hosts/routers to signal delivery failures (e.g., link down, host unreachable, TTL expired).
    1. Transport Layer:
    • Transmission Control Protocol (TCP):
      • Connection-oriented, highly reliable transport protocol.
      • Establishes a virtual circuit before transmission using a 3-way handshake.
      • Guarantees ordered delivery using sequence numbers, acknowledgments (ACKs), error detection, and automatic retransmissions.
    • User Datagram Protocol (UDP):
      • Connectionless, lightweight, and unreliable transport protocol.
      • Does not guarantee packet delivery, ordering, or flow control.
      • Low overhead; optimized for real-time streaming, voice, and quick request-response queries.
    1. Application Layer (Combines OSI Application, Presentation, and Session Layers):
    • Protocols supporting network processes:
      • HTTP (Hypertext Transfer Protocol): Transfers hyperlinked web data.
      • DNS (Domain Name System): Distributed database resolving human-readable domain names to IP addresses.
      • DHCP (Dynamic Host Configuration Protocol): Automatically assigns IP addresses, subnet masks, default gateways, and DNS settings to joining devices.
      • SMTP (Simple Mail Transfer Protocol): Relays electronic mail messages between mail servers.

Internet Protocol Version 4 (IPv4) Addressing, Subnetting, and NAT

  • IPv4 Datagram Header Format:

    • Standard header length without options is 20 bytes20\text{ bytes} (160 bits160\text{ bits}).
    • Header Fields:
    • Version (4 bits4\text{ bits}): Identifies protocol version (4 for IPv4).
    • IHL (Internet Header Length) (4 bits4\text{ bits}): Defines header length in 32-bit32\text{-bit} words (minimum value 5 = 20 bytes20\text{ bytes}).
    • Type of Service (ToS) (8 bits8\text{ bits}): Specifies packet priority and Quality of Service (QoS).
    • Total Length (16 bits16\text{ bits}): Complete size of IPv4 datagram (header + payload) in bytes (maximum 65,535 bytes65,535\text{ bytes}).
    • Identification (16 bits16\text{ bits}): Unique ID assigned to datagram to enable fragment reassembly.
    • Flags (3 bits3\text{ bits}): Control bits including Don't Fragment (DF) and More Fragments (MF).
    • Fragment Offset (13 bits13\text{ bits}): Indicates offset position of fragment relative to original unfragmented payload in 8-byte8\text{-byte} units.
    • Time to Live (TTL) (8 bits8\text{ bits}): Hop counter decremented by 1 at each router; packet dropped when TTL = 0 to prevent infinite routing loops.
    • Protocol (8 bits8\text{ bits}): Identifies upper-layer transport protocol (e.g., 6 for TCP, 17 for UDP).
    • Header Checksum (16 bits16\text{ bits}): Error-detection value computed over header fields.
    • Source IP Address (32 bits32\text{ bits}): Global IP address of sender.
    • Destination IP Address (32 bits32\text{ bits}): Global IP address of destination.
  • IPv4 Datagram Fragmentation and Reassembly:

    • Occurs when an IP datagram size exceeds the Maximum Transmission Unit (MTU) of an underlying intermediate link.
    • Reassembly is performed exclusively at the final destination host.
    • Fragment offsets are scaled in multiples of 8 bytes8\text{ bytes} (64 bits64\text{ bits}).
    • Example: A 7000-byte7000\text{-byte} transport payload originating on a host crosses a Token Ring LAN (MTU=4000 bytes\text{MTU} = 4000\text{ bytes}) into an Ethernet LAN (MTU=1500 bytes\text{MTU} = 1500\text{ bytes}).
    • On Ethernet (MTU=1500 bytes\text{MTU} = 1500\text{ bytes}), each fragment contains a 20-byte20\text{-byte} IP header and a maximum of 1480 bytes1480\text{ bytes} of payload.
    • The 7000-byte7000\text{-byte} payload is fragmented into payloads of 1480 bytes,1480 bytes,1016 bytes,1480 bytes,1480 bytes,64 bytes1480\text{ bytes}, 1480\text{ bytes}, 1016\text{ bytes}, 1480\text{ bytes}, 1480\text{ bytes}, 64\text{ bytes}, each encapsulated in a 1500-byte1500\text{-byte} frame.

IPv4 Fragmentation and Reassembly Across Networks

  • Class-Based IPv4 Addressing Schemes:

Class-Based Addressing Schemes

  • Class A:

    • Leading bits: 0
    • Network ID: 7 bits7\text{ bits}; Host ID: 24 bits24\text{ bits}
    • First octet range: 1.0.0.0 to 126.0.0.0 (127.x.x.x reserved for loopback)
    • Total networks: 27−2=1262^7 - 2 = 126; Usable hosts per network: 224−2=16,777,2142^{24} - 2 = 16,777,214
  • Class B:

    • Leading bits: 10
    • Network ID: 14 bits14\text{ bits}; Host ID: 16 bits16\text{ bits}
    • First octet range: 128.0.0.0 to 191.255.0.0
    • Total networks: 214=16,3842^{14} = 16,384; Usable hosts per network: 216−2=65,5342^{16} - 2 = 65,534
  • Class C:

    • Leading bits: 110
    • Network ID: 21 bits21\text{ bits}; Host ID: 8 bits8\text{ bits}
    • First octet range: 192.0.0.0 to 223.255.255.0
    • Total networks: 221=2,097,1522^{21} = 2,097,152; Usable hosts per network: 28−2=2542^8 - 2 = 254
  • Class D:

    • Leading bits: 1110 (Multicast addressing, 28 bits28\text{ bits})
    • Range: 224.0.0.0 to 239.255.255.255
  • Class E:

    • Leading bits: 1111 (Reserved for experimental/future use)

    • Range: 240.0.0.0 to 255.255.255.255

    • Special IP Address Reserved Conventions:

  • Host ID = All 0s: Represents the Network Address itself (e.g., 192.168.1.0).

  • Host ID = All 1s: Direct Broadcast Address for that specific network (e.g., 192.168.1.255).

  • 255.255.255.255: Limited Broadcast Address (broadcasts to all hosts on local network, not routed).

  • 0.0.0.0: Represents "This Host" or default unassigned route.

  • 127.0.0.0/8: Loopback network address block used for internal software testing on the local machine.

    • Subnetting Concepts and Subnet Masks:
  • Subnetting divides a assigned single network block into smaller internal logical networks (subnets).

  • Borrow bits from Host ID field to create Subnet ID field:     IP Address=NetID+SubnetID+Local HostID\text{IP Address} = \text{NetID} + \text{SubnetID} + \text{Local HostID}

  • Subnet Mask: Binary mask indicating network/subnet bits (1s) vs. local host bits (0s).

    • Classless Inter-Domain Routing (CIDR):
  • Replaced classful addressing to slow IPv4 address exhaustion.

  • Notation format: w.x.y.z / n, where /n (prefix length) explicitly defines the number of leading network bits.

  • Example: An organization allocated 1000 host addresses receives a block of 1024=2101024 = 2^{10} addresses, requiring 10 host bits. Prefix length = 32−10=2232 - 10 = 22 bits (/22). Mask = 255.255.252.0.

    • Network Address Translation (NAT):
  • Translates private local IP addresses into a single public IP address for Internet transit.

  • Private Address Ranges (RFC 1918):

    • 10.0.0.0 to 10.255.255.255 (10.0.0.0/8)
    • 172.16.0.0 to 172.31.255.255 (172.16.0.0/12)
    • 192.168.0.0 to 192.168.255.255 (192.168.0.0/16)
  • NAT Operation: The NAT router re-writes the source IP address and source port number of outbound packets with its public IP address and a dynamically assigned NAT port, maintaining a NAT Translation Table to route returning packets back to the original internal host.

Network Address Translation Architecture and Table

The Internet Structure, Edge, Core, and Media

  • Internet Components:

    • Network Edge: End systems / Hosts (clients, servers, IoT devices) running network applications.
    • Access Networks: Wired and wireless communication links connecting end systems to edge routers.
    • Network Core: Mesh of interconnected intermediate routers and packet switches.
  • Physical Transmission Media:

    • Guided Media (Signals propagate through solid physical boundaries):
    • Twisted Pair (TP): Copper wiring. Category 5e (100 Mbps−1 Gbps100\,Mbps - 1\,Gbps), Category 6 (10 Gbps10\,Gbps).
    • Coaxial Cable: Concentric copper conductors, bidirectional broadband supporting multiple channels (100s Mbps100\text{s } Mbps per channel).
    • Fiber Optic Cable: Glass fibers transmitting light pulses; high speed (10s−100s Gbps10\text{s}-100\text{s } Gbps) with low attenuation and error rates.
    • Unguided Media (Signals propagate freely through atmosphere/space):
    • Terrestrial Wireless / Wi-Fi: 802.11ac802.11ac (600 Mbps−1300 Mbps600\,Mbps - 1300\,Mbps over 2.4 GHz/5 GHz2.4\,GHz/5\,GHz bands).
    • Cellular Networks: 4G/5G wide-area access (100s−1000s Mbps100\text{s}-1000\text{s } Mbps).
    • Satellite Links: Up to 45 Mbps45\,Mbps per channel.
  • Internet Hierarchy and Architecture:

    • Access ISPs connect to Regional ISPs.
    • Regional ISPs connect to Tier-1 Commercial ISPs (e.g., AT&T, Sprint) providing global transit coverage.
    • Internet Exchange Points (IXPs): Shared physical infrastructures where ISPs and content provider networks connect directly to exchange traffic (peering).
    • Content Provider Networks: Private networks (e.g., Google, Facebook) connecting datacenters directly to regional ISPs, bypassing Tier-1 providers.
  • Bits vs. Bytes Unit Conversions:

    • 1 bit (b)=0 or 11\text{ bit (b)} = 0\text{ or } 1
    • 1 byte (B)=8 bits (b)1\text{ byte (B)} = 8\text{ bits (b)}
    • 1 Kilobit (Kb)=103 bits=1,000 bits1\text{ Kilobit (Kb)} = 10^3\text{ bits} = 1,000\text{ bits}
    • 1 Megabit (Mb)=106 bits=1,000,000 bits1\text{ Megabit (Mb)} = 10^6\text{ bits} = 1,000,000\text{ bits}
    • 1 Gigabit (Gb)=109 bits=1,000,000,000 bits1\text{ Gigabit (Gb)} = 10^9\text{ bits} = 1,000,000,000\text{ bits}
    • 1 Kilobyte (KB)=210 bytes=1,024 bytes1\text{ Kilobyte (KB)} = 2^{10}\text{ bytes} = 1,024\text{ bytes}
    • 1 Megabyte (MB)=220 bytes=1,048,576 bytes1\text{ Megabyte (MB)} = 2^{20}\text{ bytes} = 1,048,576\text{ bytes}
    • 1 Gigabyte (GB)=230 bytes=1,073,741,824 bytes1\text{ Gigabyte (GB)} = 2^{30}\text{ bytes} = 1,073,741,824\text{ bytes}
    • 1 Terabyte (TB)=240 bytes=1,099,511,627,776 bytes1\text{ Terabyte (TB)} = 2^{40}\text{ bytes} = 1,099,511,627,776\text{ bytes}

Packet Switching vs. Circuit Switching

Circuit Switched vs Packet Switched Networks

  • Circuit Switching:

    • Dedicated end-to-end circuit resources (bandwidth, channels) are strictly reserved for the duration of a session.
    • Zero resource sharing; guarantees performance but results in idle resource waste during silent periods.
    • Multiplexing Techniques:
    • Frequency Division Multiplexing (FDM): Physical frequency spectrum is divided into narrow frequency channels assigned to calls.
    • Time Division Multiplexing (TDM): Time is segmented into recurring time slots assigned to individual calls.
  • Packet Switching:

    • Messages are segmented into discrete units called packets of length L bitsL\text{ bits}.
    • Uses Store-and-Forward transmission: an intermediate router must receive the entire packet before transmitting it onto the next link.
    • Highly efficient for bursty data traffic through dynamic resource sharing.
    • Disadvantage: Buffer overflow leads to queueing delays and packet loss during congestion.
    • Core Functions:
    • Forwarding: Local action moving arriving packets from input interface to appropriate output interface based on a local forwarding table.
    • Routing: Global action determining optimal end-to-end paths taken by packets using routing algorithms.

Network Performance Metrics: Delays, Loss, Throughput, and Link Utilization

  • Nodal Delay Components:

    • Total Nodal Delay is expressed mathematically as:     dnodal=dproc+dqueue+dtrans+dpropd_{\text{nodal}} = d_{\text{proc}} + d_{\text{queue}} + d_{\text{trans}} + d_{\text{prop}}
    • Processing Delay (dprocd_{\text{proc}}):
    • Time required by a router to inspect packet headers, check for bit-level errors, and determine the output link.
    • Typically microsecond (μs\mu s) level.
    • Queuing Delay (dqueued_{\text{queue}}):
    • Time spent waiting in the output buffer for transmission.
    • Depends on traffic congestion; ranges from microseconds to milliseconds.
    • Transmission Delay (dtransd_{\text{trans}}):
    • Time needed to push all bits of a packet onto the physical medium.
    • Formula:       dtrans=LRd_{\text{trans}} = \frac{L}{R}       Where LL is packet length in bits and RR is link transmission rate in bits per second (bpsbps).
    • Propagation Delay (dpropd_{\text{prop}}):
    • Time required for a single bit to travel across the physical medium from source to destination.
    • Formula:       dprop=dsd_{\text{prop}} = \frac{d}{s}       Where dd is link distance in meters and ss is propagation speed in physical medium (≈2×108 to 3×108 m/s\approx 2 \times 10^8\text{ to } 3 \times 10^8\,m/s).
  • Packet Loss:

    • Routers possess finite buffer capacities.
    • When a packet arrives at a router whose buffer queue is completely full, the packet is discarded (dropped).
    • Dropped packets may be retransmitted by transport protocols (e.g., TCP) or dropped entirely (e.g., UDP).
  • End-to-End Delay Across NN Identical Links:

    • For an uncongested path containing NN links (N−1N-1 intermediate routers):     dend-end=N⋅(dproc+dtrans+dprop)d_{\text{end-end}} = N \cdot \left( d_{\text{proc}} + d_{\text{trans}} + d_{\text{prop}} \right)
  • Throughput:

    • Rate (bpsbps) at which data is transferred from sender to receiver.
    • Average Throughput Formula:     Average Throughput=FT\text{Average Throughput} = \frac{F}{T}     Where FF is file size in bits and TT is total transfer time in seconds.
    • Bottleneck Link: The link on an end-to-end path that constrains overall throughput, mathematically defined as:     Throughput=min⁡(R1,R2,R3,…,Rk)\text{Throughput} = \min\left( R_1, R_2, R_3, \dots, R_k \right)

Worked Examples and Computational Problems

  • Problem 1: Computing One-Hop Transmission Delay:

    • Scenario: A router transmits packets of length L=8000 bitsL = 8000\text{ bits} over a link with transmission rate R=1 Mbps=1,000,000 bpsR = 1\,Mbps = 1,000,000\text{ bps}.
    • Calculation:     dtrans=LR=8000 bits1,000,000 bps=0.008 seconds=8 msd_{\text{trans}} = \frac{L}{R} = \frac{8000\text{ bits}}{1,000,000\text{ bps}} = 0.008\text{ seconds} = 8\,ms
  • Problem 2: Computing Propagation Delay:

    • Scenario: Packet length L=1000 bytes=8000 bitsL = 1000\text{ bytes} = 8000\text{ bits}, link distance d=2500 km=2,500,000 md = 2500\,km = 2,500,000\,m, propagation speed s=2.5×108 m/ss = 2.5 \times 10^8\,m/s, link rate R=2 Mbps=2,000,000 bpsR = 2\,Mbps = 2,000,000\text{ bps}.
    • Propagation Delay Calculation:     dprop=ds=2,500,000 m2.5×108 m/s=0.01 seconds=10 msd_{\text{prop}} = \frac{d}{s} = \frac{2,500,000\,m}{2.5 \times 10^8\,m/s} = 0.01\text{ seconds} = 10\,ms
    • Transmission Delay Calculation:     dtrans=LR=8000 bits2,000,000 bps=0.004 seconds=4 msd_{\text{trans}} = \frac{L}{R} = \frac{8000\text{ bits}}{2,000,000\text{ bps}} = 0.004\text{ seconds} = 4\,ms
    • Independence Check: Propagation delay depends only on distance dd and propagation speed ss; it is completely independent of packet length LL and transmission rate RR.
  • Problem 3: Multi-Link End-to-End Throughput and File Transfer Time:

    • Scenario: Path consists of 3 links with rates R1=500 KbpsR_1 = 500\,Kbps, R2=2 Mbps=2000 KbpsR_2 = 2\,Mbps = 2000\,Kbps, and R3=1 Mbps=1000 KbpsR_3 = 1\,Mbps = 1000\,Kbps. File size F=4 MB=4×106 bytes=32,000,000 bitsF = 4\text{ MB} = 4 \times 10^6\text{ bytes} = 32,000,000\text{ bits}.
    • Part A (Throughput):     Throughput=min⁡(R1,R2,R3)=min⁡(500 Kbps,2000 Kbps,1000 Kbps)=500 Kbps\text{Throughput} = \min\left( R_1, R_2, R_3 \right) = \min\left( 500\,Kbps, 2000\,Kbps, 1000\,Kbps \right) = 500\,Kbps
    • Part B (Transfer Time):     T=FThroughput=32,000,000 bits500,000 bps=64 secondsT = \frac{F}{\text{Throughput}} = \frac{32,000,000\text{ bits}}{500,000\text{ bps}} = 64\text{ seconds}
    • Part C (Reduced Link Rate R2=100 KbpsR_2 = 100\,Kbps):     New Throughput=min⁡(500 Kbps,100 Kbps,1000 Kbps)=100 Kbps\text{New Throughput} = \min\left( 500\,Kbps, 100\,Kbps, 1000\,Kbps \right) = 100\,KbpsTnew=32,000,000 bits100,000 bps=320 secondsT_{\text{new}} = \frac{32,000,000\text{ bits}}{100,000\text{ bps}} = 320\text{ seconds}
  • Problem 4: End-to-End Delay Calculation across Heterogeneous Links:

    • Scenario:

End-to-End Delay Diagram across 3 Links

- Packet size L=16,000 bitsL = 16,000\text{ bits}, speed s=3×108 m/ss = 3 \times 10^8\,m/s, processing/queuing delays = 0.
- Link 1: R1=10 MbpsR_1 = 10\,Mbps, d1=5000 km=5,000,000 md_1 = 5000\,km = 5,000,000\,m
- Link 2: R2=100 MbpsR_2 = 100\,Mbps, d2=4000 km=4,000,000 md_2 = 4000\,km = 4,000,000\,m
- Link 3: R3=1 Gbps=1000 MbpsR_3 = 1\,Gbps = 1000\,Mbps, d3=1000 km=1,000,000 md_3 = 1000\,km = 1,000,000\,m
  • Transmission Delays:

    • dtrans1=16,00010×106=0.0016 s=1.60 msd_{\text{trans1}} = \frac{16,000}{10 \times 10^6} = 0.0016\text{ s} = 1.60\,ms
    • dtrans2=16,000100×106=0.00016 s=0.16 msd_{\text{trans2}} = \frac{16,000}{100 \times 10^6} = 0.00016\text{ s} = 0.16\,ms
    • dtrans3=16,000109=0.000016 s=0.016 msd_{\text{trans3}} = \frac{16,000}{10^9} = 0.000016\text{ s} = 0.016\,ms
    • ∑dtrans=0.0016+0.00016+0.000016=0.001776 s\sum d_{\text{trans}} = 0.0016 + 0.00016 + 0.000016 = 0.001776\text{ s}
  • Propagation Delays:

    • dprop1=5,000,0003×108=0.016667 s=16.67 msd_{\text{prop1}} = \frac{5,000,000}{3 \times 10^8} = 0.016667\text{ s} = 16.67\,ms
    • dprop2=4,000,0003×108=0.013333 s=13.33 msd_{\text{prop2}} = \frac{4,000,000}{3 \times 10^8} = 0.013333\text{ s} = 13.33\,ms
    • dprop3=1,000,0003×108=0.003333 s=3.33 msd_{\text{prop3}} = \frac{1,000,000}{3 \times 10^8} = 0.003333\text{ s} = 3.33\,ms
    • ∑dprop=0.016667+0.013333+0.003333=0.033333 s\sum d_{\text{prop}} = 0.016667 + 0.013333 + 0.003333 = 0.033333\text{ s}
  • Total End-to-End Delay:     dend-end=0.001776+0.033333=0.035109 s≈0.04 seconds(35.11 ms)d_{\text{end-end}} = 0.001776 + 0.033333 = 0.035109\text{ s} \approx 0.04\text{ seconds} \quad (35.11\,ms)

    • Problem 5: Shared Bottleneck Link and Utilization:
  • Scenario:

End to End Throughput and Bottleneck Links Scenario

- 4 Server-Client pairs share a middle link R=100 MbpsR = 100\,Mbps.
- Server links RS=90 MbpsR_S = 90\,Mbps.
- Client links RC=30 MbpsR_C = 30\,Mbps.
  • Part A (Achievable End-to-End Throughput per Pair):
    • Middle link rate share per pair = R4=100 Mbps4=25 Mbps\frac{R}{4} = \frac{100\,Mbps}{4} = 25\,Mbps.
    • End-to-End Throughput = min⁡(RS,RC,R4)=min⁡(90,30,25)=25 Mbps\min\left( R_S, R_C, \frac{R}{4} \right) = \min\left( 90, 30, 25 \right) = 25\,Mbps
  • Part B (Bottleneck Link):
    • Bottleneck link is the shared middle link RR (capacity limits throughput to 25 Mbps25\,Mbps).
  • Part C (Server Link Utilization RSR_S):     UtilizationRS=ThroughputRS=25 Mbps90 Mbps≈0.2778=27.78%\text{Utilization}_{R_S} = \frac{\text{Throughput}}{R_S} = \frac{25\,Mbps}{90\,Mbps} \approx 0.2778 = 27.78\%
  • Part D (Client Link Utilization RCR_C):     UtilizationRC=ThroughputRC=25 Mbps30 Mbps≈0.8333=83.33%\text{Utilization}_{R_C} = \frac{\text{Throughput}}{R_C} = \frac{25\,Mbps}{30\,Mbps} \approx 0.8333 = 83.33\%
  • Part E (Shared Link Utilization RR):     UtilizationR=4×25 Mbps100 Mbps=100 Mbps100 Mbps=1.0=100%\text{Utilization}_R = \frac{4 \times 25\,Mbps}{100\,Mbps} = \frac{100\,Mbps}{100\,Mbps} = 1.0 = 100\%