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.)
THE TCP LEVEL
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:
_______________________________________________
|BIT 0 8|9 16|17 |
|-----------------------------------------------|
| SOURCE PORT | DESTINATION PORT |
|-----------------------------------------------|
| SEQUENCE NUMBER |
|-----------------------------------------------|
| ACKNOWLEDGMENT NUMBER |
|-----------------------------------------------|
|DATA OFFSET | RESERVED | WINDOW |
|-----------------------------------------------|
| CHECKSUM | URGENT POINTER |
|_______________________________________________|
Let's explain this list:
The file, after being split up into smaller pieces, and with the
add of a header for each piece, becomes:
LEVEL IP
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.
- SOURCE INTERNET ADDRESS is the sender address; it is a 32 bit
number (i.e. 130.192.59.20). In the same way as the sender
address on an envelope, it informs the target of a file about who
is the sender.
- DESTINATION INTERNET ADDRESS is another 32 bit number, and is
the univocal address of the target. Thus both sender and target
are correctly and unmistakably recognized by any computer
forwarding datagrams.
- PROTOCOL NUMBER identifies the kind of used protocol and
determines the correct datagram processing of the receiver.
- CHECKSUM allows the receiver of the datagram to control the
presence of any corruption of data during forwarding. It is
independent from TCP checksum, and is related only to IP header.
- FLAGS and FRAGMENT OFFSET fields are used to reassemble
datagrams in case they break. It may happen that they are too big
for a certain net, and that they crumble trying to pass through.
- TIME TO LIVE it's a safety to avoid the looping of a datagram:
every time a datagram passes through a system this number
decreases progressively to zero, hence datagram is cancelled.
Now, adding IP header, our file becomes:
etc...
INTERFACE LEVEL
Now comes another level, since superimposed to datagrams are
control characters, typical to the electric interface (Ethernet,
RS232, a TNC in case of radio communication). These are low
hardware level characters, and they are processed as such.
A graphic description of the group of packets obtained is......
_
_
etc. etc.
You can easily see that electric interface control characters are
at the beginning and at the end of the datagram.
back to the home page