Tuesday, June 9, 2026

CN IMP[INTERNAL]

>>ONLY DEFINE :

i) Define Computer Network.

A Computer Network is a collection of interconnected computers and devices that communicate and share resources such as data, software, and hardware.


ii) What is Protocol Hierarchy?

A Protocol Hierarchy is a layered structure of protocols where each layer performs specific functions and provides services to the layer above it.


iii) Define Connection-Oriented Service.

A Connection-Oriented Service is a communication service in which a connection is established between the sender and receiver before data transmission begins.


iv) Expand OSI and TCP/IP.

  • OSI = Open Systems Interconnection

  • TCP/IP = Transmission Control Protocol / Internet Protocol


v) Define Routing.

Routing is the process of selecting the best path for transferring data packets from a source to a destination in a network.


vi) What is DNS?

DNS (Domain Name System) is a naming system that translates domain names (e.g., www.google.com) into IP addresses.


vii) Define CRC.

CRC (Cyclic Redundancy Check) is an error detection technique that uses binary division to detect errors in transmitted data.

>>LONG QnA

 1.Compare OSI Reference Model and TCP/IP Reference Model.

OSI Reference Model

Definition:
OSI (Open Systems Interconnection) Model is a 7-layer network model developed by ISO to explain how data travels from one computer to another.

Layers:

  1. Physical Layer
  2. Data Link Layer
  3. Network Layer
  4. Transport Layer
  5. Session Layer
  6. Presentation Layer
  7. Application Layer

Example: Sending an email through a network.


TCP/IP Reference Model

Definition:
TCP/IP (Transmission Control Protocol/Internet Protocol) is a 4-layer network model used on the Internet for communication between devices.

Layers:

  1. Network Access Layer
  2. Internet Layer
  3. Transport Layer
  4. Application Layer

Example: Browsing websites on the Internet.


Compare OSI Reference Model and TCP/IP Reference Model

OSI Reference ModelTCP/IP Reference Model
Developed by International Organization for Standardization (ISO)Developed by Defense Advanced Research Projects Agency (DARPA)

Has 7 layers.Has 4 layers.

It is a reference model.It is a protocol suite/model used on the Internet.

Layers are clearly separated.Some layers are combined.

Session and Presentation layers are separate.Session and Presentation functions are included in the Application layer.

Network layer supports both connection-oriented and connectionless communication.Internet layer mainly supports connectionless communication.

More complex and theoretical.Simpler and practical.

Used mainly for understanding and teaching networking concepts.Widely used in real-world networks and the Internet.

The OSI model is a 7-layer theoretical model, while the TCP/IP model is a 4-layer practical model used on the Internet.

Conclusion: OSI is a 7-layer reference model used for understanding networking, while TCP/IP is a 4-layer model used for actual Internet communication.


Q.2 Explain Error Detection and Correction Techniques: Checksum, CRC and Hamming Code.

Error Detection and Correction Techniques

These techniques are used in computer networks to detect and correct errors that occur during data transmission.

1) Checksum

Definition:
Checksum is an error detection technique in which the sender calculates a value from the data and sends it along with the message.

Working:

  1. Sender divides data into equal-sized blocks.

  2. All blocks are added together.

  3. The complement of the sum is sent as the checksum.

  4. Receiver performs the same calculation.

  5. If the result is correct, data is accepted; otherwise, an error is detected.

Example

Data blocks:

1010
1100

Addition:

 1010
1100
----
10110

Take lower 4 bits = 0110

Complement of 0110 = 1001

Checksum = 1001

Sender sends:

1010 1100 1001

Receiver performs the same calculation. If the result is correct, data is accepted; otherwise, an error is detected.

Advantage: Simple and easy to implement.

Disadvantage: Cannot detect all types of errors.


2) CRC (Cyclic Redundancy Check)

Definition:
CRC is an error detection technique that uses binary division to detect errors in transmitted data.

Working:

  1. Sender appends zeros to the data.

  2. Data is divided by a predefined generator polynomial.

  3. The remainder obtained is called the CRC.

  4. CRC is attached to the data and transmitted.

  5. Receiver performs the same division.

  6. If the remainder is zero, data is accepted; otherwise, an error is detected.

Example

Data:

1101

Generator:

101

Append 2 zeros:

110100

Binary division:

110100 ÷ 101

Remainder:

01

CRC = 01

Transmitted data:

110101

At the receiver, the same division is performed. If the remainder is 00, data is accepted; otherwise, an error is detected.

Advantage: Detects most transmission errors.

Disadvantage: More complex than checksum.


3) Hamming Code

Definition:
Hamming Code is an error detection and correction technique that can detect and correct single-bit errors.

Working:

  1. Redundant (parity) bits are added to the data bits.

  2. Data is transmitted with parity bits.

  3. Receiver checks parity bits.

  4. If an error is found, the exact error bit is identified.

  5. The receiver corrects the error automatically.

Example

Data bits:

1011

Add parity bits at positions:

1, 2, 4

Hamming code formed:

0110011

Suppose received code:

0110001

Parity checking identifies the error position.

Error found at:

Position 2

Corrected code:

0110011

Thus, the receiver can automatically correct the single-bit error.

Advantage: Can detect and correct single-bit errors.

Disadvantage: Requires extra parity bits.

Conclusion

  • Checksum → Detects errors using addition.

  • CRC → Detects errors using polynomial division.

  • Hamming Code → Detects and corrects single-bit errors.


Q.3 Explain HTTP and World Wide Web (WWW).

Introduction

The World Wide Web (WWW) is a system of interlinked web pages available on the Internet. HTTP is the communication protocol used for transferring web pages and other resources between web browsers and web servers.


1) HTTP (HyperText Transfer Protocol)

Definition

HTTP (HyperText Transfer Protocol) is an application layer protocol used for communication between a web browser (client) and a web server. It defines how requests and responses are exchanged on the World Wide Web.

Working of HTTP

  1. User enters a URL in the web browser.

  2. The browser sends an HTTP request to the web server.

  3. The server receives and processes the request.

  4. The server sends an HTTP response containing the requested data.

  5. The browser displays the web page to the user.

Example

Suppose a user enters:

https://www.google.com
  • Browser sends an HTTP request to Google's server.

  • Server processes the request.

  • Server returns the requested web page.

  • Browser displays the page on the screen.

Features of HTTP

  • Client-Server architecture.

  • Stateless protocol.

  • Supports multimedia data.

  • Fast and simple communication.

Advantages of HTTP

  1. Easy to implement and use.

  2. Supports data transfer over the Internet.

  3. Platform independent.

  4. Allows communication between different systems.

Disadvantages of HTTP

  1. Data is transmitted in plain text.

  2. Less secure than HTTPS.

  3. Vulnerable to interception and attacks.


2) World Wide Web (WWW)

Definition

The World Wide Web (WWW) is a collection of interconnected web pages and resources that can be accessed through the Internet using web browsers.

Components of WWW

  1. Web Browser – Software used to access web pages (e.g., Google Chrome).

  2. Web Server – Stores and delivers web pages.

  3. URL (Uniform Resource Locator) – Address of a web resource.

  4. HTTP – Protocol used for communication.

  5. HTML – Language used to create web pages.

Working of WWW

  1. User enters a URL in the browser.

  2. Browser sends a request to the web server using HTTP.

  3. Server finds the requested resource.

  4. Server sends the web page to the browser.

  5. Browser interprets HTML and displays the page.

Example

When a user visits:

https://www.wikipedia.org

The browser requests the page from the server, and the server sends the web page, which is displayed on the screen.

Advantages of WWW

  1. Easy access to information.

  2. Supports text, images, audio, and video.

  3. Provides online services such as education, banking, and shopping.

  4. Global accessibility.

Disadvantages of WWW

  1. Security and privacy concerns.

  2. Presence of unreliable information.

  3. Requires Internet connectivity.

  4. Risk of malware and phishing attacks.


Difference Between HTTP and WWW

HTTPWWW
HTTP is a communication protocol.WWW is a collection of web pages and resources.
Used to transfer data between client and server.Used to access information on the Internet.
Works at the Application Layer.Uses HTTP, HTML, URL, and browsers.
Defines communication rules.Provides web-based information and services.

Q.4 Explain Protocol Hierarchy and Design Issues for Layers.

Introduction

In computer networks, communication is organized into a set of layers. Each layer performs specific functions and communicates with its corresponding layer on another system using protocols. This layered structure is called a Protocol Hierarchy.


Protocol Hierarchy

Definition

A Protocol Hierarchy is a layered arrangement of protocols in which each layer provides services to the layer above it and receives services from the layer below it.

Working

  1. Data is generated at the sender's application layer.

  2. Each layer adds its own control information (header).

  3. Data moves through all layers to the physical medium.

  4. At the receiver side, each layer removes its header.

  5. Finally, the original data reaches the application layer.

Example

Sender

Application Layer
      ↓
Transport Layer
      ↓
Network Layer
      ↓
Data Link Layer
      ↓
Physical Layer

Receiver

Physical Layer
      ↑
Data Link Layer
      ↑
Network Layer
      ↑
Transport Layer
      ↑
Application Layer

Advantages

  1. Simplifies network design.

  2. Easy troubleshooting and maintenance.

  3. Supports interoperability.

  4. Allows independent development of layers.

Disadvantages

  1. Increased overhead due to headers.

  2. May reduce performance.

  3. Complex implementation.


Design Issues for Layers

The following are important design issues that must be considered while designing network layers:

1. Addressing

Each device must have a unique address for identification and communication.

Example: IP Address (192.168.1.1)


2. Error Control

Detects and corrects errors that occur during data transmission.

Example: CRC, Checksum, Hamming Code.


3. Flow Control

Controls the rate of data transmission between sender and receiver.

Example: Stop-and-Wait Protocol.


4. Routing

Determines the best path for data packets to travel from source to destination.

Example: Routers selecting the shortest path.


5. Segmentation and Reassembly

Large messages are divided into smaller packets and reassembled at the destination.

Example: File transfer over the Internet.


6. Multiplexing

Allows multiple users or applications to share a communication channel.

Example: Multiple applications using the same Internet connection.


7. Connection Establishment and Termination

Manages creation and closing of communication sessions.

Example: TCP Three-Way Handshake.


Q.5 Explain Twisted Pair Cable with suitable diagram, advantages and disadvantages.

Definition

Twisted Pair Cable is a guided transmission medium consisting of two insulated copper wires twisted together. The twisting reduces electromagnetic interference and crosstalk between wires. It is widely used in telephone networks and LANs.


Diagram

  

Two copper wires are twisted together to form a twisted pair cable.


Types of Twisted Pair Cable

1. UTP (Unshielded Twisted Pair)

Definition

UTP is a twisted pair cable without any metallic shielding around the wires.



  • Does not have additional shielding.

  • Less expensive.

  • Commonly used in LAN networks.

2. STP (Shielded Twisted Pair)

Definition

STP is a twisted pair cable that contains a metallic shield around the twisted wires to reduce interference and noise.



  • Contains a protective metal shield.

  • Provides better protection against interference.

  • More expensive than UTP.


Working

  1. Data is transmitted as electrical signals through copper wires.

  2. The wires are twisted together to reduce noise and interference.

  3. One wire carries the signal while the other acts as a return path.

  4. The receiving device receives and interprets the signals.


Example

  • Telephone lines

  • Ethernet LAN cables (Cat5e, Cat6)

  • Office and home networks


Advantages

  1. Low cost and economical.

  2. Easy to install and maintain.

  3. Flexible and lightweight.

  4. Suitable for short-distance communication.

  5. Widely available and commonly used.


Disadvantages

  1. Limited transmission distance.

  2. Lower bandwidth compared to fiber optic cable.

  3. Susceptible to electromagnetic interference.

  4. Less secure than fiber optic cable.

  5. Signal attenuation increases over long distances.


Applications

  1. Telephone communication.

  2. Local Area Networks (LANs).

  3. Internet connections.

  4. Office networking.


Q.6 Explain Distance Vector Routing Algorithm and Shortest Path Routing Algorithm.

Introduction

Routing algorithms are used in computer networks to find the best path for sending data from a source to a destination.


1) Distance Vector Routing Algorithm

Definition

Distance Vector Routing is a routing algorithm in which each router maintains a routing table containing the distance and next hop(router) to all destinations. Routers exchange this information with their neighboring routers.

Working

  1. Each router creates a routing table.

  2. The table contains destination address, distance, and next hop.

  3. Routers periodically send their routing tables to neighboring routers.

  4. Each router compares the received information with its own table.

  5. If a shorter path is found, the routing table is updated.

  6. The process continues until all routers have the latest routing information.

Example

A ----1---- B
|           |
4           2
|           |
C ----1---- D

Router A knows:

  • Distance to B = 1

  • Distance to C = 4

After receiving information from Router B:

  • Distance to D = A → B → D

  • Cost = 1 + 2 = 3

So, Router A updates its table and selects A → B → D as the best route.

Advantages

  1. Simple and easy to implement.

  2. Requires less processing power.

  3. Suitable for small networks.

  4. Routing tables are easy to maintain.

Disadvantages

  1. Slow convergence.

  2. Routing loops may occur.

  3. Generates periodic update traffic.

  4. Not suitable for large networks.


2) Shortest Path Routing Algorithm

Definition

Shortest Path Routing is a routing algorithm that finds the path with the minimum cost between source and destination nodes. It is commonly implemented using Dijkstra’s Algorithm.

Working

  1. Each network link is assigned a cost.

  2. The source router starts the calculation.

  3. Costs to neighboring nodes are calculated.

  4. The path with the minimum cost is selected.

  5. The process continues until the shortest path to all nodes is found.

  6. Data is transmitted through the shortest path.

Example

A ----2---- B
|           |
5           1
|           |
C ----3---- D

To find the shortest path from A to D:

Path 1:

A → B → D
Cost = 2 + 1 = 3

Path 2:

A → C → D
Cost = 5 + 3 = 8

Since cost 3 is less than cost 8,

Shortest Path = A → B → D

Advantages

  1. Finds the best and shortest route.

  2. Fast convergence.

  3. Suitable for large networks.

  4. Reduces routing loops.

Disadvantages

  1. More complex than Distance Vector Routing.

  2. Requires more memory.

  3. Higher computation cost.


Conclusion

 Distance Vector is simple and suitable for small networks, whereas Shortest Path Routing is more efficient and suitable for large networks.

Q.7 Distinguish between Connection-Oriented and Connectionless Services.

Definition

1) Connection-Oriented Service:

A connection is established between sender and receiver before data transmission begins.

Working of Connection-Oriented Service

  1. Sender establishes a connection with the receiver.

  2. Data is transmitted after connection establishment.

  3. Receiver sends acknowledgments.

  4. Connection is terminated after communication.

Example

File transfer using TCP.

2) Connectionless Service:
Data is sent directly without establishing a connection between sender and receiver.

Working of Connectionless Service

  1. No connection is established.

  2. Data packets are sent directly.

  3. Each packet travels independently.

  4. Packets reach the destination without acknowledgment.

Example

Video streaming and online gaming using UDP.


Difference Between Connection-Oriented and Connectionless Services

Connection-Oriented ServiceConnectionless Service
Connection is established before data transfer.

No connection is established before data transfer.

Reliable communication.

Less reliable communication.

Acknowledgment is provided.

No acknowledgment is provided.

Error control is available.

Limited error control.

Flow control is available.

No flow control.
Data is delivered in sequence.Data may arrive out of sequence.

Packets follow the same path.

Packets may follow different paths.

Connection setup and termination are required.

No setup or termination is required.

Higher overhead.

Lower overhead.

Slower due to connection establishment.

Faster transmission.

Suitable for file transfer and email.

Suitable for video streaming and online gaming.

Uses more resources.

Uses fewer resources.

Data delivery is guaranteed.

Data delivery is not guaranteed.

Example: TCP

Example: UDP

Q.8 Explain TCP Three-Way Handshake for Connection Establishment.

Definition

TCP Three-Way Handshake is a process used by the Transmission Control Protocol (TCP) to establish a reliable connection between a client and a server before data transmission begins. It ensures that both devices are ready to communicate and synchronizes their sequence numbers.


Purpose of TCP Three-Way Handshake

  • Establishes a reliable connection.

  • Synchronizes sequence numbers between client and server.

  • Confirms that both devices are ready for communication.

  • Prevents data loss during connection setup.


Working of TCP Three-Way Handshake

The connection establishment process consists of three steps:

Step 1: SYN (Synchronize)

The client sends a SYN packet to the server requesting a connection.

Client  -------- SYN -------->  Server

This packet contains the client's initial sequence number.


Step 2: SYN-ACK (Synchronize Acknowledgment)

The server receives the SYN packet and responds with a SYN-ACK packet.

Client  <----- SYN + ACK -----  Server
  • SYN indicates the server is ready to communicate.

  • ACK acknowledges the client's request.


Step 3: ACK (Acknowledgment)

The client sends an ACK packet to the server.

Client  -------- ACK -------->  Server

After receiving this ACK, the server knows that the client is ready and the connection is established.


Diagram



Example

Suppose a user opens a website in a browser.

  1. The browser (client) sends a SYN packet to the web server.

  2. The web server responds with a SYN-ACK packet.

  3. The browser sends an ACK packet.

  4. The TCP connection is established.

  5. The server starts sending the requested web page data.


Advantages

  1. Provides reliable communication.

  2. Ensures both sides are ready before data transfer.

  3. Synchronizes sequence numbers.

  4. Reduces the chances of communication errors.


Disadvantages

  1. Requires extra time for connection setup.

  2. Generates additional network traffic.

  3. Slightly increases communication overhead.


Conclusion

TCP Three-Way Handshake is the connection establishment process used by TCP. It consists of three steps: SYN, SYN-ACK, and ACK. This process creates a reliable connection between the client and server, ensuring accurate and secure data transmission.

Q.9 Explain Stop-and-Wait Protocol and Sliding Window Protocol with suitable example.

Introduction

Flow control protocols are used to control the rate of data transmission between sender and receiver. Stop-and-Wait Protocol and Sliding Window Protocol are commonly used flow control techniques.


1) Stop-and-Wait Protocol

Definition

Stop-and-Wait Protocol is a flow control protocol in which the sender sends one frame at a time and waits for an acknowledgment (ACK) before sending the next frame.

Working

  1. Sender sends one frame.

  2. Receiver receives the frame and sends an ACK.

  3. Sender waits until ACK is received.

  4. After receiving ACK, the sender sends the next frame.

  5. This process continues until all frames are transmitted.

Diagram



Sender                    Receiver
Frame 1  -------------->
         <------ ACK

Frame 2  -------------->
         <------ ACK

Example

Suppose a sender has three frames F1, F2, and F3.

Send F1 → Receive ACK
Send F2 → Receive ACK
Send F3 → Receive ACK

The sender sends the next frame only after receiving the acknowledgment for the previous frame.

Advantages

  1. Simple to implement.

  2. Easy error detection and recovery.

  3. Reliable data transmission.

Disadvantages

  1. Low efficiency.

  2. Wastes bandwidth while waiting for ACK.

  3. Slow for long-distance communication.


2) Sliding Window Protocol

Definition

Sliding Window Protocol is a flow control protocol in which the sender can send multiple frames before receiving acknowledgments.

Working

  1. Sender maintains a window of frames.

  2. Multiple frames are sent without waiting for ACK.

  3. Receiver sends acknowledgments for received frames.

  4. As ACKs arrive, the window moves (slides) forward.

  5. New frames are transmitted.

Diagram

Sender                         Receiver

F1 ----------->
F2 ----------->
F3 ----------->
          <------ ACK for F1,F2,F3

F4 ----------->
F5 ----------->

Example

Assume window size = 3

Sender sends: F1, F2, F3
Receiver sends ACK
Window slides
Sender sends: F4, F5, F6

Thus, several frames can be transmitted before waiting for acknowledgments.

Advantages

  1. Better bandwidth utilization.

  2. Faster data transmission.

  3. Higher efficiency than Stop-and-Wait.

  4. Suitable for high-speed networks.

Disadvantages

  1. More complex implementation.

  2. Requires more memory.

  3. Window management is needed.


Difference Between Stop-and-Wait and Sliding Window Protocol

Stop-and-Wait ProtocolSliding Window Protocol
Sends one frame at a time.Sends multiple frames at a time.
Waits for ACK after each frame.Does not wait for ACK after every frame.
Low efficiency.High efficiency.
Simple to implement.More complex to implement.
Low bandwidth utilization.Better bandwidth utilization.
Slower transmission.Faster transmission.

Conclusion

Stop-and-Wait Protocol sends one frame and waits for an acknowledgment before sending the next frame, making it simple but less efficient. Sliding Window Protocol allows multiple frames to be transmitted before receiving acknowledgments, resulting in better performance and higher network efficiency.

No comments:

Post a Comment

OS_IMP

UNIT=1 Explain Process States (7 Marks – GTU Style) A process is a program that is currently running in the computer. During execution, a p...