A TCP/IP packet is simply a package of data. Just like a mail package, the packet has both a source and a destination address, as well as information inside. Figure 6-1 gives a basic breakdown of a packet. Note that this is a generic representation of a packet. In practice, some fields are optional, some fields will be in a different order, and some other fields may be present as well. Each part of the packet has a specific purpose and is needed to ensure that information transfer is reliable. Figure 6-1. Generic data packet Here's how the data packet breaks down: -
- Start indicator
-
Every message has a beginning; when you are writing a letter or email, you may start with "Hello". The same rule applies to data transfer. When computers communicate, they send a stream of information. A start indicator designates when a new packet has begun. -
- Source address
-
Every letter needs a reply address, and the source address provides it. Without a source address, a reply would be impossible . -
- Destination address
-
Just as you would not open a letter addressed to your neighbor, a computer rejects any packets without the correct destination address. -
- Control
-
This part of the data packet is used to send brief messages that let the receiving computer know more about the status of a communication. For example, just aswe generally say "Hello" at the beginning of a conversation, a computer uses this part of the packet to indicate the start of communication. -
- Data
-
The only limitation on data is the size allowed to be sent in one packet. Each packet has a length, designated in bits. A bit is one of the eight units that make up a byte . A byte represents an alphanumeric value. For example, 00000011 is the same as the decimal number 3. -
- Error control
-
Error handling is a significant aspect of any computing system: a computer program must be able to deal with anomalies. Whether it's human error or machine corruption, a program must know when something is not right. Error control is arguably the most important part of the data packet, because it verifies the integrity of the rest of the data in the packet. Using checksums and other safeguards, error control ensures that the data arrives in its original form. If an error is found, the packet is rejected and the source address is used to request a new packet. |