Feedback Form

Introduction to Connection-Oriented Networking: Reliability with TCP

Introduction to Connection-Oriented Networking: Reliability with TCP

Introduction to Connection-Oriented Networking

जब हम Internet या किसी network के माध्यम से data भेजते हैं, तो data को सही जगह और सही तरीके से पहुँचाने के लिए दो major communication models का use किया जाता है — Connection-Oriented और Connectionless। इनमें से Connection-Oriented networking का सबसे अच्छा example है TCP (Transmission Control Protocol)। यह model reliability, sequencing और error control पर focus करता है ताकि data loss या corruption न हो।

TCP एक ऐसा protocol है जो sender और receiver के बीच पहले connection establish करता है, फिर data transfer करता है, और अंत में connection को close करता है। इस वजह से इसे “reliable connection-oriented protocol” कहा जाता है। इसे समझने के लिए पहले ये देखना जरूरी है कि connection-oriented communication का मतलब क्या होता है।

What is Connection-Oriented Communication?

Connection-Oriented communication में data भेजने से पहले एक dedicated logical path establish किया जाता है। यह path तब तक active रहता है जब तक data transmission पूरा नहीं हो जाता। इसे आप ऐसे समझ सकते हैं जैसे एक phone call — जब तक call connect है, दोनों users बात कर सकते हैं; call cut होते ही communication खत्म।

  • पहले connection setup होता है।
  • फिर data transfer किया जाता है।
  • अंत में connection terminate किया जाता है।

इस process को TCP protocol handle करता है ताकि हर packet सही sequence में पहुंचे और कोई packet खो न जाए।

Example

जब आप किसी website को open करते हैं, जैसे www.google.com, आपका browser पहले TCP connection establish करता है (through 3-way handshake), फिर request भेजता है और response receive करता है। इससे सुनिश्चित होता है कि communication reliable और complete हो।

Three-Way Handshake in TCP

TCP connection setup का सबसे important step है Three-Way Handshake। इसके द्वारा sender और receiver दोनों आपस में synchronize होते हैं ताकि data का सही transmission हो सके।

Step Description
1. SYN Client server को SYN message भेजता है (synchronize request) ताकि connection की शुरुआत हो सके।
2. SYN-ACK Server SYN-ACK भेजकर confirm करता है कि उसने request receive कर ली और वह भी synchronize करना चाहता है।
3. ACK Client ACK message भेजकर final confirmation देता है, और अब connection establish हो जाता है।

यह handshake सुनिश्चित करता है कि दोनों parties communication के लिए तैयार हैं और reliable data transfer शुरू हो सकता है।

Features of TCP

TCP में कई ऐसी features हैं जो इसे reliable बनाते हैं। नीचे इसके major features दिए गए हैं —

  • Connection-Oriented: TCP हमेशा data भेजने से पहले connection establish करता है।
  • Reliable Data Transfer: Lost packets को TCP दोबारा भेजता है ताकि data complete और accurate रहे।
  • Sequencing: Packets को sequence number दिए जाते हैं ताकि receiver सही order में data को reassemble कर सके।
  • Error Detection: TCP हर packet में checksum जोड़ता है ताकि error detect हो सके।
  • Flow Control: Sender और receiver की speed को balance रखने के लिए TCP flow control use करता है।
  • Congestion Control: अगर network busy है, तो TCP data sending rate को कम करता है ताकि congestion न हो।

TCP Connection Termination

Data transfer complete होने के बाद TCP connection को बंद किया जाता है। इसे “Four-Way Handshake” के द्वारा terminate किया जाता है। इसके steps नीचे दिए गए हैं:

Step Description
1. FIN Client server को FIN packet भेजता है ताकि वो बता सके कि अब और data नहीं भेजेगा।
2. ACK Server FIN packet receive करके ACK भेजता है।
3. FIN Server भी FIN packet भेजता है ताकि client को बताए कि अब वह भी data नहीं भेजेगा।
4. ACK Client ACK भेजता है, और connection officially बंद हो जाता है।

TCP Header Structure

TCP segment के अंदर एक structured header होता है जिसमें connection और data control के लिए कई fields होती हैं। नीचे इसका simplified table दिया गया है:

Field Description
Source Port Sender process का port number।
Destination Port Receiver process का port number।
Sequence Number Packets के सही order को maintain करने के लिए।
Acknowledgment Number Confirm करता है कि previous data successfully receive हुआ है।
Flags Control bits जैसे SYN, ACK, FIN आदि।
Window Size Flow control के लिए use होता है।
Checksum Error detection के लिए।

Example TCP Header Representation:

Source Port: 8080
Destination Port: 80
Sequence Number: 1001
Acknowledgment Number: 2001
Flags: SYN
Checksum: 0xABCD

Difference Between TCP and UDP

TCP और UDP दोनों transport layer protocols हैं, लेकिन दोनों का working principle अलग है। नीचे table में इसका comparison दिया गया है:

Feature TCP UDP
Connection Type Connection-Oriented Connectionless
Reliability Reliable (Error Checking + Recovery) Unreliable (No recovery)
Speed Slower Faster
Header Size 20 Bytes minimum 8 Bytes
Use Cases Web browsing, Email, File transfer Video streaming, Gaming, VoIP

Applications of TCP

TCP का use उन applications में किया जाता है जहाँ reliability और accuracy जरूरी होती है। कुछ common applications नीचे दी गई हैं:

  • HTTP/HTTPS: Websites और web browsers में reliable communication के लिए।
  • FTP: File transfer के लिए।
  • SMTP/POP3: Email transmission के लिए।
  • Telnet: Remote login systems के लिए।

Advantages of TCP

  • Reliable communication ensure करता है।
  • Data loss या corruption से बचाव करता है।
  • Congestion control से network stability maintain होती है।
  • Flow control sender और receiver के बीच synchronization बनाए रखता है।

Disadvantages of TCP

  • Overhead ज्यादा होता है क्योंकि control information maintain करनी पड़ती है।
  • Speed कम होती है, इसलिए real-time applications के लिए suitable नहीं।
  • Complex mechanism होने के कारण resource usage बढ़ जाता है।

Summary of TCP Networking

TCP networking का purpose होता है reliable, ordered, और error-free communication देना। Connection-Oriented model होने की वजह से यह हर packet की confirmation और sequencing manage करता है। इस वजह से यह protocol Internet की backbone services जैसे HTTP, Email और FTP के लिए सबसे ज़्यादा use होता है।

Important Exam Notes

  • TCP का full form है Transmission Control Protocol
  • यह एक connection-oriented और reliable protocol है।
  • TCP में 3-way handshake द्वारा connection establish होता है।
  • Data sequencing, error detection और retransmission TCP की core features हैं।
  • TCP segment का minimum header size 20 bytes होता है।
  • UDP fast है लेकिन TCP reliable है।
  • Applications जैसे HTTP, FTP और SMTP TCP का use करती हैं।