1 of 42

Discussion 13

1

CS 168, Summer 2025 @ UC Berkeley

Slides credit: Sylvia Ratnasamy, Rob Shakir, Peyrin Kao, Iuniana Oprescu

Wireless and Cellular 📱

2 of 42

Logistics

  • Last discussion 🥲
  • Final on August 13th, 3-6pm (put it in your calendar)!
    • You can bring four 8.5” x 11” cheat sheets, each two-sided (8 sides total)
    • All lectures, discussions, and projects are included in the exam scope
  • Please fill out course evaluations for extra credit!

3 of 42

Wireless

  • What is different about wireless?

4 of 42

What is wireless communication?

Transmit information without contact (e.g. with EM waves)

5 of 42

Wireless Signals

Wireless signals are not packets of data floating in space.

Wireless signals are waves that propagate in all directions.

  • Analogy: Ripples in a pond.
  • Waves interact with each other, and with the environment.

A

B

6 of 42

How is wireless different from wired?

Wireless…

  • Is a fundamentally shared medium
  • Signals attenuate significantly with distance
  • Environments can change rapidly
  • Packet collisions are hard to detect

7 of 42

How is data encoded?

Physical Layer Modulation: Physical variations in signals map to digital values (i.e. 1 or 0)

8 of 42

Encoding Data Over Wireless Links

Wired link: Encode bits as electrical signals.

  • High voltage = 1.
  • Low voltage = 0.

Wireless link:

  • Draw the bits as a wave?
  • Problem: Resulting wave is low-frequency, and hard to transmit.

0 0 1 1 0 0 0 0 0 1 0 1 0 1 1 1 1 0 0 0 0

9 of 42

Encoding Data Over Wireless Links – Modulation

Modulation: Impose our data signal on top of a carrier signal.

  • Carrier signal: A high-frequency, constant wave that contains no information.
  • The combined wave is easy to transmit, and contains our data!

Amplitude Modulation (AM):

1 = Taller wave.

0 = Shorter wave.

Frequency Modulation (FM):

1 = Oscillate fast.

0 = Oscillate slow.

Original signal

+ Carrier signal

= Modulated signal

Other modulation strategies exist.

10 of 42

Path Loss is Messy

Wireless propagation is messy.

  • In theory: Signal propagates in all directions.
  • In real life: Signal strength depends on environment.

Color = strength of signal.

11 of 42

Medium Access Control

  • CSMA
  • RTS/CTS
  • MACA

12 of 42

How to share the same transmission technology?

Key problem: wireless collisions are often unexpected (highly mobile, dynamic environment) and hard to detect (failure is the only indication)

How do we deal with a lack of reliability in networks?

  • end-to-end principle, ensure reliability at endpoints
  • retransmit if no ack
  • coordination

13 of 42

CSMA in Wireless Networks

Key idea: listen for others on the medium and don’t transmit if busy

  • Works great when ranges of involved transmitters/receivers are all overlapping or completely disconnected
  • No collisions!

Notice: Signals propagate in all directions (not just toward the destination).

  • Arrows are just drawn for convenience.

A

C

B

D

14 of 42

CSMA in Wireless Networks

If pairs are in range of each other, no problem!

  • Goal: A→B and C→D.
  • A transmits to B.
  • C detects transmission. Must wait to transmit to D.
  • No collisions! A–B and C–D take turns.

A is quiet now.�My turn!

A

C

B

D

I hear A transmitting!

I'll wait for A to finish.

15 of 42

CSMA in Wireless Networks – Hidden Terminal Problem

Hidden terminal problem: two transmitters can’t hear each other

  • Goal: A→B and C→B.
  • A senses quiet, and starts transmitting.
  • C senses quiet, and starts transmitting.
  • Collision at B!

Problem: A and C are out-of-range. They can't detect each other sending.

A

C

B

All is quiet.�Time to send!

All is quiet.�Time to send!

???

16 of 42

CSMA in Wireless Networks – Exposed Terminal Problem

Exposed terminal problem:

  • Goal: B→A and C→D.
  • B senses quiet, and starts transmitting.
  • C senses a collision and doesn't send.

Notice: We could have actually sent simultaneously.

  • Some areas have collision, but we don't care. No collisions at the receivers.

A

C

B

D

All is quiet.�Time to send!

I hear B.

I'll be quiet.

This would have been okay!�But C didn't send.

17 of 42

MACA (Multiple Access with Collision Avoidance)

MACA fixes these problems problems that arise due to collisions at the sender!

  1. Sender transmits Request to Send (RTS) with length of data.
  2. Receiver transmits a Clear to Send (CTS) with length of data.
    • This tells sender that it's safe to send. No collisions at receiver.
    • This tells everyone in receiver's range to be quiet.

A

B

RTS: "I want to send 1 MB."

CTS: "If you hear this, shut up.�I need to receive 1 MB."

A sends 1 MB.

18 of 42

MACA (Multiple Access with Collision Avoidance) – Solving Hidden Terminal Problem

MACA solves the hidden terminal problem.

  • Goal: A→B, C→B.
  • B now tells everyone in its range to be quiet, using the CTS.
  • C won't send anymore. Collision avoided!

A

C

B

RTS: "I want to send 1 MB."

CTS: "If you hear this, shut up.�I need to receive 1 MB."

B told me to be quiet.�I won't send.

A sends 1 MB.

C would have sent, but MACA saved the day!

19 of 42

MACA (Multiple Access with Collision Avoidance) – Solving Exposed Terminal Problem

MACA solves the exposed terminal problem, under certain assumptions.

  • Goal: B→A and C→D.
  • C hears the RTS and defers for one time slot.
  • C doesn't hear the CTS, so it's out-of-range of the other receiver, and can send.

A

C

B

D

I hear an RTS.�I'll be quiet for 1 time slot�to avoid clobbering the CTS.

RTS: "I want to send 1 MB."

CTS: "If you hear this, shut up. I'm receiving 1 MB."

B sends 1 MB.

C quiet at this time.

I didn't hear the CTS.�I'm not in receiver range.�I can send data!

C can send here too!�(After its own RTS/CTS.)

20 of 42

Cellular

  • Architecture
  • Actions
    • Discovery
    • Attachment
    • Handover
    • Roaming

21 of 42

How does cellular work?

  • Key goal: Mobility
  • Authentication and accountability are also first order goals
  • Two Major Components:
  • Cellular Radio Access Network (RAN): between devices and cell towers
  • Cellular Core: between gateways and internet

22 of 42

How does cellular work?

23 of 42

High-Level View (0/4) – Registration

Step 0: Registration.

  • User registers for the service. Database is updated.

R1

R2

Mobility Manager

Database

P1

24 of 42

High-Level View (1/4) – Discovery

Step 1: Discovery.

  • User wants to connect.
  • User device discovers available towers and picks one.

R1

R2

P1

Database

Mobility Manager

25 of 42

High-Level View (2/4) – Attachment

Step 2: Attachment.

  • Device asks the tower to connect.
  • Tower checks with mobility manager if connection is allowed.

R1

R2

P1

Database

Mobility Manager

26 of 42

High-Level View (2/4) – Attachment

Step 2: Attachment.

  • If manager approves request, it configures a path between user and Internet.

R1

R2

P1

Database

Mobility Manager

27 of 42

High-Level View (3/4) – Data Exchange

Step 3: Data exchange.

  • User can now send and receive data!
  • Packets travel along the path configured in previous step.

R1

R2

P1

Database

Mobility Manager

28 of 42

High-Level View (4/4) – Handover

Step 4: Handover.

  • Device might move away from old tower, closer to a new tower.
  • Device, old tower, new tower, and manager work together to switch towers.

R1

R2

P1

Database

Mobility Manager

29 of 42

High-Level View (4/4) – Handover

Step 4: Handover.

  • Manager configures a new path through the network for the user.
  • Handover must be seamless. We can't interrupt the user's connection!
    • User's IP address should stay the same.

R1

Database

Mobility Manager

R2

P1

30 of 42

High-Level View (4/4) – Handover

After handover, user has a new path through the network.

Step 3 (Data Exchange) and Step 4 (Handover) repeat as the user moves around.

R1

Database

Mobility Manager

R2

P1

31 of 42

Step 4: Handover

5. Connect to new tower using these slots.

2. Here's my signal strength to other towers.

Old Tower

Device

New Tower

1. Your signal strength is low. Measure signal to other towers.

3. User is coming your way...

4. OK. Here are radio slots for the user.

7. Handover complete!

Mobility Manager

6. I'm the new tower for the user.

Update user location in database.�Configure new path between user and Internet.

32 of 42

Roaming

  • Mobility manager in the “visited” network has to check with the “home” network mobility manager for authentication.
  • Can either route data through home network packet gateway or visited network packet gateway

R1

R2

P1

DB

Manager

Home network

R3

DB

Manager

Visited network

Internet

P2

R4

33 of 42

Worksheet

  • True or False
  • Cellular
  • Wireless

34 of 42

Question 1: True or False

35 of 42

Worksheet

  • True or False
  • Cellular
  • Wireless

36 of 42

Question 2: Cellular

37 of 42

Question 2: Cellular

38 of 42

Worksheet

  • True or False
  • Cellular
  • Wireless

39 of 42

Question 3: Wireless

40 of 42

Question 3: Wireless

41 of 42

Question 3: Wireless

42 of 42

Questions?

Feedback Form: https://tinyurl.com/cs168-su25-disc-feedback