THE TCP/IP PROTOCOL
The TCP/IP is a group of protocols developed to interconnect nets of calculators. These protocols have a stratified architecture. We'll try to explain it with an example. Let's suppose to manage E-Mail traffic. First level is the one of the protocol needed to send the message, which identifies the sender, the receiver and the text of the message. Above this level there is TCP/IP, the protocol that controls that data forwarded will reach effectively the target. For this purpose the message is split up into datagrams, and TCP/IP cares for the datagrams to reach correctly the target. Above both of these levels there is still another protocol, IP, which cares for data routing on the Internet. Last, we have a fourth level: the interface (Ethernet, serial port, etc.)
TCP or Transfer Control Protocol splits data to be sent into datagrams, and has to reassemble received datagrams, or to ask for re-sending of lost data packets. IP proceeds for routing of datagrams. Each protocol level ignores completely the other, and as a matter of fact each protocol adds headings to datagrams, so that they are unique and impossible to be lost. An example, that we will repeat later, will allow us to understand the mechanism. Let's suppose to send a message to another computer through the Internet. We represent the bytes of this file with bullets:
The protocol controlling the transfer (TCP) splits the file into smaller pieces, by mutual consent with the receiver about the maximum size to be used, and depending also on the net they share. Thus file becomes:
Now, as we said, at the beginning of each datagram (the three bullets) is attached a header. Present technology uses 20 bytes (160 bits) for each header, that we can represent as follows:
BIT0 |
8|9
|
_ |
16|17
|
_
|
---|---|---|---|---|
SOURCE PORT
|
|
|
DESTINATION PORT
|
||
SEQUENCE NUMBER
|
||||
ACKNOWLEDGMENT NUMBER
|
||||
DATA OFFSET
|
|
|
RESERVED
|
|
|
WINDOW
|
CHECKSUM
|
|
|
URGENT POINTER
|
The reason for these two partitions is that each system can have multiple ports, to connect simultaneously more users. Source Port and Destination Port interexchange when receiver sends data back.
The file, after being split up into smaller pieces, and with the add of a header for each piece, becomes:
Now TCP has made up, out of the starting file, a series of datagrams; now these datagrams are passed to the IP (Internet Protocol) instructions. These instructions will be used by datagrams to find their way to the target. For this reason even IP adds a 20 bytes header to each datagram. We show a list of this datagram:
BIT 0 |
|
|
9
|
16|17
|
|||||
---|---|---|---|---|---|---|---|---|
VERSION
|
|
|
IHL
|
|
|
TYPE OF SERVICE
|
|
|
TOTAL LENGHT
|
||
IDENTIFICATION
|
|
|
FLAGS
|
|
|
FRAGMENT OFFSET
|
||||
TIME OF LIVE
|
|
|
PROTOCOL
|
|
|
HEADER CHECKSUM
|
||||
SOURCE INTERNET ADDRESS
|
||||||||
DESTINATION INTERNET ADDRESS
|
||||||||
TCP HEADER, DATA, ......
|
Let's explain the content.
Now, adding IP header, our file becomes:
Ham radio Data Center - free schematics | Free HAM Directory | About me | Acronyms | CW | Data Sheets | Docs | Download | E-mail | HOME | Ham projects | Hobby circuits | Photo galery | PIC | QTH photos |
Sign in my guestbook | View my guestbook ]
© 2001 - YO5OFH, Csaba Gajdos