Academic Tutorials



English | French | Portugese | German | Italian
Google

Home Source Codes E-Books Downloads Contact Us About Us

TCP/IP Tutorial
TCP/IP Introduction
TCP/IP Addressing
TCP/IP Protocols
What is TCP/IP ?
HTTP and HTTPS protocols
MIME and IMAP protocols
SSL and SMTP protocols
POP and FTP protocols
NTP and DHCP protocols
SNMP and LDAP protocols
ICMP and ARP protocols
RARP,BOOTP and PPTP protocols
TCP/IP email

HTML Tutorials
HTML Tutorial
XHTML Tutorial
CSS Tutorial
TCP/IP Tutorial
XML Tutorials
XML Tutorial
XSL Tutorial
XSLT Tutorial
DTD Tutorial
Schema Tutorial
XForms Tutorial
XSL-FO Tutorial
XML DOM Tutorial
XLink Tutorial
XQuery Tutorial
XPath Tutorial
XPointer Tutorial
RDF Tutorial
SOAP Tutorial
WSDL Tutorial
RSS Tutorial
WAP Tutorial
Web Services Tutorial
Browser Scripting
JavaScript Tutorial
VBScript Tutorial
AJAX Tutorial
DHTML Tutorial
HTML DOM Tutorial
WMLScript Tutorial
E4X Tutorial
Server Scripting
ASP Tutorial
PHP Tutorial
PERL Tutorial
SQL Tutorial
ADO Tutorial
.NET (dotnet)
Microsoft.Net
XML Web Services
ASP.Net
.Net Mobile
C# : C Sharp
ADO.NET
VB.NET
Multimedia
SVG Tutorial
Flash Tutorial
Media Tutorial
SMIL Tutorial
Web Building
Web Browsers
Web Hosting
W3C Tutorial
Web Building
Web Quality
Web Semantic
Web Careers
Java Tutorials
Java Tutorial
JSP Tutorial
Servlets Tutorial
Struts Tutorial
EJB Tutorial
JMS Tutorial
JMX Tutorial
Programming Langauges
C Tutorial
C++ Tutorial
Visual Basic Tutorial
Data Structures Using C
Soft Skills
Communication Skills
Time Management
Project Management
Team Work
Leadership Skills
Corporate Communication
Negotiation Skills


TCP/IP Protocols
Previous Next


Transmission Control Protocol(TCP)

TCP is a reliable, connection-oriented and byte-stream protocol. Let's look at each of the terms - reliable, connection-oriented, and byte-stream - in detail.Applications that require the transport protocol to provide reliable data delivery use the TCP because it verifies that data is delivered across the network accurately and in the proper sequence.

TCP provides reliability with the help of a mechanism called Positive Acknowledgment with Re-transmission (PAR). Simply stated, a system using PAR sends the data again, unless it hears from the remote system that the data arrived okay and the unit of data exchanged between cooperating TCP modules is called a segment (see Figure below Each segment contains a checksum that the recipient uses to verify that the data is undamaged. If the data segment is received undamaged, the receiver sends a positive acknowledgment back to the sender and if the data segment is damaged, the receiver discards it.The sending TCP module re-transmits any segment for which no positive acknowledgment has been received,after an appropriate time-out period.

TCP segment format

Note:

  • TCP is the connection-oriented.
  • It establishes a logical end-to-end connection between the two communicating host.
  • To establish a dialogue before data is transmitted,control information, called a handshake, is exchanged between the two endpoints.
  • TCP indicate the control function of a segment by setting the appropriate bit in the Flags field in word 4 of the segment header.



  • TCP Using Three Way Handshake Process

    The figure below shows the three way handshake process which is used by TCP.

    Host A begins the connection by sending host B a segment with the "Synchronize sequence numbers" (SYN) bit set and this segment tells host B that A wishes to set up a connection, and it tells B what sequence number host A will use as a starting number for its segments. (Sequence numbers are used to keep data in the proper order.) Host B responds to A with a segment that has the "Acknowledgment" (ACK) and SYN bits set and B's segment acknowledges the receipt of A's segment, and informs A which Sequence Number host B will start with. Finally, host A sends a segment that acknowledges receipt of B's segment, and transfers the first actual data.

    After this exchange, host A's TCP has positive evidence that the remote TCP is alive and ready to receive data and then as soon as the connection is established, data can be transferred. When the cooperating modules have concluded the data transfers,to close the connection they will exchange a three-way handshake with segments containing the "No more data from sender" bit (called the FIN bit). It is the end-to-end exchange of data that provides the logical connection between the two system.

    TCP also helps to views the data it sends as a continuous stream of bytes, not as independent packets. Therefore, TCP takes care to maintain the sequence in which bytes are received and sent.The Acknowledgment Number and Sequence Number fields in the TCP segment header keep track of the bytes.

    The TCP standard does not require that each system start numbering bytes with any specific number and each system chooses the number it will use as a starting point.Each end of the connection must know the other end's initial number to keep track of the data stream correctly. The two ends of the connection synchronize byte-numbering systems by exchanging SYN segments during the handshake and the Sequence Number field in the SYN segment contains the Initial Sequence Number (ISN), which is the starting point for the byte-numbering system. For security reasons the ISN should be the random number, though it is often 0.

    Each byte of data is numbered sequentially from the ISN, so the first real byte of data sent has a sequence number of ISN+1 and the Sequence Number in the header of a data segment identifies the sequential position in the data stream of the first data byte in the segment. For example, if the first byte in the data stream was sequence number 1 (ISN=0) and 4000 bytes of data have already been transferred, then the first byte of data in the current segment is byte 4001, and the Sequence Number would be 4001 only.

    The Acknowledgment Segment (ACK) performs two functions: flow control and positive acknowledgment. The acknowledgment tells the sender how much data has been received, and how much more the receiver can accept and the Acknowledgment Number is the sequence number of the next byte the receiver expects to receive.For every packet,the standard does not require an individual acknowledgment. The acknowledgment number is a positive acknowledgment of all bytes up to that number. For example, if the first byte sent was numbered 1 and 2000 bytes have been successfully received, the Acknowledgment Number would be 2001.

    The Window field contains the number of bytes the remote end is able to accept or the window. If the receiver is capable of accepting 6000 more bytes, the window would be 6000 only. The window indicate to the sender that it can continue sending segments as long as the total number of bytes that it sends is smaller than the window of bytes that the receiver can accept and he receiver controls the flow of bytes from the sender by changing the size of the window. A zero window tells the sender to cease transmission until it receives the non-zero window value.




    IP - Internet Protocol

    1. The Internet Protocol (IP) is a network-layer (Layer 3) protocol that contains some control information that enables packets to be routed and addressing information.


    2. IP is the primary network-layer protocol in the Internet protocol suite and is documented in RFC 791.


    3. Along with the Transmission Control Protocol (TCP), IP represents the heart of the Internet protocol.


    4. IP has two primary responsibilities: providing connectionless, best-effort delivery of datagrams through an internetwork and providing fragmentation and reassembly of datagrams to support data links with different maximum-transmission unit (MTU) sizes.





    IP Packet Format

    An IP packet contains several types of information, as illustrated in the following figure:

    The description for IP packet fields is given below:

    1. Version: Indicates that the version of IP currently used.


    2. IP Header Length (IHL):which indicates the datagram header length in 32-bit words.


    3. Type-of-Service:which specifies how an upper-layer protocol would like a current datagram to be handled, and assigns datagrams various levels of importance.


    4. Total Length: Specifies the length, in bytes, of the entire IP packet, including the data and header.


    5. Identification:which contains an integer that identifies the current datagram. This field is used to help piece together datagram fragments.


    6. Flags:which consists of a 3-bit field of which the two low-order (least-significant) bits control fragmentation. The low-order bit specifies whether the packet can be fragmented. The middle bit specifies whether the packet is the last fragment in a series of fragmented packets. The third or high-order bit is not used.


    7. Fragment Offset:which indicates the position of the fragment's data relative to the beginning of the data in the original datagram, which allows the destination IP process to properly reconstruct the original datagram.


    8. Time-to-Live:which maintains a counter that gradually decrements down to zero, at which point the datagram is discarded. This keeps packets from looping endlessly.


    9. Protocol:which indicates which upper-layer protocol receives incoming packets after IP processing is complete.


    10. Header Checksum:which helps ensure IP header integrity.


    11. Source Address:which specifies the sending node.


    12. Destination Address:which specifies the receiving node.


    13. Options:which allows IP to support various options, such as security.


    14. Data:which contains upper-layer information.





    Share And Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.
    • blinkbits
    • BlinkList
    • blogmarks
    • co.mments
    • connotea
    • del.icio.us
    • De.lirio.us
    • digg
    • Fark
    • feedmelinks
    • Furl
    • LinkaGoGo
    • Ma.gnolia
    • NewsVine
    • Netvouz
    • RawSugar
    • Reddit
    • scuttle
    • Shadows
    • Simpy
    • Smarking
    • Spurl
    • TailRank
    • Wists
    • YahooMyWeb

    Previous Next

    Keywords: TCP/IP Protocols, molecular biology protocols, osi model protocols, protocols elders of zion, network protocols, networking protocols, cisco protocols, ethernet protocols, wan protocols, osi protocols, wireless protocols, define protocols, vpn protocols, lan protocols, elisa protocols, zion protocols, router protocols, voip protocols


    HTML Quizes
    HTML Quiz
    XHTML Quiz
    CSS Quiz
    TCP/IP Quiz
    XML Quizes
    XML Quiz
    XSL Quiz
    XSLT Quiz
    DTD Quiz
    Schema Quiz
    XForms Quiz
    XSL-FO Quiz
    XML DOM Quiz
    XLink Quiz
    XQuery Quiz
    XPath Quiz
    XPointer Quiz
    RDF Quiz
    SOAP Quiz
    WSDL Quiz
    RSS Quiz
    WAP Quiz
    Web Services Quiz
    Browser Scripting Quizes
    JavaScript Quiz
    VBScript Quiz
    AJAX Quiz
    DHTML Quiz
    HTML DOM Quiz
    WMLScript Quiz
    E4X Quiz
    Server Scripting Quizes
    ASP Quiz
    PHP Quiz
    PERL Quiz
    SQL Quiz
    ADO Quiz
    .NET (dotnet) Quizes
    Microsoft.Net Quiz
    XML Web Services Quiz
    ASP.Net Quiz
    .Net Mobile Quiz
    C# : C Sharp Quiz
    ADO.NET Quiz
    VB.NET Quiz
    Multimedia Quizes
    SVG Quiz
    Flash Quiz
    Media Quiz
    SMIL Quiz
    Web Building  Quizes
    Web Browsers Quiz
    Web Hosting Quiz
    W3C Quiz
    Web Building Quiz
    Web Quality Quiz
    Web Semantic Quiz
    Web Careers Quiz
    Java Quizes
    Java Quiz
    JSP Quiz
    Servlets Quiz
    Struts Quiz
    EJB Quiz
    JMS Quiz
    JMX Quiz
    Programming Langauges Quizes
    C Quiz
    C++ Quiz
    Visual Basic Quiz
    Data Structures Using C Quiz
    Soft Skills Quizes
    Communication Skills Quiz
    Time Management Quiz
    Project Management Quiz
    Team Work Quiz
    Leadership Skills Quiz
    Corporate Communication Quiz
    Negotiation Skills Quiz

    Privacy Policy
    Copyright © 2003-2008 Vyom Technosoft Pvt. Ltd., All Rights Reserved.