TCP packet life Cycle

Header, PayLoad Trailer

Tracy Pettigrue
Tracy Pettigrue
Sep 28, 2009
0 Comments | 7362 Views | 0 Hits


Every Web page that we receive comes as a series of packets, and every e-mail we send leaves as a series of packets. Networks that ship data around in small packets are called packet switched networks.
On the Internet, the network breaks an e-mail message into parts of a certain size in bytes. These are the packets. Each packet carries the information that will help it get to its destination -- the sender's IP address, the intended receiver's IP address, something that tells the network how many packets this e-mail message has been broken into and the number of this particular packet. The packets carry the data in the protocols that the Internet uses: Transmission Control Protocol/Internet Protocol (TCP/IP). Each packet contains part of the body of your message. A typical packet contains perhaps 1,000 or 1,500 bytes.
Each packet is then sent off to its destination by the best available route -- a route that might be taken by all the other packets in the message or by none of the other packets in the message. This makes the network more efficient.
Most packets are split into three parts:
Header - The header contains instructions about the data carried by the packet. These instructions may include:
·         Length of packet (some networks have fixed-length packets, while others rely on the header to contain this information)
·         Synchronization (a few bits that help the packet match up to the network)
·         Packet number (which packet this is in a sequence of packets)
·         Protocol (on networks that carry multiple types of information, the protocol defines what type of packet is being transmitted: e-mail, Web page, streaming video)
·         Destination address (where the packet is going)
·         Originating address (where the packet came from)
Payload - Also called the body or data of a packet. This is the actual data that the packet is delivering to the destination. If a packet is fixed-length, then the payload may be padded with blank information to make it the right size.
Trailer - The trailer, sometimes called the footer, typically contains a couple of bits that tell the receiving device that it has reached the end of the packet. It may also have some type of error checking. The most common error checking used in packets is Cyclic Redundancy Check (CRC). CRC is pretty neat. Here is how it works in certain computer networks: It takes the sum of all the 1s in the payload and adds them together. The result is stored as a hexadecimal value in the trailer. The receiving device adds up the 1s in the payload and compares the result to the value stored in the trailer. If the values match, the packet is good. But if the values do not match, the receiving device sends a request to the originating device to resend the packet.
As an example, an e-mail message might get broken into packets. For example we can send an e-mail to a friend. The e-mail is about 3,500 bits (3.5 kilobits) in size. The network we send it over uses fixed-length packets of 1,024 bits (1 kilobit). The header of each packet is 96 bits long and the trailer is 32 bits long, leaving 896 bits for the payload. To break the 3,500 bits of message into packets, we will need four packets (divide 3,500 by 896). Three packets will contain 896 bits of payload and the fourth will have 812 bits.
Here is what one of the four packets would contain:

Sender’s IP address
Receiver’s IP address
Packet number
96 bits
896 bits
Data to show end of packet
Error correction
32 bits


Each packet's header will contain the proper protocols, the originating address (the IP address of your computer), the destination address (the IP address of the computer where you are sending the e-mail) and the packet number (1, 2, 3 or 4 since there are 4 packets). Routers in the network will look at the destination address in the header and compare it to their lookup table to find out where to send the packet. Once the packet arrives at its destination, our friend's computer will strip the header and trailer off each packet and reassemble the e-mail based on the numbered sequence of the packets.

Author's note: TCP, Header, Life, Cycle
Keywords: TCP, Header, Life, Cycle

Please Signup to comment on this article