Data Packets
Data Packets
splitting data into packets is the need to reassemble the data when it reaches its
destination.
Packet structure
A typical packet is split up into:
» a packet header
» the payload
» a trailer.
(Note: the header often also contains another value indicating how many packets
there are in total for this transmission.)
For each packet, the payload consists of the actual data being sent in the packet
(this is usually about 64 KiB).
For each packet, the packet trailer consists of:
» some way of identifying the end of the packet; this is essential to allow
each packet to be separated from each other as they travel from sending to
receiving station
» an error checking method; cyclic redundancy checks (CRCs) are used to check
data packets:
– this involves the sending computer adding up all the 1-bits in the payload
and storing this as a hex value in the trailer before it is sent
– once the packet arrives, the receiving computer recalculates the number of
1-bits in the payload
– the computer then checks this value against the one sent in the trailer
– if the two values match, then no transmission errors have occurred;
otherwise the packet needs to be re-sent.
46
Packet switching
Let us now consider what happens when a photograph, for example, is sent from
computer ‘A’ to computer ‘B’. The photograph will be split up into a number of
packets before it is sent. There will be several possible routes for the packets,
between computer ‘A’ (sender) and computer ‘B’ (receiver). Each stage in the route
contains a router. A router receives a data packet and, based on the information
in the header, decides where to send it next. For example:
Computer ‘B’
R3
R2 R4
R5 Router ‘B’
Router ‘A’
R7
R6
R10
R8
R9
▲ Figure 2.2 Typical network showing possible routes between ‘A’ and ‘B’
▲ Figure 2.3
▲ Figure 2.4
47
Computer ‘B’ will now have to reassemble the packets into the original sequence.
Computer ‘B’
Computer ‘A’
R1
R3
R2 R4
R5 Router ‘B’
Router ‘A’
R7
R6
R10
R8
R9
▲ Figure 2.5 Typical network showing possible paths taken by each packet
Sometimes it is possible for packets to get lost because they keep ‘bouncing’ around
from router to router and never actually reach their destination. Eventually the
network would just grind to a halt as the number of lost packets mount up,
clogging up the system. To overcome this, a method called hopping is used. A
hop number is added to the header of each packet, and this number is reduced
by 1 every time it leaves a router (Figure 2.6).
Hop number: 10 9 8 7 6 5
48
Activity 2.1
1 Suppose a video conference is taking place between delegates in two different
countries. Packet switching is being used to send video and sound data
between the delegates:
▲ Figure 2.7
Describe:
i any potential problems with sound and video quality
ii how these problems could be caused.
2 Explain how packet switching could be used to download a large web page
from a website.
3 a The trailer in a packet will use one form of error checking.
Explain what is meant by a cyclic redundancy check.
b The payload contains the following data:
Use this data to show how the receiving computer can verify that the
received payload was error-free.
4 a Explain how it is possible for packets to be lost during their transmission
across a network.
b Describe how it is possible for a system to deal with lost packets and
prevent them from slowing down the transmission process.
c Explain why you think packet switching might improve data security.
49