22-Elec-B4 Information Technology Networks · December 2015
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper format. Professional Engineers of Ontario, Annual Examinations — December 2015, 07-Elec-B4 Information Technology Networks. Three hours, closed book, a PEO-approved non-programmable calculator permitted. Five questions; any four constitute a complete paper worth 100 marks, and marks are printed in the left margin against each sub-part. All five questions are solved here, because the set is a study resource rather than an exam attempt.
Reference texts.
Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.
Given. Bluetooth operates in the 2.4 GHz ISM band with 79 RF channels of 1 MHz, hopping 1600 times per second; the 802.11b DSSS physical layer has a slot time of 20 µs and a SIFS of 10 µs. Find. The membership rules and spectrum-sharing mechanism of a piconet, the services offered by a BSS and an ESS, and how inter-frame spacing prioritises access in WiFi.
A piconet is the elementary Bluetooth cell. It is a star, not a peer group: exactly one device is the master, and it is the master purely by role rather than by capability — any unit can take the part. The master matters because the piconet's frequency-hopping sequence and slot phase are computed from the master's 48-bit device address (BD_ADDR) and its free-running native clock (CLK). Every other member therefore has to slave its own clock offset to the master's, and that is precisely what makes it a slave.
An active slave holds a 3-bit logical transport address (LT_ADDR) that the master writes into the packet header to say which slave is being addressed. Code $000$ is reserved for broadcast, so the number of simultaneously active slaves is $2^{3}-1=7$. A member with no immediate traffic can be moved to the parked state: it surrenders its LT_ADDR, drops to a very low duty cycle, and wakes only to track the beacon train so that it stays synchronised to the hop sequence and can be un-parked in a few slots. A parked device is identified instead by an 8-bit parked-member address (PM_ADDR), giving $2^{8}-1=255$ parked members. The intermediate sniff and hold low-power modes keep the LT_ADDR and so count against the seven.
The permitted population is therefore one master, at most seven active slaves, and at most 255 parked slaves — a maximum membership of $1+7+255=263$ devices, of which only eight can be exchanging data at any instant. A unit may be a slave in one piconet and simultaneously the master of another; the resulting interconnected structure is a scatternet, and it is how Bluetooth escapes the eight-device ceiling.
Sharing in a piconet happens on two axes at once, and it is worth separating them. Frequency hopping shares the band between piconets and against interference; time-division duplex polling shares the current channel between the master and its slaves.
Taking the frequency axis first, the 2.4 GHz ISM band is divided into 79 channels of 1 MHz, centred at $f_{k}=2402+k$ MHz for $k=0,1,\dots,78$. The radio changes channel 1600 times per second, so each dwell — one Bluetooth slot — lasts
$$T_{\text{slot}}=\frac{1}{1600\ \text{s}^{-1}}=625\ \mu\text{s}.$$The sequence of channels is a pseudo-random permutation generated from the lower 28 bits of the master's BD_ADDR together with its clock. Every member of the piconet runs the same generator with the same seed, so all of them arrive on the same channel in the same slot without any channel negotiation. Two co-located piconets have different masters, hence different seeds and different sequences, so they interfere only in the roughly one slot in 79 where their hops coincide — and that slot is recovered by the ordinary retransmission mechanism. This is what makes the band self-sharing.
On the time axis the master polls. It transmits only in even-numbered slots, and a slave transmits only in the odd slot immediately following the packet that addressed it, so master and slave strictly alternate and each direction receives $1600/2=800$ slots per second. A slave that is not addressed stays silent, which is why no contention protocol is needed inside a piconet at all.
Detailed example. Suppose the generator produces the channel sequence $f_{21},f_{45},f_{9},f_{62},f_{30},f_{77},f_{14},f_{52}$ for slots $k$ through $k+7$, with $k$ even. In slot $k$ the master transmits a one-slot DM1 packet to slave S3 on channel 21; in slot $k+1$ S3 answers on channel 45. In slot $k+2$ the master polls S1 on channel 9 and S1 replies in slot $k+3$ on channel 62, and so on. Every packet in this example is one slot long, so the radio takes a fresh channel every 625 µs.
Multi-slot packets are the interesting variation. A DH3 or DH5 packet occupies three or five consecutive slots, and the radio holds a single channel for the whole packet:
$$T_{\text{DH3}}=3\times625\ \mu\text{s}=1875\ \mu\text{s},\qquad T_{\text{DH5}}=5\times625\ \mu\text{s}=3125\ \mu\text{s}.$$If the master had instead sent a DH5 packet to S1 starting in slot $k+2$, the radio would have stayed on channel 9 for slots $k+2$ to $k+6$, and the four intervening channels $f_{62},f_{30},f_{77},f_{14}$ would simply have been skipped. The sequence generator is free-running, so when S1 replies in slot $k+7$ it does so on $f_{52}$ — the channel that slot $k+7$ was always going to use. Longer packets therefore trade hopping diversity for payload efficiency without ever letting the piconet lose synchronism.
The Basic Service Set is the fundamental building block of an 802.11 network: a group of stations whose medium access is coordinated by one instance of the access function. In infrastructure mode it is one access point plus the stations associated with it, and every frame between two stations passes through the AP; in an independent BSS (IBSS, or ad hoc network) there is no AP and the stations communicate directly.
What a BSS provides are the station services, which live in every 802.11 station including the AP:
Mobility inside a BSS is the trivial “no transition” case: a station may move about, but it stays associated with the same AP.
An Extended Service Set is two or more BSSs joined by a distribution system (typically a wired Ethernet backbone) and advertised under a single ESSID. To the logical link control layer above, the whole ESS looks like one IEEE 802 LAN, so a station may move between BSSs without the upper layers noticing. The services an ESS adds are the distribution system services:
The distinction that earns the marks is therefore: a BSS provides everything needed to move a frame within one coverage area securely and reliably, while an ESS provides everything needed to make several such areas behave as one network as stations move between them.
WiFi shares the medium with the Distributed Coordination Function, which is CSMA with collision avoidance rather than collision detection. The reason for the difference from Ethernet is physical: a half-duplex radio cannot listen to a weak distant signal while its own transmitter is running, and in any case a collision that matters happens at the receiver, not at the transmitter. Collisions are therefore avoided in advance and inferred afterwards — every unicast data frame is positively acknowledged, and a missing acknowledgement is the collision signal.
The access procedure runs as follows. A station with a frame to send senses the medium, both physically (energy and preamble detection) and virtually (the network allocation vector loaded from the duration field of any frame it overhears). If the medium has been idle for a full DIFS the station may transmit. If it was busy, the station waits for the medium to go idle for DIFS and then counts down a random backoff of an integral number of slot times drawn uniformly from $[0,\mathrm{CW}]$, freezing the counter whenever the medium goes busy again and resuming when it is idle for DIFS once more. The contention window starts at $\mathrm{CW}_{\min}=31$ slots and doubles after each failed attempt up to $\mathrm{CW}_{\max}=1023$, resetting on success.
Inter-frame spacing is what turns this single contention mechanism into a priority system. Because every station starts its wait from the same instant — the moment the medium goes idle — a shorter mandated gap simply wins. On the 802.11b DSSS PHY, with a slot time of $20\ \mu\text{s}$:
$$\mathrm{SIFS}=10\ \mu\text{s},\qquad \mathrm{PIFS}=\mathrm{SIFS}+T_{\text{slot}}=30\ \mu\text{s},\qquad \mathrm{DIFS}=\mathrm{SIFS}+2\,T_{\text{slot}}=50\ \mu\text{s}.$$The average first backoff adds $\tfrac{1}{2}\mathrm{CW}_{\min}T_{\text{slot}}=\tfrac{31}{2}\times20=310\ \mu\text{s}$ on top of DIFS, which is the dominant per-frame overhead at low load and the reason 802.11 efficiency falls sharply as frames get shorter.
$$\boxed{\mathrm{SIFS}\ (10\ \mu\text{s})\ \lt\ \mathrm{PIFS}\ (30\ \mu\text{s})\ \lt\ \mathrm{DIFS}\ (50\ \mu\text{s})\ \lt\ \mathrm{EIFS}}$$| Quantity | Value |
|---|---|
| Masters per piconet | exactly 1 |
| Active slaves per piconet | up to 7 (3-bit LT_ADDR, 000 reserved) |
| Parked members per piconet | up to 255 (8-bit PM_ADDR) |
| Maximum membership | 263 devices, 8 active |
| Hop rate / slot length | 1600 hops/s, 625 µs per slot |
| RF channels | 79 × 1 MHz in the 2.4 GHz ISM band |
| Slots per second per direction | 800 (TDD alternation) |
| DH3 / DH5 dwell on one channel | 1875 µs / 3125 µs |
| BSS services | authentication, deauthentication, confidentiality, MSDU delivery, QoS scheduling |
| ESS services | association, reassociation, disassociation, distribution, integration |
| 802.11b SIFS / PIFS / DIFS | 10 / 30 / 50 µs (slot 20 µs) |
| Mean first backoff | 310 µs |