Cn u1 sn

 


Computer Networks – Unit 1

1.1 Data Communications

Definition

Exchange of data between two devices using a transmission medium.


1.1.1 Characteristics

  1. Delivery – must reach correct destination.
  2. Accuracy – data must be correct, no changes.
  3. Timeliness – delivered on time (real-time systems).
  4. Jitter – variation in arrival time of packets.

👉 Key Point: Good communication = Correct, Accurate, Timely, Stable.


1.1.2 Components

  1. Message – data (text, audio, video, etc.)
  2. Sender – device that sends (computer, phone).
  3. Receiver – device that receives (monitor, server).
  4. Medium – path (cable, fiber, radio waves).
  5. Protocol – set of rules for communication.

👉 Example: Sending WhatsApp message:

  • Message = text,
  • Sender = your phone,
  • Receiver = friend’s phone,
  • Medium = internet,
  • Protocol = TCP/IP.

1.1.3 Data Representation

  • Text → ASCII/Unicode bits.
  • Numbers → Bit patterns.
  • Images → Pixels in matrix.
  • Audio → Continuous sound waves → digital form.
  • Video → Sequence of images (frames) + audio.

1.1.4 Data Flow

  1. Simplex – one-way only.
    • Example: Keyboard → Computer.
  2. Half-Duplex – both send/receive but not same time.
    • Example: Walkie-Talkie.
  3. Full-Duplex – both send/receive at same time.
    • Example: Telephone call.

👉 Key Point for Exam:
Simplex = One way,
Half-duplex = Both ways but one at a time,
Full-duplex = Both ways at same time.


1.2 Networks

Definition: A set of devices (nodes) connected by a communication medium.

Criteria

  1. Performance – speed, response time.
  2. Reliability – accuracy, fault tolerance.
  3. Security – protection from unauthorized access.

1.2.1 Physical Structure

Types of Connection:

  1. Point-to-Point – dedicated link between 2 devices.
    • Example: Remote control → TV.
  2. Multipoint (Multidrop) – many devices share one link.
    • Example: Classroom projector shared by many laptops.

1.3 Network Types

1.3.1 LAN (Local Area Network)

  • Covers small area (building/campus).
  • High speed (10 Mbps – 1 Gbps).
  • Low error, low delay.
  • Privately owned.

👉 Example: College computer lab.


1.3.2 MAN (Metropolitan Area Network)

  • Covers city or group of offices.
  • Medium speed (34 – 150 Mbps).
  • Uses fiber optics.
  • Standard = IEEE 802.6.

👉 Example: Cable TV network in a city.


1.3.3 WAN (Wide Area Network)

  • Covers large area (country/world).
  • Low speed compared to LAN.
  • Uses routers, packet switching.
  • Can use satellite/microwave.

👉 Example: Internet.


1.3.4 Comparison (LAN vs MAN vs WAN)

Feature LAN MAN WAN
Area Small (building) City Country/World
Speed High Medium Low
Cost Low Medium High
Error rate Low Medium High

1.3.6 Wireless LAN (WLAN)

  • Uses radio waves instead of cables.
  • Devices connect via Access Point (AP).
  • IEEE 802.11 family (WiFi).

👉 Example: WiFi in your home/college.


1.4 Layering and Protocols

Why Layers?

  • Networking is complex → split into layers.
  • Each layer handles specific functions.
  • Protocols define rules at each layer.

👉 Example: Sending email –

  • Application layer → creates mail,
  • Transport layer → divides into segments,
  • Network layer → decides route,
  • Data link + Physical → transmit over medium.

Exam Key Points (Quick Revision)

  1. Data communication characteristics: Delivery, Accuracy, Timeliness, Jitter.
  2. Components: Message, Sender, Receiver, Medium, Protocol.
  3. Data flow: Simplex (one way), Half-duplex (two-way alternate), Full-duplex (two-way simultaneous).
  4. Network criteria: Performance, Reliability, Security.
  5. Connections: Point-to-point vs Multipoint.
  6. LAN vs MAN vs WAN: Area, speed, cost, error rate.
  7. Wireless LAN: Uses radio waves, IEEE 802.11 (WiFi).
  8. Layering: Divide functions, use protocols.


Protocol Hierarchies

  • Networks are divided into layers. Each layer performs specific tasks and communicates with the layer above and below it.
  • Protocols = rules for communication.
  • Entity = module in a layer.
  • Interface = point where one layer interacts with the next.
  • Peers = same layer entities in different systems.

Key Point (Exam):

  • Layers reduce complexity.
  • Each layer adds its own header before sending data.

Example:
Email → Application Layer (SMTP) → Transport (TCP) → Internet (IP) → Data Link (MAC address).


Interfaces and Services

  • SDU (Service Data Unit): Data from upper layer.
  • PCI (Protocol Control Info): Extra info (header) added by a layer.
  • PDU (Protocol Data Unit): SDU + PCI = full packet at that layer.
  • IDU (Interface Data Unit): Data passed between two layers.
  • ICI (Interface Control Info): Control info passed across interface.

Key Point (Exam):

  • Each layer adds header for its peer layer to understand.

Example:
When sending a file:
Application sends file → Transport adds TCP header → Internet adds IP header → Data Link adds MAC header.


Connection-Oriented vs Connectionless Services

  1. Connection-Oriented

    • Path is set up before data transfer.
    • Reliable, ensures delivery.
    • Example: Telephone call, TCP.
  2. Connectionless

    • No fixed path, each packet routed separately.
    • Faster but less reliable.
    • Example: Postal letters, UDP.

Key Point (Exam):

  • TCP = connection-oriented.
  • UDP = connectionless.

Services vs Protocols

  • Service = what is provided (e.g., reliable transfer).
  • Protocol = how it is done (rules).
  • Service interface hides details of protocol from user.

Example:
Web browsing uses HTTP (service) over TCP/IP (protocols).


TCP/IP Protocol Suite

  • 4 Layers:
    1. Application Layer – TELNET, FTP, SMTP, DNS.
    2. Transport Layer – TCP (reliable), UDP (fast).
    3. Internet Layer – IP, ARP, ICMP (routing, addressing, fragmentation).
    4. Host-to-Network Layer – physical/data link (Ethernet, WiFi).

Key Point (Exam):

  • TCP = reliable, connection-oriented.
  • UDP = fast, no guarantee.
  • IP = addressing + routing.

Comparison: OSI vs TCP/IP

OSI (7 layers) TCP/IP (4 layers)
Defined before protocols. Defined after implementation.
Service, interface, protocol separated. Not clearly separated.
Strict layering. Loose layering.
Reliable delivery in transport. Not always reliable (UDP).

Key Point (Exam):

  • OSI = theoretical model.
  • TCP/IP = practical model.

Addressing in TCP/IP

  1. Physical Address (Data Link Layer)

    • MAC address (unique hardware address).
    • Changes hop to hop.
    • Example: 18:27:AC:34:7B:11.
  2. Logical Address (Internet Layer)

    • IP address (unique across internet).
    • Stays same end-to-end.
    • Example: 192.168.1.1.
  3. Port Address (Transport Layer)

    • Identifies process/application.
    • 16-bit number.
    • Example: HTTP uses port 80.
  4. Specific Address (Application Layer)

    • User-level addresses.
    • Example: email (abc@gmail.com), URL (www.google.com).

Key Point (Exam):

  • Physical changes per hop.
  • Logical stays fixed across path.
  • Port identifies application.
  • Specific is user-friendly.

OSI Model

  • 7 Layers: Physical, Data Link, Network, Transport, Session, Presentation, Application.
  • Each has a clear function, reducing complexity.

Key Services:

  1. Peer-to-peer logical services.
  2. Standard communication between systems.
  3. Defines interconnection points.
  4. Each layer has well-defined role.
  5. Ensures compatibility across products.

Key Point (Exam):

  • OSI = 7 layers, theoretical, standard.
  • Helps understand networking but not directly used in Internet.

Principles of OSI Layer Design

  1. Keep number of layers minimum (not too many).
  2. Boundary should be simple, with fewer interconnections.
  3. Different functions → separate layers.
  4. Similar functions → same layer.
  5. Use past experience to decide boundaries.
  6. Each layer should be flexible (can change without affecting others).
  7. Some interfaces may need standardization.
  8. Different data abstractions → new layers.
  9. Change inside a layer should not affect other layers.
  10. Each layer only connects to its upper & lower layers.

Key Point (Exam):
Layers = divide big problem into smaller, independent parts.


OSI Model – 7 Layers

1. Physical Layer

  • Lowest layer.
  • Transfers raw bits (0s & 1s) over channel.
  • Deals with hardware: cables, voltages, signals.

Functions:

  • Defines interface characteristics (plug, cable type).
  • Bit representation (electric/optical signals).
  • Data rate (bit speed).
  • Synchronization (sender & receiver clocks match).

Example: Ethernet cable, WiFi signals.

Key Point (Exam): Sends bits over medium.


2. Data Link Layer

  • Converts raw channel into error-free link.
  • Transfers frames (not bits).

Functions:

  • Framing – divides packets into frames.
  • Physical addressing – adds MAC address.
  • Flow control – prevents fast sender from overwhelming slow receiver.
  • Error control – detects & retransmits lost/damaged frames.
  • Access control – decides which device can use channel.

Example: Ethernet (MAC), Switch operation.

Key Point (Exam): Reliable frame-to-frame delivery.


3. Network Layer

  • Responsible for source-to-destination delivery across multiple networks.
  • Transfers packets.

Functions:

  • Logical addressing – assigns IP addresses.
  • Routing – selects best path to destination.

Example: IP (Internet Protocol).

Key Point (Exam): End-to-end packet delivery with IP.


4. Transport Layer

  • Ensures complete, reliable process-to-process delivery.
  • Transfers segments.

Functions:

  • Port addressing – identifies process using port numbers (e.g., HTTP → 80).
  • Segmentation & reassembly – breaks/rebuilds data.
  • Error control – ensures correct & ordered delivery.
  • Flow control – manages data speed.

Example: TCP (reliable), UDP (fast but unreliable).

Key Point (Exam): Delivers data to correct process at receiver.


1. Transport Layer Functions

  • Delivery: Network layer delivers packets to the correct computer; transport layer delivers them to the correct process (e.g., a browser or email app).
  • Segmentation & Reassembly: Breaks large messages into smaller segments. Adds sequence numbers so they can be reassembled correctly.
  • Connection Control: Provides either connection-oriented (TCP) or connectionless (UDP) services.
  • Flow Control: Ensures sender doesn’t send data faster than receiver can handle. (End-to-end).
  • Error Control: Detects and retransmits lost/corrupted data. Works end-to-end.

Key Points for Exam

  • TCP = connection-oriented, reliable.
  • UDP = connectionless, fast but unreliable.
  • Flow control = manage data rate.
  • Segmentation = dividing + numbering.

2. Session Layer

  • Manages dialog between two computers.
  • Dialog Control: Allows half-duplex (one at a time) or full-duplex (both sides together) communication.
  • Synchronization: Adds checkpoints in data. If failure occurs, transmission restarts from last checkpoint.

Example: Video call session management.

Key Points

  • Controls who talks and when.
  • Synchronization = recovery points.

3. Presentation Layer

  • Handles formatting of data.
  • Translation: Converts data between different encoding systems.
  • Encryption/Decryption: Secures data.
  • Compression/Decompression: Reduces size for efficient transmission.

Example: Sending a PDF via email → compressed and encoded, receiver decodes and views.

Key Points

  • Deals with syntax & semantics of data.
  • Ensures interoperability between systems.

4. Application Layer

  • Closest to the user. Provides services like email, file transfer, browsing.
  • Network Virtual Terminal: Allows remote login.
  • FTAM: File Transfer, Access, Management.
  • Mail Services: Email handling.
  • Directory Services: Global info access.

Example: Gmail (Mail service), Google Drive (File access).

Key Points

  • Provides interface to user.
  • Examples: HTTP, SMTP, FTP, DNS.

5. Sockets

  • Socket = Endpoint of communication (IP + Port).
  • Client socket connects to Server socket.
  • Well-known ports: HTTP → 80, HTTPS → 443, SMTP → 25, FTP → 21.
  • System calls used: socket(), bind(), connect(), listen(), accept(), close().

Example: Web browser connects to a server using TCP socket at port 80.

Key Points

  • Socket = IP + Port.
  • Used in TCP (connection-oriented) and UDP (connectionless).

6. Application Layer Protocols

  • HTTP: For web communication (stateless, uses TCP).
  • SMTP: For email transfer.
  • DNS: For domain name to IP mapping.

Key Points

  • Protocol = set of rules.
  • Application protocols differ from application programs.

7. HTTP Basics

  • Request/Response model.
  • Methods:
    • GET = Retrieve data.
    • POST = Send data to server.
    • PUT = Replace resource.
    • DELETE = Remove resource.
    • HEAD = Request header info only.
  • URL structure: protocol://host:port/path

Example: http://www.example.com/index.html

Key Points

  • HTTP is stateless.
  • Uses TCP port 80.
  • Request = Request line + headers + body.
  • Response = Status line + headers + body.

8. Persistent vs Non-Persistent HTTP

  • Non-Persistent: One TCP connection per request/response (slow).
  • Persistent: Single TCP connection used for multiple requests/responses (fast).

Key Points

  • Persistent is default in modern browsers.
  • Non-persistent = more overhead.

HTTP – Process & RTT

  • RTT (Round Trip Time): Time for a packet to go client → server → back.
  • Includes: propagation delay, queuing delay, processing delay.
  • 3-way handshake needed to establish TCP before HTTP transfer.
    1. Client sends SYN.
    2. Server replies SYN-ACK.
    3. Client replies ACK.

Key Points:

  • RTT is important for performance.
  • Each object in HTTP 1.0 required 2 RTTs (connection + transfer).

Non-Persistent HTTP (v1.0)

  • One TCP connection per request/response.
  • After object transfer, connection closes.
  • Disadvantages:
    • Wastes CPU and memory (many connections).
    • Each object transfer = 2 RTTs.
    • Extra overhead (3 TCP segments per setup).

Example: Browser loads webpage with 5 images → 6 separate connections.

Key Points:

  • HTTP 1.0 → Non-persistent, inefficient.

Persistent HTTP (v1.1)

  • Single TCP connection stays open for multiple requests/responses.
  • Saves time and resources.

Types:

  1. Without pipelining: Client waits for response before sending next request.
    • Still 1 RTT per object.
    • Server idle between requests.
  2. With pipelining (default in HTTP 1.1):
    • Client sends multiple requests without waiting.
    • Server replies back-to-back.
    • Only 1 RTT needed for multiple objects.

Advantages:

  • Fewer TCP setups → saves CPU, reduces congestion.
  • Lower latency.

Key Points:

  • HTTP 1.1 → Persistent + pipelining.
  • Faster than non-persistent.

Proxy Server

  • Acts as middleman between client and original server.
  • Function:
    • Stores cache of requested objects.
    • If object already stored, proxy serves it directly.
    • If not, proxy fetches from server and saves copy.
  • Advantages:
    • Reduces server load.
    • Reduces network traffic.
    • Improves speed for clients.

Key Points:

  • Proxy = caching + reduces latency.
  • Needs client to be configured to use proxy.

Difference: Persistent vs Non-Persistent HTTP

Persistent (HTTP 1.1) Non-Persistent (HTTP 1.0)
Keeps TCP connection open Closes after each request
1 RTT needed 2 RTTs needed
Multiple requests on same connection New connection for each request
Default mode Not default
Methods: GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE Only GET, POST, HEAD

Key Points:

  • Exam: Mention RTT difference (1 vs 2).
  • Persistent saves time, resources.

FTP (File Transfer Protocol)

  • Client-Server model for file transfer.
  • Uses TCP.
  • Two connections:
    • Control connection → Port 21.
    • Data connection → Port 20.
  • Commands:
    • open → connect.
    • get → download file.
    • bye → exit.

Modes:

  1. ASCII mode → for text files (adjusts line endings).
  2. Binary mode → for images, videos, programs (no changes).

Key Points:

  • Reliable (uses TCP).
  • Maintains session state.

TFTP (Trivial FTP)

  • Simplified FTP, uses UDP (unreliable).
  • Only 5 commands.
  • No authentication.
  • Transfers files in 512-byte blocks with acknowledgments.

Key Points:

  • Less secure.
  • Faster, lightweight.
  • Used for booting diskless devices.

FTP vs TFTP

FTP TFTP
Uses TCP Uses UDP
Two connections (control + data) One connection
Many commands Only 5 commands
User login required No login/authentication
Reliable Must handle retransmissions manually

Key Points:

  • FTP → reliable, full features.
  • TFTP → simple, lightweight, less secure.

Email & Protocols

  • SMTP (Simple Mail Transfer Protocol):
    • For sending/forwarding mails (uses TCP).
  • POP (Post Office Protocol):
    • For receiving mail from server to client.
  • User Agents: Programs like Outlook, Gmail interface.
  • Mail Servers: Store and forward mails.

Email Address Example:
user@domain.comuser = username, domain.com = host.

Message Headers: Contain sender, receiver, subject, date, etc.

Formatted Emails:

  • HTML, Rich Text, MIME, Word format.

Key Points:

  • SMTP = outgoing.
  • POP = incoming.
  • Email = asynchronous, not real-time.



E-mail System

Mail server handles incoming and outgoing mails.

  • POP servers → store incoming mails.
  • SMTP servers → relay outgoing mails.
  • ISP generally runs both SMTP and POP servers.

Ways to access e-mail:

  1. Web-based e-mail service
  2. E-mail through LAN
  3. Unix shell account
  4. Using mail client

Components of E-mail

Three major components:

  1. User agents
  2. Mail servers
  3. SMTP

Working:

  • User sends mail → outgoing mail spool area → client transfers via TCP → server accepts mail → placed in mailboxes.
  • User reads mail via user interface.

1.11.1 E-mail Addressing

  • Format: username@domain.com
  • Example: vilas@hotmail.com
  • Username: can include numbers, underscores, periods. No spaces, commas, or brackets.
  • Domain name: host name (e.g., hotmail.com).
  • E-mail addresses are case insensitive.

1.11.2 Message Headers

  • Headers include sender, receiver, subject, date, etc.
  • Structure: header type + colon + content.
  • Example headers:
    • From
    • To
    • Subject
    • Date
    • MIME-Version
    • Content-Type
    • Message-ID

1.11.3 Formatted E-mail

Modern e-mail supports formatting like bold, underline, multimedia.

Types:
a) HTML – formatting with styles, hyperlinks, backgrounds.
b) Rich Text – supported by word processors.
c) MIME – supports text, pictures, audio, video.
d) MS Word format – uses Word features as editor.

MIME (Multipurpose Internet Mail Extension):

  • Encodes non-ASCII data (images, audio, video) into ASCII.
  • Allows multimedia in e-mail.
  • Example: GIF image encoded with base64.

MIME Content Types:

  1. Text
  2. Image
  3. Audio
  4. Video
  5. Application
  6. Multipart
  7. Message

Content-Transfer Encoding:

  • 7-bit, 8-bit, Binary, Base64, Quoted-printable.

1.11.4 Functions of E-mail

  1. Composition – creating messages, replies.
  2. Transfer – moving from sender to receiver.
  3. Reporting – delivery status info.
  4. Displaying – reading e-mails.
  5. Disposition – actions after receiving (save, delete, forward).

1.11.5 User Agent & MTA

  • User Agent (UA): interface to read/send mails. Supports mailing lists, mailbox display.
  • Message Transfer Agent (MTA): moves mail from source to destination. Runs in background, handles failures, spooling, multiple recipients, and mixed content (text, audio, video).

1.11.6 Simple Mail Transfer Protocol (SMTP)

  • Application layer protocol of TCP/IP.
  • Transfers mail between servers (port 25).
  • Uses command/response model.
  • Client initiates transfer, server accepts.

Addressing: local-part@domain-name.

  • Local-part → username.
  • Domain name → unique host identity.

SMTP Commands:

  1. HELO – start mail transaction.
  2. MAIL FROM – sender info.
  3. RCPT TO – recipient info.
  4. DATA – message body.
  5. QUIT – close connection.

Scenario: Alice → Bob

  1. Alice composes mail.
  2. Sent to her mail server.
  3. SMTP opens TCP connection.
  4. Message delivered to Bob’s server.
  5. Stored in Bob’s mailbox.
  6. Bob reads using user agent.

1.11.7 Multipurpose Internet Mail Extensions (MIME)

  • Supplementary protocol with SMTP.
  • Converts non-ASCII to ASCII for transmission.
  • Defines 5 headers:
    1. MIME-Version
    2. Content-Type
    3. Content-Transfer-Encoding
    4. Content-ID
    5. Content-Description

Example MIME types:

  • Text/plain, Image/gif, Image/jpeg, Audio/basic, Video/mpeg, Application/postscript, Multipart/mixed.

1.11.8 Post Office Protocol (POP3)

  • Used to download e-mails from server to client (port 110).
  • Operates in 3 phases:
    1. Authorization – login with username & password.
    2. Transaction – retrieve, delete, or mark messages.
    3. Update – finalize session after QUIT.

Modes:

  • Delete mode: mails removed after download.
  • Keep mode: mails remain on server.



POP3 (Post Office Protocol v3)

  • Used for receiving e-mails.
  • Downloads mails from server to user’s system, then usually deletes from server.
  • Works in offline mode.

Limitations of POP3

  1. No option to organize mail on server (no folders).
  2. Cannot check mail partially before download.

Keypoint: POP3 is simple but limited → mainly for single-computer users.


HTTP Message Format Example

Status Line

HTTP/1.1 300 OK → Version + Status code + Meaning.

General Headers

  • Date: Current date/time.
  • Connection: Type of connection (close/keep-alive).
  • Server: Server software (Apache).
  • Accept-range: What type of data it supports.

Entity Headers

  • Content-type: Type of file (text/html).
  • Content-length: Size of file.
  • Last-modified: Last updated time.

Message Body

  • Contains actual HTML data (webpage content).

Keypoint: HTTP message = Status line + Headers + Blank line + Body.


IMAP (Internet Mail Access Protocol)

  • Advanced than POP3.
  • Allows multiple-computer access.
  • Does not copy mails to personal device unless needed.
  • Works over TCP.

Modes:

  1. Offline mode – download and delete (like POP3).
  2. Online mode – process mails on server.
  3. Disconnected mode – supports both.

IMAP4 Extra Functions:

  1. Can check header before download.
  2. Partial download possible.
  3. Can create, delete, rename mailboxes.
  4. Supports folder hierarchy.
  5. Can search inside mails.

IMAP State Transition Diagram

  1. Not Authenticated – Client gives login info.
  2. Authenticated – Server verifies, user can access mailbox.
  3. Selected – User can manage individual mails.
  4. Logout – End session.

Keypoint: IMAP is powerful, supports multiple devices and advanced mailbox operations.


DNS (Domain Name System)

Goal

  • Converts domain names → IP addresses.
  • Distributed database across Internet.
  • Runs on UDP, port 53.

Problems with Old System (hosts.txt)

  1. Flat namespace (no duplicates allowed).
  2. Changes took long time.
  3. Central site overloaded.
  4. Internet grew fast → not scalable.

DNS Solution

  • Hierarchical: tree-like structure.
  • Distributed: control given to local sites.
  • Provides host aliasing, mail server aliasing, load distribution.

Components of DNS

  1. Domain – top-level (e.g., .com).
  2. Domain Name – full name (e.g., vtubooks.com).
  3. Name Server – maps domain to IP.
  4. Name Resolver – client program to query names.
  5. Name Cache – stores frequently used mappings.
  6. Zone – part of domain managed by one server.

DNS in Internet

Types

  1. Generic domain – com, edu, gov, org, net, mil etc.
  2. Country domain – two-letter codes (e.g., .in, .us).
  3. Inverse domain – IP → name (pointer query).

Example: IP 132.34.5.6 → domain name.


Name Spaces

Flat Names

  • Simple strings (e.g., "host1").
  • Advantage: Easy.
  • Disadvantage: Not scalable for large internet.

Hierarchical Names

  • Tree structure (root → subdomains).
  • Up to 128 levels.
  • Divided into generic, country, arpa domains.

Keypoint: Internet uses hierarchical naming for scalability.


Domain Name Space

  • Inverted tree with root at top.
  • Each node has label (max 63 chars).
  • FQDN (Fully Qualified Domain Name): full path (e.g., www.vtu.com.).
  • PQDN (Partially Qualified Domain Name): incomplete (e.g., vtu.com).

Hierarchy of Name Servers

  • Multiple servers manage domains.
  • Zone File – stores mapping for its domain.
  • Domain = Zone if server has full control.
  • Domain ≠ Zone if split into subdomains.

Types of DNS Servers:

  1. Root server – top-level, knows other servers.
  2. Primary server – keeps main database.
  3. Secondary server – copies from primary, read-only.

Recursive vs Iterative Resolution

  • Recursive: Resolver asks server, server queries other servers until final answer is returned.
  • Iterative: Resolver queries step by step from root → TLD → authoritative server.

Keypoint: Recursive = one server does all work; Iterative = client queries each server.



DNS (Domain Name System)

Naming Theme

  • Needed because subdomain names and object names may look similar.
  • DNS provides structure to avoid confusion.

Mapping Domain Names to Addresses

  • DNS maps domain names → IP addresses.
  • Uses distributed Name Servers.
  • Name Resolver: software that queries name servers.
  • DNS hierarchy follows naming tree (root → subdomains).

Resolution Types

Recursive Resolution

  • Client asks server for complete answer.
  • If server knows → replies.
  • If not, it queries other servers on behalf of client.
  • Response travels back to client.

Keypoint: Server does all work.

Iterative Resolution

  • Server replies with best info it has.
  • If not authoritative, it returns another server’s address.
  • Client must repeat query to new server.

Keypoint: Client does all work step by step.


Name Caching & TTL

  • DNS servers cache answers for faster response.
  • TTL (Time To Live) sets how long cache is valid.
  • After TTL expires, client must request again.

Reverse Name Resolution

  • Converts IP address → domain name.
  • Uses IN-ADDR.ARPA domain.
  • Example: IP 130.19.60.10 → query “10.60.19.130.in-addr.arpa” → returns domain.
  • Uses PTR (Pointer) record.

Keypoint: Reverse mapping uses PTR and IN-ADDR.ARPA.


DNS Message Format

  • Messages exchanged between clients and servers.
  • Types: Query and Response (same format).
  • Fields in Message:
    1. Header
    2. Question
    3. Answer
    4. Authority
    5. Additional

Header (12 bytes)

  • Identification: Match query with response.
  • Flags: Query/Response, recursion, errors.
  • Counts: number of questions, answers, authority, additional records.

Flag bits:

  • QR = 0 (query), 1 (response)
  • Opcode = type of query (standard, inverse, status)
  • AA = authoritative answer
  • TC = truncated
  • RD = recursion desired
  • RA = recursion available
  • RCode = error codes (0 = no error, 3 = name not found).

DNS Resource Records (RR)

  1. A – IP address record.
  2. CNAME – Canonical name (alias).
  3. HINFO – Host info (CPU + OS).
  4. MX – Mail exchange.
  5. PTR – Pointer (reverse lookup).
  6. NS – Name server (authoritative server).

Keypoint: A = forward lookup, PTR = reverse lookup.


Name Servers

  • Local server first checks query.
  • If unknown, it queries higher-level servers step by step until answer found.
  • Hierarchy: Root → TLD (e.g., .edu) → Subdomain → Host.

Example: Query for linda.cs.yale.edu

  1. Local server (vu.nl) asks → edu server → yale.edu server → cs.yale.edu server.
  2. Final answer returned back to client.

LDAP (Lightweight Directory Access Protocol)

  • Application protocol for accessing directories (like phonebook).
  • Stores entries (like objects) with attributes.
  • Each entry has Distinguished Name (DN).
  • Organizes data in directory tree.
  • Provides authentication and secure access.

Keypoint: LDAP = lightweight, flexible directory access.


DDNS (Dynamic DNS)

  • Like DNS but works with dynamic IP addresses.
  • Updates name-IP mapping when IP changes.
  • Used in home networks (where ISP gives changing IP).
  • Needs extra host software.

Keypoint: DNS → static IP, DDNS → dynamic IP.


Advantages of DNS

  1. Hierarchical and scalable.
  2. Divided into small manageable zones.
  3. Eliminates host tables.
  4. Consistent across all hosts.
  5. Internet cannot function without it.
  6. Easy to configure and manage.

SNMP (Simple Network Management Protocol)

Network Management

  • Collection of tools to monitor, test, configure, and control networks.
  • Helps achieve performance and reliability.

Uses

  1. Detect hardware failures (e.g., interface card).
  2. Monitor hosts (check availability).
  3. Monitor traffic (link utilization).
  4. Detect routing table changes.
  5. Monitor Service Level Agreements (SLA).
  6. Intrusion detection (unauthorized access).

Areas of Network Management

  1. Fault Management – Diagnose, repair failures. Tools: protocol analyzer, cable tester, backup devices.
  2. Performance Management – Collect info (response time, throughput, load) to predict growth.
  3. Security Management – Protect against threats, unauthorized access.
  4. Accounting Management – Track usage, billing.
  5. Configuration Management – Manage device configs and changes.

Keypoint: 5 areas = Fault, Performance, Security, Accounting, Configuration.



1.13.1 Uses of Network Management

Detecting failure – check  if interface card/port fails; replace before breakdown.

  1. Host monitoring – check if hosts are up and running.
  2. Traffic monitoring – measure link load; add higher bandwidth if overloaded.
  3. Routing table changes – detect unstable/misconfigured routers.
  4. SLA monitoring – measure availability, latency, throughput.
  5. Intrusion detection – detect unauthorized or suspicious traffic.

Keypoint: Main use = keep network healthy, secure, and efficient.


1.13.2 Areas of Network Management

Five areas (ISO model):

  1. Fault Management – diagnose and repair failures. Tools:

    • Network management system (uses SNMP, CMIP).
    • Protocol analyzer (captures packets).
    • Cable tester (finds faults in wires).
    • Redundant systems (backup devices).
    • Backup/archiving tools.
  2. Performance Management – monitor response time, throughput, cost, load. Predict growth.

  3. Security Management – prevent misuse/attacks. Methods: passwords, monitoring, design.

  4. Accounting Management – track cost of usage, upgrades, performance vs cost.

  5. Configuration Management – track devices, software/hardware, and IP requirements.

Keypoint: Five areas = Fault, Performance, Security, Accounting, Configuration.


1.13.3 Infrastructure for Network Management

Three components:

  1. Managing entity – application that controls collection/analysis of info.
  2. Managed device – routers, switches, hosts, printers, etc. Each has objects stored in MIB (Management Information Base).
  3. Protocol – communicates between manager and agents (e.g., SNMP).

Keypoint: Manager ↔ Agent ↔ Device using SNMP.


1.13.4 Internet Standard Management Framework

Four parts:

  1. Definitions of objects – stored in MIB (e.g., number of packets dropped).
  2. Data definition language – SMI (defines data types, object rules).
  3. Protocol – SNMP used for manager–agent communication.
  4. Security and administration – extra protection in advanced versions (SNMPv3).

1.13.5 SNMP (Simple Network Management Protocol)

SNMPv2 Operations (PDU types)

  1. Get Request – manager asks agent for MIB value.
  2. Get Next Request – get next object in MIB table.
  3. Get Bulk Request – fetch block of data at once.
  4. Set Request – manager sets MIB value.
  5. Response – reply from agent.
  6. Inform Request – manager ↔ manager info exchange.
  7. Trap – agent notifies manager about event/error.

Example: If router fails, agent sends Trap message to manager.


SNMPv3 Features (Security)

  • Encryption – DES used to secure data.
  • Authentication – HMAC ensures correct sender.
  • Protection vs replay – counter added to avoid repeated old messages.
  • Access control – view-based control, defines who can access what.

Keypoint: SNMPv3 = secure version of SNMP with authentication, encryption, access control.


Strengths of SNMP

  1. Simple, easy to implement.
  2. Agents widely available.
  3. Low overhead at agent side.
  4. Robust and extensible.
  5. Polling good for LAN.

Weaknesses of SNMP

  1. Too simple, not scalable.
  2. No object-oriented model.
  3. No standard control definitions.
  4. Many private vendor extensions.
  5. Polling increases overhead.

Keypoint: SNMP is simple but limited in scalability.


Review Questions (Short Notes for Exam)

  1. SNMP – protocol for managing network devices using manager–agent model. Uses MIB. Versions: v1, v2, v3. v3 adds security.

  2. SNMP Messages – Get, GetNext, GetBulk, Set, Response, Inform, Trap. Used for communication between manager and agent.

  3. Elements of Network Management

    • Managing entity (manager).
    • Managed devices (routers, hosts).
    • Protocol (SNMP).
      Operation of SNMP – manager queries agent for MIB data; agent responds; traps sent for errors/events.
  4. Importance of SNMP

    • Standard protocol for network management.
    • Monitors health, traffic, errors.
    • Controls devices remotely.
    • Widely implemented.

Two Marks Q&A

  1. Data Communication – exchange of data between two devices. Components: Message, Sender, Receiver, Medium, Protocol.

  2. Protocol – set of rules for communication. Defines how/when data is sent.

  3. Network Topologies – Mesh, Star, Bus, Ring.

  4. Layer – collection of functions that provides services to layer above, receives services from layer below.

  5. Properties of HTTP – URI, Request-response, Stateless, Metadata.

  6. Use of HTTP – protocol to transfer webpages between client-server.

  7. FTP Transmission Modes – Stream (default), Block (in blocks), Compressed (RLE compression).

  8. Compare HTTP vs FTP

    • HTTP: one port (80), webpages, request-response.
    • FTP: two ports (20, 21), file transfer, client-server.
  9. Applications of FTP – remote login & transfer, uploading web pages, secure file transfer.