Total members 10262 | Gratitudes |It is currently Thu May 24, 2012 4:13 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 1 post ] 
Author Question
 Question subject: TCP Transmission Control Protocol
PostPosted: Sat Nov 29, 2008 11:49 pm 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2279
Location: Earth
Has thanked: 39 time
Have thanks: 61 time

TCP stands Transmission Control Protocol. TCP is one of the transport layer protocols in IP networks. TCP protocol is a connection-oriented protocol which provides end-to-end reliability. When we say TCP is connection-oriented, we mean that before two network nodes start sending and receiving data packets using TCP, they must first create connections using three handshaking protocols. TCP contain techniques for control flow and error detection. This is on reason we say that TCP provide end to end reliability.

TCP establishes a full duplex connection between two end nodes. Each node is defined by an IP address and a TCP port number. The byte stream is transferred in segments. The window size determines the number of bytes of data that can be sent before an acknowledgment from the receiver is necessary. The length of TCP packet is 32 bits.

the packet is like this :
Code:
MAC Header | IP Header |TCP Header | Data

Attachment:
File comment: TCP Header
untitled.JPG
untitled.JPG [ 36.49 KiB | Viewed 715 times ]


Source Port. 16 bits.

Destination Port. 16 bits.

Sequence Number. 32 bits.
The sequence number of the first data byte in this segment. If the SYN bit is set, the sequence number is the initial sequence number and the first data byte is initial sequence number + 1.

Acknowledgment Number. 32 bits.
If the ACK bit is set, this field contains the value of the next sequence number the sender of the segment is expecting to receive. Once a connection is established this is always sent.

Data Offset. 4 bits.
The number of 32-bit words in the TCP header. This indicates where the data begins. The length of the TCP header is always a multiple of 32 bits.

reserved. 3 bits.
Must be cleared to zero.

ECN, Explicit Congestion Notification. 3 bits.
Added in RFC 3168.
Code:
    00   01   02
    N     C      E


N, NS, Nonce Sum. 1 bit.
Added in RFC 3540. This is an optional field added to ECN intended to protect against accidental or malicious concealment of marked packets from the TCP sender.

C, CWR. 1 bit.

E, ECE, ECN-Echo. 1 bit.

Control Bits. 6 bits.

00 01 02 03 04 05
U A P R S F

U, URG. 1 bit.
Urgent pointer valid flag.

A, ACK. 1 bit.
Acknowledgment number valid flag.

P, PSH. 1 bit.
Push flag.

R, RST. 1 bit.
Reset connection flag.

S, SYN. 1 bit.
Synchronize sequence numbers flag.

F, FIN. 1 bit.
End of data flag.

Window. 16 bits, unsigned.
The number of data bytes beginning with the one indicated in the acknowledgment field which the sender of this segment is willing to accept.

Checksum. 16 bits.
This is computed as the 16-bit one's complement of the one's complement sum of a pseudo header of information from the IP header, the TCP header, and the data, padded as needed with zero bytes at the end to make a multiple of two bytes. The pseudo header contains the following fields:

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 1 post ] 
Quick reply


  

 Similar topics
 protocol
 Control font size of sub and sup text
 Control HR tag width and height
 Source Code for protocol
 Chat with Video Transmission in Java
 VOIP Voice-Over-Internet Protocol
 ipv6 the generation protocol
 control order in actions
 hello - how to dynamiclly load a costum user control with a
 modeling traffic light control system using neural network

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team