Chapter 7 Exercises · Problems, a Lab and an Interview

Link layer ✎ Practice Kurose & Ross pp. 597–606 · ~38 min read

Where you are

  • Application layer
  • Transport layer
  • Network layer
  • Link layer you are here
  • Physical layer

Thirty-one review questions and fourteen problems, every one of them checkable here — plus the chapter’s Wireshark lab and its closing interview.

How to use this page

  • Review questions R1–R31 — mostly recall, grouped as the book groups them.

  • Problems P1–P14 — the CDMA (Code Division Multiple Access) arithmetic, an 802.11 timing calculation, two scheduling problems with real numbers, and four mobility designs.

  • The Wireshark lab — what it captures, and why this site cannot ship it.

  • An interview with Deborah Estrin — the chapter’s closing card.

Why this matters

Three of this chapter’s problems are worth more than the rest put together, because each one makes you compute something the prose only asserts.

P8 builds the hidden terminal problem out of four nodes and a clock, and the answer to part (c) is exactly half the answer to part (b). P10 turns “fairness” from a word into three different numbers. P14 makes you discover triangle routing a second time, by building it yourself without being told that is what you are doing.

Review questions

Review questions R1–R31

The book groups these by section. Answer before revealing — a solution read early is a solution not learned.

  1. R1Infrastructure mode, and the alternative

    What does it mean for a wireless network to operate in "infrastructure mode"? If it is not in infrastructure mode, what mode is it in, and how do the two differ?

    Hint: Ask what the wireless hosts are connected to, and who provides the usual network services.

  2. R2The taxonomy of section 7.1

    What are the four types of wireless network identified in the taxonomy? Which have you used?

    Hint: Two questions, each with two answers: is there infrastructure, and is it one hop or many?

  3. R3Three impairments of a wireless channel

    What is the difference between path loss, multipath propagation, and interference from other sources?

    Hint: One is about distance, one about geometry, one about other transmitters.

  4. R4Holding the loss probability steady as a device moves away

    A device moves further from its base station. What two actions can the base station take so that the frame loss probability does not rise?

  5. R5Beacon frames

    Describe the role of beacon frames in 802.11.

    Hint: They are how a station discovers that an access point exists at all.

  6. R6True or false: RTS/CTS before every data frame

    Before an 802.11 station transmits a data frame, it must first send an RTS frame and receive a CTS frame.

  7. R7Why 802.11 acknowledges and Ethernet does not

    Why are acknowledgements used in 802.11 but not in wired Ethernet?

    Hint: Think about bit error rates, and about what a sender can detect while it is sending.

  8. R8True or false: the same frame structure

    Ethernet and 802.11 use the same frame structure.

  9. R9The RTS threshold

    Describe how the RTS threshold works.

    Hint: It is a length, and it decides whether the reservation is worth paying for.

  10. R10If RTS and CTS were as long as DATA and ACK

    Suppose the RTS and CTS frames were as long as the standard DATA and ACK frames. Would there be any advantage to using them? Why or why not?

    Hint: The whole benefit of RTS/CTS is that a collision between two of them is cheap.

  11. R11The spoofed MAC address in 802.11 mobility

    A station moves from one BSS to another within the same subnet, and the access points are interconnected by a switch. Why might an access point need to send a frame with a spoofed MAC address?

    Hint: Recall from section 6.4.3 how a switch decides where to forward a frame.

  12. R12A Bluetooth master against an 802.11 base station

    What are the differences between a master device in a Bluetooth network and a base station in an 802.11 network?

    Hint: Consider who is permanent, who decides when a device may transmit, and what each is connected to.

  13. R13The base station in 4G/5G

    What is the role of the base station? Which other elements does it communicate with directly in the control plane, and in the data plane?

    Hint: Section 7.4.1 for the role; section 7.6.1 for who it talks to during attachment and handover.

  14. R14The IMSI

    What is an International Mobile Subscriber Identity?

  15. R15The HSS

    What is the role of the Home Subscriber Service? Which elements does it communicate with directly in the control plane, and in the data plane?

  16. R16The MME

    What is the role of the Mobility Management Entity? Which elements does it communicate with directly in the control plane, and in the data plane?

  17. R17The two tunnels, at home and away

    Describe the purpose of the two data-plane tunnels. When the device is attached to its own home network, where does each end of each tunnel terminate?

    Hint: Section 7.6.1 builds them; the answer for a device at home differs only in where the far end happens to sit.

  18. R18The three LTE link-layer sublayers

    What are the three sublayers of the link layer in the LTE protocol stack, and what does each do?

  19. R19FDMA, TDMA, or both?

    Does the LTE wireless access network use FDMA, TDMA, or both?

  20. R20The two sleep modes

    Describe the two sleep modes of a 4G/5G device. In each, will the device still be associated with the same base station when it wakes?

    Hint: The difference between the two is how much state is kept while asleep.

  21. R21Visited network and home network

    What is meant by a "visited network" and a "home network"?

  22. R22Three differences between 4G and 5G

    List three important differences between 4G and 5G cellular networks.

  23. R23Roaming

    What does it mean that a mobile device is "roaming"?

  24. R24Handover

    What is meant by "hand over" of a network device?

  25. R25Direct against indirect routing

    What is the difference between direct and indirect routing to a roaming device?

  26. R26Triangle routing

    What does "triangle routing" mean?

  27. R27Tunnels at home against tunnels while roaming

    Describe the similarity and the differences in tunnel configuration when a device is in its home network, and when it is roaming.

  28. R28Who decides to hand over, and who picks the target

    Which element decides to initiate a handover, and which chooses the target base station?

  29. R29The forwarding path before, during and after handover

    Describe how and when the forwarding path of datagrams entering the visited network changes, before, during and after handover.

    Hint: Follow the seven messages, and notice that step 4 exists precisely to cover the gap.

  30. R30Mobile IP elements and their 4G/5G equivalents

    Give the closest 4G/5G equivalent of each: home network, foreign network, permanent IP address, home agent, foreign agent, data-plane forwarding, access point, WLAN.

    Hint: This is Table 7.3, read from the other side.

  31. R31Three approaches for TCP over a wireless link

    What are three approaches that avoid a single wireless link degrading an end-to-end TCP connection?

Problems

Problems P1–P14

Numeric answers are checked with a 1 per cent tolerance. Several of these are best done on paper first.

  1. P1CDMA output with a different code

    Figure 7.5 is the single-sender CDMA example. Its data bits are d₀ = 1 and d₁ = −1, and the code shown in the figure is (1, 1, 1, −1, 1, −1, −1, −1). Suppose instead the sender's code were (1, −1, 1, −1, 1, 1, 1, −1).

    What would the sender's output be for the two data bits shown?

    Hint: Equation 7.1 is Z[i][m] = d[i] · c[m]. There is nothing more to it than multiplying.

  2. P2Sender 2's output to the channel

    In Figure 7.6, sender 2's code is (1, −1, 1, 1, 1, −1, 1, 1) and both of its data bits are 1: d²₀ = 1 and d²₁ = 1.

    What is sender 2's output to the channel, before it is added to sender 1's signal?

  3. P3Recovering sender 2 from the aggregate signal

    Sender 1 uses code (1, 1, 1, −1, 1, −1, −1, −1) with d¹₀ = 1 and d¹₁ = −1. Sender 2 uses code (1, −1, 1, 1, 1, −1, 1, 1) with d²₀ = 1 and d²₁ = 1. The channel carries the sum of the two.

    a.In slot 0 the channel carries 2, 0, 2, 0, 2, −2, 0, 0. Apply equation 7.3 with sender 2's code. What value of d²₀ do you recover?

    b.In slot 1 the channel carries 0, −2, 0, 2, 0, 0, 2, 2. What value of d²₁ do you recover?

  4. P4Two codes that do not work

    For the two-sender, two-receiver example, give two CDMA codes of +1 and −1 values that do NOT allow the receivers to extract the original bits.

    Hint: The property that makes recovery work is that the two codes have an inner product of zero. Break that.

  5. P5Two access points in one café

    Two ISPs provide WiFi in one café, each operating its own access point with its own IP address block.

    a.Both access points are accidentally configured to use channel 11. Will 802.11 completely break down? What happens when two stations associated with different ISPs transmit at the same time?

    b.Now one access point uses channel 1 and the other channel 11. How does your answer change?

  6. P6Why step 4 of CSMA/CA returns to step 2

    A station that has just transmitted successfully begins the protocol for its next frame at step 2 rather than step 1 — that is, it takes a random backoff even though the channel may be idle. What was the design reason?

    Hint: Ask what would happen to the other stations if a busy sender never paused.

  7. P7The time to send one reserved frame

    An 802.11b station always reserves the channel with RTS/CTS. It suddenly wants to send 1,500 bytes of data, all other stations are idle, propagation delay is ignored and there are no bit errors.

    As a function of SIFS and DIFS, how long does it take to transmit the frame and receive the acknowledgement?

    Hint: Write the sequence of events in order, and note which gap separates each pair.

  8. P8Scheduling a line of four wireless nodes

    Four wireless nodes A, B, C, D in a line. A is heard only by B; B is heard by A and C; C is heard by B and D; D is heard only by C. Time is slotted, one message per slot, and a node may send, receive one message, or stay silent in a slot. Two simultaneous transmissions audible at a node collide there.

    a.With an omniscient controller and no other traffic, what is the maximum rate, in messages per slot, at which data can be transferred from C to A?

    b.Now A sends to B and D sends to C. What is the combined maximum rate?

    c.Now A sends to B and C sends to D. What is the combined maximum rate?

    d.Repeat (a), (b) and (c) with the wireless links replaced by wired point-to-point links.

    e.Return to the wireless case, and now every data message is answered by an ACK that also occupies one slot. Repeat (a), (b) and (c).

    Hint: Draw the ACK's route as carefully as the data's, and check what it collides with.

  9. P9The Bluetooth frame format

    Describe the Bluetooth frame format — this needs reading outside the book. Is there anything in it that inherently limits a piconet to eight active nodes?

    Hint: Look for a field that identifies which slave a slot belongs to, and count how many values it can hold.

  10. P10Scheduling against three fairness rules

    An idealised LTE downstream channel, slotted in time across F frequencies. Four nodes A, B, C, D are reachable at 10, 5, 2.5 and 1 Mbps respectively, each rate assuming the base station uses every slot on every frequency for that one node. The base station has infinite data for each node.

    a.What is the maximum rate at which the base station can send, if it may choose any node in each slot? (Mbps)

    Mbps

    b.Now every node must receive an equal amount of data each second. What is the average transmission rate in that case? (Mbps)

    Mbps

    c.Now the rule is only that no node may receive more than twice as much as any other. What is the average transmission rate? (Mbps)

    Mbps
  11. P11Advertising a route per mobile user

    The rejected proposal from section 7.5: a foreign network advertises a highly specific route to the mobile user, and the existing routing infrastructure propagates it. When the user moves, the new foreign network advertises and the old one withdraws.

    a.Will other routers be able to route datagrams to the new foreign network as soon as it begins advertising?

    b.Is it possible for different routers to believe that different foreign networks contain the mobile user?

    c.Discuss the timescale over which other routers will eventually learn the path.

  12. P12Handover and end-to-end delay

    What effect will handover have on the end-to-end delay of datagrams between source and destination?

    Hint: Look again at step 4 of the seven, and at what happens to the path afterwards.

  13. P13Designing a handover between two visited networks

    A device attaches to visited network A, with indirect routing from its home network H. It then moves out of range of A and into range of visited network B. After the handover, the tunnel from H terminates in network B.

    Sketch the steps needed, identifying each network element and the network it belongs to.

    Hint: The within-network handover of section 7.6.1 is the template. Ask which of its steps now cross a network boundary.

  14. P14Anchoring the tunnel in the first visited network

    The same move as P13, but now the tunnel from home network H to visited network A stays in place, and A acts as an anchor point. This is how 2G GSM routed circuit-switched voice calls to a roaming phone.

    Sketch the steps, then give one advantage and one disadvantage compared with your answer to P13.

Wireshark Lab: WiFi (IEEE 802.11 wireless LAN)

The book’s lab for this chapter captures the 802.11 frames exchanged between a wireless laptop and an access point. It asks you to identify beacon frames, the association exchange, and the data frames that follow.

Why this one is not rebuilt here

Every other Wireshark lab on this site ships as a canned capture in the packet inspector, because that traffic is ordinary wired traffic and can be reproduced faithfully.

An 802.11 capture cannot. It needs a radio interface placed in monitor mode. What it records then depends on the channel, on where the capturing machine is standing, and on which nearby networks happen to be busy. A canned file would show one arbitrary radio environment while implying it is the general case.

Run this one yourself if you have a machine that supports monitor mode. Three things to look for. The beacon frames, arriving roughly ten times a second from every access point in range. The association request and response. And then the data frames, where you can confirm that each carries the four address fields of section 7.3.3 rather than Ethernet’s two.

An interview with Deborah Estrin

Voices from the field — Deborah Estrin

Deborah Estrin is Professor of Computer Science and Associate Dean for Impact at Cornell Tech, and Professor of Public Health at Weill Cornell Medical College. Her early work was on network protocols — multicast and interdomain routing, including PIM, with Steve Deering, Mark Handley and Van Jacobson. In 2002 she founded the Center for Embedded Networked Sensing at UCLA, which moved from sensor networks for environmental monitoring to participatory sensing and mobile health.

On what the work has in common. The challenges in multicast routing, environmental sensing and mobile health are as different as their subjects, she says. Each still required keeping “our eyes open to whether we have the problem definition right” while iterating between design and deployment. None could be solved by analysis, simulation or laboratory experiment alone.

On predictions. She notes that an earlier edition of this interview predicted the end of feature phones and the spread of embedded SIM cards. The first happened; the second happened partly, with many devices instead using embedded WiFi and other short-range links to local hubs. She did not anticipate consumer wearables or voice agents such as Siri and Alexa.

On where the difficulty has moved. Her sharpest observation is about layers. In the early Internet, architecture lived at layer 4 and below, with applications sitting on top as separate monolithic things. Now, she says, “data and analytics dominate transport” — and the new problems are above the stack, not inside it. Machine-learning systems favour scale, particularly when they depend on continuous engagement for revenue, and the resulting information ecosystem is more monolithic than in earlier decades. She calls that a challenge for networking, for the Internet, and for society.

On advice. Build a strong academic foundation, balanced with every piece of real-world experience you can get. Then choose problems you care about, and teams you can learn from.

Worth noticing. Software defined networking is covered in chapter 5, and section 7.6 named it as the likely future of the 5G control plane. Its adoption went “well beyond what I ever anticipated” — from someone who helped design the protocols it replaced.

What these problems are really testing

  • Orthogonal codes are what makes CDMA work, and P4 is how you prove it. When the inner product of two codes is not zero, each receiver recovers its own bit plus a fraction of the other sender’s.

  • P8(b) gives 2 messages per slot and P8(c) gives 1, on the same four nodes with the same links. The difference is entirely the hidden terminal geometry, and the wired version of (c) recovers the missing half.

  • Fairness has a price you can compute. Greedy scheduling gives 10 Mbps, strictly equal shares 2.35, and a factor-of-two allowance 2.92 — so relaxing the rule slightly buys about a quarter more throughput.