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
Interfaces and Services in Computer Networks
Interface aur Service kya hote hain?
Jab hum computer networks ke layers ki baat karte hain (jaise OSI model ya TCP/IP model), toh har layer doosri layer ke saath interact karti hai.
-
Service = Ek layer doosri layer ko kya kaam de rahi hai
-
Interface = Upar wali layer, neeche wali layer ke service ko kaise use karti hai
Ek simple example:
Agar layers ek building ke floors hain:
-
Service = Lift ka kaam (aapko upar le jaana)
-
Interface = Lift ke buttons (jinse aap service use karte ho)
Layered Architecture Reminder
Har layer:
-
Sirf apne upar wali layer ko service provide karti hai
-
Aur neeche wali layer se service leti hai
Isse system modular aur easy to manage ban jaata hai.
Networking mein Service kya hoti hai?
Service ek kaam ya feature hai jo ek layer doosri (upper) layer ko deti hai.
Service ke Types:
-
Connection-Oriented Service
-
Jaise phone call: Pehle connection banta hai, data send hota hai, phir disconnect hota hai
-
Example: TCP
-
-
Connectionless Service
-
Jaise postcard: Direct bhej do, koi connection banane ki zarurat nahi
-
Example: UDP
-
-
Reliable Service
-
Data safe aur sahi order mein pahuchta hai
-
Example: TCP
-
-
Unreliable Service
-
Data lost ho sakta hai, lekin fast hota hai
-
Example: UDP
-
Interface kya hota hai?
Interface ek point of interaction hota hai — jahan ek layer apne neeche wali layer ke service ko use karti hai.
-
Ye define karta hai ki ek layer doosri layer ke functions ko kaise call karegi
-
Jaise browser socket function ka use karta hai TCP service ke liye
Layer, Interface, Service
Layer N+1 ← Service use karta hai
|
| (Interface)
V
Layer N ← Service provide karta hai
|
V
Layer N–1
example:
Application Layer (HTTP)
|
| Interface (Socket API)
V
Transport Layer (TCP)
|
| Interface (IP call)
V
Network Layer (IP)
Example – Browser se Website Access
Jab aap browser me www.google.com open karte ho:
-
HTTP request banata hai (Application Layer)
-
HTTP, TCP layer se data bhejne ke liye socket interface use karta hai
-
TCP reliable delivery service deta hai
-
TCP, IP layer se packets bhejne ke liye service use karta hai
Har layer sirf apni neeche wali layer se service leti hai using its interface
Important Baaten
Term | Matlab |
---|---|
Service | Jo kaam ek layer doosri layer ke liye karti hai |
Interface | Kaise ek layer doosri layer ke service ko access karti hai |
Protocol | Same layer ke beech ke communication rules |
Summary
-
Services define karte hain kya kaam diya jaa raha hai
-
Interfaces define karte hain kaise wo kaam use kiya jaa raha hai
-
Is design se network communication modular aur reliable hota hai
-
Example: HTTP uses TCP service via socket interface