Computer Networks – Unit 1
1.1 Data Communications
Definition
Exchange of data between two devices using a transmission medium.
1.1.1 Characteristics
- Delivery – must reach correct destination.
- Accuracy – data must be correct, no changes.
- Timeliness – delivered on time (real-time systems).
- Jitter – variation in arrival time of packets.
👉 Key Point: Good communication = Correct, Accurate, Timely, Stable.
1.1.2 Components
- Message – data (text, audio, video, etc.)
- Sender – device that sends (computer, phone).
- Receiver – device that receives (monitor, server).
- Medium – path (cable, fiber, radio waves).
- 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
- Simplex – one-way only.
- Example: Keyboard → Computer.
- Half-Duplex – both send/receive but not same time.
- Example: Walkie-Talkie.
- 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
- Performance – speed, response time.
- Reliability – accuracy, fault tolerance.
- Security – protection from unauthorized access.
1.2.1 Physical Structure
Types of Connection:
- Point-to-Point – dedicated link between 2 devices.
- Example: Remote control → TV.
- 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)
- Data communication characteristics: Delivery, Accuracy, Timeliness, Jitter.
- Components: Message, Sender, Receiver, Medium, Protocol.
- Data flow: Simplex (one way), Half-duplex (two-way alternate), Full-duplex (two-way simultaneous).
- Network criteria: Performance, Reliability, Security.
- Connections: Point-to-point vs Multipoint.
- LAN vs MAN vs WAN: Area, speed, cost, error rate.
- Wireless LAN: Uses radio waves, IEEE 802.11 (WiFi).
- 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
-
Connection-Oriented
- Path is set up before data transfer.
- Reliable, ensures delivery.
- Example: Telephone call, TCP.
-
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:
- Application Layer – TELNET, FTP, SMTP, DNS.
- Transport Layer – TCP (reliable), UDP (fast).
- Internet Layer – IP, ARP, ICMP (routing, addressing, fragmentation).
- 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
-
Physical Address (Data Link Layer)
- MAC address (unique hardware address).
- Changes hop to hop.
- Example: 18:27:AC:34:7B:11.
-
Logical Address (Internet Layer)
- IP address (unique across internet).
- Stays same end-to-end.
- Example: 192.168.1.1.
-
Port Address (Transport Layer)
- Identifies process/application.
- 16-bit number.
- Example: HTTP uses port 80.
-
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:
- Peer-to-peer logical services.
- Standard communication between systems.
- Defines interconnection points.
- Each layer has well-defined role.
- 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
- Keep number of layers minimum (not too many).
- Boundary should be simple, with fewer interconnections.
- Different functions → separate layers.
- Similar functions → same layer.
- Use past experience to decide boundaries.
- Each layer should be flexible (can change without affecting others).
- Some interfaces may need standardization.
- Different data abstractions → new layers.
- Change inside a layer should not affect other layers.
- 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.
- Client sends SYN.
- Server replies SYN-ACK.
- 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:
- Without pipelining: Client waits for response before sending next request.
- Still 1 RTT per object.
- Server idle between requests.
- 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:
- ASCII mode → for text files (adjusts line endings).
- 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.com → user = 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:
- Web-based e-mail service
- E-mail through LAN
- Unix shell account
- Using mail client
Components of E-mail
Three major components:
- User agents
- Mail servers
- 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:
- Text
- Image
- Audio
- Video
- Application
- Multipart
- Message
Content-Transfer Encoding:
- 7-bit, 8-bit, Binary, Base64, Quoted-printable.
1.11.4 Functions of E-mail
- Composition – creating messages, replies.
- Transfer – moving from sender to receiver.
- Reporting – delivery status info.
- Displaying – reading e-mails.
- 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:
- HELO – start mail transaction.
- MAIL FROM – sender info.
- RCPT TO – recipient info.
- DATA – message body.
- QUIT – close connection.
Scenario: Alice → Bob
- Alice composes mail.
- Sent to her mail server.
- SMTP opens TCP connection.
- Message delivered to Bob’s server.
- Stored in Bob’s mailbox.
- 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:
- MIME-Version
- Content-Type
- Content-Transfer-Encoding
- Content-ID
- 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:
- Authorization – login with username & password.
- Transaction – retrieve, delete, or mark messages.
- 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
- No option to organize mail on server (no folders).
- 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:
- Offline mode – download and delete (like POP3).
- Online mode – process mails on server.
- Disconnected mode – supports both.
IMAP4 Extra Functions:
- Can check header before download.
- Partial download possible.
- Can create, delete, rename mailboxes.
- Supports folder hierarchy.
- Can search inside mails.
IMAP State Transition Diagram
- Not Authenticated – Client gives login info.
- Authenticated – Server verifies, user can access mailbox.
- Selected – User can manage individual mails.
- 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)
- Flat namespace (no duplicates allowed).
- Changes took long time.
- Central site overloaded.
- 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
- Domain – top-level (e.g.,
.com). - Domain Name – full name (e.g.,
vtubooks.com). - Name Server – maps domain to IP.
- Name Resolver – client program to query names.
- Name Cache – stores frequently used mappings.
- Zone – part of domain managed by one server.
DNS in Internet
Types
- Generic domain – com, edu, gov, org, net, mil etc.
- Country domain – two-letter codes (e.g.,
.in,.us). - 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:
- Root server – top-level, knows other servers.
- Primary server – keeps main database.
- 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:
- Header
- Question
- Answer
- Authority
- 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)
- A – IP address record.
- CNAME – Canonical name (alias).
- HINFO – Host info (CPU + OS).
- MX – Mail exchange.
- PTR – Pointer (reverse lookup).
- 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
- Local server (vu.nl) asks → edu server → yale.edu server → cs.yale.edu server.
- 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
- Hierarchical and scalable.
- Divided into small manageable zones.
- Eliminates host tables.
- Consistent across all hosts.
- Internet cannot function without it.
- 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
- Detect hardware failures (e.g., interface card).
- Monitor hosts (check availability).
- Monitor traffic (link utilization).
- Detect routing table changes.
- Monitor Service Level Agreements (SLA).
- Intrusion detection (unauthorized access).
Areas of Network Management
- Fault Management – Diagnose, repair failures. Tools: protocol analyzer, cable tester, backup devices.
- Performance Management – Collect info (response time, throughput, load) to predict growth.
- Security Management – Protect against threats, unauthorized access.
- Accounting Management – Track usage, billing.
- 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.
- Host monitoring – check if hosts are up and running.
- Traffic monitoring – measure link load; add higher bandwidth if overloaded.
- Routing table changes – detect unstable/misconfigured routers.
- SLA monitoring – measure availability, latency, throughput.
- 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):
-
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.
-
Performance Management – monitor response time, throughput, cost, load. Predict growth.
-
Security Management – prevent misuse/attacks. Methods: passwords, monitoring, design.
-
Accounting Management – track cost of usage, upgrades, performance vs cost.
-
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:
- Managing entity – application that controls collection/analysis of info.
- Managed device – routers, switches, hosts, printers, etc. Each has objects stored in MIB (Management Information Base).
- Protocol – communicates between manager and agents (e.g., SNMP).
Keypoint: Manager ↔ Agent ↔ Device using SNMP.
1.13.4 Internet Standard Management Framework
Four parts:
- Definitions of objects – stored in MIB (e.g., number of packets dropped).
- Data definition language – SMI (defines data types, object rules).
- Protocol – SNMP used for manager–agent communication.
- Security and administration – extra protection in advanced versions (SNMPv3).
1.13.5 SNMP (Simple Network Management Protocol)
SNMPv2 Operations (PDU types)
- Get Request – manager asks agent for MIB value.
- Get Next Request – get next object in MIB table.
- Get Bulk Request – fetch block of data at once.
- Set Request – manager sets MIB value.
- Response – reply from agent.
- Inform Request – manager ↔ manager info exchange.
- 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
- Simple, easy to implement.
- Agents widely available.
- Low overhead at agent side.
- Robust and extensible.
- Polling good for LAN.
Weaknesses of SNMP
- Too simple, not scalable.
- No object-oriented model.
- No standard control definitions.
- Many private vendor extensions.
- Polling increases overhead.
Keypoint: SNMP is simple but limited in scalability.
Review Questions (Short Notes for Exam)
-
SNMP – protocol for managing network devices using manager–agent model. Uses MIB. Versions: v1, v2, v3. v3 adds security.
-
SNMP Messages – Get, GetNext, GetBulk, Set, Response, Inform, Trap. Used for communication between manager and agent.
-
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.
-
Importance of SNMP –
- Standard protocol for network management.
- Monitors health, traffic, errors.
- Controls devices remotely.
- Widely implemented.
Two Marks Q&A
-
Data Communication – exchange of data between two devices. Components: Message, Sender, Receiver, Medium, Protocol.
-
Protocol – set of rules for communication. Defines how/when data is sent.
-
Network Topologies – Mesh, Star, Bus, Ring.
-
Layer – collection of functions that provides services to layer above, receives services from layer below.
-
Properties of HTTP – URI, Request-response, Stateless, Metadata.
-
Use of HTTP – protocol to transfer webpages between client-server.
-
FTP Transmission Modes – Stream (default), Block (in blocks), Compressed (RLE compression).
-
Compare HTTP vs FTP –
- HTTP: one port (80), webpages, request-response.
- FTP: two ports (20, 21), file transfer, client-server.
-
Applications of FTP – remote login & transfer, uploading web pages, secure file transfer.