Tuesday, July 1, 2014

Network Communications

Network Communications
How Data is packaged

At first, one might assume that data is sent as a continuous stream of ones and zeros from one computer to another. In fact, data is broken down into small, manageable packets, each wrapped with the essential information needed to get it from its source to the correct destination. This lesson introduces the concept of packets as the basic building blocks of network data communications.
After this lesson, you will be able to:
  • Define the term "packet," including its function and components.
  • Describe the contents and function of each packet component: header, data, and trailer.

The Function of Packets in Network Communications

Data usually exists as rather large files. However, networks cannot operate if computers put large amounts of data on the cable at the same time. A computer sending large amounts of data causes other computers to wait (increasing the frustration of the other users) while the data is being moved. This is not called "sharing"; it is called "monopolizing the network." There are two reasons why putting large chunks of data on the cable at one time slows down the network:
  • Large amounts of data sent as one large unit tie up the network and make timely interaction and communications impossible because one computer is flooding the cable with data.
  • The impact of retransmitting large units of data further multiplies network traffic.
These effects are minimized when the large data units are reformatted into smaller packages for better management of error correction in transmission. This way, only a small section of data is affected, and, therefore, only a small amount of data must be retransmitted, making it relatively easy to recover from the error.

Figure 1: Large continuous streams of data slow down the network
In order for many users at once to transmit data quickly and easily across the network, the data must be broken into small, manageable chunks. This way, users each get their share of access to the network. These chunks are called packets, or frames. Although the terms "packet" and "frame" are often used interchangeably, there are some differences based on the type of network. This lesson uses the term "packet," meaning "a unit of information transmitted as a whole from one device to another on a network."

"Device" is a generic term for a computer subsystem. Printers, serial ports, and disk drives are often referred to as devices; such subsystems frequently require their own controlling software, called device drivers. Packets are the basic units of network communication. Figure 3.6 shows data that is being broken into packets. With data divided into packets, individual transmissions are speeded up so that every computer on the network has more opportunities to transmit and receive data. At the target (receiving) computer, the packets are collected and reassembled in the order of the original data.
Figure 3.6 Breaking data into packets
When the network operating system at the sending computer breaks the data into packets, it adds special control information to each frame. This makes it possible to:
  • Send the original, disassembled data in small chunks.
  • Reassemble the data in the proper order when it reaches its destination.
  • Check the data for errors after it has been reassembled.

Packet Structure

Packets can contain several types of data including:
  • Information, such as messages or files.
  • Certain types of computer control data and commands, such as service requests.
  • Session control codes, such as error correction that indicate the need for a retransmission.

Packet Components

All packets have certain components in common. These include:
  • A source address that identifies the sending computer.
  • The data that is intended for transmission.
  • A destination address that identifies the recipient.
  • Instructions that tell network components how to pass the data along.
  • Information that tells the receiving computer how to connect the packet to other packets in order to reassemble the complete data package.
  • Error-checking information to ensure that the data arrives intact.
Figure 3.7 shows these packet components grouped into three sections: header, data, and trailer.
Figure 3.7 Packet components
The header includes:
  • An alert signal to indicate that the packet is being transmitted.
  • The source address.
  • The destination address.
  • Clock information to synchronize transmission.
This describes the actual data being sent. This part of the packet varies in size, depending on the network. The data section on most networks varies from 512 bytes—or 0.5 kilobytes (KB)—to 4 KB.
Because most original data strings are much longer than 4k, data must be broken into chunks small enough to be put into packets. It takes many packets to complete the transmission of a large file.

The exact content of the trailer varies depending on the communication method, or protocol. However, the trailer usually contains an error-checking component called a cyclical redundancy check (CRC). The CRC is a number produced by a mathematical calculation on the packet at its source. When the packet arrives at its destination, the calculation is made again. If the results of both calculations are the same, this indicates that the data in the packet has remained stable. If the calculation at the destination differs from the calculation at the source, this means the data has changed during the transmission. In that case, the CRC routine signals the source computer to retransmit the data.