Computer Networks
CN Part-1
- What is a Computer Network?
- Goals and Applications of Computer Networking
- Computer Network Components
- Types of Computer Networks
- Network Topology
- Difference between Client Server and Peer to Peer Network
- Layered Architecture in Computer Networks
- Protocol Hierarchy in Computer Networks
- Interfaces and Services in Computer Networks
- Connection Oriented and Connectionless Services
- Service Primitives
- OSI Model
- TCP/IP Model
- Difference between OSI Model and TCP/IP Model
- Encapsulation and Decapsulation in Computer Networks
- Queueing Models in Computer Network
CN Part-2
Connection-Oriented and Connectionless Services
Network Services kya hote hain?
Network mein services ka matlab hota hai ki ek layer dusri layer ko kaise data bhejne ka tareeka deti hai.
Network mein mainly 2 types ke services hote hain:
-
Connection-Oriented Service
-
Connectionless Service
Chaliye dono ko easy language mein samajhte hain.
1. Connection-Oriented Service
Definition:
Connection-Oriented service mein pehle connection banaya jata hai, phir data bheja jata hai, aur baad mein connection close kiya jata hai.
Example: Phone call — pehle number dial karte ho, samne wala uthata hai, fir baat hoti hai, aur phir disconnect.
Features:
-
Pehle connection establish hota hai
-
Data sahi order mein pahuchta hai
-
Reliable hota hai — galti hone par data fir se bhej diya jata hai
-
Thoda slow hota hai kyunki setup time lagta hai
Example:
-
TCP (Transmission Control Protocol) connection-oriented service deta hai
Diagram:
Sender Receiver
| Connection Req |
|--------------------->|
| Connection Ack |
|<---------------------|
| Data Transfer |
|--------------------->|
| Acknowledgment |
|<---------------------|
| Connection Close |
|--------------------->|
2. Connectionless Service
Definition:
Connectionless service mein bina connection banaye hi data bhej diya jata hai.
Example: Postcard ya SMS — seedha bhej do, koi pehle se poochne ki zarurat nahi.
Features:
-
No connection setup
-
Fast hota hai
-
Data loss ya out of order ho sakta hai
-
No guarantee ki data sahi se pahucha
Example:
-
UDP (User Datagram Protocol) connectionless service deta hai
Diagram:
Sender Receiver
| Data Packet |
|------------------->|
| Data Packet |
|------------------->|
(No acknowledgment, no setup)
Comparison Table
Feature | Connection-Oriented | Connectionless |
---|---|---|
Setup Required | Haan | Nahi |
Reliability | High | Low |
Order of Data | Maintain hota hai | Nahi hota |
Speed | Slow | Fast |
Example Protocol | TCP | UDP |
Use Case | File Transfer, Website | Video Stream, Online Games |
Real-Life Examples
Service Type | Real-Life Example |
---|---|
Connection-Oriented | Phone Call, WhatsApp Call |
Connectionless | Postcard, SMS, YouTube Video |
Summary
-
Connection-Oriented = Reliable, sahi order mein data, lekin slow (e.g. TCP)
-
Connectionless = Fast, simple, lekin data loss ho sakta hai (e.g. UDP)
Aap kis service ka use karenge, ye aapke application pe depend karta hai:
-
Agar data ka correct pahuchna zaruri hai (like bank transaction), toh connection-oriented
-
Agar speed important hai (like live video), toh connectionless