← IB Computer Science

A2.3 · Book pp. 136–143

Data transmissions

Your level

A video you stream arrives as thousands of tiny packets, which may each take a different route. This section follows them from address to destination.

What you need to know

PointTopicLevel
A2.3.1Types of IP addressingSL + HL
A2.3.2Types of media for data transmissionSL + HL
A2.3.3How packet switching sends dataSL + HL
A2.3.4Static and dynamic routing in LANsHL

Next: IP addresses →

A2.3.1 Types of IP addressing

IPv4 and IPv6

IPv4IPv6
Size32 bits (4 bytes)128 bits (16 bytes)
Written asFour decimal numbers, 0–255Eight groups of four hex digits
Example192.168.0.12001:0db8:85a3:0000:0000:8a2e:0370:7334
Possible addresses2³² ≈ 4.3 billion2¹²⁸ ≈ 3.4 × 10³⁸

✏️ Book correction

The book describes IPv6 as “eight groups of four bytes”. Each group is four hexadecimal digits, which is two bytes. Eight groups of two bytes makes the 16 bytes (128 bits) in total.

Public and private

Public addresses are unique worldwide, for websites and routers that face the internet. Private addresses are for use inside a network and cannot be routed on the internet. The IPv4 ranges are 10.0.0.0–10.255.255.255, 172.16.0.0–172.31.255.255 and 192.168.0.0–192.168.255.255.

Static and dynamic

A static address never changes, which servers need so that clients can find them. A dynamic address is given out by DHCP from a pool, which uses a limited supply of addresses efficiently.

Network address translation (NAT)

IPv4 addresses have all but run out. NAT lets many private devices share one public address. It also hides internal addresses from the outside.

🔬 Lab: a NAT router

InsideSeen outside as

Send a request from a device. The router gives each connection its own public port, so replies can find their way back.

Check yourself
  1. How many bytes is 2001:0db8:85a3:0000:0000:8a2e:0370:7334? 16. Each hex digit is 4 bits, and there are 32 digits.
  2. Does your phone’s Wi-Fi address appear on websites you visit? No, they see your router’s public address.

Next: transmission media →

A2.3.2 Types of media

FactorFibre opticTwisted pairWireless
BandwidthHighest, up to terabits per secondTypically gigabit, up to about 10 Gb/sSeveral Gb/s shared between devices
InterferenceImmune to electromagnetic interferenceSusceptible, especially unshieldedVery susceptible, and walls weaken it
RangeTens or hundreds of kmAbout 100 mAbout 90 m at best
SecurityVery hard to tap undetectedNeeds physical accessCan be intercepted from nearby
CostHighestLowLow, with no cabling
InstallationSpecialist skills, and the cable is fragileSimple and flexibleSimplest
Typical useUndersea links, backbones, data centresOffices and homesHomes, campuses, mobile devices

Attenuation is signal loss with distance. Fibre has very little, which is why it runs across ocean floors.

🔬 Lab: choose your medium

Tick what the job needs.

✏️ Book correction

The book says microwave ovens use 2.4 GHz because it is water’s resonant frequency. That is a popular myth. Water absorbs across a wide range of frequencies, and 2.4 GHz was chosen largely because that band was set aside for such uses and penetrates food well. The practical point stands: a leaking oven can disturb 2.4 GHz Wi-Fi.

Next: packet switching →

A2.3.3 Packet switching

Older circuit switching held a dedicated channel for a whole session. Packet switching breaks data into packets that share the links.

  1. Segmentation: data is split into packets, typically up to 1500 bytes each (the MTU) including headers.
  2. Headers: each has the source and destination addresses, a sequence number and a checksum.
  3. Routing: each packet travels independently. Routers choose the next hop using routing tables, and switches forward within a LAN using MAC addresses.
  4. Reassembly: the destination puts the packets back in order and asks for any that are missing or corrupted.

🔬 Lab: packets on their way

Press Send.

⚠️ Common mistake

Do not mix up routers and switches. Routers join networks using IP addresses. Switches work inside one network using MAC addresses.

Next: routing →

Next: review →

HL A2.3.4 Static and dynamic routing

StaticDynamic
Routes set byAn administrator, by handAn algorithm, as routers share information
Failed linkStays broken until someone updates itTraffic is rerouted automatically
OverheadNo extra processing or bandwidthExtra processing and bandwidth
ScaleSmall, stable networksLarge, changing networks
BehaviourPredictableBrief inconsistencies during convergence

🔬 Lab: fail a router

Numbers are link costs. Select R2, R3 or R4 to fail or repair it, and send data from R1 to R5.

Static route
Dynamic route

Next: review →

Quick quiz

1. How long is an IPv4 address?
2. Why was IPv6 created?
3. Which device needs a static IP address most?
4. What does NAT do?
5. A factory has electrically noisy motors. Which cable suits it?
6. What does a packet header contain?
7. How can packets of one file arrive out of order?
8. Why is packet switching more efficient than circuit switching?

HL Extra questions

1. Who updates a static routing table?
2. What is a benefit of static routing?
3. What does convergence mean in dynamic routing?

Exam-style questions

These are written for this site in the style of Paper 1. Answer on paper first, then open the mark points.

  1. Describe the main purpose of network address translation. [2]

    Mark points
    • It converts private IP addresses to a public address, and back [1].
    • So many devices can share one public address, which conserves IPv4 addresses [1].
  2. Outline why a home laptop usually has a dynamic IP address. [2]

    Mark points
    • A DHCP server assigns it from a pool when it connects [1].
    • Addresses can be reused, which suits devices that join and leave [1].
  3. Describe one advantage and one disadvantage of fibre-optic cable. [2]

    Mark points
    • Advantage: very high bandwidth, or immunity to interference [1].
    • Disadvantage: high cost, or fragile and specialist to install [1].
  4. A school links two buildings 400 m apart, and needs Wi-Fi inside each. Recommend media and justify your answer. [4]

    Mark points
    • Fibre optic between buildings [1], as twisted pair reaches only about 100 m [1].
    • Wireless access points inside [1], which give mobility for portable devices without new cabling [1].
  5. Explain how a large file is sent using packet switching. [4]

    Mark points
    • It is split into packets with headers that include addresses and sequence numbers [1].
    • Routers forward each packet independently, by the best available route [1].
    • Packets can arrive out of order, so the destination reorders them [1].
    • Missing or corrupted packets are requested again [1].

HL Exam-style questions

  1. Explain one advantage of static routing compared with dynamic routing. [3]

    Mark points
    • Routes are set manually, so traffic follows a predictable path [1].
    • Routers need not exchange updates [1].
    • So no extra processing or bandwidth is used [1].
  2. Explain how dynamic routing deals with a failed link. [4]

    Mark points
    • Routers regularly share information about their connections [1].
    • The failure is noticed by neighbouring routers and passed on [1].
    • Routing tables are updated automatically with a new path [1].
    • Traffic continues along that path, with possible brief inconsistency during convergence [1].