2.1.
1 Data packets
• Data sent over long distances is usually broken up into data packets (sometimes called datagrams).
• The packets of data are usually quite small, typically 64 KiB, which are much easier to control than a
long continuous stream of data.
• The idea of splitting up data in this way means each packet can be sent along a different route to its
destination.
• This would clearly be of great benefit if a particular transmission route was out of action or very busy.
• The only obvious drawback of 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.
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:
• Packet switching is a method of data transmission in which a message is broken up into a number
of packets.
• Each packet can then be sent independently from start point to end point.
• At the destination, the packets will need to be reassembled into their correct order (using the
information sent in the header).
• At each stage in the transmission, there are nodes that contain a router. Each router will determine
which route the packet needs to take, in order to reach its destination.
• Suppose our photograph has been split up into five packets that have been sent in the following
order:
» each packet will follow its own path (route)
» routers will determine the route of each packet
» routing selection depends on the number of packets waiting to be processed at each node
» the shortest possible path available is always selected – this may not always be the shortest path
that could be taken, since certain parts of the route may be too busy or not suitable
» unfortunately, packets can reach the destination in a different order to that in which they were sent.
• Notice the different paths taken by each packet from computer ‘A’ to computer ‘B’. Also notice that
the packets have arrived in a different order compared to the way they were sent, namely:
Computer ‘B’ will now have to reassemble the packets into the original sequence.
The benefits of packet switching are:
» there is no need to tie up a single communication line
» it is possible to overcome failed, busy or faulty lines by simply re-routing packets
» it is relatively easy to expand package usage
» a high data transmission rate is possible.
The drawbacks of packet switching include:
» packets can be lost and need to be re-sent
» the method is more prone to errors with real-time streaming (for example, a live sporting event
being transmitted over the internet)
» there is a delay at the destination whilst the packets are being re-ordered.
• 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