Computer Networking: A Top-Down Approach
Introduction
Two Key Network-Core Functions
Forwarding:
Definition: Local action of moving arriving packets from router’s input link to appropriate output link.
Components: Utilizes destination address in the packet header and uses routing algorithms to determine correct output link.
Routing:
Definition: Global action that determines paths taken by packets from source to destination.
Components: Involves routing algorithms and local forwarding tables to manage routes.
Circuit Switching: FDM and TDM
Frequency Division Multiplexing (FDM):
Bandwidth is divided into narrow frequency bands.
Each call allocated a specific frequency band allowing maximum transmission rates of the band.
Time Division Multiplexing (TDM):
Time is divided into slots, where each call is allocated periodic time slots.
Each call can transmit at maximum rate but only within assigned time slots.
Throughput
Definition: Rate (bits/time unit) at which bits are transmitted from sender to receiver.
Types of Throughput:
Instantaneous Throughput: Rate at a specific moment.
Average Throughput: Rate over a longer duration.
Example Configuration:
Server with a file of F bits sends to client with link capacities Rs (server) and Rc (client) in bits per second.
Average End-to-End Throughput
When Rs < Rc: Average end-to-end throughput = Rs (limited by the sender capacity).
When Rs > Rc: Average end-to-end throughput = Rc (limited by the receiver capacity).
Bottleneck links constrain end-to-end throughput based on their capacities.
Chapter 1 Roadmap
Topics covered:
Definition of the Internet
Explanation of protocols
Network edge components: hosts, access networks, physical media
Network core: packet vs circuit switching, internet structure
Performance metrics: loss, delay, throughput
Security aspects
Protocol layers and service models
Historical context
Denial of Service (DoS) Attack
Definition: Attackers render resources (e.g., servers, bandwidth) unavailable by overwhelming them with malicious traffic.
Steps to Execute:
Select a target.
Compromise multiple hosts forming a botnet.
Direct compromised hosts to send packets to the target server.
Packet Interception and Sniffing
Packet Sniffing:
Captures data packets as they travel across network media.
Can happen on shared Ethernet or wireless networks using promicuous mode.
Tools like Wireshark can be used to monitor traffic.
IP Spoofing
Definition: Sending packets with a forged source address.
Significance of spoofing includes enhancing anonymity while conducting attacks.
Why Layering?
Provides a structured approach to complex systems through modularization, allowing easier maintenance and updates.
Changes in one layer must not affect others (e.g., changing gate procedures).
Association with other layered systems can provide contextual insights.
Internet Protocol Stack
Layers of the Stack:
Application Layer: Supports network applications (IMAP, SMTP, HTTP).
Transport Layer: Facilitates process-to-process data transfer (TCP, UDP).
Network Layer: Handles routing of datagrams (IP protocols).
Link Layer: Manages data transfer between neighboring elements (Ethernet, WiFi).
Physical Layer: Manages bit transmission over physical media.
Encapsulation
Process Overview:
Data moves through the layers of the stack, encapsulating into segments, messages, and frames as it transitions from application to physical layer, passing through each layer of the protocol stack.
Chapter 2: Application Layer
Applications of the Layer:
Overview of mobile, home, enterprise, ISPs, and cloud networks.
Client-server paradigm distinguishes between server and client roles.
Processes Communicating
Process: A running program within a host; different processes communicate via messages.
Processes on the same host use inter-process communication through the OS.
Client-server architecture involves client initiating requests while servers wait for client connections.
Sockets
Functionality: Sockets act as endpoints for sending/receiving messages, analogous to doors for communicated data.
Internet Transport Protocols and Services
TCP (Transmission Control Protocol):
Reliable communication, flow control, and congestion control.
Not designed for timing or security aspects.
Connection-oriented and requires setup.
UDP (User Datagram Protocol):
Unreliable transport with no connection setup or guarantees on delivery, timing, or throughput.
Useful in scenarios where speed is crucial.
HTTP Overview
Hypertext Transfer Protocol (HTTP):
Application layer protocol; facilitates communication between clients (browsers) and servers.
HTTP is stateless – does not retain information about previous interactions.
HTTP Connections
Types of Connections:
Non-persistent: One object sent per TCP connection; creates multiple connections for multiple objects.
Persistent: Allows multiple objects to be sent over a single TCP connection, reducing overhead and connection times.
Connection Scenarios in HTTP
Initiation: When a user enters a URL, the sequence involves TCP connections, requests, and responses that transmit requested objects.
Response Time in Non-persistent HTTP
Average Response Time Calculation:
Two round-trip times (RTT) for connection initiation and data receipt, plus the time required to transmit the object.
Persistent HTTP (HTTP 1.1)
Addresses limitations of non-persistent HTTP by keeping the connection open for subsequent requests, which reduces latency significantly.
HTTP Request Message Structure
Components of HTTP Requests:
ASCII format with request lines, headers, and terminating characters specifying structure.
Maintaining State with Cookies
Functionality: Cookies store session data between HTTP transactions, enhancing user experience and service personalization.
Web Caches (Proxy Servers)
Purpose: To temporarily store HTTP responses to reduce latency and bandwidth usage when clients request frequently accessed objects.
DNS: Domain Name System
Role: Translating human-readable hostnames to IP addresses and vice versa.
Structure: A distributed database implemented hierarchically across various name servers.
DNS Resolution Process
Iterated and Recursive Queries: Mechanisms used to resolve IP addresses from hostnames, with varying server load depending on the method of querying.
IP Addressing and Subnets
IP Addresses: 32-bit identifiers for devices that contribute to addressing in the Internet.
Subnetting: Divides larger networks into smaller, more manageable sections for organizational efficiency.
NAT: Network Address Translation
Functionality: Allows multiple devices on a local network to share a single public IP address, conserving address space and providing an additional layer of security.