Unit 1 - Notes
CSE306
Unit 1: INTRODUCTION & NETWORK MODELS
1. Uses of Computer Networks
A computer network is a set of devices (nodes) connected by communication links. The fundamental purpose of a network is resource sharing.
- Business Applications:
- Resource Sharing: Sharing physical resources (printers, scanners) and digital resources (databases, files) to reduce costs.
- Communication: Email, VoIP (Voice over IP), and video conferencing allow for instant internal and external communication.
- E-Commerce: Facilitating business-to-business (B2B) and business-to-consumer (B2C) transactions.
- Home Applications:
- Access to Remote Information: Browsing the World Wide Web, accessing financial news, and digital libraries.
- Person-to-Person Communication: Social media, instant messaging, and peer-to-peer file sharing.
- Interactive Entertainment: Online gaming and Video on Demand (streaming services).
- Mobile Users: Wireless connectivity allows access to data from anywhere (PDAs, Smartphones, Laptops), enabling the Internet of Things (IoT).
2. Types of Networks
Networks are categorized based on their geographical span and scale.
A. PAN (Personal Area Network)
- Range: Smallest range (approx. 10 meters).
- Purpose: Connects devices centered around an individual (e.g., connecting a mouse, keyboard, and headphones to a computer).
- Technology: Bluetooth, ZigBee, USB.
B. LAN (Local Area Network)
- Range: Covers a limited area like a room, building, or campus (up to a few kilometers).
- Ownership: Usually privately owned.
- Characteristics: High data transfer rates, low error rates.
- Technology: Ethernet (IEEE 802.3), Wi-Fi (IEEE 802.11).
C. MAN (Metropolitan Area Network)
- Range: Covers a city or a large campus.
- Purpose: Interconnects several LANs.
- Example: Cable television network, city-wide Wi-Fi mesh.
D. WAN (Wide Area Network)
- Range: Spans a large geographical area, often a country or continent.
- Ownership: Can be private (enterprise WAN) or public (ISP networks).
- Characteristics: Connects using leased telecommunication lines, satellites, or fiber optics. The Internet is the largest WAN.
3. Network Hardware Architecture
A. Network Topologies
Topology refers to the physical or logical layout of a network.
- Mesh Topology:
- Every device has a dedicated point-to-point link to every other device.
- Links required: for devices.
- Pros: Robust (if one link fails, others work), secure/private.
- Cons: Expensive cabling, difficult installation.
- Star Topology:
- All devices connect to a central controller (Hub or Switch).
- Pros: Easy to install, easy fault identification, failure of one node doesn't affect others.
- Cons: If the central hub fails, the whole network goes down.
- Bus Topology:
- One long cable (backbone) connects all devices. Drop lines and taps connect devices to the backbone.
- Pros: Less cable required, easy to install.
- Cons: If the backbone breaks, the network fails; heavy traffic slows performance; difficult fault isolation.
- Ring Topology:
- Each device has a dedicated connection with two devices on either side, forming a closed loop. Data travels in one direction.
- Pros: Equal access to resources (often uses Token Passing).
- Cons: Unidirectional traffic means a break in the ring disables the network.
- Tree/Hybrid Topology:
- Combinations of the above (e.g., Star-Bus). Used to scale networks efficiently.
B. Network Connecting Devices
- HUB (Physical Layer Device):
- Function: A generic connection point. It does not inspect data.
- Operation: When a packet arrives at one port, it is copied to all other ports (Broadcasting).
- Drawback: High collision rate, security risks (everyone sees all data), wastes bandwidth.
- SWITCH (Data Link Layer Device):
- Function: An intelligent device that filters and forwards packets.
- Operation: Uses MAC Addresses to learn where devices are located. It sends data only to the intended receiver (Unicast).
- Benefit: Reduces collisions, increases effective bandwidth.
- ROUTER (Network Layer Device):
- Function: Connects different networks (e.g., LAN to WAN/Internet).
- Operation: Uses IP Addresses to determine the best path for data to travel. It maintains a routing table.
- Benefit: Performs traffic management, connects disparate network architectures.
4. Network Software Architecture
Network software allows hardware to function effectively. It is structured using Protocol Hierarchies.
Protocol Hierarchies (Layering)
To reduce design complexity, networks are organized as a stack of layers or levels, each built upon the one below it.
- Protocol: A set of rules that governs data communication.
- Service: Operations a layer provides to the layer above it.
- Interface: Defines primitive operations and services between adjacent layers.
Design Issues for Layers
- Addressing: Identifying the sender and receiver.
- Error Control: Detecting and correcting physical communication errors.
- Flow Control: Preventing a fast sender from swamping a slow receiver.
- Multiplexing: Using one physical channel for multiple conversations.
- Routing: Choosing the specific path for the data.
Connection Services
- Connection-Oriented: A logical path is established first (Handshake), data is sent, and the connection is released (e.g., TCP, Phone call). Reliable.
- Connectionless: No setup. Data packets are sent independently (e.g., UDP, Postal mail). Faster but less reliable.
5. Internet Basic Concepts
The Internet
A global system of interconnected computer networks that use the standard Internet protocol suite (TCP/IP) to link billions of devices worldwide. It is a "network of networks."
Key Terminology
- Web Browser: Application software for accessing the World Wide Web. It translates HTML/CSS/JS code into a visual page (e.g., Chrome, Firefox).
- Web Server: A computer utilizing specific software (Apache, Nginx) to store website files and serve them to users upon request via HTTP/HTTPS.
- URL (Uniform Resource Locator): The address of a given unique resource on the Web.
- Structure:
Protocol://Domain:Port/Path - Example:
https://www.example.com/index.html
- Structure:
- Domain Name: A human-readable label used to identify a network address (e.g.,
google.com). The DNS (Domain Name System) translates this name into a numerical IP address. - IP Address (Internet Protocol Address): A numerical label assigned to each device connected to a computer network using IP.
- IPv4: 32-bit (e.g.,
192.168.1.1) - IPv6: 128-bit (hexadecimal)
- IPv4: 32-bit (e.g.,
- Packets: Small units of data. Large files are broken down into packets to be transmitted over the network and reassembled at the destination.
6. Protocol Layering
Protocol layering creates a modular design where each layer solves specific problems.
Encapsulation
As data moves down the layers (from Application to Physical):
- Each layer adds its own Header (and sometimes a Trailer) to the data received from the layer above.
- The data from the upper layer becomes the "Payload" for the lower layer.
Decapsulation
As data moves up the layers (from Physical to Application):
- Each layer reads and removes the header intended for it.
- The remaining payload is passed up to the next layer.
7. The OSI Model (Open Systems Interconnection)
Developed by ISO, this is a 7-layer logical reference model defining network communication.
Mnemonic: Please Do Not Throw Sausage Pizza Away (Physical to Application).
Layers (Bottom-Up)
- Physical Layer:
- Unit: Bits.
- Function: Transmission of raw bits over a communication channel. Deals with voltage levels, cable types, and physical topology.
- Data Link Layer (DLL):
- Unit: Frames.
- Function: Node-to-node delivery. Handles Physical Addressing (MAC), Error Control, and Flow Control. Divided into LLC (Logical Link Control) and MAC (Media Access Control).
- Network Layer:
- Unit: Packets.
- Function: Host-to-host delivery. Handles Logical Addressing (IP) and Routing (path determination).
- Transport Layer:
- Unit: Segments (TCP) or Datagrams (UDP).
- Function: End-to-end delivery of the complete message. Handles segmentation/reassembly, and service-point addressing (Ports). Ensures reliability (TCP) or speed (UDP).
- Session Layer:
- Function: Dialog control. It establishes, maintains, and synchronizes the interaction between communicating systems (checkpoints).
- Presentation Layer:
- Function: Syntax and semantics of information. Handles Translation (encoding), Encryption/Decryption, and Compression.
- Application Layer:
- Function: Provides network services directly to the user application (e.g., Email, File Transfer).
8. TCP/IP Protocol Suite
TCP/IP is the practical implementation of the network model used in the Internet today. It has 4 layers (sometimes mapped as 5).
Layers and Protocols
- Network Access / Link Layer:
- Equivalent to OSI Physical and Data Link layers.
- Handles physical interface with the cable and framing.
- Protocols: Ethernet, Wi-Fi, ARP (Address Resolution Protocol).
- Internet Layer:
- Equivalent to OSI Network layer.
- Handles logical addressing and routing.
- Protocols: IP (Internet Protocol), ICMP (Ping), IGMP.
- Transport Layer:
- Equivalent to OSI Transport layer.
- Handles end-to-end communication.
- Protocols:
- TCP (Transmission Control Protocol): Connection-oriented, reliable, heavy (used for Web, Email).
- UDP (User Datagram Protocol): Connectionless, unreliable, fast (used for Gaming, Streaming).
- Application Layer:
- Combines OSI Session, Presentation, and Application layers.
- Protocols:
- HTTP/HTTPS: Web browsing.
- SMTP/POP3/IMAP: Email.
- FTP: File Transfer.
- DNS: Domain Name resolution.
- SSH/Telnet: Remote login.
Summary Comparison: OSI vs TCP/IP
| Feature | OSI Model | TCP/IP Model |
|---|---|---|
| Type | Reference Model (Theoretical) | Implementation Model (Practical) |
| Layers | 7 Layers | 4 Layers |
| Development | Defined before protocols | Protocols defined first |
| Strictness | Strict layering | Loose layering |
| Usage | Rarely used mostly for education | Used for the Internet |