Packets, Frames and Error Detection: Lecture Handout
Packets, Frames and Error Detection: Lecture Handout
Packets, Frames and Error Detection: Lecture Handout
Lecture No. 4
CONCEPT OF PACKET:
Network systems divide data in small blocks or junks called packets, which they send individually. Why we need packets rather than bits? The answer to this question is because a sender and receiver need to coordinate to detect transmission errors. Also the individual connection between each pair of computers is not possible. Thats why to solve these problems shard network connections are made among many workstations.
Example:
In the figure one reason for using the packets is illustrated. We see that in a shared resource when one pair of computer communicates, the other must wait. To understand the use of packet here, lets suppose a transmission with packets in the figure.
WITHOUT PACKETS:
A 5MB file transferred across network with 56Kpbs capacity will require 12 minutes. This means that all that computers will be forced to wait for 12 minutes before initiating other transfers. 5x106 bytes * 8 bits / byte 60 secs / minute * 56x 103 bits / second 11.9 minutes
WITH PACKETS:
Now if the file is broken into packets, other computers must only wait until packet (not entire file) has been sent. Suppose file is broken into 1000 byte packets. Now each packet takes less than 0.2 seconds to transmit. Here other computers must only 1000 bytes * 8 bits/ byte .143 seconds 56x103 bits / second wait for 0.14 sec before beginning to transmit. Note: - if both files are 5MB long, each now takes 24 minutes to transmit. But if the second file is 10MB long it sill be transmitted in only 2.8 seconds while 5MB file still takes roughly 12 minutes.
FRAME:
A frame or hardware frame denotes a packet of a specific format on a specific hardware technology.
FRAME FORMAT:
We need to define a standard format for data to indicate the beginning and end of the frame. Header and tail are used to frame the data as shown in the figure below.
We see that in the figure soh and eot are used to denote the start of header and end of tail.
FRAMING IN PRACTICE:
In practice there is a disadvantage of overhead. To avoid the no delay between two frames each frame sends an extra character between block of data. The framing in practice also has some transmission problems just like: Missing eot indicates sending computer crashed. Missing soh indicates receiving computer missed beginning of message. Bad frame is discarded.