Computer Networks - Unit 1: Introduction and Fundamentals Table of Contents 1. Introduction to Computer Networks 2. Network Performance Metrics and Formulas 3. Types of Networks (LAN, MAN, WAN) 4. Internet Basics 5. Packet Structure and Transmission 6. Network Hardware Architecture 7. Network Mediums (Wired and Wireless) 8. Network Topologies 9. Network Software Architecture 10. Network Models (OSI and TCP/IP) 11. Protocol Analysis 12. Exam Summary 1. Introduction to Computer Networks Definition A computer network is a collection of interconnected computing devices that can exchange data and share resources with each other. These devices communicate using standardized protocols to enable resource sharing, communication, and collaboration across different locations and distances [1][7][19]. Importance of Computer Networks Computer networking has become the backbone of modern communication and information exchange, providing numerous critical benefits [4][7]: 1. Cost Savings: By enabling resource sharing such as printers and storage devices, networks reduce the need for multiple hardware components, leading to significant cost reductions. 2. Enhanced Storage Capacity: Centralized data storage allows for better data management and accessibility, improving productivity and reducing the need for multiple storage solutions. 3. Improved Flexibility: Networks provide flexibility for employees to access data and applications from various locations, supporting remote work and increasing overall efficiency. 4. Streamlined Communication: Networking facilitates real-time communication through emails, instant messaging, and video conferencing, enhancing collaboration among team members. 5. Resource Sharing: Networks allow multiple users to share resources such as files, applications, and internet connections, optimizing utilization and reducing redundancy. 6. Scalability: As organizations grow, networks can be scaled to accommodate additional devices and users without significant infrastructure changes. 7. Security: Implementing security measures like firewalls and encryption within a network helps protect sensitive information from unauthorized access. 8. Centralized Management: Networks enable centralized management of resources, simplifying tasks such as software updates and data backups. Uses of Computer Networks Modern computer networks serve multiple purposes across various sectors [1][4]: Communication: Email, instant messaging, video conferencing, and social networking Resource Sharing: Printers, scanners, files, and internet connections Remote Access: Working from anywhere with network connectivity E-commerce: Online sales, payments, and business transactions Education: Distance learning, resource access, and collaboration Entertainment: Online gaming, streaming media, and social platforms Healthcare: Patient data management and telemedicine Scientific Research: Data sharing and collaborative research 2. Network Performance Metrics and Formulas Understanding network performance requires knowledge of key metrics that determine how efficiently data travels across networks [2][8][11]. Key Performance Metrics Bandwidth: The maximum data transfer capacity of a network, measured in bits per second (bps). It represents the theoretical limit of data that can be transmitted over the network in a given time [2][8]. Data Rate (Throughput): The actual amount of data that successfully travels through the network over a specified period, often lower than bandwidth due to real-world limitations [2][8]. Latency: The time it takes for a packet of data to traverse from one point in the network to another. It includes propagation delay, transmission delay, queuing delay, and processing delay [2][11]. Propagation Delay: The time required for a signal to travel from sender to receiver, calculated as: Propagation Time = Distance / Signal Speed Transmission Delay: The time required to push all packet bits into the transmission medium, calculated as: Transmission Time = Message Size / Bandwidth Important Formulas 1. Bandwidth-Delay Product: Bandwidth-Delay Product = Bandwidth × Latency This represents the maximum number of bits that can fill the link [11]. 2. Network Latency: Total Latency = Propagation Delay + Transmission Delay + Queuing Delay + Processing Delay 3. Throughput Calculation: Throughput = Amount of Data Transferred ÷ Time Taken Example Calculation: For a 2.5 KB message with 1 Gbps bandwidth over 12,000 km distance (signal speed = 2.4 × 10⁸ m/s): Propagation time = (12000 × 1000) / (2.4 × 10⁸) = 50 ms Transmission time = (2560 × 8) / 10⁹ = 0.020 ms 3. Types of Networks (LAN, MAN, WAN) Networks are classified based on their geographical coverage, with three main types serving different scales of connectivity [3][6][9]. Network Types Comparison Local Area Network (LAN) Coverage: Single room, building, or campus (up to 1-2 km) Speed: Very high (10 Mbps - 10 Gbps) Cost: Low implementation and maintenance Ownership: Private (hospitals, homes, schools, offices) Technology: Ethernet, Wi-Fi, cables, switches Advantages: High-speed local connectivity, easy management, low cost Disadvantages: Limited geographical coverage, security vulnerabilities if not properly configured Metropolitan Area Network (MAN) Coverage: Metropolitan area (25-50 km radius) Speed: High (155 Mbps - 1 Gbps) Cost: Moderate implementation cost Ownership: Can be private or public Technology: Fiber rings, metro Ethernet, WiMAX Advantages: Higher speed than WAN, centralized control, covers city-wide areas Disadvantages: More expensive than LAN, complex installation, difficult to secure from hackers Wide Area Network (WAN) Coverage: Cities, states, countries (thousands of kilometers) Speed: Moderate (up to 100 Mbps) Cost: High implementation and maintenance Ownership: Can be private or public Technology: Cellular, satellite, fiber cables, routers Advantages: Global connectivity, information sharing across vast distances Disadvantages: High cost, complex management, lower speeds, security challenges 4. Internet Basics The Internet represents the largest implementation of WAN technology, connecting billions of devices worldwide through standardized protocols and addressing systems [21][24][27]. Key Components Web Browser: An application software that acts as a platform allowing users to access information from the Internet by serving as an interface between the client (user) and the server [33]. Popular browsers include Google Chrome, Microsoft Edge, Mozilla Firefox, and Safari. Web Server: A computer system that stores, processes, and delivers web pages to clients. When a user requests a webpage, the web server processes this request and responds with the required content including HTML, CSS, images, and scripts [33]. URL (Uniform Resource Locator): Web addresses that define the locations of unique resources on the internet. A typical URL consists of: Protocol: (e.g., https://) - The method used to access the resource Domain Name: (e.g., example.com) - Human-readable address of the server Path: (e.g., /page.html) - Specific location of the resource on the server [21] Domain Name: A string of text that maps to an alphanumeric IP address, used to access websites from client software. Domain names make it easier for users to remember website addresses instead of complex numerical IP addresses [27]. IP Address: A unique numerical identifier assigned to every device connected to the Internet (e.g., 192.168.1.1 for IPv4 or 2400:cb00:2048:1::c629:d7a2 for IPv6). IP addresses are necessary for routing data to the correct destination device [24]. Domain Name System (DNS) DNS acts as the "phonebook of the Internet," translating human-friendly domain names into machine-readable IP addresses [24][30]. DNS Resolution Process: 1. User enters domain name in browser 2. DNS query sent to DNS resolver 3. Resolver checks cache, if not found, forwards to root DNS server 4. Root server provides TLD (Top-Level Domain) server address 5. TLD server directs to authoritative DNS server 6. Authoritative server provides IP address 7. IP address returned to user's device 8. Browser can now access the website 5. Packet Structure and Transmission Data transmission across networks occurs through the use of packets - small chunks of data that include both the actual information (payload) and control information (headers) [22][28]. Packet Components Header: Contains control information including: Source and destination addresses Packet sequence numbers Protocol information Error detection codes Routing information Payload: The actual data being transmitted, such as: Web page content Email messages File data Multimedia content Trailer: Additional control information added by some protocols, typically including: Error detection codes (Frame Check Sequence) End-of-frame markers Packet Structure Diagram ┌─────────────────────────────────────────────────┐ │ PACKET │ ├─────────────┬───────────────────┬───────────────┤ │ HEADER │ PAYLOAD │ TRAILER │ │ │ (Actual Data) │ (Optional) │ ├─────────────┼───────────────────┼───────────────┤ │ • Source IP │ • Web content │ • Error check │ │ • Dest IP │ • Email data │ • End marker │ │ • Protocol │ • File data │ │ │ • Sequence │ • Multimedia │ │ └─────────────┴───────────────────┴───────────────┘ Maximum Transmission Unit (MTU) MTU defines the largest packet size that can be transmitted over a network medium without fragmentation [22] [25]: Standard Ethernet MTU: 1500 bytes Calculation: MTU - (IP header + TCP header) = Maximum Segment Size (MSS) Example: 1500 - (20 + 20) = 1460 bytes MSS Transmission Time Formula Transmission Time = Packet Size / Link Bandwidth Fragmentation: When packets exceed the MTU of any device along the network path, they must be broken into smaller fragments. If the "Don't Fragment" flag is set, the packet is dropped instead [22]. Ethernet Frame Structure The IEEE 802.3 Ethernet frame includes [28]: Preamble: 7 bytes for synchronization Start Frame Delimiter: 1 byte Destination MAC: 6 bytes Source MAC: 6 bytes Type/Length: 2 bytes Payload: 46-1500 bytes Frame Check Sequence: 4 bytes 6. Network Hardware Architecture Network devices operate at different layers of network models and serve specific functions in managing and directing data flow [23][26][29]. Hub (Physical Layer - Layer 1) Function: Multi-port repeater that broadcasts data to all connected devices Operation: Works on electrical signal amplification, no intelligence Speed: Original hubs: 10 Mbps, Modern hubs: 100 Mbps Collision Domain: All ports share single collision domain Advantages: Simple, inexpensive Disadvantages: No security, broadcasts to all ports, half-duplex only Status: Largely deprecated in modern networks Network Hardware Comparison Diagram ┌─────────────────────────────────────────────────┐ │ HUB (Layer 1) │ │ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ │ │ PC1 │────▶│ │◄────│ PC2 │ │ PC3 │ │ │ └─────┘ │ HUB │ └─────┘ └─────┘ │ │ │ │ │ │ └─────┘ │ │ • Broadcasts to all ports │ │ • Single collision domain │ │ • Half-duplex communication │ └─────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────┐ │ SWITCH (Layer 2) │ │ ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ │ │ PC1 │────▶│ │◄────│ PC2 │ │ PC3 │ │ │ └─────┘ │SWTH │ └─────┘ └─────┘ │ │ │ │ │ │ └─────┘ │ │ • Learns MAC addresses │ │ • Separate collision domains per port │ │ • Full-duplex communication │ └─────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────┐ │ ROUTER (Layer 3) │ │ LAN A ┌─────┐ LAN B │ │ ┌─────────┐ │ │ ┌─────────┐ │ │ │ Network │──│RTER │──│ Network │ │ │ │192.168.1│ │ │ │192.168.2│ │ │ └─────────┘ └─────┘ └─────────┘ │ │ • Routes between different networks │ │ • Uses IP addresses │ │ • Separates broadcast domains │ └─────────────────────────────────────────────────┘ Switch (Data Link Layer - Layer 2) Function: Intelligent device that learns MAC addresses and forwards frames selectively Operation: Maintains MAC address table, forwards frames only to intended recipients Speed: 10 Mbps to 100+ Gbps Collision Domain: Each port has separate collision domain Features: MAC address learning Intelligent frame forwarding Full-duplex communication Loop avoidance through Spanning Tree Protocol Advantages: Improved security, reduced collisions, better performance Disadvantages: More expensive than hubs, limited to single broadcast domain Router (Network Layer - Layer 3) Function: Routes data packets between different networks based on IP addresses Operation: Maintains routing tables, makes forwarding decisions based on network layer information Speed: 1-10 Mbps (wireless) to 100 Mbps+ (wired) Features: Logical addressing using IP addresses Best path determination (routing) Inter-network communication Broadcast domain separation Types: Static Routers: Manually configured routing tables Dynamic Routers: Adaptive routing with automatic updates Layer 3 Switches Modern networking devices that combine switching and routing functions: Perform Layer 2 switching for intra-VLAN traffic Perform Layer 3 routing for inter-VLAN traffic Use ASICs for hardware-based forwarding Implement "route once, switch many" principle 7. Network Mediums (Wired and Wireless) Network transmission mediums are the physical pathways through which data travels between network devices [41][44][45]. Wired (Guided) Media Twisted Pair Cable Unshielded Twisted Pair (UTP): Construction: Pairs of insulated copper wires twisted together Categories: Cat5e (1 Gbps), Cat6 (10 Gbps), Cat7 (10+ Gbps) Distance: Up to 100 meters Cost: Very low Applications: LANs, Ethernet, telephone systems Advantages: Easy installation, cost-effective, flexible Disadvantages: Susceptible to EMI, limited bandwidth, short distance Shielded Twisted Pair (STP): Construction: Additional metal foil shielding around wire pairs Performance: Better than UTP for high-speed applications Cost: Higher than UTP Applications: Industrial environments, high-EMI areas Coaxial Cable 75 Ohm Coaxial: Applications: Cable TV, video transmission Bandwidth: 80x more capacity than twisted pair Distance: 500m - 10km Advantages: Higher bandwidth, good interference protection 50 Ohm Coaxial: Applications: Data networks, AM/FM radio, computer backbones Performance: Suitable for 2-way communication systems Fiber Optic Cable Single Mode Fiber (SMF): Core Diameter: ~9 microns Distance: 40km - 100km+ Speed: 10 Gbps - 100 Tbps Applications: Long-distance, backbone networks Multi Mode Fiber (MMF): Core Diameter: 50/62.5 microns Distance: 550m - 2km Speed: 10 Mbps - 100 Gbps Applications: Campus networks, data centers Advantages: Very high bandwidth (26,000x more than twisted pair), immune to EMI, secure transmission Disadvantages: High cost, fragile, difficult installation Network Medium Visual Comparison TWISTED PAIR CABLE ┌─────────────────────────────────────────┐ │ ┌───┐ ┌───┐ ┌───┐ ┌───┐ │ │ │ 1 │ │ 2 │ │ 3 │ │ 4 │ │ │ └─┬─┘ └─┬─┘ └─┬─┘ └─┬─┘ │ │ └─────┘ └─────┘ │ │ Pair 1 (Twisted) Pair 2 (Twisted) │ │ • Low cost • Easy installation │ │ • 100m max • Susceptible to EMI │ └─────────────────────────────────────────┘ COAXIAL CABLE ┌─────────────────────────────────────────┐ │ ┌─────────────────────────────────────┐ │ │ │ Inner Conductor │ │ │ └─────────────────────────────────────┘ │ │ Dielectric Insulator │ │ ┌─────────────────────────────────────┐ │ │ │ Outer Conductor │ │ │ └─────────────────────────────────────┘ │ │ • Medium cost • Good EMI protection │ │ • 10km max • 80x bandwidth vs TP │ └─────────────────────────────────────────┘ FIBER OPTIC CABLE ┌─────────────────────────────────────────┐ │ Core (Light transmission) │ │ ┌───────────────────────────────────┐ │ │ │ ═══════════════════════════════ │ │ │ └───────────────────────────────────┘ │ │ Cladding (Light reflection) │ │ • High cost • Immune to EMI │ │ • 100km+ max • 26,000x bandwidth │ └─────────────────────────────────────────┘ Wireless (Unguided) Media Radio Waves Frequency Range: 3 KHz - 1 GHz Characteristics: Omnidirectional, can penetrate walls, long-distance travel Applications: AM/FM radio, cordless phones, Wi-Fi Advantages: No physical infrastructure, long range Disadvantages: Interference susceptible, less secure Microwaves Frequency Range: 1 GHz - 300 GHz Characteristics: Unidirectional, line-of-sight communication Types: Terrestrial Microwave: Point-to-point communication between ground stations Satellite Microwave: Communication via geostationary satellites at 36,000 km altitude Infrared Frequency Range: 300 GHz - 400 THz Characteristics: Short-range, line-of-sight, cannot penetrate obstacles Applications: TV remotes, IrDA devices, short-range data transfer Advantages: Secure (short range), inexpensive, no interference with radio Disadvantages: Limited range, requires line-of-sight Satellite Communication Orbit: Geostationary at 35,400 km above equator Coverage: Global communication capability Applications: GPS, TV broadcasting, internet for remote areas Advantages: Wide coverage, remote area access Disadvantages: High latency, weather dependent, expensive Free Space Path Loss Formula For wireless communications: FSPL (dB) = 20 × log₁₀(d) + 20 × log₁₀(f) + 32.45 Where: d = distance in kilometers f = frequency in MHz 8. Network Topologies Network topology refers to the geometric arrangement of network devices and the paths through which data flows [43][49][52]. Network Topology Diagrams BUS TOPOLOGY ┌─────┐ ┌─────┐ ┌─────┐ ┌─────┐ │ PC1 │ │ PC2 │ │ PC3 │ │ PC4 │ └──┬──┘ └──┬──┘ └──┬──┘ └──┬──┘ │ │ │ │ ───┴─────────┴─────────┴─────────┴─── Single Cable Backbone STAR TOPOLOGY ┌─────┐ │ PC1 │ └──┬──┘ │ ┌─────┐ │ ┌─────┐ │ PC4 │─┼─│ PC2 │ └─────┘ │ └─────┘ ┌──┴──┐ │ HUB │ └──┬──┘ │ ┌──┴──┐ │ PC3 │ └─────┘ RING TOPOLOGY ┌─────┐ ┌─────┐ │ PC1 │────▶│ PC2 │ └─────┘ └─────┘ ▲ │ │ ▼ ┌─────┐ ┌─────┐ │ PC4 │◄────│ PC3 │ └─────┘ └─────┘ MESH TOPOLOGY (Full) ┌─────┐─────────┌─────┐ │ PC1 │ ╱ │ PC2 │ └─┬─┬─┘ ╱ └─┬─┬─┘ │ │ ╱ │ │ │ │ ╱ │ │ │ │ ╱ │ │ ┌─┴─▼─╱─────────┌─▼─┴─┐ │ PC4 │ │ PC3 │ └─────┘─────────└─────┘ Bus Topology Structure: All devices connected to a single central cable (backbone) Data Flow: Data transmitted to all devices, only intended recipient processes it Advantages: Simple and cost-effective Easy to implement Requires minimal cable length Disadvantages: Single point of failure (backbone) Performance degrades with more devices Difficult troubleshooting Applications: Early Ethernet networks, small networks Star Topology Structure: All devices connected to a central hub or switch Data Flow: All communication passes through central device Advantages: Easy to install and manage Failure of one device doesn't affect others Easy troubleshooting and expansion Better performance than bus topology Disadvantages: Central device is single point of failure Requires more cable than bus topology Higher cost due to central device Applications: Modern Ethernet LANs, home networks Ring Topology Structure: Devices connected in circular fashion, each device connected to exactly two others Data Flow: Data travels in one direction (unidirectional) or both directions (bidirectional) Token Passing: Access control mechanism using token circulation Advantages: Equal access for all devices Predictable data transmission No collisions with proper token passing Disadvantages: Break in ring disrupts entire network Complex addition/removal of devices Troubleshooting difficulties Applications: IBM Token Ring LANs (historical), FDDI networks Mesh Topology Structure: Every device connected to every other device Types: Full Mesh: Complete interconnection (n(n-1)/2 links for n devices) Partial Mesh: Some devices have multiple connections Advantages: High reliability and redundancy Multiple paths for data transmission No single point of failure High security and privacy Disadvantages: Very expensive (multiple cables/ports) Complex installation and maintenance Redundant connections may be underutilized Applications: Internet backbone, military networks, critical systems Hybrid Topology Structure: Combination of two or more basic topologies Types: Star-Bus: Star networks connected via bus backbone Star-Ring: Ring networks connected via central hubs Hierarchical: Tree-like structure with multiple levels Advantages: Combines benefits of multiple topologies Scalable and flexible design Can choose optimal topology for each segment Disadvantages: Complex design and implementation Difficult fault detection Higher cost and maintenance complexity Applications: Large corporate networks, campus networks 9. Network Software Architecture Network software architecture is organized into layered designs that provide modularity, standardization, and interoperability between different network systems [29][65]. Layered Design Principles Benefits of Layered Architecture: Modular Design: Each layer performs specific functions independently Standardization: Common interfaces between layers enable interoperability Abstraction: Higher layers don't need to understand lower layer implementations Maintainability: Changes in one layer don't affect other layers Troubleshooting: Problems can be isolated to specific layers Layer Interaction Service Interface: Each layer provides services to the layer above and uses services from the layer below through well-defined interfaces. Protocol Communication: Peer layers on different devices communicate using protocols specific to that layer. Encapsulation and Decapsulation Process SENDING DEVICE - ENCAPSULATION ┌─────────────────────────────────────┐ │ Application Data │ ← Layer 7 ├─────────────────────────────────────┤ │ L6 Header │ Application Data │ ← Layer 6 ├─────────────────────────────────────┤ │ L5 Header │ L6 Header │ App Data │ ← Layer 5 ├─────────────────────────────────────┤ │ TCP/UDP │ L5 Header │ L6 │ App │ ← Layer 4 ├─────────────────────────────────────┤ │ IP │ TCP │ L5 │ L6 │ App Data │ ← Layer 3 ├─────────────────────────────────────┤ │Frame│IP│TCP│L5│L6│App Data│Trailer│ ← Layer 2 ├─────────────────────────────────────┤ │ Electrical Signals │ ← Layer 1 └─────────────────────────────────────┘ RECEIVING DEVICE - DECAPSULATION ┌─────────────────────────────────────┐ │ Electrical Signals │ → Layer 1 ├─────────────────────────────────────┤ │Frame│IP│TCP│L5│L6│App Data│Trailer│ → Layer 2 ├─────────────────────────────────────┤ │ IP │ TCP │ L5 │ L6 │ App Data │ → Layer 3 ├─────────────────────────────────────┤ │ TCP/UDP │ L5 Header │ L6 │ App │ → Layer 4 ├─────────────────────────────────────┤ │ L5 Header │ L6 Header │ App Data │ → Layer 5 ├─────────────────────────────────────┤ │ L6 Header │ Application Data │ → Layer 6 ├─────────────────────────────────────┤ │ Application Data │ → Layer 7 └─────────────────────────────────────┘ Encapsulation Process: As data moves down the protocol stack, each layer adds its own header (and sometimes trailer) containing protocol-specific information. Decapsulation Process: As data moves up the protocol stack on the receiving end, each layer removes its corresponding header and processes the protocol information. 10. Network Models (OSI and TCP/IP) Network models provide standardized frameworks for understanding and implementing network communications [61][64][65]. OSI (Open Systems Interconnection) Model The OSI model consists of seven layers, each with specific functions and Protocol Data Units (PDUs) [64][67]. Mnemonic: "All People Seem To Need Data Processing" (Layers 7-1) TCP/IP Model The TCP/IP model is a four-layer model that forms the foundation of Internet protocols [71][74][65]. TCP/IP vs OSI Layer Mapping ┌─────────────────────┬─────────────────────┐ │ TCP/IP Model │ OSI Model │ ├─────────────────────┼─────────────────────┤ │ │ 7. Application │ │ 4. Application │ 6. Presentation │ │ │ 5. Session │ ├─────────────────────┼─────────────────────┤ │ 3. Transport │ 4. Transport │ ├─────────────────────┼─────────────────────┤ │ 2. Internet │ 3. Network │ ├─────────────────────┼─────────────────────┤ │ │ 2. Data Link │ │ 1. Network Access │ 1. Physical │ └─────────────────────┴─────────────────────┘ TCP/IP Layer Details: Layer 4 - Application Layer: Equivalent OSI Layers: 7, 6, 5 (Application, Presentation, Session) Protocols: HTTP, FTP, SMTP, DNS, DHCP, SSH Function: Application services and protocols Layer 3 - Transport Layer: Equivalent OSI Layer: 4 (Transport) Protocols: TCP, UDP Function: End-to-end data delivery Layer 2 - Internet Layer: Equivalent OSI Layer: 3 (Network) Protocols: IP, ICMP, ARP Function: Routing and logical addressing Layer 1 - Network Access Layer: Equivalent OSI Layers: 2, 1 (Data Link, Physical) Protocols: Ethernet, Wi-Fi, PPP Function: Physical transmission and local network access Encapsulation Example in TCP/IP APPLICATION LAYER ┌─────────────────────────────────────┐ │ HTTP Request │ │ "GET /index.html HTTP/1.1" │ └─────────────────────────────────────┘ ↓ TRANSPORT LAYER ┌─────────────────────────────────────┐ │ TCP Header │ HTTP Request │ │ (20 bytes) │ │ └─────────────────────────────────────┘ ↓ INTERNET LAYER ┌─────────────────────────────────────┐ │IP Header│TCP Header│ HTTP Request │ │(20 byte)│(20 bytes)│ │ └─────────────────────────────────────┘ ↓ NETWORK ACCESS LAYER ┌─────────────────────────────────────┐ │Eth │IP │TCP │ HTTP Request │ CRC │ │Head│Hdr│Hdr │ │ │ └─────────────────────────────────────┘ 11. Protocol Analysis TCP vs UDP Comparison TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are the two primary transport layer protocols, each optimized for different use cases [63][66][69]. TCP Three-Way Handshake CLIENT SERVER │ │ │──── SYN (Seq=100) ────▶ │ Step 1: Connection Request │ │ │ ◄── SYN-ACK ──────────── │ Step 2: Acknowledgment + Server SYN │ (Seq=200, Ack=101) │ │ │ │──── ACK (Ack=201) ────▶ │ Step 3: Final Acknowledgment │ │ │ Connection Established │ UDP Header vs TCP Header UDP HEADER (8 bytes) ┌─────────────────┬─────────────────┐ │ Source Port │ Destination Port│ │ (2 bytes) │ (2 bytes) │ ├─────────────────┼─────────────────┤ │ Length │ Checksum │ │ (2 bytes) │ (2 bytes) │ └─────────────────┴─────────────────┘ TCP HEADER (20-60 bytes) ┌─────────────────┬─────────────────┐ │ Source Port │ Destination Port│ ├─────────────────┴─────────────────┤ │ Sequence Number │ ├─────────────────────────────────────┤ │ Acknowledgment Number │ ├─────┬───┬─────┬─────────────────────┤ │Hdr │Rsv│Flags│ Window Size │ │Len │ │ │ │ ├─────┴───┴─────┼─────────────────────┤ │ Checksum │ Urgent Pointer │ ├───────────────┴─────────────────────┤ │ Options (Optional) │ └─────────────────────────────────────┘ Port Numbers Well-Known Ports (0-1023): HTTP: 80 - Web traffic HTTPS: 443 - Secure web traffic FTP: 21 - File transfer SSH: 22 - Secure shell Telnet: 23 - Remote terminal SMTP: 25 - Email sending DNS: 53 - Domain name resolution DHCP: 67/68 - Dynamic host configuration POP3: 110 - Email retrieval IMAP: 143 - Email access Registered Ports (1024-49151): Used by specific applications and services Dynamic/Private Ports (49152-65535): Used by client applications for temporary connections 12. Exam Summary Key Formulas and Units Performance Calculations: Bandwidth = Data capacity (bits per second - bps) Throughput = Actual data transfer rate (bps) Latency = Total delay (milliseconds - ms) Propagation Delay = Distance / Signal Speed Transmission Delay = Message Size / Bandwidth Bandwidth-Delay Product = Bandwidth × Latency MTU - (IP Header + TCP Header) = MSS FSPL (dB) = 20 × log₁₀(d) + 20 × log₁₀(f) + 32.45 where d = distance (km), f = frequency (MHz) Full Mesh Links = n(n-1)/2 for n devices Units: Bandwidth: bps, Kbps, Mbps, Gbps, Tbps Distance: meters (m), kilometers (km) Time: seconds (s), milliseconds (ms), microseconds (μs) Data Size: bits, bytes, KB, MB, GB, TB Network Classification Summary Type Coverage Speed Cost Ownership Technology LAN 1-2 km 10 Mbps - 10 Gbps Low Private Ethernet, WiFi MAN 25-50 km 155 Mbps - 1 Gbps Moderate Public/Private Fiber rings, WiMAX WAN Thousands of km Up to 100 Mbps High Public/Private Cellular, Satellite Important Tables and Comparisons Cable Specifications: Twisted Pair: 100m, 10 Mbps - 10 Gbps, Low cost, EMI susceptible Coaxial: 10km, Up to 10 Gbps, Moderate cost, Good EMI protection Fiber Optic: 100km+, 100 Tbps, High cost, EMI immune Network Devices: Hub: Layer 1, Broadcast, Single collision domain, Deprecated Switch: Layer 2, MAC learning, Per-port collision domains Router: Layer 3, IP routing, Separates broadcast domains Topologies: Bus: Single cable, Cost-effective, Single point of failure Star: Central device, Easy management, Hub dependency Ring: Circular, Equal access, Break disrupts all Mesh: Full connectivity, High reliability, Expensive Mnemonics OSI Model (7-1): "All People Seem To Need Data Processing" Application, Presentation, Session, Transport, Network, Data Link, Physical OSI PDUs (7-1): "Data Data Data Segments Packets Frames Bits" TCP/IP Model (4-1): "Application, Transport, Internet, Network Access" Protocol Quick Reference TCP Characteristics: Connection-oriented (3-way handshake) Reliable (acknowledgments, retransmission) Ordered delivery Flow control 20-60 byte header UDP Characteristics: Connectionless Fast (minimal overhead) Unreliable No ordering guarantee 8-byte fixed header Critical Concepts for Exam 1. Layered Architecture: Understanding abstraction, encapsulation/decapsulation 2. Performance Metrics: Bandwidth vs throughput, latency components, calculation formulas 3. Network Classification: LAN/MAN/WAN characteristics and applications 4. Hardware Functions: Layer operations of hubs, switches, routers 5. Media Selection: Cable types, wireless technologies, distance/speed trade-offs 6. Topology Analysis: Advantages/disadvantages, failure scenarios 7. Protocol Selection: TCP vs UDP application suitability 8. Addressing: IP addresses, MAC addresses, port numbers, DNS resolution 9. Internet Basics: URL components, client-server interaction, packet structure 10. Model Mapping: OSI layers to TCP/IP layers, PDU progression Sample Calculations Example 1: Transmission Time File size: 10 MB = 80 Megabits Bandwidth: 100 Mbps Transmission Time = 80 Mb ÷ 100 Mbps = 0.8 seconds Example 2: Propagation Delay Distance: 3000 km Signal speed: 2 × 10⁸ m/s Propagation Delay = 3,000,000 m ÷ (2 × 10⁸ m/s) = 15 ms Example 3: Full Mesh Links 6 devices in full mesh Links required = 6(6-1)/2 = 15 links References This comprehensive document synthesizes information from multiple authoritative sources on computer networking fundamentals, including academic institutions, technology companies, and industry standards organizations. All technical specifications, formulas, and concepts have been verified against current networking standards and best practices.
0
You can add this document to your study collection(s)
Sign in Available only to authorized usersYou can add this document to your saved list
Sign in Available only to authorized users(For complaints, use another form )