Explain how data is transmitted by packet switching.


Teaching Note:


Sample Question:



JSR Notes:


These notes are in three separate parts: the in-class highlights, the notes from the Yellow & Red textbook, and my former curriculum notes - which you will note is green, meaning that it all applies quite well, if not perfectly.

Ultimately you should be prepared to explain, in summary, this concept in a 5-6 mark kind of an answer. But you should also be prepared to address certain parts of it - in the same way that some of my homework questions will pin-point important concepts.


sdfasdfsadfsaddsaf water through different streams analogy

postal analogy

trace route in Network Utility to see number of nodes a packet goes through

laying cables under the ocean


Firstly, here are the highlights from our class discussion of this:

- Packet switching - single data transmission is broken up into packets and each packet is transmitted.

- Data packet fixed in length, structure determined by protocol used.

- Each packet includes a packet number.

- Packet errors can occur as result of collisions or by interference.

- Each packet has a counter which decrements as it passes through a node, and if it gets lost, then after a certain number of hops (after the counter has decremented below a certain number), the packet is trashed.

- Packet switching suitable when small delays can be tolerated (i.e. email transmission), or the complete transmission doesn't have to happen all together.

- Streaming an example of circuit switching, which is the other way that data can be transmitted, in contrast to packet switching.



The Yellow and Red IB CS textbook does a very, very good and thorough job of this assessment statement. Your best strategy is to use it, physically, to read through and try to understand packet switching. But "for posterity", and to have it always available to you, I have copied it over here. ("Computer Science Java Enabled, 2nd Edition, Andrew Meyenn, Richard Jones, pages 343 - 345.


Packet Switching

Definition of data packet

That is transmitted to groups of bits referred to as data packets. A data packet is typically fixed in length it structures determined by the protocol being used.

The contents of the packet typically hold the source address, destination address, the data and parity bit or check digit. In a packet switched network, the packet also contains a packet number.

A diagram of a data packet is shown below.

(See page 343 of the Red & Yellow IB textbook.)

Packet Switching

ipv4: 4 billion possible IP addresses

ipv6: 4 billion x 4 billion x 4 billion x 4 billion different IP address

2 ^ 128

Definition of Packet Switching

Packet switching sends data in individual groups called data packets. A single data transmission is broken up into individual packets and then each packet is transmitted. The key feature is that the individual pockets need not be transmitted over the same links, but can be sent over the best available link. The original data transmission is broken up into packets is then reassembled at their destination.

The reordering is possible because each packet has a separate packet number. Thus the packets can be reordered according to this packet number.

Each packet also has a counter, which documents as it passes through a node. If it reaches zero, the packet is discarded.

The main advantage is that if the link is broken or unavailable during transmission, another link can be used in the transmission can continue. Packet switching is suitable and small delays can be tolerated, for example, e-mail transmission as compared to real time video where is important that there is no delay you sound or pictures. Packet switching is also suitable transmission is not a constant stream or rather where there is a burst of data transmission, and then some idle time before another burst. During the idle time network link can be used to handle the transfer.

This method is in contrast to the circuit switching which has a fixed link to send the data transmission. The advantage is that it can be fast, subject to failure if the link is broken during transmission.

Role of Nodes and Traffic Management

As a packet traverses the links, each link is connected via a note in the data traffic is managed via a router. The router inspects each packet and routes it on to the appropriate link. Network traffic management involves ensuring that packets are passed on to an appropriate link and that congestion is managed so that network performance is maintained.

Their two factors to be considered by the routing algorithms: determining the shortest path in determining free notes. Both involve complex mathematical algorithms.

Routing of Packets Over Different Paths

As mentioned above the routing of packets is a fundamental feature of a packet switching network. A router will inspect the destination address and inspect available links. A traffic management algorithm will be employed to decide which link is most appropriate to use. Remember, in a high-speed network, a large amount of traffic is entering a single node at any one time. The router needs to be able to handle each individual packet and ensure that it is sent to the correct destination, but the route the packet takes can vary

Packet Errors

Packet errors can occur as a result of collisions, or by interference. In collisions, the same link is attempted to be used by two packets at the same time. In this case the router will communicate with the sender of the packet will be reset.

On arrival, a data packet is checked to see if there had been any transmission errors, for example party is checked. If an error is found, the destination router will request a resend.

Obviously the higher the error rate the slower the performance of the transmission.

Packet Switching Protocol

Packet switching protocols establish the rules for node to node communication and application to application indications. The Internet has established TCP/IP is the default standard protocol. This protocol is a combination of two separate protocols.

Transmission control protocol TCP controls the direct links between computer applications and ensures the data arrives and is assembled into the correct order. It is a transport level protocol of the OSI model.

The Internet protocol IP establishes the identification of packets so the destination or source address can determine. It is a packet switching protocol that handles the dividing of the data into small packets. It is a network layer OSI protocol.

World Wide Web addresses, for example www.myweb.com represent an IP address of the location of the computer or hypertext page resource on the Internet. Addresses of computers on the web are known as domain names.

The IP protocol uses forceps at eight that bites you know the address. These bytes are used to address the network and computer on a network.

Role of Protocols and Packet Switching Networks

Protocols play an important role in packet switching networks. In very simple terms, the data must be split up into packets and then the packets reassembled into the correct order at the receiving end. Is a very complex process. Rules are protocols required to govern each stage of this process to ensure that the data is transmitted it is error-free.


Jose: The difference between TCP/IP version 4 and 6:

The Difference Between IPv4 and IPv6 Addresses. An IP address is binary numbers but can be stored as text for human readers. For example, a 32-bit numeric address (IPv4) is written in decimal as four numbers separated by periods. ... IPv6 addresses are 128-bit IP address written in hexadecimal and separated by colons. (So IPv6 can address 4 billion x 4 billion x 4 billion x 4 billion devices)

or 256 000 000 000 000 000 000 000 000 000 000 000 000 different devices.


JSR Notes - FORMER CURRICULUM - 6.4.3 Describe packet switching.:

Once again, lots of good stuff in the text, but I’ll focus you a bit here.

First the analogy. You're in O2 stadium after a concert, with 99 of your friends (...yes, 99. Think Facebook.) There are two ways you can try to make it to the meeting point outside. Option 1: All hold hands, and go together (imagining that many other large groups are doing the same thing...) "Nope, no letting go of hands. Just wait for that group to pass..." etc.
Option 2: Everyone just go as quickly as they can, whatever route they choose, squeezing in and out of people along the way, and re-assemble back at the meeting point. (And the sad part of this analogy: "Anyone who doesn't make it there in 5 minutes, we're leaving without you!")

(Actually, analogies of traffic from one part of town to another is more accurate, or even the way a "peloton" of cyclists in a race splits up some times. But the analogy above is a bit more fun.)

Certainly you should be aware of the various things that need to be in each packet and why. But the big thing here is what the teaching note focuses in on: the “switching” in packet switching. Yes, in packet switching the data is grouped into small packets which are sent. But the reason that they are divided up into smaller groups in the first place is that those packets can then switch the route that they are taking depending on traffic in given routes. In fact, theoretically, even with a very large file being downloaded to your computer the packet switching way could have each and every packet following a different route.

And in terms of the possible routes a packet can take, it’s almost infinite. The analogy of flying from New York to LA is a good one; there is not just one direct way to do that trip; you can literally come up with tens of thousands of different routes through major airports and minor along the way, but always be going in a Westerly direction. Doing a “traceroute” in the Network utility of the Mac OS is an interesting visual way to see just how many “hops” there can be from node to node as a packet finds its way (or not) to its destination.

And that’s the other teaching note not to forget: Packets can indeed get “lost”; that’s why the “time to live” information is decremented as it makes its way around.