ece/cs 439 wireless networks university of illinois at ...ece/cs 439 wireless networks university of...

260
ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign Spring 2010 Instructor: Nitin Vaidya c 2010 Vaidya i

Upload: doananh

Post on 31-Jan-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

ECE/CS 439 Wireless Networks

University of Illinois at Urbana-Champaign

Spring 2010

Instructor: Nitin Vaidya

c© 2010 Vaidya i

Page 2: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Wireless Networks

Nitin H. Vaidya

January 19, 2010

Do not distribute without the author’s permission.

This text is a work-in-progress. Please report any errors to

Nitin Vaidya at [email protected]

c© 2010 Nitin H. Vaidya

Page 3: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

TABLE OF CONTENTS

CHAPTER PAGE

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

1.1 A Brief History of Wireless Communication . . . . . . . . . . . . . . . . . . 1

1.2 The Internet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.3 What makes wireless networks different? . . . . . . . . . . . . . . . . . . . . 5

1.4 Wireless Network Architectures . . . . . . . . . . . . . . . . . . . . . . . . . 7

1.5 Caveat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

1.6 Book Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 The Wireless Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.1 An Example Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.2 Processing at the Transmitter . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.2.1 Digital Representation of Information . . . . . . . . . . . . . . . . . . 11

2.2.2 Packetization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.2.3 Encapsulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.2.4 Error Control Codes (ECC) . . . . . . . . . . . . . . . . . . . . . . . 12

2.2.5 Modulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

2.3 The Wireless Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

2.4 Processing at the Receiver . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

2.5 Throughput Limit for a Wireless Link . . . . . . . . . . . . . . . . . . . . . . 22

2.6 Link Formation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

2.7 SINR-Threshold Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

c© 2010 Vaidya i

Page 4: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

2.8 Path Gain and Path Loss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

2.8.1 Small-Scale Fading . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

2.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3 Distributed Medium Access Control in Wireless Networks . . . . . . . . . . . . . . 29

3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

3.2 Basic MAC Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

3.3 Slotted Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31

3.4 Carrier Sensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3.5 Collision Detection and Avoidance . . . . . . . . . . . . . . . . . . . . . . . 40

3.6 Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

3.7 Overhead of Packet Collisions . . . . . . . . . . . . . . . . . . . . . . . . . . 44

3.8 Solutions for Hidden Terminals . . . . . . . . . . . . . . . . . . . . . . . . . 46

3.9 Reducing Collision Probability . . . . . . . . . . . . . . . . . . . . . . . . . . 54

3.9.1 p-Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

3.9.2 Backoff Intervals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

3.9.3 Responding to Packet Loss . . . . . . . . . . . . . . . . . . . . . . . . 60

3.10 Examples of Random Access MAC protocols . . . . . . . . . . . . . . . . . . 61

4 Topics in Distributed Wireless Medium Access Control . . . . . . . . . . . . . . . 65

4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

4.2 Service Differentiation at MAC Layer . . . . . . . . . . . . . . . . . . . . . . 65

4.2.1 Priority Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

4.2.2 Throughput Fairness . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

4.3 Rate and Power Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

4.4 Rate Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77

4.5 Power Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83

4.5.1 Distributed Power Control . . . . . . . . . . . . . . . . . . . . . . . . 83

4.5.2 Power Control with Interference Margin Dissemination . . . . . . . . 85

4.6 Impact of Directional Antennas . . . . . . . . . . . . . . . . . . . . . . . . . 86

c© 2010 Vaidya ii

Page 5: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

5 Centralized Protocols for Transmission Scheduling in Wireless Networks . . . . . . 88

5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

5.2 Rate Region . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

5.2.1 Rate Region for Downlink Scenario . . . . . . . . . . . . . . . . . . . 90

5.2.2 Rate Region for Uplink Scenario . . . . . . . . . . . . . . . . . . . . . 96

5.2.3 Operating Points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97

5.2.4 Practical Considerations and Approximate Rate Regions . . . . . . . 98

5.3 Centralized Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

5.4 Scheduling For Always Heavily Backlogged Flows . . . . . . . . . . . . . . . 102

5.5 Scheduling for Flows Within Rate Region . . . . . . . . . . . . . . . . . . . . 104

5.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

6 Routing in Wireless Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

6.1 Unicast Routing in Mobile Ad Hoc Networks (MANET) . . . . . . . . . . . 109

6.2 Proactive Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

6.2.1 Link State Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

6.2.2 Distance Vector Routing . . . . . . . . . . . . . . . . . . . . . . . . . 120

6.3 Reactive Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

6.3.1 Handling Link Failures with Reactive Protocols . . . . . . . . . . . . 135

6.3.2 Interaction Between Multiple Route Discoveries . . . . . . . . . . . . 136

6.4 Unidirectional Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

6.5 Optimizations for Reactive Protocols . . . . . . . . . . . . . . . . . . . . . . 144

6.5.1 Allowing Intermediate Hosts to Respond to RREQ . . . . . . . . . . 144

6.5.2 Learning Routes Opportunistically . . . . . . . . . . . . . . . . . . . 145

6.5.3 Sending Replies to Multiple Route Requests . . . . . . . . . . . . . . 146

6.5.4 Expanding Ring Search . . . . . . . . . . . . . . . . . . . . . . . . . . 147

6.5.5 Bounding the Scope of Route Discovery . . . . . . . . . . . . . . . . . 147

6.6 Host Mobility in IPv4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

6.6.1 Mobile IP Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . 152

6.6.2 Data Forwarding in Mobile IP . . . . . . . . . . . . . . . . . . . . . . 152

6.6.3 Multi-Level Indirection . . . . . . . . . . . . . . . . . . . . . . . . . . 155

c© 2010 Vaidya iii

Page 6: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

7 Topics in Routing in Mobile Ad Hoc Networks . . . . . . . . . . . . . . . . . . . . 157

7.1 Geographic Forwarding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

7.1.1 Greedy Geographic Forwarding . . . . . . . . . . . . . . . . . . . . . 157

7.1.2 Location-Aided Graph Traversal . . . . . . . . . . . . . . . . . . . . . 158

7.2 Opportunistic Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

7.3 Network Coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

7.3.1 Network Coding for Two-Way Traffic . . . . . . . . . . . . . . . . . . 161

7.3.2 Opportunistic Routing with Network Coding . . . . . . . . . . . . . . 162

7.4 Multi-Channel Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164

7.5 Hybrid Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165

7.6 MANET Protocol Standards . . . . . . . . . . . . . . . . . . . . . . . . . . . 166

8 Address Assignment in Wireless Networks . . . . . . . . . . . . . . . . . . . . . . 167

8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

8.2 IP Address Assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168

8.2.1 Static Self-Assignment of IP Addresses . . . . . . . . . . . . . . . . . 168

8.2.2 Dynamic Address Assignment Using Address Servers . . . . . . . . . 170

8.2.3 Distributed Dynamic Address Assignment . . . . . . . . . . . . . . . 172

8.2.4 Weak Duplicate Address Detection . . . . . . . . . . . . . . . . . . . 177

8.2.5 Passive Duplicate Address Detection . . . . . . . . . . . . . . . . . . 181

8.3 MAC Layer Address Assignment . . . . . . . . . . . . . . . . . . . . . . . . 182

8.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182

9 TCP Over Wireless . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

9.2 TCP Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

9.2.1 TCP Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . . . 186

9.2.2 Detection of Packet Loss . . . . . . . . . . . . . . . . . . . . . . . . . 193

9.2.3 Congestion Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194

9.3 Performance of TCP over wireless links . . . . . . . . . . . . . . . . . . . . . 198

c© 2010 Vaidya iv

Page 7: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

9.4 Improving TCP Performance over Last-Hop Wireless Routes . . . . . . . . . 200

9.5 Link Layer Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202

9.6 Split Connection Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209

9.7 TCP-Aware Link Layer Retransmission . . . . . . . . . . . . . . . . . . . . . 213

9.8 Impact of Long Outages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217

9.9 TCP over Ad Hoc Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . 219

10 Capacity of Wireless Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

10.1 Arbitrary Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

10.2 Upper Bound on Transport Capacity of Arbitrary Networks . . . . . . . . . 223

10.3 Lower Bound on Transport Capacity of Arbitrary Networks . . . . . . . . . . 225

10.4 Random Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227

10.5 Throughput Capacity of Random Networks . . . . . . . . . . . . . . . . . . . 227

10.5.1 Upper Bound (Informal Argument) . . . . . . . . . . . . . . . . . . . 228

10.5.2 Lower Bound Construction . . . . . . . . . . . . . . . . . . . . . . . . 229

10.5.3 Impact of Area Scaling . . . . . . . . . . . . . . . . . . . . . . . . . . 231

10.6 Impact of Channelization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232

10.7 Impact of Infrastructure on Capacity . . . . . . . . . . . . . . . . . . . . . . 236

10.8 Capacity with Mobility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236

APPENDIX A Error Control Codes . . . . . . . . . . . . . . . . . . . . . . . . . . 238

APPENDIX B Frequency-Domain Representation of Signals . . . . . . . . . . . . 244

REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247

c© 2010 Vaidya v

Page 8: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

LIST OF FIGURES

Figure Page

1.1 Protocol layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2 An example network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.3 Wireless network architectures: (a) infrastructure-based, (b) infrastructure-less, (c) hybrid. AP denotes an access point. . . . . . . . . . . . . . . . . . . 8

2.1 Voice-over-IP over a wireless link . . . . . . . . . . . . . . . . . . . . . . . . 10

2.2 A digital communication link . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.3 Bandwidth W of a real signal . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3.1 Window of vulnerability: Illustration assumes negligible propagation delays . 32

3.2 Unsynchronized slots (illustration assumes that propagation delays are negli-gible) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3.3 Throughput comparison of synchronized and unsynchronized slots: In bothgraphs, unsynchronized slots result in lower throughput . . . . . . . . . . . . 35

3.4 Carrier sensing using CS threshold . . . . . . . . . . . . . . . . . . . . . . . 37

3.5 Example for carrier sensing: The dark box in the figure depicts a wall . . . . 39

3.6 Exposed terminals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

3.7 Simultaneous transmission during (t − δ, t + δ) can lead to a collision. . . . 42

3.8 Retransmission mechanism for reliability . . . . . . . . . . . . . . . . . . . . 44

3.9 Multiple interferers may be present . . . . . . . . . . . . . . . . . . . . . . . 47

3.10 Protecting Ack transmission when using busy-tone and carrier sensing . . . . 50

3.11 Using RTS-CTS handshake to overcome hidden terminal problem . . . . . . . 51

c© 2010 Vaidya vi

Page 9: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

3.12 Space reserved by virtual carrier sensing mechanism using RTS-CTS: Al-though the figure shows circular spaces, in reality, the shape will usually notbe circular due to variations in path gains, and differing interference levels. . 54

3.13 Duration required for a transmission . . . . . . . . . . . . . . . . . . . . . . 57

3.14 Efficiency with physical carrier sensing. The different curves correspond todifferent values of δ = 0.001, 0.01, 0.05, 0.1, with L = 1. The value of δis measured here relative to the time required to transmit a packet. Thus,δ = 0.01 means that δ is 1% of the time required to transmit a packet. Theoptimal efficiency decreases as δ increases, as may be expected. . . . . . . . . 58

3.15 Physical carrier sensing with unsynchronized slots . . . . . . . . . . . . . . . 59

3.16 Illustration of interframe spacings in IEEE 802.11: The figure is not drawnto scale . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

4.1 Competition between low and high priority transmissions . . . . . . . . . . . 68

4.2 An example network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

4.3 Illustration of rate control with X = 3 and Y = 2 . . . . . . . . . . . . . . . 79

4.4 Illustration of rate control with initial value of Xi = 3, and Y = 2 . . . . . . 80

4.5 An example for rate adaptation . . . . . . . . . . . . . . . . . . . . . . . . . 82

4.6 Example network using directional antennas . . . . . . . . . . . . . . . . . . 86

5.1 An example network with 6 links . . . . . . . . . . . . . . . . . . . . . . . . 89

5.2 Downlink and uplink scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . 90

5.3 Downlink scenario: power-sharing and time-sharing . . . . . . . . . . . . . . 92

5.4 Set of feasible rate vectors using power-sharing and bandwidth-sharing . . . 94

5.5 Feasible rate vectors using successive interference cancellation . . . . . . . . 95

5.6 Queue for a link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

5.7 A conflict graph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

6.1 Illustration of link state routing . . . . . . . . . . . . . . . . . . . . . . . . . 115

c© 2010 Vaidya vii

Page 10: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

6.2 Example of hazy-sighted link state (HSLS) dissemination: In figure (a), as-sume that each host knows the status of all the links correctly. Near eachhost in figure (a) the next-hop at that host for destination G is shown. Forinstance, next-hop for destination G at host A is D. Host G now moves some-what, breaking the link between F and G. The resulting network is shown in(b). Now, suppose that, using HSLS routing, host F disseminates its link stateinformation to up to 1 hop. Consequently, host D learns that link FG doesnot exist anymore; D’s knowledge of other links remains unchanged. Conse-quently, host D recomputes the shortest path to host G, and sets its next-hopfor host G as E. As shown in figure (b), at the remaining hosts, the next-hopentries for destination G remain unchanged. In particular, host A does notknow about the topology change, therefore, it forwards to host D any packetsdestined for host G. Host D, however, uses the new next-hop entry, and for-wards the packet to host E, which subsequently forwards it to host G. Thus,the packets from host A do reach the destination host G correctly. In fact,the packets are delivered over a route containing 3 hops, which is the shortestroute from A to G. In general, however, hazy-sighted routing can result in thepackets being delivered over sub-optimal routes. . . . . . . . . . . . . . . . . . 117

6.3 Uncoordinated forwarding may not always propagate link state updates through-out the network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118

6.4 Relay sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

6.5 Illustration of distance vector protocol: Next-hop marked as * indicates thatno routing is required . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

6.6 Illustration of distance vector protocol with link failure: ∞ costs and null nexthops are shown as - in the figure. Next hop * indicates that routing is notneeded. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124

6.7 Distance vectors using tags . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

6.8 Reduced need for information with reactive protocols . . . . . . . . . . . . . . 130

6.9 Illustration of the use of a centralized list stored in RREQ . . . . . . . . . . 132

6.10 Illustration of reverse pointers . . . . . . . . . . . . . . . . . . . . . . . . . . 133

6.11 Location-aided forwarding . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

6.12 Adaptive request zone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

6.13 Connectivity-aided forwarding . . . . . . . . . . . . . . . . . . . . . . . . . . 151

6.14 Registration and routing in mobile IP . . . . . . . . . . . . . . . . . . . . . . 154

7.1 Greedy geographic forwarding . . . . . . . . . . . . . . . . . . . . . . . . . . 158

c© 2010 Vaidya viii

Page 11: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

7.2 Greedy geographic forwarding . . . . . . . . . . . . . . . . . . . . . . . . . . 159

7.3 Depth-first traversal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

7.4 Opportunistic Routing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161

7.5 Network coding with two-way traffic . . . . . . . . . . . . . . . . . . . . . . 162

7.6 Network coding with opportunistic routing . . . . . . . . . . . . . . . . . . . 163

7.7 Routing in multi-channel networks . . . . . . . . . . . . . . . . . . . . . . . 165

8.1 Auto-configuration of IPv4 address: (a) Format. (b) Example address formedfor interface 6 on a host with key 1000111011001 and subnet address 1000001001111110 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

8.2 Auto-configuration of IPv6 address . . . . . . . . . . . . . . . . . . . . . . . 170

8.3 Probability of duplicate address assignment using address spaces with 216 and232 addresses: the corresponding curves are labeled in the figure as 16 bitsand 32 bits, respectively. This graph is obtained using results derived for theBirthday Paradox. Birthday paradox refers to the observation that in a roomcontaining 23 people, there is a 50% probability that two people will haveidentical birthday, if all birthdays in a year are equally likely. Similaritiesto the random address selection problem should be obvious. The probabilityq(n) that all n randomly chosen numbers (with uniform distribution) fromamong r possible values will not be distinct can be approximated as q(n) ≈ 1−e−n(n−1)/(2r). The graphs in this figure were obtained using this approximateexpression. Note that the graph is plotted on a log-log scale. . . . . . . . . 173

8.4 Partitions may defeat duplicate address detection . . . . . . . . . . . . . . . 175

8.5 Detection of merging partitions . . . . . . . . . . . . . . . . . . . . . . . . . 176

8.6 An Example: Hosts A and K choose the same IP address . . . . . . . . . . . 178

8.7 Achieving weak DAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

8.8 DAD interaction with applications . . . . . . . . . . . . . . . . . . . . . . . . 180

9.1 Illustration of TCP acknowledgements (Ack) . . . . . . . . . . . . . . . . . . 188

9.2 Illustration of delayed acknowledgements . . . . . . . . . . . . . . . . . . . . 190

9.3 Illustration of duplicate acknowledgement . . . . . . . . . . . . . . . . . . . 190

9.4 Out-of-order delivery by network layer can lead to dupacks . . . . . . . . . . 190

9.5 Number of dupacks depends on how much out-of-order a packet is delivered . 192

9.6 Sliding window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197

c© 2010 Vaidya ix

Page 12: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

9.7 Congestion window dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . 199

9.8 Fast retransmit due to packet loss . . . . . . . . . . . . . . . . . . . . . . . . 199

9.9 Performance of TCP in presence of errors: The results presented here corre-spond to a certain two-hop network, with route S-B-D used between sourceS and destination D, with link BD being a wireless link. . . . . . . . . . . . . 204

9.10 End-to-end recovery using TCP retransmissions . . . . . . . . . . . . . . . . 204

9.11 Benefit of local recovery using link layer retransmissions . . . . . . . . . . . . 205

9.12 Protocol stack illustrating link layer retransmissions . . . . . . . . . . . . . . 207

9.13 In-order delivery at the link layer . . . . . . . . . . . . . . . . . . . . . . . . 207

9.14 Protocol stack illustrating the split connection approach . . . . . . . . . . . 212

9.15 Disadvantages of split connection approach . . . . . . . . . . . . . . . . . . . 212

9.16 Impact of link asymmetry on the split connection approach . . . . . . . . . . 213

9.17 TCP-aware link layer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214

9.18 Illustration of TCP-aware link layer retransmission scheme . . . . . . . . . . 215

9.19 Impact of long outage on TCP . . . . . . . . . . . . . . . . . . . . . . . . . . 218

9.20 A chain topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

10.1 The placement of nodes within a cell . . . . . . . . . . . . . . . . . . . . . . 226

10.2 Straight-line routing: Packets from a flow are first routed via nodes in cellsthat are intersected by the straight line segment joining the source (node Sin the figure) and the pseudo-destination (point P in the figure) for that flow.Once a packet reaches the cell containing the pseudo-destination, it is thentransmitted to the destination node D on a single additional hop. Withineach cell along the straight-line route, any node may be chosen for forwardingthe packets of a flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229

10.3 Impact of channelization on performance . . . . . . . . . . . . . . . . . . . . 234

10.4 Alleviating interface bottleneck . . . . . . . . . . . . . . . . . . . . . . . . . 237

A.1 (7,4) Hamming code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240

A.2 (8,4) Single error-correcting, double error-detecting code . . . . . . . . . . . 241

B.1 Vector representation of complex numbers . . . . . . . . . . . . . . . . . . . 245

c© 2010 Vaidya x

Page 13: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

CHAPTER 1

Introduction

1.1 A Brief History of Wireless Communication

The history of wireless communication using radio frequency (RF) waves can beviewed as beginning towards the end the 19th century, with Marconi’s successful demon-stration of radio transmission over the distance of many miles in 1895. Marconi’s work waspreceded by the work of Oersted, Faraday and Maxwell. In 1819, Hans Christian Oerstedobserved that a compass needle moves in the presence of an electric field, establishing aconnection between electricity and magnetism. Michael Faraday demonstrated electromag-netic induction in 1831. James Clerk Maxwell developed the theory of electromagnetic (EM)waves during 1860s and 1870s.

Despite Marconi’s successful demonstration in 1895, large scale commercial deploy-ment of wireless communication did not occur until the middle of the 20th century. Inthe United States, public mobile telephone service was introduced in 1946. These systemsused a single transmitter to cover large areas. This led to low capacity due to the sharednature of the wireless spectrum, and the system could accommodate only a small numberof users. The cellular concept was developed in 1947 at the Bell Labs as a solution to thecapacity problem. The cellular concept improves capacity by improving the spatial reuse ofthe wireless spectrum. In particular, the coverage area is divided into cells, with a differentbase station covering each cell. By appropriately assigning the spectrum to the differentcells, and controlling the transmit power, it is possible to simultaneously use the same partof the spectrum in multiple cells. The initial cellular system design was completed at theBell Labs by the 1960s. The notion of handoff was subsequently incorporated to facilitatemobility. It required several more years for the U.S. Federal Communications Commission(FCC) to approve a mobile phone service, and the first commercial analog mobile phoneservice (AMPS) system was deployed in the United States in 1983.

c© 2010 Vaidya 1

Page 14: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Since the deployment of the first generation cellular systems in the 1980s, cellulartelephony has seen an enormous growth. The first generation analog system was followedby the second generation (2G) digital system in early 1990s. The second generation designresulted in higher capacity and lower costs. Data services were also introduced in the secondgeneration cellular systems. In the United States, several competing standards were deployedfor the second generation systems. As an evolution of 2G, third generation (3G) standardswere developed, and deployed beginning in 2001. The 3G systems support higher data ratethan prior deployments.

Several cellular standards have been developed over the years. GSM (Global Sys-tem for Mobile communications, or Groupe Special Mobile) is presently the most popularstandard worldwide. It is to be expected that the cellular design with continue evolving,supporting an increasing range of services.

The use of the RF spectrum is regulated in most countries. In the United States,for instance, the federal government regulates the use of the spectrum. Different chunks ofthe spectrum have been reserved for different applications, including military usage, licensedcommercial usage, and unlicensed usage. For instance, in the United Stated, 902-928 MHzband is allocated for use by Industrial, Scientific and Medical (ISM) equipment, and 535-1705 KHz is allocated for radio broadcasting. At the time of writing of this text, the U.S.frequency allocation chart is available via the website below:

http://www.ntia.doc.gov/osmhome/allochrt.html

While the commercial cellular systems operate in licensed bands, there have alsobeen important developments in the deployment of wireless devices in unlicensed bands.In particular, the IEEE 802.11 standard for wireless local area networking has becomevery successful. The original IEEE 802.11 standard was approved in 1997, and there havebeen a series of modifications (such as 802.11g and 802.11e) since then, which support newcapabilities. Other wireless local area networking technologies, such as Bluetooth, have alsobeen developed in recent years.

The cellular networks are typically deployed after a careful planning process to de-termine where the cellular base stations should be placed. Wireless local area networksare often deployed with a lesser degree of planning. As the local area wireless technologiescontinue to proliferate, a large number of wireless devices are expected to be deployed withlittle or no planning on the part of the users. Thus, wireless protocols that can dynamicallyadapt to the environment and manage interference effectively are important. The topicscovered in this book provide an introduction to some of the issues affecting the design ofsuch protocols.

c© 2010 Vaidya 2

Page 15: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

1.2 The Internet

The internet is a large network consisting of devices using many different forms ofphysical communication technologies (such as RF, fiber and copper). The term internetis an abbreviation of internetwork. The internet consists of many smaller networks, calledsubnetworks (or subnets), that are interconnected. Communication among hosts in theinternet is supported by a set of protocols. It is convenient to view these protocols as beingorganized in layers forming a protocol stack, as illustrated in Figure 1.1. Let us understandthe functionality of these layer using the example of a simple network consisting of four

Physical

Link

Network

Transport

Upper layers

Figure 1.1 Protocol layers

hosts A, B, C, and D, as shown in Figure 1.2. The lines drawn between the hosts indicateslinks available in the network. Hosts A and D can communicate with B and C directly,whereas they can communicate with each other only via nodes B and C. Let us consider thefunctions performed by each layer of the protocol stack.

• Physical layer: The physical layer deals with transmission of information in the formof signals on the available channel (such as wireless channel, copper, etc.). The phys-ical layer includes functionality such as modulation/demodulation and channel cod-ing/decoding.

• Link layer: Link layer provides stronger functionality than the physical layer. The linklayer protocol operates between two peers at the two endpoints of a transmission. Thepeers at the link layer send frames to each other, where each frame consists of a certainnumber of bits. The link layer may provide some level of reliability, for instance, byusing a link layer retransmission mechanism, or error correcting codes.

In general, the physical communication medium may be shared by many transmitters.For instance, when a group of people stand together and talk to each other at a party,they must share the “air” to talk to each other. If more than one person talks at thesame time, the interference can make it difficult to understand the speakers. Thus,

c© 2010 Vaidya 3

Page 16: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

the performance achieved by different transmitter-receiver pairs is not necessarily in-dependent of each other. Protocols for such shared channels must be able to facilitatecommunication between multiple transmitter-receiver pairs, by appropriately sharingthe channel between them. Ethernet is an example of a medium access control (MAC)protocol that allows multiple transmitters to share a wired medium. Such protocolsare needed for the shared wireless medium as well.

• Network layer: Routing is the primary function of the network layer. Routing isrequired when two hosts are not on the same link, thus requiring packets sent by onehost to travel multiple links to reach the desired destination. In general, multipleroutes may exist between a pair of hosts, e.g., routes A-B-D and A-C-D from A to Din our example. The network layer determines which route is to be used to forwarddata between two hosts. In general, multiple routes may be used simultaneously totransmit packets between a pair of hosts.

Internet Protocol (IP) provides the routing functionality in the internet. The unit oftransmission at the network layer is called a datagram. IP does not guarantee that thepackets will reach their destination. Packets may be lost due to transmission errorswhen transmitted on the links (for instance, when A transmits to B in our example).Packets may also be lost due to buffer overflow. In our example, when packets fromA are received by B, the packets are buffered at B while waiting to be transmitted tohost D. If this buffer gets full, packets received from host A may be discarded, andhence not received by host D. IP may also deliver some of the packets more than once.Furthermore, IP does not guarantee that packets sent by the sender will reach theintended receiver in the order in which they were sent. For instance, in our example,suppose that both routes A-B-D and A-C-D are used to send packets from A to D,and that the delay on route A-C-D is shorter than route A-B-D. Suppose that onepacket is sent on route A-B-D and the second packet is sent on route A-C-D. Due tothe lower delay, the second packet may arrive before the first packet.

A D

C

B

Figure 1.2 An example network

• Transport layer: While the network layer allows a host to communicate with otherhosts in the network, the transport layer can support additional functionality usingthe lower layer functionality. UDP (User Datagram Protocol) and TCP (Transmission

c© 2010 Vaidya 4

Page 17: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Control Protocol) are the commonly used transport protocols today. TCP supportsthe abstraction of a connection between different hosts. This abstraction allows ahost to communicate simultaneously on many connections (potentially with differenthosts), while maintaining a logical separation between the different connections. TCPalso provides other functionalities, such as reliability and ordered delivery of packets.The unit of transmission at the transport layer will be referred as a segment.

• Higher layers (including applications): Suppose that an application at host A, partic-ularly a web browser, wants to access a web page located at host D. In this communi-cation, two entities are involved, the web browser (the client) and the web server. Theprotocol (in this case, http) used by these entities relies on the functionality providedby the lower layers in the protocol stack, but it does not depend on exactly how thelower layers provide their functionality. The protocols used by the application layerwill provide richer functionality than supported by the lower layers. For instance, theweb browser allows a user to download a web page, which may consist of many imagesand text. This may be achieved by performing multiple uses of the http protocol,which, in turn, uses the TCP (transport layer) protocol, and so on. Thus the layeredarchitecture supports progressively richer functionality at higher layers, building onthe functionality provided by lower layers. By designing appropriate interfaces be-tween the layers, it is possible to implement the higher layers without being aware ofthe exact manner in which lower layers are implemented.

In our discussion, we may often use the term packet instead of segment, datagram orframe. The intended meaning of the term packet should be clear from the context.

1.3 What makes wireless networks different?

Wireless networks differ from wired networks in several ways, which affect their utilityas well as performance.

• Absence of wires facilitates mobility: Wireless connectivity is not a necessary conditionfor mobility, however, it makes it easier for a device to be mobile. For instance, alaptop user can disconnect the laptop from the Ethernet in one room and connect tothe Ethernet in another room. This is an example of device mobility, which requiresexplicit action on the part of the user (connect/disconnect Ethernet cables). Insteadof the Ethernet, if the user were to use a wireless LAN (local area network), then themobility can potentially be achieved without the user having to take any such actionmanually.

c© 2010 Vaidya 5

Page 18: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Signal attenuation: The broadcast nature of the wireless medium facilitates commu-nication despite device mobility. This broadcast nature also affects wireless networkperformance in other important ways. The energy transmitted by the transmitterpropagates in various directions, as a function of the antenna used by the transmitter.As the signal propagates away from the transmitter, the signal power level attenuates.In a wireless network, signal attenuation may manifest itself by making some of thewireless links unreliable or “broken”. Thus, two hosts that are far away from eachother may not be able to communicate with each other at a chosen rate with adequatereliability.

• Spatial reuse: Signal attenuation also has a beneficial outcome. In particular, signalattenuation allows us to simultaneously use the same part of spectrum at differentplaces that are sufficiently far apart.

• Diversity: The term diversity is used here to imply the availability of multiple choices– such choice in general can be exploited to improve performance. Here are someexamples of diversity in wireless networks:

– Multi-user diversity: Consider a base station that has data to be transmitted tomany users. The “quality” of the wireless channel to each user is time-varying,for instance, because obstacles in the environment may be mobile. In such cases,at any given time, the base station may choose to transmit data to users whosechannel is in a good condition at the time.

– Antenna diversity: Consider a base station equipped with two antennas. Thebase station needs to transmit data to another host, using one of the availableantennas. If the antennas are placed sufficiently far apart at the base station,then the quality of the channel from the two antennas to the receiver may bequite different. Then the base station can choose the antenna with the betterchannel condition to improve performance. This is knows as selection diversity.In general, the transmitter and the receiver both may be equipped with multipleantennas, and more complex strategies can be used to exploit the available an-tennas; rather than selecting one of the available antennas, all the antennas maybe used simultaneously.

– Time diversity: Since the channel conditions between a pair of hosts vary withtime, the channel may be better at some points of time than others.

– Frequency diversity: The signal attenuation experienced by a transmission is afunction of the radio frequencies used for the transmission. Thus, performancecan potentially be improved by choosing the frequencies that experience betterchannel conditions at any given time.

c© 2010 Vaidya 6

Page 19: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Security and privacy concerns: The broadcast nature of the wireless channel makes iteasier to disrupt or “jam” wireless communication. Also, the broadcast nature makeswireless transmissions more vulnerable to eavesdropping.

• Energy constraints: Most wireless devices are intended for mobile users. Thus, mobiledevices must be relatively small and lightweight, which results in limited battery ca-pabilities. Due to the limited energy supply, it is important that wireless devices andprotocols be energy efficient.

1.4 Wireless Network Architectures

Wireless networks may be divided into three categories:

• Infrastructure-based networks: Figure 1.3(a) illustrates an infrastructure-based net-work. As the name suggests, such a network relies on availability of an infrastructureconsisting of base stations (BS) or access points (AP). These access points are them-selves connected by a backbone network. The backbone network is often (but notalways) a wired network. The “clients” or mobile hosts obtain connectivity to the net-work via the access points. Thus, when host M in Figure 1.3(a) needs to send a packetto another host (say, host W or host F), then M can transmit the packet to accesspoint AP1 over a wireless channel, and then rely on AP1 to forward the packet on itsway to its destination. When the packet is intended for destination W, access pointAP1 will forward the packet to gateway G, which will, in turn, forward the packet onits route to destination W. When the intended destination is host F, AP1 will forwardthe packet to AP6 on the backbone network, and then AP6 will transmit the packetto F over the wireless channel. Thus, all communication to and from a wireless hostin an infrastructure-based wireless network is routed via access points. The cellularnetworks and many wireless LAN deployments use a similar architecture.

• Infrastructure-less networks: In an infrastructure-less network, as the name implies,no infrastructure is available. In this case, to facilitate communication between a pairof non-adjacent hosts, other hosts must relay the packets on a route from the source tothe destination. Such infrastructure-less networks are also known as ad hoc networks.For instance, consider Figure 1.3(b) where links are drawn between hosts that cantransmit to each other reliably. In this case, while hosts A and B can communicatewith each other directly, for host A to be able to deliver packets to host D, two otherhosts (B and C) must forward the packets. Such routes will be referred to as ad hocroutes in later discussion. Ad hoc networks potentially have many applications inpractice, including military and civilian scenarios where networking capability may

c© 2010 Vaidya 7

Page 20: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

have to be provided without having the luxury of a pre-deployed infrastructure (e.g.,on a battlefield, or after a natural disaster).

• Hybrid networks: In hybrid networks, infrastructure is directly accessible to somehosts, and, in addition, ad hoc routes may also be used. For instance, in Figure 1.3(c),we may use routes M-AP2-AP5-E or M-B-C-E or M-AP2-AP3-C-E to forward packetsfrom sender M to destination E. Thus, in a hybrid network, we can use a combinationof infrastructure-based and ad hoc connectivity. Such a hybrid architecture has beenused in practice, for instance, to build community wireless networks.

BackbonenetworkAP1

AP2AP3 AP5 AP6

M

Internet

G

W

A

B C

D

EF

M

A

B C

D

EF

(a)

BackbonenetworkAP1

AP2AP3 AP5 AP6

Internet

G

W

M

A

B C

D

EF

(c)(b)

Figure 1.3 Wireless network architectures: (a) infrastructure-based, (b) infrastructure-less,(c) hybrid. AP denotes an access point.

1.5 Caveat

It should be noted that the emphasis in this book is on basic ideas behind variousprotocol mechanisms. We do not attempt to describe protocol standards (such as IEEE orIETF standards) in detail. In fact, our discussion will sometimes deviate from the standardspecifications.

1.6 Book Outline

The discussion in this book roughly proceeds from the lower layers of the protocolstack in Figure 1.1 to the higher layers. Chapter 2 introduces some basic physical layer con-

c© 2010 Vaidya 8

Page 21: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

cepts, since these will be useful later in understanding wireless protocol design. Distributedmedium access control mechanisms are introduced in Chapter 3, with other related topicsbeing discussed in Chapter 4. Chapter 5 introduces the notion of rate region of a wirelessnetwork, and discusses some centralized scheduling algorithms. Routing mechanisms forwireless networks are discussed in Chapter 6. The chapter discusses routing protocols usefulin multi-hop wireless networks such as mobile ad hoc networks, as well as mechanisms tohandle mobility in IP. Advanced topics on routing in mobile ad hoc networks are discussedin Chapter 7. Hosts in any network need to be assigned addresses to be able to communi-cate with each other. Chapter 8 discusses address assignment protocols in the context ofwireless networks. TCP is a popular transport protocol used in the internet today. Chap-ter 9 discusses the potential detrimental impact of wireless behavior on TCP performance,as well as approaches to improve the TCP performance. Performance achievable in anynetwork is limited by its capacity. Exact capacity analysis of wireless networks has provedto be a very difficult problem. Instead of such exact analysis, in Chapter 10, we will considerasymptotic analysis, which is useful in obtaining the capacity trends as a function of networkparameters, such as, number of nodes in the network.

c© 2010 Vaidya 9

Page 22: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

CHAPTER 2

The Wireless Link

This chapter uses the example of communication between two users to informallyintroduce some concepts related to the physical layer. These concepts will be useful inunderstanding wireless protocol design and performance.

2.1 An Example Scenario

Let us consider two users, Mary and John, who communicate with each other usinga voice-over-IP application, as shown in Figure 2.1. Mary and John are both connected toa computer, with the link connecting the two computers being a wireless link.

M J

Mary John

wirelesschannel

Figure 2.1 Voice-over-IP over a wireless link

This chapter will discuss how Mary’s “signal” – that is, her speech, is delivered toJohn’s ears. We will divide the “lifespan” of the signal in three phases: (I) processing atthe transmitter, (II) propagation through the wireless channel, and (III) processing at thereceiver. For this discussion, it will also be useful to refer to Figure 2.2, which illustratesthe different functional blocks at the transmitter and the receiver.

c© 2010 Vaidya 10

Page 23: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Demodulator Channeldecoder

Sourcedecoder

Channel

Channel Modulatorencoder

Transmitter

sourceInformation

encoderSource Information

sink

Receiver

Figure 2.2 A digital communication link

2.2 Processing at the Transmitter

At the transmitter, the speech produced by Mary must be somehow translated intoan electrical signal, in a form suitable for transmission on the wireless channel. Several stepsare typically used to achieve this goal, as discussed in this section.

2.2.1 Digital Representation of Information

Mary is speaking into a microphone attached to her computer. The words spokenby Mary create an analog audio signal, which is translated into analog electrical signal bythe microphone. This signal can then be sampled, and the resulting sampled values canbe represented in binary. The sampled data may also be compressed so that the spokenwords can be represented using fewer bits. For instance, when Mary pauses every oncein while, the resulting silent intervals may be “compressed” to reduce the number of bitsnecessary. In general, rather than bits, the signal may be represented using larger symbols,each symbol corresponding to several bits. In our discussion, we will assume that eachsymbol corresponds to a single bit.

2.2.2 Packetization

When Mary speaks into the microphone, a sequence of bits is generated as seen above.Since Mary and John are having a conversation, we would like John to be able to quicklystart hearing Mary’s response to whatever he may have said. Because of this, we cannotwait for Mary to complete her response – which may very well last several minutes! – beforewe start sending the corresponding bits to John. To achieve this goal, the bits obtainedafter source coding are divided into chunks of consecutive bits. We will refer to this processas packetization. For instance, we may decide to form one chunk corresponding to each 20ms duration of Mary’s speech. This implies that 50 packets may be formed for each secondfor which Mary talks.

c© 2010 Vaidya 11

Page 24: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

2.2.3 Encapsulation

With packetization, we obtain a series of packets that contain the bits representingMary’s voice. Now these packets must be sent to John’s computer. We know that theinternet protocol (IP) may not deliver the packets in the correct order to John’s computer.Also, some packets may be delivered very late, and would be useless in “playing back”Mary’s voice to John. To allow identification of such late packets on John’s computer, itis necessary to include additional information in each packet. This can be accomplishedby attaching an application layer header to the packets obtained above, and including inthis header the information that would be useful to the voice-over-IP application on John’scomputer in reproducing Mary’s voice correctly (such as a timestamp).

Having formed this application layer packet, we would now need to deliver it toJohn’s computer. On John’s computer, many applications may be running simultaneously,and we need some mechanism to ensure that Mary’s voice packets are delivered to the rightapplication. This goal can be accomplished using a transport protocol. For instance, wecan use User Datagram Protocol (UDP) for this purpose. By making use of the IP addressfor John’s computer, and the UDP port used by John’s voice-over-IP application, UDP canensure that the packets are delivered to the right application. For this purpose, the packetsobtained above (including the application layer header) are encapsulated by attaching a UDPheader to the packet, to obtain a UDP segment.

The UDP protocol, which resides at the transport layer of the protocol stack, thenpasses the segment to the Internet Protocol (IP). An IP header is attached to the abovesegment, to obtain an IP datagram. Information in the IP header is useful in performingrouting.

IP then passes the datagram down to the link layer. If “Wi-Fi” or IEEE 802.11protocol is used as the medium access control (MAC) protocol on the wireless link betweenthe two computers, then a IEEE 802.11 MAC header is added to the datagram to create anIEEE 802.11 frame. The frame is then passed to the physical layer for transmission on thewireless channel.

2.2.4 Error Control Codes (ECC)

When a signal is transmitted on the wireless channel, the received signal is not iden-tical to the transmitted signal. The signal “deteriorates” during propagation from the trans-mitter to the receive, and also affected by interference from other transmitters. Therefore,sometimes the receiver has difficulty correctly determining the bits that were transmitted.Thus, errors may occur, which cause a transmitted 0 bit to be received as a 1 and vice-versa. To allow the receiver to detect and/or correct such errors, the channel coding module

c© 2010 Vaidya 12

Page 25: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

at the physical layer introduces redundancy in the transmitted data. For instance, the IEEE802.11a physical layer uses a convolutional code to allow correction of some errors.

In practice, error control codes are also used at other layers of the protocol stack,introducing redundancy at several layers. For instance, the TCP protocol uses a checksumto detect errors in data and the TCP header. The TCP checksum is computed before passingthe packet to IP. When IP receives the packet from a higher layer protocol such as TCPor UDP, it adds the IP header along with a checksum for the IP header. Suppose that IPhands the datagram to the MAC layer for IEEE 802.11a. The IEEE 802.11 MAC headerincludes a cyclic redundancy check, which can be used to detect some errors in a MAClayer frame. As mentioned above, the IEEE 802.11a physical layer uses a convolutional codewhen transmitting the MAC layer frame. At the receiver, all of these codes will be usedsuitably at the various layers of the protocol stack, as the packet travels up the stack fromthe physical layer.

Appendix A provides further discussion of error-control codes, including some simpleexamples.

2.2.5 Modulation

Modulation is the process by which the packet to be transmitted (which is a sequenceof bits) is encoded on a “carrier”. The carrier frequency is chosen depending on the channelcharacteristics, as well as policy restrictions. Each channel can efficiently carry informationat certain frequencies. Also, there are often policy restrictions on the frequencies that maybe used for a certain communication. The process of modulation allows us to use desiredfrequency range for the communication.

The carrier frequency is normally chosen to be much larger than the bandwidth ofthe signal to be transmitted. We will define the term bandwidth more precisely later inthis section, but intuitively, bandwidth is a measure of the amount of spectrum used by asignal. If B is the signal bandwidth, and fc is the carrier frequency, then let us assume thatfc >> B. For instance, the wireless channel may be assigned B = 20 MHz bandwidth withfc = 915 MHz. In this section, we will discuss the process of modulation that occurs at atransmitter. Modulation can be performed in many different ways. As an example, we willdiscuss one of the simpler modulation schemes, namely, binary pulse amplitude modulation(binary PAM).

In case of binary PAM, the information is transmitted one bit at a time, that is,with one bit per symbol. Alternatively, we can group several bits into a single symbol, andencode them together on the carrier. For instance. QPSK (Quadrature Phase-Shift Keying)encodes 2 bits per symbols. While the information in the symbols is digital, the signal

c© 2010 Vaidya 13

Page 26: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

produced as a result of the modulation process is an analog signal. This analog signal istransmitted on the wireless channel.

Binary PAM can be divided into two steps [19]:

• Represent each information bit input using a “baseband” signal: We will use a suitablydesigned pulse b(t), such that b(t) takes non-zero values only if 0 ≤ t ≤ T for some T .One pulse will be transmitted each T time units.

With binary PAM, each symbol can take values 0 or 1, and a pulse corresponding toone symbol is transmitted for each T duration. Thus, j-th pulse (j ≥ 1) is transmittedduring time interval from (j − 1)T to jT . In our discussion below, let us focus on thevery first symbol transmitted, with the corresponding pulse occupying time interval[0, T ]. We encode values 0 and 1 for the first symbol as waveform s0(t) and s1(t),respectively, as defined below:

s0(t) = −b(t)

s1(t) = b(t)

In general, to transmit 0 as the j-th symbol, the signal waveform will be given by−b(t− (j − 1)T ), and to transmit 1 as the j-th symbol, the waveform will be given byb(t − (j − 1)T ).

The above process results in the baseband signal corresponding to the sequence of bitsto be transmitted. The baseband signal is thus a sum of time-shifted copies of b(t)and −b(t).

• Superimpose the signal on the carrier: This step “shifts” the baseband signal to ahigher carrier frequency. Let fc denote the carrier frequency. For pulse amplitudemodulation, modulation is achieved simply by multiplying the signal by the “carrier”.Here we focus our attention on just the first symbol transmitted at time 0. In partic-ular, to transmit value i (i is 0 or 1) at time 0, we transmit the waveform

wi(t) = si(t) cos(2πfct)

= Ai b(t) cos(2πfct)

where Ai = −1 for i = 0 and Ai = 1 for i = 1.

Frequency Spectrum after Modulation: To intuitively understand why multiplicationby the carrier cos(2πfct) results in a shift in frequency spectrum, let us consider multiplyinga baseband signal cos(2πft) by cos(2πfct), where f << fc. Then we have

cos(2πft) cos(2πfct) =1

2cos(2π(fc − f)t) +

1

2cos(2π(fc + f)t)

c© 2010 Vaidya 14

Page 27: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Thus, while the unmodulated signal is at frequency f , the modulated signal consists ofsinusoids at frequencies fc − f and fc + f . In general, above modulation process results in atransmitted signal with the spectrum centered at the carrier frequency. This phenomenonis easier to discuss using the Fourier transform for the signal. Fourier transform of a signalis a way of representing the manner in which the signal “occupies” the frequency spectrum.Appendix B provides some intuition behind the definition of Fourier transform. Specifically,if X(f) is the Fourier transform of a signal x(t), then x(t) can be obtained using the followinginverse Fourier transform operation:

x(t) =∫ +∞

−∞X(f)ej2πft df

f in X(f) denotes frequency, and t in x(t) denotes time. Thus, X(f) is the frequency-domainrepresentation of a signal, and x(t) is the time-domain representation of the same signal. Ingeneral, Fourier transform X(f) may be a complex number. f may be positive or negative.It is easy to show that for real-valued signal x(t), the magnitudes of X(f) and X(−f) areidentical. A real-valued signal has bandwidth W if, for f ≥ 0, the Fourier transform isnon-zero only in a frequency band of width W . Since |X(f)| = |X(−f)|, it follows that, forf ≤ 0 as well, the Fourier transform for the real-valued signal is non-zero only in a band ofwidth W . This is illustrated in Figure 2.3(a).

fl fl + Wfl + W fl 0

| X(f) |

f)

W W

−( −

Figure 2.3 Bandwidth W of a real signal

It turns out that if X(f) is the Fourier transform of some signal x(t), then the Fouriertransform of signal x(t)cost(2πfct) is given by

1

2X(f − fc) +

1

2X(f + fc)

It follows that if x(t) is a baseband signal band-limited to [−B/2, B/2], the modulatedsignal will be band-limited to frequencies f such that fc −B/2 ≤ |f | ≤ fc + B/2. Thus, themodulated signal will have bandwidth B centered at fc. This explains how modulation canbe used to “shift” a baseband signal to the desired center frequency. In case of binary PAM,the shape of the pulse b(t) will determine the spectrum occupied by the modulated signal.

c© 2010 Vaidya 15

Page 28: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

The modulated signal is then transmitted on the wireless channel from host M tohost J in our example in Figure 2.1. This signal propagates through the wireless channel tothe receiver. Processing is performed at the receiver to recover the transmitted signal. InSection 2.3, we discuss propagation of the signal through the wireless channel, and processingat the receiver is discussed in Section 2.4.

Energy and Power Content of a Signal: To aid in the discussion later in this chapter,we now introduce the notion of energy content and power content of a signal. The energycontent of signal x(t) over duration [t1, t2] is defined as

Ex =∫ t1

t2|x(t)|2 dt (2.1)

Power content Px of a signal x(t) is defined as

Px = limT→∞

1

T

∫ + T

2

−T

2

|x(t)|2 dt (2.2)

Circuit theory tells us that voltage or current x(t) applied across a 1 Ω resistance will result

in power dissipation of x2(t). Thus, Px may be interpreted as the average amount of energythat will be dissipated by a 1 Ω resistor in 1 second if x(t) is the voltage or current appliedto the resistor.

Previously we have seen that a time-domain signal can also be represented in thefrequency-domain using its Fourier transform. Similarly, while we defined power contentabove using the time domain, it is also possible to define a frequency-domain function –namely, power spectral density – to obtain power content of a signal. In particular, if wedenote power spectral density of signal x(t) as Sx(f), then power content of x(t) can beobtained as

Px =∫ +∞

−∞Sx(f) df (2.3)

Power spectral density Sx(f) may be interpreted as a measure of the contribution of fre-quency f to the power content of signal x(t). The above notion of power spectral density isuseful for deterministic signals for which the signal value at each time t is deterministicallychosen, as well as for non-deterministic signals (such as noise) for which the signal valueat time t is a random variable. For brevity, we will not discuss how to calculate the powerspectral density here. For future reference, note that when a signal has a finite bandwidth,the power spectral density for the signal is non-zero only over the signal bandwidth.

Power content of a signal is measured in Watts (W). Decibel notations dBW anddBm are often used to represent the power level. Power P in Watts can be converted tothe decibel units dBW using the formula 10 log10 P . Similarly, power P in milliwatts can beconverted to decibel units dBm using the formula 10 log10 P . In our discussion below, thebase of logarithms used in determining decibel quantities will be assumed to be 10, even ifthe base is not specified explicitly.

c© 2010 Vaidya 16

Page 29: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

2.3 The Wireless Channel

The signal transmitted by the transmitter is eventually received by the receiver. Thereceived signal is different from the transmitted signal for three main reasons:

• Channel characteristics: When the signal propagates from the transmitter to the re-ceiver, the signal attenuates as the distance increases. Also, the environment throughwhich the signal propagates includes objects that may also modify the signal. For in-stance, if the signal propagates through walls, the materials in the walls will attenuatethe signal more than propagation through free space. Also, signal may be reflectedor scattered by the the objects in the environment, causing the signal to reach thereceiver along many different paths.

• Noise: Thermal noise is introduced by the hardware used for communication. Thus,the receiver receives a composite of the signal and the noise.

• Interference: Simultaneous transmissions can pose interference to each other. Such aninterferer is not shown in Figure 2.1, although interference is commonplace in mostwireless environments.

The impact of the channel, noise, and interference can be characterized using a simpleequation as follows. Let r(t) be the received signal at receiver J at time t, and let x(t) be thesignal transmitted by host M at time t. Also, let n(t) denote the noise at time t, and let i(t)be interfering signal at the receiver J at the time t. Note that i(t) is the composite of theinterference from all the interference sources, which are not shown in Figure 2.1. Assumingthat the signal travels from the transmitter to the receiver along different paths, with path ihaving a delay of τi and attenuation factor ai, the received signal can be obtained as follows:

r(t) =∑

i

ai x(t − τi) + n(t) + i(t) (2.4)

where the summation is over all the paths taken by the signal when propagating from thetransmitter to the receiver. In general, the channel conditions can be time-varying, makingai and τi functions of time.

The noise n(t) in the above equation is typically modeled using an Additive WhiteGaussian Noise (AWGN) process. Each of the words Additive, White, Gaussian and processdeserves some explanation. The term additive refers to the fact that noise adds to the signal,as seen in the above equation. The term process implies that the noise n(t) at each time tis a random variable. For the AWGN process, the noise at different instants of time is inde-pendent of each other. The term Gaussian represents that n(t) has a Gaussian distribution

with zero mean. It is customary to denote the variance of this Gaussian distribution as N0

2.

c© 2010 Vaidya 17

Page 30: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

If N denotes the Gaussian random variable for additive white Gaussian noise at a certaintime, then

p(N = n) =1√πN0

e− n

2

N0 (2.5)

p(N = n) above is the probability that the actual additive noise amplitude at time t is equalto n.

The term white in AWGN implies that the power spectral density for the noise is“flat” or constant for all frequencies. Thus, the noise power only depends on the bandwidth,not which part of the spectrum is utilized. In fact, it turns out that the noise power spectral

density for the AWGN channel is equal to the variance N0

2of the Gaussian random variable

in Equation 2.5. Thus, if the bandwidth for the signal of interest is W , then the noise

introduced over that bandwidth will have power N = N0

2(2W ) = N0W Watts. Recall that

by our definition of bandwidth for real signals, a signal with bandwidth W occupies positivefrequencies over a band of width W , and also negative frequencies over a band of width W ,

for a total of 2W . Hence the noise power is given by N0

2(2W ). For instance, when W is 10

MHz and N0/2 is 4 × 10−21 W/Hz, we have noise power equal to 8 × 10−14 Watts or −131dBW or −101 dBm.

AWGN model is an approximation of the reality: since the total amount of spectrumis infinite, the total noise power over the entire spectrum will be ∞! Obviously, we don’thave noise with infinite power content. However, in practice, we use only a small fractionof the available spectrum, and over the bandwidths of interest, the approximation of “flat”power spectral density is adequate.

2.4 Processing at the Receiver

When the transmitted signal propagates to the receiver, the receiver must performseveral steps to recover the transmitted information. As seen earlier, the signal obtained afterthe modulation step is transmitted on the wireless channel. At the receiver, demodulationis performed, to attempt to recover the transmitted symbols. As an illustration, this sectiondiscusses demodulation of binary PAM signals. We will make several simplifying assumptionsin our discussion:

• Let us assume that there is only a line-of-sight path between the transmitter and thereceiver with delay τ .

• Equation 2.4 tells us how the received signal can be related to the transmitted signal.Let us assume that there is no interference (that is, i(t) = 0), or equivalently, that the

c© 2010 Vaidya 18

Page 31: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

interference appears similar to noise, and therefore, the interference can be absorbedinto the n(t) term in Equation 2.4.

This assumption, together with the assumption of a single line-of-sight path impliesthat, the received signal can be written as follows, where a is a constant, and x(t) isthe transmitted signal:

r(t) = a x(t − τ) + n(t) (2.6)

• Let us assume that the transmitter and the receiver are perfectly synchronized, andthe receiver knows when the bit boundaries occur (such a demodulator is said to bea coherent demodulator). Under these conditions, intuitively, we can run the clockat the receiver behind the clock at the transmitter by τ , allowing us to rewrite theequation for r(t) as follows:

r(t) = a x(t) + n(t) (2.7)

In essence, we can ignore the delay τ .

• In practical systems, the pulses transmitted for adjacent bits may potentially overlap,leading to intersymbol interference (ISI). We will make the simplifying assumptionthat there is no inter-symbol interference (ISI). This assumption allows us to analyzethe demodulation for a bit without having to take into account ISI.

Let us consider demodulation of the received signal corresponding to the very firstbit received by the receiver. Each subsequent bit can be demodulated similarly. The firststep in the demodulation is to remove the carrier. Recall that the transmitted signal for bitvalue i (i = 0 or 1) is wi(t). Thus, from equation 2.7, the waveform received at the receiveris given by r(t) = a wi(t) + n(t), where n(t) is the noise. Assume the AWGN model, withvariance of n(t) being N0/2.

Let us denote Eb as the energy content in a wi(t) – which is the signal received at thereceiver ignoring noise – over bit duration [0, T ]. This can be viewed as the energy-per-bitreceived from the transmitter. Then,

Eb =∫ T

0(a wi(t))

2dt

= a2∫ T

0b2(t) cos2(2πfct)dt

To remove the carrier, the demodulator performs the following operation:

z =1√Eb

∫ T

0r(t) a b(t) cos(2πfct) dt

To perform this operation, the demodulator will need to know the value of a (using which itcan also computer Eb). Thus, we are implicitly assuming that the receiver somehow knows

c© 2010 Vaidya 19

Page 32: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

a. This assumption is not quite necessary, but makes the analysis more appealing. As youcan see soon, removing a√

Eb

from the above expression will simply result in a linear scaling

of z. The above expression can be rewritten as

z =1√Eb

∫ T

0r(t) a b(t) cos(2πfct) dt =

1√Eb

∫ T

0a wi(t) [a b(t) cos(2πfct)] dt +

1√Eb

∫ T

0n(t) [a b(t) cos(2πfct)] dt (2.8)

Now, let us consider the first integral on the right hand side of Equation 2.8.

1√Eb

∫ T

0a wi(t) a b(t) cos(2πfct) dt =

1√Eb

a2∫ T

0Ai b

2(t) cos2(2πfct)dt

=1√Eb

Ai Eb

= Ai

Eb

Now, let us consider the second integral on the right hand side of Equation 2.8, and denoteits value by m. Thus,

m =1√Eb

∫ T

0n(t) a b(t) cos(2πfct) dt

Since n(t)’s are independent Gaussian random variables with mean 0, the above integral canbe viewed as a linear combination of independent zero-mean Gaussian random variables,namely, n(t), 0 ≤ t ≤ T . Therefore, it follows that m is also a Gaussian random variablewith mean 0. It can also be shown that m has variance N0/2.

The above discussion implies that the output of the demodulator is given by

z = Ai

Eb + m

where m is a Gaussian random variable with mean 0 and variance N0/2. In the absence

of noise (or, with m = 0), the output will be −√Eb if the transmitted bit is 0, and +

√Eb

if the transmitted bit is 1. Now, suppose that the transmitter transmits bits 0 and 1 withequal probability. Then, since m is a random variable symmetric around 0, it follows thatthe optimal decision rule to decide whether the transmitter has sent 0 or 1 is as follows:

• 0 if z < 0

• 1 if z > 0

• 0 or 1 (arbitrary choice) when z = 0

c© 2010 Vaidya 20

Page 33: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

The received bit will be erroneous, if the transmitter sends 1 but the demodulator outputis 0, and vice-versa. In other words, the decision at the receiver will lead to an error if

m >√

Eb when the transmitted bit is 0, and m < −√Eb when the transmitted bit is 1.

Since m is a Gaussian variable with variance N0/2, the bit error probability Pb is then givenby

Pb =∫ ∞√

Eb

1√πN0

e− u

2

N0 du = Q

√Eb

N0/2

= Q

(√

2Eb

N0

)

where Q(v) is defined as probability that a Gaussian variable with mean 0 and variance 1

is greater than v, that is, Q(v) =∫∞v

1√2π

e−u2

2 du.

Observe that the error probability is a decreasing function of Eb, which is the energy-per-bit in the received signal. If we denote received power as Pr and the bit rate as R,then it follows that Eb = Pr/R. Thus, the error probability is a function of Pr/N0, or thesignal-to-noise ratio (SNR). In general, the reception may also encounter interference fromother sources, and the presence of interference may increase the error probability.

The receiver can demodulate each bit in a packet and form the received packet. Now,as seen above, some of the demodulated bits may be in error. Such errors may be detected(and possibly corrected) using error control codes used in the channel coding stage. Aftererror correction at the physical layer, the packet is passed to the link layer for processing.The link layer may apply its own error checks to the received packet and in absence of anydetected errors, pass the packet to the next layer. Similarly, IP will verify the checksum forthe IP header, and discard the packet if an error is detected. Why do we need such checksat multiple layers of the protocol stack? First, the error control code at a lower layer cannotcorrectly fix all possible errors in a packet. Thus, checks at higher layers can potentiallydetect errors that occur despite the use of codes at the lower layer(s). Also, errors maypotentially be introduced at the lower layers due to software bugs, or memory corruption.Higher layer checks can help detect such errors as well.

In our example, when a packet eventually reaches the application layer on John’scomputer, the application layer will translate the received samples of Mary’s voice into anaudible signal using a speaker, which can then be heard by John.

c© 2010 Vaidya 21

Page 34: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

2.5 Throughput Limit for a Wireless Link

Performance of a traffic flow can be measured using various parameters, such asthroughput, packet loss rate, delay, and jitter. For the voice-over-IP flow in our example,all of these parameters may of interest. For a bulk data transfer, we may be more interestedin just the throughput, that is, the rate at which data is delivered reliably between the twohosts.

Shannon introduced the notion of capacity to characterize the best achievable rate ofreliable information delivery. Reliable communication is feasible only at rates that do notexceed the capacity. While determining capacity is a difficult problem in general, in somespecific cases, precise formulations of capacity are known. In this section, we summarize onesuch result, which will be used later in the book.

Consider a wireless link between a pair of hosts as in Figure 2.1. Suppose that thechannel between these hosts is a AWGN channel with noise power spectral density N0/2.The capacity C of such a link is given by

C = W log2

(

1 +P

N0W

)

bits/second

where P is the received signal power (at the receiver), and W is the channel bandwidth (inHz), assuming interference I = 0.

In general, there may also be interference from other transmitters. Suppose that theinterference power at the receiver is I. If the receiver treats the interference similar to noise,then assuming Gaussian noise and interference, we get

C = W log2 (1 + SINR) in bits/second (2.9)

where SINR = PI+N0W

, is the signal-to-interference-and-noise ratio. As the capacity ex-

pression suggests, for fixed I + N0W , capacity can be improved by increasing the transmitpower, which will result in higher received power P , increasing the SINR. SINR in decibel

notation is obtained as 10 log(

PI+N0W

)

dB.

c© 2010 Vaidya 22

Page 35: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Bandwidth, Capacity, Bit-Rate and Throughput: The terms bandwidth, capacity,transmission rate, and throughput are often used differently by different user/research com-munities. In this book, we will use these terms as follows. Bandwidth, as defined earlier,is a measure of the amount of spectrum occupied by a signal transmitted on a channel.Bandwidth is measured in units of Hertz (Hz). Capacity is the maximum possible rate ofreliable information delivery. Transmission rate is the rate at which information is trans-mitted on the channel. We will sometimes use the term bit-rate to refer to transmissionrate. Throughput is the rate at which data is reliably delivered between a pair of peers. Ca-pacity, transmission rate and throughput can all be expressed in the units of bits-per-second(bps). As an example, a host S may transmit to host R using a IEEE 802.11g device, withtransmission rate 54 Mbps. The bandwidth used in this case is 22 MHz, with the centerfrequency of approximately 2.4 GHz. The throughput achieved for transmissions from S toR may possibly be only 10 Mbps. Why would the throughput smaller than the transmissionrate? There are overheads incurred during transmission, such as overhead of packet headers,and medium access control overhead (for instance, as per the protocol specification, host Scannot transmit all the time, and must remain idle intermittently). Also, packet losses mayoccur due to interference from other transmitters. For similar reasons, the capacity of thewireless channel would also be higher than the achieved throughput. The goal is to designthe system such that the achieved throughput approaches the capacity.

2.6 Link Formation

Our discussion of binary PAM demodulation showed that the bit error probabilitydepends on Eb/N0. Although we ignored interference in our analysis, it should be clearthat greater interference will generally result in higher error probability. What does this tellus about “link reliability” or the probability that a packet transmission on a link will bereceived reliably?

• Since error probability decreases with increasing Eb, higher transmission power willresult in higher link reliability.

• Decreasing the transmission rate, while maintaining the transmit power constant, willresult in higher energy-per-bit, improving link reliability.

• Increasing the packet size, while keeping all other parameters fixed (including theamount of redundancy for ECC), will decrease link reliability, since there are morebits in the packets that could be received erroneously.

• Poorer channel conditions (or, small a in Equation 2.6) will result in lower receivedpower and lower Eb, which will reduce link reliability.

c© 2010 Vaidya 23

Page 36: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

The channel conditions and interference can vary over time and space both, causing the linkreliability to also vary over time and space. This has two consequences that affect designand performance of practical protocols.

• A host may reliably receive some packet transmissions from another host, but may notreliably receive other packet transmissions from the same host.

When should we say that a wireless link “exists” between a pair of hosts? The ab-straction of a “link” is often useful in designing higher layer protocols, particularly,routing protocols. As the above discussion suggests, there is no way to guarantee thata packet transmission between a pair of hosts will always be received reliably. Thus,we have to allow for unreliable transmissions on any such “link”. For future reference,we will say that a link exists from host A to host B, if reliable packet transmissionscan be performed from host A to host B with a sufficiently high probability. Similarly,a previously existing link from host A to host B would be said to be “broken” whenits reliability becomes inadequate. Recall from the PAM discussion that this reliabil-ity depends on the packet size as well as the transmission rate, thus the “adequatereliability” is implicitly assumed to be for a certain set of operating parameters, suchas transmission rate, power, and packet size.

Conversely, when we say that a link does not exist from host A to host B, it doesnot necessarily mean that signals from host A do not propagate to host B causinginterference at B, or that host B can never reliably receive A’s transmission. Ratherit simply means that reliability of transmission from A to B is not sufficiently highunder the chosen operating parameters.

When a link is deemed to be present between from host A to host B, we would saythat B is host A’s neighbor.

• One host at distance d from a transmitter may receive a packet transmission reliably,but another host within distance d may not receive the same transmission reliably. Dueto this phenomenon, we cannot assume that all hosts within some constant distanceof a host will receive its transmissions reliably. In other words, a broadcast performedby a host is not always received reliably by all the nearby hosts.

2.7 SINR-Threshold Model

The discussion Section 2.4 suggests that the probability of reliable reception of apacket is a function of the SINR at the receiver. In our discussion in later chapters, we willfind it convenient to use an approximate model to determine whether a packet transmissionis reliable or not. In particular, this approximate model, referred to as the SINR-threshold

c© 2010 Vaidya 24

Page 37: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

model, makes the simplifying assumption that a packet will always be received reliably if theSINR at the receiver exceeds a certain threshold, say, β. In reality, even with SINR greaterthan β, the packet may be sometimes received unreliably. Thus, the SINR-threshold modelshould be viewed as a deterministic approximation of a non-deterministic phenomenon.

2.8 Path Gain and Path Loss

To calculate SINR, it is useful to know the received signal power. The received signalpower is a function of the channel conditions, and the transmit power. We now introducepath gain to characterize the channel conditions. In particular, if transmit signal power isPs and the received power for this signal is Pr, then path gain g is defined as

g =Pr

Ps

Clearly, path gain g is dependent on the channel gain. Inverse of path gain is called path

loss. Thus, path loss is obtained as Ps

Pr. Despite the use of the word gain in the term path

gain, the received power Pr is never greater than the transmit power Ps.

The path loss can be divided into two components, large scale path loss and smallscale path loss. Large scale path loss can be viewed as a measure of the average channelconditions at a given location, with the small scale component characterizing the variationaround the average.

In an attempt to describe the large scale behavior of the path loss, several differentlarge scale path loss models have been introduced. We summarize a few such models here.

Free Space Propagation Model:

Free space propagation model determines received signal power in the “free space”environment wherein there is a line-of-sight (LoS) path between transmitter and receiver,and there are no other paths or obstacles between the two hosts. Let d denote the distancebetween the transmitter and the receiver. As per the free-space model,

Pr(d) ∝ Ps

d2

Considering that the surface area of a sphere at distance d from the transmitter is 4πd2, itshould seem reasonable that the received power varies inversely with d2. If we denote theconstant of proportionality above as K, then

Pr(d) = KPs

d2

c© 2010 Vaidya 25

Page 38: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Note that the channel does not amplify the signal (that is, Pr ≤ Ps). Thus, the path lossexpression above cannot hold for “small” values of d. We will not formally define “small”distance d here, but we will assume that the above model holds for some suitably large d0,and all d ≥ d0. Then it follows that, for d ≥ d0,

Pr(d) = Pr(d0)d2

0

d2

In many applications (for instance, many wireless LANs), the distance between transmitterand receiver is indeed “large” enough, however, in certain applications (for instance, someRFID devices) the distance may be very small, and the above path loss model does notapply.

Recall that path loss is defined as Ps

Pr. Also, path loss in decibel (dB) is obtained as

10 log Ps

Pr. Let us denote path loss in dB at distance d as PL(d). Then, for d ≥ d0, we have

PL(d) = PL(d0) + 20 logd

d0

Two-Ray Ground Propagation Model:

Two-ray ground propagation model accounts for a direct line-of-sight (LoS) path,and a second path reflected from the ground. When the distance d between transmitter andreceiver is large compared to antenna height from the ground, the two-ray model concludesthat:

Pr ∝Ps

d4

The exponent of d above is called the path loss exponent. The path loss exponent in thiscase is 4, larger than the path loss exponent of 2 for free space. Thus, signal attenuatesmuch faster than in case of free space. For large enough d0 and d ≥ d0,

Pr(d) = Pr(d0)d4

0

d4

Log-Distance Path Loss Model:

Generalizing on the free space and two-ray models, we can obtain the following log-distance model, for a path loss exponent α. In this case, for large enough d0 and d ≥ d0,

Pr(d) = Pr(d0)dα

0

and for path loss PL(d) expressed in decibel,

PL(d) = PL(d0) + 10α logd

d0

c© 2010 Vaidya 26

Page 39: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Log-Normal Shadowing:

The above models only take into account the distance between the transmitter andthe receiver. However, the path loss at a given distance from the transmitter is not constant,due to environmental obstructions. That is, all hosts at distance d from the transmitter donot see the same signal attenuation. Between the transmitter and a receiver A there may bea hill, whereas between the transmitter and another receiver B, the terrain may be flat. Thepath loss with “shadowing” caused by such obstructions is often modeled by the log-normalmodel. As per the log-normal model:

PL(d) = PL(d) + Xσ

where PL(d) is the average large scale path loss at distance d, and Xσ is a Gaussian (normal)random variable with zero mean and standard deviation σ. In the above expression, Xσ,

PL(d) and PL(d) are in dB.

Many other path loss models have also been developed. For instance, some modelsaccount for additional path loss that occurs when signal travels through materials such asbuilding walls (in contrast, the models listed above only account for the distance betweenthe transmitter and the receiver).

Models versus Reality:

The various path loss models discussed above are approximations of reality. Ingeneral, it is unlikely that a simple model can capture the channel characteristics precisely.However, a simplified model can be potentially useful in analytical evaluation of performanceof a system, and also in performing simulations, or to estimate system performance priorto deployment. When the exact channel characteristics may not be known (for instance, atdesign time), we are forced to rely on such models. As we will see later, for a protocol tobe able to adapt to the channel characteristics, it is often useful to estimate the channelconditions dynamically, instead of relying on a simplified model of the channel.

2.8.1 Small-Scale Fading

The previous section discussed the models for large scale path loss. Large scale pathloss characterizes the average path loss for the channel between a receiver and transmitter.Small scale effects introduce variations in the path loss. These variations may be over timeand space both. The term “small” here refers to the scale of variations; the small scalevariations cause relatively rapid changes in path loss over time and space, in contrast to thelarge scale effects. We briefly discuss two factors that lead to small scale variations.

• Movement of objects: Due to movement of objects (such as the transmitter, receiver orother obstacles in the environment) the length of the path traveled from the transmitterand the receiver changes with time, resulting in the Doppler effect.

c© 2010 Vaidya 27

Page 40: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Multipath: In an environment containing many obstacles, such as an indoor environ-ment or downtown of a city, there are many paths from the transmitter to the receiverthat the signal may take, with the received signal being a composite of the signals re-ceived along the various paths. Different paths incur differing delays, thus the signalsalong the different paths do not necessarily arrive in phase.

Object movements and multipath cause fading, or relatively fast changes in the signal am-plitude over time or space. Two fading models are in common use in wireless systemevaluations:

• Rayleigh fading: This model is used when there are a large number of paths from thetransmitter to the receiver, and none of them is dominant.

• Ricean fading: In contrast to Rayleigh fading, Ricean fading model is used to capturethe presence of a dominant path.

For a given pair of hosts, say A and B, at a given instant of time, the path loss isidentical in both directions, that is, regardless of whether A transmits to B, or B transmitsto A (due to the principle of reciprocity), provided that the same antenna beamforms areused for transmission and reception. However, the path loss experienced by the transmis-sions from A and B (to each other) at different points of time can be different due to thelarge scale and small scale variations discussed above. Thus, transmissions from A to B andtransmissions from B to A may potentially encounter different channel conditions, and dif-ferent link reliability. In addition, differences in hardware implementation at the two hostscan result in different link characteristics in the two directions.

2.9 Summary

In this chapter, we defined the terms bandwidth, capacity, path gain and path loss. Wealso introduced a few path loss models. In addition, the chapter briefly discussed a simplemodulation scheme, and the relationship between the bit error probability and the SNR.Understanding of these concepts related to the physical layer will help in understandingdesign decisions made in wireless protocol design.

c© 2010 Vaidya 28

Page 41: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

CHAPTER 3

Distributed Medium Access Control in Wireless

Networks

3.1 Introduction

Wireless channel is a shared medium, and multiple transmitters can potentially trans-mit on the same channel at the same time. This raises the possibility of interference. Schedul-ing or medium access control (MAC) protocols are useful in achieving reliable transmissionsdespite this potential for interference. Scheduling mechanisms can be broadly classified intotwo categories: centralized and distributed. In centralized protocols, a designated host (forinstance, a base station), is given the responsibility to coordinate the access to the wirelesschannel. This is analogous to a teacher in a classroom deciding which student, from amongthose who have raised their hand, may ask the next question. On the other hand, distributedprotocols allow the various hosts to coordinate channel access without assigning special re-sponsibility to a single host. The distributed MAC protocols may be further classified intorandom access and coordinated access protocols [3]. Coordinated access protocols use apriori coordination to try to ensure that the transmissions performed at any given time willall be reliable (that is, achieve high enough SINR). One example of such protocols is token-passing; only a host holding a token is allowed to transmit a packet. This is analogous to ameeting wherein each person sitting at the table gets a turn to talk in, say, clockwise orderaround the table. Another example is a reservation-based scheme, where each host reservestime slots for its own transmissions. Thus, in any given time slot, only the hosts that havethat slot reserved may transmit. Random access protocols, in contrast, do not use such apriori coordination. At any given time, each host may potentially attempt to transmit apacket. This is analogous to conversations in a group of people at a party: following some

c© 2010 Vaidya 29

Page 42: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

social norms for politeness, the various individuals wishing to speak ensure that only oneperson talks at any given time (well, most of the time anyway).

In this chapter, we discuss some basic issues in the design of random access protocolsfor wireless networks. A goal in the design of such mechanisms is to utilize the wirelesschannel in the “best” possible manner. The best possible performance is subject to twofactors:

• Wireless channel characteristics: With poor channel conditions, best achievable per-formance is poor as well.

• Physical layer constraints: The physical layer may constrain the performance in manyways. Here we discuss three such possibilities.

– Consider a wireless link between hosts A and B. If the physical layer only supportstransmissions at the rate of 1 Mbps, 2 Mbps and 11 Mbps, then the wireless linkis limited to the maximum rate of 11 Mbps, even if the channel conditions maypermit reliable transmissions at a higher rate.

– Consider again a wireless link between nodes A and B, each equipped with onewireless interface (such as one IEEE 802.11g card). Suppose that the availablespectrum is divided into several different channels of identical bandwidth, andeach wireless interface is constrained to tune to any one channel at any giventime. Due to this limitation, the link between A and B can use only a fraction ofthe available spectrum at any given time.

– Consider an access point and multiple hosts that want to transmit data to thisaccess point. If the access point is designed such that it can decode only one trans-mission at any given time, then only one host should transmit data to the accesspoint at any given time. With a more capable access point, it may be possiblefor the access point to reliably receive multiple transmissions simultaneously.

Design of medium access control protocols is naturally dependent on the physicallayer capabilities and constraints. Unless specified otherwise, our discussion in this chapterand later chapters will make the assumption that each wireless interface may reliably receiveat most one transmission at any given time. Unless otherwise specified, each host is assumedto be equipped with one wireless interface.

3.2 Basic MAC Protocol

The discussion in this chapter will focus primarily on random access protocols. Webegin our discussion of random access protocols with a basic MAC protocol. When designing

c© 2010 Vaidya 30

Page 43: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

the MAC protocols, one important consideration is the propagation delay, which depends onthe distance between the hosts and the speed of light. In our discussion on MAC protocols,we will only consider environments wherein the propagation delay is small compared topacket transmission times. When the distance between hosts is 300 meters, the propagationdelay will be 1 microsecond (with speed of light 3 × 108 m/s), which is small comparedto, for instance, transmission time of a 1500 byte packet at 100 Mbps (specifically, 120microseconds). On the other hand, if hosts are 9,000 meters apart, then the propagationdelay is 30 microseconds, which is not negligible compared to the above 120 microsecondtransmissions time. Our discussion of MAC protocols implicitly assumes that the hosts usingthe protocol are relatively close to each other. The main consequence of the assumption isthat the propagation time is a small fraction of the transmission time for a packet.

The basic MAC protocol we consider here does not use much intelligence at thehosts (the basic protocol is based on the Pure Aloha [1] protocol). In the basic protocol,whenever the MAC layer at a host receives a packet from upper layers of the protocolstack, it immediately transmits the packet on the wireless channel. This simple protocolcan be adequate in certain environments, for instance, when the load on the network is low.However, in general, this approach suffers from two important shortcomings:

• The basic MAC protocol makes no provision to detect packet loss, and thus, cannotprovide reliability at the MAC layer. However. the basic protocol can be augmentedto improve its reliability, as discussed later.

• A packet sent by host S to host R is said to be lost due to collision if interference fromanother simultaneous transmission prevents reliable reception of the packet at host R.When the load on the channel is non-negligible, with the above basic protocol, twohosts may often attempt to transmit simultaneously, leading to a collision. The basicMAC protocol does not make any provision to detect such collisions, or to reduce thefrequency of collisions.

Many solutions have been developed to mitigate the above shortcomings of the basic MACprotocol. The rest of this chapter discusses some of these solutions.

3.3 Slotted Access

The basic protocol allows a host to transmit a packet at any point of time. Let usconsider an example of the use of this protocol. Assume that propagation delay betweenall host pairs is negligible. Consider three hosts S, R and P. Suppose that host S will haveone packet to be sent to host R, and host P will also have one packet to be sent to hostR. Assume that the transmission time for all data packets is L. Using the basic protocol,

c© 2010 Vaidya 31

Page 44: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

each host will transmit its packet as soon as the packet is available. Suppose that host Ssends the packet to host R starting at time t0. Assume that a collision would occur athost R if transmissions from hosts P and S overlap in time, preventing reliable reception ofthe packet from S. In general, in wireless networks, this is not always true. Reliability ofpacket reception depends on the signal-to-interference-and-noise ratio (SINR). Thus, evenwith transmissions overlapping in time, the transmissions may be received correctly. Inthe present discussion, however, we assume that a transmission can succeed only in theabsence of any overlapping transmissions by other hosts. Figure 3.1(a) shows the windowof vulnerability for the transmission from S, which is the duration in which a transmissioninitiated by host P will cause a collision at R. As can be seen from the figure, the length ofthe window of vulnerability is 2L. With the basic protocol, if the packet arrives at host P atany time during the 2L interval, a collision will occur at host R, since host P will transmita packet immediately upon receipt.

(a) (b)

t0 t1

P

S

R

t0 t1

P

S

R

2L L

L

Shaded duration depicts thewindow of vulnerability

t2 t0t2 t1

Figure 3.1 Window of vulnerability: Illustration assumes negligible propagation delays

The window of vulnerability can be reduced in half by utilizing a slotted access mech-anism. This mechanism divides time into equal-length slots, each slot being long enough totransmit one packet. The slot boundaries at all the hosts are synchronized; the slot bound-aries are shown by dotted lines in Figure 3.1(b). Each host is allowed to begin transmittinga packet only at the start of a slot. If the packet arrives at host P during a particularslot, it must wait until the start of the next slot. Thus, the transmission from host P willcause collision at host R only if P’s packet arrives in the slot preceding the slot in which Stransmits its packet, as shown in Figure 3.1(b). Therefore, the window of vulnerability isnow 1 slot time or duration L.

Our discussion above assumed that propagation delays are negligible. In general, thepropagation delays are non-negligible. Also the propagation delays may vary with time,and may be different between different pairs of hosts. However, we can design a slotted

c© 2010 Vaidya 32

Page 45: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

access protocol for a certain worst-case propagation delay – in other words, the protocol willfunction as intended so long as the propagation delay between any pair of hosts is smallerthan some value, say, τ . Under this assumption, we can achieve a window of vulnerabilityof 1 slot duration, by choosing a large enough slot size, as a function of maximum packettransmission time L and the propagation delay bound τ . In particular, if the slots begin atall hosts at the same time (that is, slot boundaries are synchronized), then slot size L + τcan be used while keeping the window of vulnerability equal to 1 slot. With this choiceof slot size, regardless of the propagation delay, transmissions by two hosts in a given slotwill arrive at the receiver(s) before that slot ends, assuming that the slot boundaries aresynchronized. Thus, a transmission by a certain host will overlap in time with at most onetransmission from another host, and thus the window of vulnerability is 1 slot.

In the above discussion, we assumed perfect synchronization, so that the slot bound-aries occur at all hosts at the same time. Such a perfect clock synchronization is not feasiblein practice. When the clocks are not perfectly synchronized. the clock skew, or the differencein the clock values at different hosts, can cause the slot boundaries at different hosts to occurat different times even if the hosts begin slots at the same clock value as per their own localclocks. This results in a window of vulnerability of 2 slots, if we use a slot size of L + τ .To maintain a window of vulnerability of 1 slot, the slot size should be chosen while takinginto account the clock skew. Suppose that the maximum clock skew is µ. Then, comparedto host S, the slot boundary at host P may occur early or late by duration µ. By increasingthe slot size to L+ τ +µ, we can achieve a window of vulnerability of 1 slot. To achieve thisgoal, it is important that packets transmissions begin only at occurrence of a slot boundaryat the transmitter.

Consider an example where host P transmits a packet to host R in a certain slot andhost S also transmits in the same slot. Now, the transmissions from P and S may start atmost µ interval apart, since the clock skew is at most µ. Similarly, the propagation delayfrom P to R can differ from the delay from S to R by at most τ . Thus, the transmissionsfrom P and S can arrive at R at most interval τ + µ apart. The “slack” of τ + µ in theslot size ensures that the transmission from P to R can overlap with at most 1 transmissionfrom S to R.

To analyze the benefits of slotted access, let us evaluate its performance under somesimplifying assumptions. Let us suppose that there are n hosts, which are always backlogged,and each host transmits a packet in each slot with probability p. Let us call p the accessprobability. Let us further assume that if two or more hosts transmit in the same slot,then their transmissions will not be successful. Recall from our discussion of Binary PAMthat transmission errors occur with some probability depending on the modulation schemeused, received signal power, etc. Thus, simultaneous transmission of two packets may notalways result in both packets being erroneous. Also, depending on the path gains, the errorprobability for the two simultaneously transmitted packets may not necessarily be identical.However, in the current discussion, we make the simplifying assumption that when two

c© 2010 Vaidya 33

Page 46: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

packets are transmitted simultaneously, they are both corrupted and discarded. Then, giventhat a host transmits a packet in a certain slot, the probability that the transmission will besuccessful is given by (1 − p)n−1: this is the probability with which no other host transmitsa packet in the same slot. Thus, the throughput of the system, measured in average numberof successful transmissions per slot, will be given by

Throughput = n p (1 − p)n−1 packets/slot

When n = 1, clearly p = 1 maximizes the throughput. When n > 1, it can be easily shownthat the throughput is maximized when p = 1/n, and the maximum value of throughput isgiven by

Maximum throughput =(

1 − 1

n

)n−1

In the limiting case, for large number of hosts,

limn→∞

(Maximum throughput) = limn→∞

(

1 − 1

n

)n−1

= limn→∞

(

1 − 1

n

)n (

1 − 1

n

)−1

= e−1 . 1

=1

epackets/slot

Comparison of the optimal performance of the slotted mechanism for n → ∞ with theunslotted mechanism is of interest. Recall that in case of the unslotted mechanism, thewindow of vulnerability is 2L, where L is the time required for one packet. To simplify ouranalysis, we will actually evaluate a slotted scheme but with unsynchronized slots. In thiscase, each host uses the slotted mechanism, but the slot boundaries are not synchronized.The window of vulnerability is at most two slots (which is comparable to the window ofvulnerability with the unslotted scheme). Let us consider the example in Figure 3.2. Itis easy to see that a slot at one host overlaps with at most two slots at another host. Forsimplicity of analysis, let us assume that a slot at each host overlaps with exactly two slots atanother host. For instance, slot i at host S in Figure 3.2 overlaps with slots i and i+1 at hostP. If host S transmits a packet in slot i, then a collision will occur if host P sends a packetin slot (i − 1) or slot i. Thus, given n hosts, the probability of a successful transmission in

slot i by host S will be ((1 − p)2)n−1 = (1 − p)2n−2. Thus, we obtain the throughput (inpackets/slot) as

n p (1 − p)2n−2 = n p (1 − p)2(n−1)

Figure 3.3 compares the throughput with the two approaches (in both graphs, the lowercurve corresponds to unsynchronized slots). Figure 3.3(a) plots throughput for n = 100 anddifferent values of p, whereas Figure 3.3(b) plots the throughput for p = 0.01 and different

c© 2010 Vaidya 34

Page 47: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

i−1 slot i

P

R

S

i−1 slot i

Figure 3.2 Unsynchronized slots (illustration assumes that propagation delays are negligible)

values of n. In the case of unsynchronized slots, the maximum throughput can be shownto occur at p = 1

2n−1. In the limiting case with n → ∞, the throughput is given by 1

2e

packets/slot. Thus, in the limiting case (when n → ∞), the lack of synchronization resultsin throughput degradation by a factor of 2 when compared to the case of synchronized slots.However, as a trade-off, the improved performance with synchronized slots requires clocksynchronization among the hosts to be able to choose suitable slot boundaries.

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

1e-05 0.0001 0.001 0.01 0.1 1

thro

ughp

ut (

pack

ets/

slot

)

access probability p

synchronized slotsunsynchronized slots

(a) n = 100

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

1 10 100 1000

thro

ughp

ut (

pack

ets/

slot

)

number of hosts n

synchronized slotsunsynchronized slots

(b) p = 0.01

Figure 3.3 Throughput comparison of synchronized and unsynchronized slots: In bothgraphs, unsynchronized slots result in lower throughput

3.4 Carrier Sensing

In the previous section, we improved on the performance of the basic MAC proto-col by using a slotted access mechanism, which reduces the window of vulnerability for atransmitted packet. In this section, we consider an alternative approach to reduce collisions,

c© 2010 Vaidya 35

Page 48: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

which may occur with the basic MAC protocol when multiple hosts in the vicinity of eachother transmit packets concurrently. For instance, as seen earlier, if host S is transmittingto host R, and at the same time host P transmits its packet, then host R may not receivethe transmission from host S reliably. Clearly, this situation is undesirable. Among a groupof people standing together at a party, when one person is talking, the rest of the (polite)people keep quiet to avoid interrupting her. Similar mechanisms are useful in wireless net-works to allow hosts to be polite. Carrier sensing is one such mechanism. Carrier sensinghas been used in wired as well as wireless networks, however, the path loss characteristicsof wireless networks provide more flexibility in the use of carrier sensing, as we will see laterin the context of power control at the MAC layer.

Intuitively, carrier sensing requires that each host listen to the channel, and if thechannel seems to be busy at a given time, then the host may not transmit at that time.Given that some noise is always present, the channel may never appear to be “idle” in thestrictest sense. In other words, each host may always sense non-zero energy on the channel.Thus, mere presence of energy on the channel is not a sufficient mechanism for determiningwhether a channel is busy. Let us return to our example of a party. Typically, the people atthe party will form several groups. While a person will keep quiet when someone in his owngroup is talking, the same deference is not shown when someone in another group fartheraway is talking. In other words, if someone close to John is talking at a given time, thenJohn will not start talking himself. However, if no one nearby is talking, then John maytalk even if he can hear someone far away talking at the same time. A simple strategy thatJohn may use to achieve this outcome is to talk only when he cannot hear anyone else loudlyenough.

Carrier sensing can be implemented in wireless networks similarly using a CarrierSense Threshold or CS threshold. In particular, if the received power level at a host exceedsthe CS threshold, then that host may assume that the channel is busy. On the other hand,if the received power does not exceed the CS threshold, then the host may consider thechannel as being idle. This approach is referred to as energy detection.

Energy detection is just one possible mechanism to detect the presence of ongoingtransmissions. The energy detection mechanism ignores the structure of the signal beingsensed, and instead, only considers the energy content of the signal. The alternative, referredas feature detection, looks for a particular pattern in the signal in order to detect a transmis-sion. For instance, the physical layer transmission format often requires that a well-knowna bit sequence, or preamble, be transmitted at the start of each packet transmission. Sucha preamble can be used by the other hosts to detect that a packet is going be transmitted,without requiring a priori clock synchronization between the hosts (such synchronizationis used in the slotted scheme in the previous section). Thus, if a host detects a preambletransmission on the channel, then it “senses” that a transmission is taking place. Energydetection and feature detection provide a trade-off between complexity of implementation

c© 2010 Vaidya 36

Page 49: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

and the accuracy of sensing. In much of our discussion below, we will assume that carriersensing is being performed using energy detection.

Carrier sensing using a CS threshold is illustrated using Figure 3.4. Consider host Atransmitting to host B. In Figure 3.4, the curves show the received power level as a functionof distance from host A; the example makes the simplifying assumption that the path lossconsists of only the large scale path loss, and that the received power at host C is attributedentirely to the transmission from A. In general, noise and interference from other sourceswill also affect the outcome of the carrier sensing function. We will mostly ignore this issuewhen discussing the examples.

Whether host C will sense the channel busy or not depends on the choice of CSthreshold at host C. In Figure 3.4(a), host C will perceive the channel as being idle becausethe received power is smaller than the CS threshold. On the other hand, if C were to use asmaller CS threshold, then as shown in Figure 3.4(b), host C will sense the channel as busy.As noted above, presence of noise and interference will also affect whether the channel issensed busy or not. Also, since noise is non-deterministic, carrier sensing outcome is alsonon-deterministic. Thus, even if the received signal power is below the CS threshold, thepresence of noise may sometimes result in the channel as being detected busy. We will ignorethis non-deterministic nature of carrier sensing in our discussion here. However, it should benoted that, when the noise power level is non-trivial compared to the received signal powerlevel, noise will have a significant impact on the efficacy of the energy detection mechanism.

distance distance

receivedpower

receivedpower

CS ThresholdCS Threshold

CC

(a) Large CS threshold (b) Small CS threshold

Figure 3.4 Carrier sensing using CS threshold

The example in Figure 3.4 shows that whether a host perceives the channel as beingidle or busy depends on the choice of the CS threshold. Clearly, while host A is transmitting,host C can also begin transmitting when using the higher CS threshold in Figure 3.4(a), butnot with the lower CS threshold in Figure 3.4(b). Which CS threshold is appropriate?

Suppose that the CS threshold is chosen as shown in Figure 3.4(a). Then host C maybegin transmitting even after A has started transmitting a packet to B. This transmission

c© 2010 Vaidya 37

Page 50: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

from C will cause interference at host B. Now, the reliability of the transmission from hostA to B depends on the SINR at host B. If the transmission from host C causes the SINRat host B to be too small, leading to unreliable reception, then it is preferable that hostC does not transmit at the same time. On the other hand, if the SINR at host B is highenough to ensure reliable reception, despite the transmission from host C, then it is betterthat C transmits as well. Such concurrent (reliable) transmissions can improve the aggregatethroughput in the network, by improving the spatial reuse of the wireless channel. Thus,in the former case, it would be better to use the lower CS threshold as in Figure 3.4(b),whereas in the latter case, it would be better to use the higher CS threshold in Figure 3.4(a).

To summarize the above discussion, increasing the CS threshold will improve thespatial reuse of the wireless channel, while the SINR at the receivers may decrease. Clearly,there is a trade-off between the spatial reuse and the reliable transmission rate. HigherCS threshold will generally allow more simultaneous transmissions, but at a lower rate, ascompared to a lower carrier sense threshold. Since the aggregate throughput in the networkdepends on spatial reuse as well as transmission rates, the CS threshold should be neithertoo small, nor too large. The optimal CS threshold depends on many parameters, includingnetwork topology, channel conditions, as well as the traffic patterns.

Let us now consider how the choice of the CS threshold affects interference. Considerthe example in Figure 3.5(a). Let us assume that all transmitters use the transmit powerPt. Let us denote the path gain from a host X to a host Y as gXY . When host A transmits apacket to host B at power level Pt, this transmission will be received by host C at power levelPt gAC . Host C can pose interference at the receiver of A’s transmission, namely, host B,only if host C actually transmits. For host C to begin transmitting when host A is alreadytransmitting, the received power level Pt gAC at host C must be below the carrier sensethreshold PCS. As noted earlier, we ignore the noise in our analysis here. Thus,

Pt gAC ≤ PCS ⇒ Pt ≤ PCS

gAC(3.1)

Now, since host C transmits at power level Pt, the interference ICB posed by host C at hostB will be Pt gCB. The above inequality implies that

Interference ICB = Pt gCB ≤ PCS

gACgCB = PCS

gCB

gAC(3.2)

The above inequality provides an upper bound on the interference posed by hostC at host B. Clearly, a smaller carrier-sense threshold (PCS) used by host C results in asmaller bound on the interference from host C. In fact, the interference bound is linearlyproportional to PCS. Thus, the carrier sense threshold provides a mechanism for a host tolimit its interference to other ongoing transmissions. In a similar manner, the carrier sense

c© 2010 Vaidya 38

Page 51: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

threshold used by host C also bounds the interference posed by host A at the receiver ofC’s transmission, say host D. Again, suppose that host A is already transmitting a packet,and then host C transmits to host D despite A’s ongoing transmission. Then, we must havePt ≤ PCS/gAC , as in Equation 3.1. Thus, the interference IAD posed by host A at host Dwill be given by

IAD = Pt gAD ≤ PCSgAD

gAC

Thus, the carrier sense threshold used by host C affects the interference C may pose toother ongoing transmissions, as well as the interference at host C’s receiver by other ongoingtransmissions.

A B

CD D

A B

C

(a) No hidden terminal (b) Obstacle makes carrier sensing difficult

Figure 3.5 Example for carrier sensing: The dark box in the figure depicts a wall

Hidden Terminals:

As discussed earlier, transmissions are said to collide at a host, say host R, if thetransmission intended for host R is not received reliably by host R due to interference fromanother transmission or transmissions. While the carrier sensing mechanism discussed aboveis useful to reduce the possibility of collisions, it does not necessarily eliminate all collisions.To illustrate the limitations of the carrier sensing approach, let us consider the example inFigure 3.5(b). Suppose that while A is transmitting to host B, host C does not sense thechannel as busy. In this case, the received power at C is low because the path loss from Ato C is higher due to the presence of an obstacle (shown in black in the figure). However,if C begins transmitting, then the interference from C will be high at host B since there isno obstacle between B and C. This may cause a collision at host B, resulting in unreliablereception of A’s transmission. Observe in Equation 3.2 that, if gAC is small, the bound oninterference becomes large.

Hosts A and C are said to be hidden from each other, since they may not be ableto sense each other’s transmissions, and yet, their transmissions can collide. To mitigatethis limitation of carrier sensing, other mechanisms can be incorporated, as we will discusslater. Alternatively, the hosts can become more “sensitive” by using a smaller CS threshold.However, a smaller CS threshold increases the instances of exposed terminals discussed below.

Exposed Terminals:

c© 2010 Vaidya 39

Page 52: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

While the presence of hidden terminals can result in a collision, exposed terminalsresult in a host unnecessarily deferring transmissions. Consider the example in Figure 3.6.In this case, suppose that concurrent transmissions from B and C, to hosts A and E, re-spectively, can complete reliably due to high SINR. However, since B and C are sufficientlyclose to each other, when B is transmitting to A, host C may sense the channel as busy, anddelay its transmission to host E. Similarly, when C is transmitting to E, host B may defertransmission. Thus, although it may be possible to perform the two transmissions reliablyconcurrently, the use of carrier sensing may prevent this possibility. Clearly, by making thecarrier sense threshold larger, we can prevent hosts B and C from deferring to each other.However, the larger carrier sense threshold may result in collision in other cases due to anincrease in the interference, as seen earlier.

A B C E

Figure 3.6 Exposed terminals

The above discussion on carrier sensing, hidden terminals, and exposed terminalsleads to the following two conclusions:

• Carrier sensing alone cannot prevent all the collisions due to the presence of hiddenterminals.

• An attempt to reduce the possibility of collisions due to hidden terminals by decreasingthe CS thresholds can result in a reduction in spatial reuse due to exposed terminals.

Despite these limitations of carrier sensing, this mechanism is in use in practical protocolssuch as IEEE 802.11. An attractive feature of carrier sensing is that it is fully distributed.Each host can independently make decisions on when it is acceptable to transmit a packet,based on its local observation of the channel status.

3.5 Collision Detection and Avoidance

The term collision detection refers to the ability of a host to detect that its transmis-sion has collided with another transmission, resulting in unreliable reception of its transmis-sion at the intended receiver. Collision detection is incorporated in the Ethernet protocol.To perform collision detection, when a host using the Ethernet protocol transmits a packet,the host simultaneously receives signal from the Ethernet channel. A discrepancy betweenthe transmitted signal and the received signal indicates the presence of another transmitteron the Ethernet, resulting in collision detection. The collision is detected within a short

c© 2010 Vaidya 40

Page 53: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

time after a colliding packet begins transmission. The delay includes propagation delayand the time required to detect discrepancy between transmitted and received signals. Thiscollision detection mechanism, however, requires the ability to transmit and receive signalssimultaneously on the same channel.

In case of wireless networks, when a host transmits on a given channel, attempts toreceive on the same channel simultaneously will result in the received signal being dominatedby the transmitted signal. Perhaps more importantly, the collision that we want to detectoccurs at the receiver, not the transmitter, of a packet. Thus, the transmitter cannot detecta collision accurately without some feedback from the receiver. This makes it difficultto implement Ethernet-style collision detection mechanism in wireless networks. Insteadof collision detection, collision avoidance mechanisms have been incorporated in practicalwireless MAC protocols, with the goal of avoiding or reducing the occurrence of collisions.

Collision with a transmission from a host A to a host B may occur from two types ofinterfering transmissions, which we will refer to as simultaneous and concurrent transmissions[24]:

• Simultaneous transmissions: Suppose that host A is close enough to host C suchthat A and C can carrier sense each other’s transmissions using the chosen carriersense thresholds. Now, host C can detect the transmission from host A by meansof carrier sensing only if host C performs carrier sensing after host A has started itstransmission. Let us assume that the maximum propagation delay between hosts Aand C is τ , and that the maximum delay required for carrier sensing is σ. Also, letus define δ = τ + σ. As shown in Figure 3.7, if host A starts transmitting a packetat time t, then host C may not sense that transmission before time t + δ. Thus,host C may start its own transmission during the interval (t, t + δ) despite performingcarrier sensing. Now, if host C performs carrier sensing during the interval (t − δ, t),it will not sense A’s transmission, since A is yet to begin transmission. Thus, hostC may possibly start transmitting in the interval (t − δ, t). This transmission fromhost C will not be sensed by host A prior to t either (due to the propagation andcarrier sensing delays). In summary, a transmission from host A that begins at timet can collide with a transmission from C that can start anytime during the interval(t − δ, t + δ) despite carrier sensing. We refer to transmissions that occur during thisinterval as occurring simultaneously with the transmission from A at time t. It shouldbe clear that the carrier sensing mechanism cannot help avoid collisions between suchsimultaneous transmissions. Later in this chapter, parameter δ will be used to definea slotted access scheme that uses carrier sensing.

• Concurrent transmissions: Again consider a transmission from host A to host B. InFigure 3.5(b), with the chosen CS threshold, host C is not able to sense the transmissionfrom host A. In this case, even if host C were to sense the channel δ duration afterhost A’s transmission commences, host C will still determine the channel to be idle,

c© 2010 Vaidya 41

Page 54: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

A

t

t

δ

Figure 3.7 Simultaneous transmission during (t − δ, t + δ) can lead to a collision.

and transmit. Such a transmission is said to be a concurrent transmission. Theconcurrency in transmissions is generally a desirable phenomenon, since it improvesthe spatial reuse of the channel. However, the concurrent transmissions can also leadto excessive interference, resulting in packet loss.

While a suitable choice of the carrier sense threshold may help reduce the interferencedue to concurrent transmissions, it does not help alleviate interference from simultaneoustransmissions. Other collision avoidance mechanisms need to be utilized to reduce suchinterference. We will discuss some solutions for this purpose later in the chapter.

3.6 Reliability

Each transmission on the wireless channel can potentially be unreliable due to thepresence of noise as well as interference from other transmitters. One issue to considerwhen designing the MAC protocols is whether the MAC layer should attempt to providehigh reliability or not. As we will discuss in the context of transport protocol performanceover wireless networks, it is often desirable to provide a reasonable level of reliability at theMAC layer. To achieve this, retransmission mechanisms as well as forward error correctionmechanisms may be used.

We now discuss a simple retransmission scheme to improve reliability. In this scheme,when a host receives a data packet reliably, it is expected to immediately send an acknowl-edgement (Ack) to the sender. When the sender receives the Ack, it will know that its datapacket was delivered reliably. On the other hand, if the sender does not receive the Ackwithin a suitable retransmission timeout interval, the sender will assume that the packetwas not delivered reliably. While waiting for the timeout to occur, the sender will remainidle. When a timeout occurs, the sender may retransmit the packet to the receiver. Theretransmission timeout interval should be long enough to allow time for the data packet to

c© 2010 Vaidya 42

Page 55: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

reach the receiver, processing delay at the receiver in generating the Ack, and the time forthe Ack to reach the sender.

This simple “stop-and-wait” protocol, wherein a host waits to receive an Ack beforesending the next packet, is inefficient when the delay-capacity product of a link is large.Consider an analogy with cars traveling on a street, where we do not allow a new car toenter the street until the previous car has exited the street. If the street length is short sothat it takes very little time for a car to travel the street, then this approach will keep thestreet busy most of the time. However, if the time required to travel on the street is very long,then we will keep the street underutilized. Similarly, the simple retransmission protocol willunderutilize the channel if the delay-capacity product is large. However, in our discussion, weimplicitly assume small delay-capacity product. Even when delay-capacity product is small,some improvement in performance can be obtained by sending an acknowledgement for a setof packets, as opposed to one acknowledgement for each packet. Note that, delay-capacityproduct is commonly referred to as delay-bandwidth product in the networking literature.To avoid confusion with the spectrum used (measured in Hertz), we will avoid using theterm bandwidth in the present context.

Let us illustrate the above scheme using the example in Figure 3.8. In the example,the first transmission of a data packet from A to B is successful, but the resulting Ack fromB is not received reliably by host A. When host A fails to receive the Ack within the timeoutinterval, it retransmits the data packet. In this case, the data was, in fact, received by Bafter the initial transmission, but host A has no mechanism to learn this, since the Ack waslost. The second transmission of the data packet is unreliable, thus, B does not receive thedata, and does not send the Ack. After a timeout interval, node A again sends the datapacket, followed by the transmission of Ack by B. When A receives the Ack, it knows thatthe packet is received by B reliably. Thus, for a “dialog” to conclude, the data packet mustbe received by B reliably, and the subsequent Ack from B must be received reliably by A.This implies that within a single dialog, both A and B act as receivers; B is receiver for thedata, and A is receiver for the Ack. Due to this, we must take precautions to protect bothdata and Ack packets.

The maximum number of retransmission is usually chosen to be a finite number.Allowing for an arbitrarily large number of retransmissions can degrade performance whena link is broken because of host mobility. In such cases, retransmissions cannot deliverpackets reliably.

As seen in the example in Figure 3.8, a host may receive the same packet multipletimes due to the retransmissions. In this case, to allow the MAC layer at the receiver todetect duplicate packets, a unique sequence number can be associated with each packet.Packets with identical sequence number can be considered duplicates. Of course, since thesequence numbers will usually be assigned a fixed number of bits, the sequence numbers willbe reused eventually. However, if the sequence numbers are not reused too close to each

c© 2010 Vaidya 43

Page 56: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

other, then it is possible to avoid ambiguity between two different packets using the samesequence number.

data data dataA

B

Retransmission Retransmission

Ack Ack

Ackinterval interval

TimeoutTimeout

received

Figure 3.8 Retransmission mechanism for reliability

3.7 Overhead of Packet Collisions

When two transmissions collide, the time spent on the lost packets is wasted. Thus,it is important to incorporate mechanisms to reduce the collision overhead. Two factorsaffect the collision overhead:

• Cost of a collision: Cost of a collision is the channel time that is wasted in unfruitfulcommunication. The time spent in transmitting the lost data packet is clearly a partof this cost. There may also be additional costs. Recall that, in the retransmissionprotocol discussed above, the retransmission interval includes time for the transmissionof the Ack as well. During the retransmission timeout interval, while waiting for theAck, the transmitter stays idle, thus not utilizing the channel.

• Frequency of collisions: The frequency with which collisions occur affects the totalcost of collisions. Clearly, it would be nice to not have any collisions at all. However,eliminating all collisions will require a coordination among the hosts, which itself incursan overhead. Random access protocols do not eliminate the collisions altogether, butattempt to reduce the frequency.

Clearly, to reduce the overhead due to collisions, it is useful to reduce the cost as well asfrequency of collisions. In this section, we present a simple technique to reduce the cost of acollision. In the case of Ethernet, collision cost is reduced by quickly detecting a collision. Inthe wireless network, as discussed earlier, collision detection is difficult. Thus, even when acollision occurs, the entire data packet is transmitted. When the data packets are long, the

c© 2010 Vaidya 44

Page 57: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

cost of the collision is high. A simple approach for reducing this cost of collision is to reservethe channel before sending the data, by first sending a shorter control packet. In particular,a host, which wants to transmit a data packet, first sends a Request-to-Send (RTS) packetspecifying the intended receiver for the packet, and the duration of time required to sendthe data packet. The RTS may be sent using the basic mechanism discussed earlier. If nohost transmits a packet that interferes with the RTS, the intended receiver for the RTS,as well as other nearby hosts in the network will receive the RTS reliably. Thus, the otherhosts learn the duration of the impending data transmission, and can elect to stay silentfor that duration, avoiding collisions with the subsequent data packet transmission. Theintended receiver of the RTS, on receiving the RTS reliably, will respond by transmitting aClear-to-Send (CTS) packet. Essentially, the CTS serves as an acknowledgement that thereceiver has received the RTS reliably. When the sender receives a CTS from its intendedreceiver, the sender will then send the data. The presumption here is that, since the RTSwas delivered reliably, the data will be delivered reliably as well. If a host does not receivea CTS from the intended receiver, the host does not transmit its data packet.

Clearly, the above scheme incurs the overhead of RTS and CTS. However, as a trade-off, the cost of a collision is reduced (unless the time required to send the data packet issmaller than that required for the RTS-CTS exchange). To quantify the relative benefits,let us assume that the data packets sent by any two hosts are identical in size, and thatcolliding transmissions begin at the same time. When not using RTS-CTS, let us denote thecost of a collision by Ldata. Ldata would include the transmission time for the data packet,and time for sending an Ack in response. On the other hand, when using RTS-CTS, let usdenote the cost of a collision of the RTS by Lrts,cts. Lrts,cts is the duration required for anRTS and CTS exchange.

With sufficiently large data packets, the cost of a collision when using RTS-CTS willbe smaller. However, since RTS-CTS imposes an overhead even when there is no collision,the cost reduction in the presence of collisions needs to be sufficient to justify the increasedoverhead in absence of collisions. In particular, suppose that each transmission may belost due to collision with probability pc, incurring a cost of Ldata or Lrts,cst, depending onthe scheme used. Now, before a successful transmission occurs, on average, pc/(1 − pc)transmission attempts will result in collisions. Therefore, for the RTS-CTS mechanism tobe beneficial, we must have that

pc

1 − pcLdata + Ldata >

pc

1 − pcLrts,cts + (Lrts,cts + Ldata)

⇒ pc Ldata > Lrts,cts

The above simplified analysis suggests that, if RTS-CTS impose low overhead, when com-pared to pc Ldata, then the use of the RTS-CTS mechanism will improve performance. Inother words, if collisions are frequent enough and data packets are large enough, then RTS-CTS mechanism is beneficial. On the other hand, if Lrts,cts is not small enough, then theRTS-CTS mechanism may not be beneficial.

c© 2010 Vaidya 45

Page 58: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Recall that collisions can occur due to interference from simultaneous transmissions,as well as concurrent transmissions. The solutions that might help reduce interference from(or collision with) concurrent transmissions will not always help in avoiding collisions fromsimultaneous transmissions. In particular, the above RTS-CTS solution will only be effectivefor collisions due to simultaneous transmissions. In the next section, we begin discussion ofsolutions for reducing the frequency of collisions.

3.8 Solutions for Hidden Terminals

The example in Figure 3.5(b) illustrates how the hidden terminal problem occurswith carrier sensing. The carrier sensing mechanism relies on the ability of an interferer,host C in Figure 3.5(b), to sense the transmission from host A. However, since the path gainbetween hosts A host C is low, host C is unable to detect the transmission from A. Yet, ifC were to transmit, its transmission collides at host B with the transmission from host A.Since the path gain from A to C is low, an alternative mechanism is needed to signal tohost C that it is unsafe to transmit. Following this intuition, two mechanisms have beendeveloped to solve the hidden terminal problem: busy-tones, and virtual carrier sensing.

Busy-Tone Mechanism

This mechanism requires the use of an additional channel for the transmission of abusy-tone [21]. The busy-tone channel and the channel used for data occupy non-overlappingbands of spectrum. Conceptually, the busy-tone scheme is quite simple. When a host isreceiving a packet, it announces that it is busy by transmitting a tone on the busy-tonechannel. This busy-tone would be heard by the nearby hosts. Thus, potential interferersin the vicinity of host B can learn that it is not safe to transmit a packet. Such hosts willremain silent until the busy-tone channel becomes idle. In the example in Figure 3.5(b),when host B begins receiving a packet from host A, host B transmits a busy-tone. Whenhost C senses the busy-tone signal from host B, it will remain silent, thus, preventing acollision at host B.

Despite the use of busy-tones, there is a short interval of time during which a trans-mission is vulnerable. In particular, it takes some time for host B in our example to detectthe transmission from host A, and to begin transmission of the busy-tone; an interfering hostmay begin transmission before it receives the busy-tone from host B, potentially causing acollision.

The main distinction between the carrier sensing and the busy-tone scheme is in thesignal that the potential interferers are required to sense. In particular, in carrier sensing,

c© 2010 Vaidya 46

Page 59: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

the potential interferer would need to sense signal from the transmitter of an ongoing datatransmission. On the other hand, the busy-tone is transmitted by the receiver of an ongoingdata transmission.

To understand the importance of this relatively small distinction, let us do a simpleanalysis. Suppose that the transmit power for the busy-tone is Pt, identical to that used fordata, and that threshold PCS is used for sensing busy-tone and data channels both. Thus,the received power at host C for data packet transmitted by host A would be RAC = Pt gAC.On the other hand, the received power at host C for the busy-tone transmitted by host Bwould be RBC = Pt gBC . Now, if the path gain gAC is small, then RAC may be below theCS threshold, and yet RBC may be above the CS threshold, if gain gBC is large enough.Thus, it is indeed possible that C may detect the busy-tone sent by B, even if it could notcarrier sense the transmission from host A. Similar to the derivation of Equation 3.2, if hostC transmits a packet despite the fact that host B is transmitting the busy-tone signal, thenit follows that Pt gBC ≤ PCS, or equivalently, Pt ≤ PCS/gBC . Thus, the interference ICB

that might be posed by host C at host B is upper-bounded as shown below:

Interference ICB = Pt gCB ≤ PCS

gBCgCB = PCS assuming gBC = gCB (3.3)

Observe that the above upper bound on the interference depends only on the carrier sensethreshold used by host C. Thus, with the busy-tone, PCS provides an accurate bound onthe interference from each interferer. In contrast, recall from Equation 3.2 that, if host Crelies on sensing the data transmission from transmitter host A, then the interference posedby host C at host B is bounded by PCS

gCB

gAC. This bound will be large when gAC is small.

Thus, carrier sensing a signal sent by the receiver, as opposed to the transmitter, provides abetter bound on the interference posed by an interferer, since a host such as C can controlits carrier sense threshold PCS, but not the path gain gAC .

BA

C

D

EF

Figure 3.9 Multiple interferers may be present

How should we choose the carrier sense threshold PCS for the busy-tone? We knowthat an interferer will not pose interference greater than PCS. Thus, we could choose the

c© 2010 Vaidya 47

Page 60: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

carrier sense threshold PCS to be equal to the amount of interference we want to be abletolerate at the receiver. Such a choice can allow adequately reliable delivery despite in-terference from one interferer. But with multiple interferers, it is possible that the totalinterference may still exceed the tolerable limit. For instance, in Figure 3.9, suppose thathost A is transmitting data to B, and that hosts E and F are just far enough that theydo not sense the busy-tone from B, or the data transmission from A. Thus, hosts E andF may both potentially transmit packets that will interfere with data reception at host B.To allow for such multiple interferers, PCS should be chosen to be a fraction of the totalinterference that is tolerable at a receiver. In particular, if total interference that can betolerated is I, then to allow k interferers, the interferers should choose PCS at most I/k.Now, with PCS = I/k, it may actually be possible to tolerate more than k interferers if theinterference from each of the interferer turns out to be lower than the PCS. The number ofhosts that might interfere with a given transmission is not always known a priori, however.In general, making PCS smaller will result in lower interference, but at the same time, it willalso allow fewer concurrent transmissions. Thus, there is a trade-off between spatial reuseand reliability, as we have discussed previously as well.

Although the busy-tone scheme discussed above is relatively simple, several issuesaffect its efficacy, as discussed next:

• Fading: Busy-tone requires additional spectrum, which increases the overhead of theaccess mechanism. To keep this overhead small, a narrow-band busy-tone channel maybe used. However, narrow-band channels are more prone to fading, which reduces thereliability of busy-tone sensing.

• Gain differences between the busy-tone and data channel: In our derivation of Equa-tions 3.2 and 3.3, we implicitly assumed that the path gains are identical for dataand busy-tone channels. However, when the data and busy-tone signals use non-overlapping frequency bands, their propagation characteristics may not be identical.Thus, it is possible that the gain on the busy-tone channel between B and C is low,but the gain on the data channel between C and B is high. In this case, host C maynot sense the busy-tone from B, but its transmission on the data channel can causea collision at B. On the other hand, if busy-tone gain is higher, then host C may un-necessarily defer its transmission, similar to the exposed terminal problem discussedearlier. Thus, significant gain differences will defeat the busy-tone mechanism.

• Impact of the gain between a receiver and an interferer: Consider a transmission fromhost A to host B in Figure 3.5(b), with host C as the potential interferer. For thisdiscussion, let us assume that the busy-tone and data channel have the same gain.What happens if the path gain between B and C is low, and host C fails to sense thebusy-tone transmission from host B?

Fortunately, a low gain between hosts B and C does not have the same detrimentaleffect, as a low gain between A and C has for the carrier sensing scheme. If the path

c© 2010 Vaidya 48

Page 61: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

gain from B to C is low, then the gain is also low from C to B. Thus, if C were totransmit, it will cause low level of interference at B due to the low path gain (recallthat we are assuming identical gains for busy-tone and data channels). In the analysisof the upper bound on interference when using the busy-tone, notice that the upperbound is independent of the gain gCB (Equation 3.3). Thus, a smaller value for thegain does not affect the worst-case interference from an interferer.

A caveat is in order here. The time interval over which the busy-tone is sensed by hostC, and the time interval over which C makes an interfering transmission are disjoint.Gain gBC in the derivation of Equation 3.3 affects sensing of the busy-tone, whereasgCB affects the interference posed by C. In our analysis, we assumed that these twogains are identical. However, if the channel changes rapidly, then the assumption thatgCB = gBC will no longer be valid, and the benefit of sensing the busy-tone would bereduced accordingly. The assumption of symmetry (that is, gBC = gCB) may also beincorrect in practice due to differences in receiver implementations at different hosts.Also, as noted earlier, since busy-tone and data are sent on different channel, gBC andgCB may be different.

• Reliability of Ack packets: As we discussed previously, a simple mechanism to improvereliability is to require the receiver to send an acknowledgement (Ack) to the senderof the data packet, and to require the sender to retransmit a packet if an Ack isnot received within a suitable timeout interval. Consider the use of busy-tone inthe example in Figure 3.10 wherein host A sends data to host B. In this case, thebusy-tone sent by B may protect data reception at host B by preventing a concurrenttransmission from host C. If carrier sensing on data channel is also used in additionto busy-tone sensing, hosts in the vicinity of host A may defer transmission while hostA is transmitting the data packet. However, this does not ensure that a collision willnot occur when host A receives the Ack from host B. Consider two potential solutionsfor this problem:

– The first solution is to require a host to remain silent not only while it is sensingthe data channel as busy, but also for a certain interval after the data channelis sensed as changing from busy to idle state. This additional interval should belong enough to allow a host, such as host A in our example in Figure 3.10, toreceive the Ack subsequent to transmitting a data packets. With this approach,host D in Figure 3.10 will not cause interference with Ack reception at host A.A disadvantage of this approach is that host D will remain silent for the aboveinterval even if host A does not receive an Ack because its transmission of datato host B is unreliable.

– The second solution is to also require host A to send a busy-tone when it isreceiving the Ack packet. Thus, unlike the above solution, host D will not haveto stay silent unnecessarily when host A does not receive an Ack.

c© 2010 Vaidya 49

Page 62: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

A

B

data

Ack

Ddata channelsensed busy

Additionalsilent durationto protect Ackreception at A

Figure 3.10 Protecting Ack transmission when using busy-tone and carrier sensing

Now we discuss an alternative to the busy-tone mechanism. In our subsequent dis-cussion, we will often refer to carrier sensing mechanism discussed so far (using a carriersense threshold) as physical carrier sensing, to distinguish it from the virtual carrier sensingmechanism to be introduced below.

Virtual Carrier Sensing

The use of busy-tone introduces two complexities: First, a separate busy-tone channelis necessary for the busy-tone, requiring the use of additional bandwidth. Second, the hostsare required to transmit a busy-tone while receiving on the data channel, requiring morecomplex hardware. To overcome these obstacles, an alternative mechanism that relies onadditional control packets on the data channel can be used. The alternative mechanism, asdescribed below, also introduces overhead. However, the control packets can be sent on thesame channel as the data. This mechanism, called virtual carrier sensing (VCS), is obtainedby modifying the RTS-CTS mechanism. We previously saw that the use of RTS-CTS canhelp reduce the cost of collisions. With a simple modification, RTS-CTS can also help reducecollisions from hidden terminals.

Recall that the RTS-CTS approach we discussed previously requires that, before ahost such as host A in Figure 3.9 transmits a data packet, it should send a RTS packet tothe receiver, namely, host B in our example. The RTS packet specifies the time durationrequired for the proposed transmission; essentially, this duration specifies when host A needsthe nearby hosts to remain quiet so as to complete the transmission to B successfully. If thehosts that can interfere with the reception at host B are all among the hosts receiving theRTS from A, the RTS may potentially suffice to avoid collision with the data packet fromhost A to host B. Due to the hidden terminals, hosts such as host C in Figure 3.9 might notreceive the RTS from A. However, similar to the busy-tone from host B, host C has a betterchance of receiving the CTS from host B. If we augment the CTS to include the duration

c© 2010 Vaidya 50

Page 63: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

of the proposed data transmission from host A to host B, then host C can learn how long itmust stay silent in order to avoid interfering with the reception of the data packet at hostB. Thus, host C will remain quiet even though it may not be able to physically carrier sensethe transmission from A. The mechanism using RTS-CTS is, therefore, called virtual carriersensing, whereas the carrier sensing mechanism described earlier is called physical carriersensing.

The above mechanism may prevent host C from interfering with data reception athost B (in Figure 3.9). What about Ack reception at host A? Protection for Ack receptioncan be provided by requiring the host receiving the RTS to be silent for the interval whenACK is expected. The resulting silent intervals at hosts C and D are shown in Figure 3.11(a).In this case, host D receives RTS from A, and stays silent when A is expected to receivethe CTS and ACK. Similarly, host C receives the CTS from B, and stays silent when B isexpected to receive the data. If virtual carrier sensing is used in conjunction with physicalcarrier sensing, then host D may sense RTS and data transmissions from A, and also staysilent during these transmissions; similarly, C will also be silent when it senses transmissionof CTS and Ack from B.

silent forsilent forCTS at A Ack at A

A

B

C

D

RTS

CTS Ack

data

silent for datareception at B

A

B

C

D

RTS

CTS Ack

data

silent duration

silent duration

(a) Silent intervals to avoid collision (b) Conservative silent intervals

Figure 3.11 Using RTS-CTS handshake to overcome hidden terminal problem

What happens if host D also hears a RTS from another host, say F? Then host Dwill have to stay silent long to allow the transmission from F to complete reliably. Thesilent intervals for F’s transmission may be disjoint or overlapping with the silent intervalsrequired for A’s transmission. Keeping track of these silent intervals can become somewhatcumbersome. Also, the window of time between the two silent intervals (see Figure 3.11)during which D must be silent might not be long enough for D to communicate with another

c© 2010 Vaidya 51

Page 64: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

host. A simplification of the protocol can be achieved by requiring all hosts that receivean RTS or CTS to stay silent long enough to allow time for the subsequent data and Acktransmissions to complete. With this modification, in our example, host C and D both willstay silent long enough to allow host A to receive the Ack, as shown in Figure 3.11(b). Thereare two other reasons why this modification is desirable. Refer to the topology in Figure 3.5for this discussion.

• First, it may be the case that host C is in the transmission range of hosts A and Bboth, but due to interference during the time when host A transmits the RTS, host Cdoes not receive the RTS. Subsequently, host C does receive the CTS. Now, by stayingsilent until the Ack reception at host A, host C can avoid interfering with the Ack.

• Second, and perhaps more importantly, even if host C may not receive the RTS fromhost A reliably, it is still possible for host C to cause enough interference at host A,causing unreliable Ack reception. In Chapter 2, we saw that reliability of the receptionof a packet is a function of the SINR. Let us assume the SINR-threshold model fromSection 2.7. In particular, assume that a packet will be received reliably if the SINRfor the packet exceeds a certain threshold β. Assume that noise power at each hostis N . Now, the SINRC at host C for the RTS transmission from host A is ay mostPt gAC/N , even without any interference. On the other hand, SINRA for the Acktransmission from host B to A, while enduring C’s interference would be bounded as

SINRA ≤ Pt gBA

Pt gCA + N

Is it possible that SINRC < β and SINRA < β both? If both these conditions holdthen C might not receive A’s RTS, and yet its interference will cause a collision withAck reception at host A. These two conditions will hold true, if

Pt gAC

N< β

andPt gBA

Pt gCA + N< β

By rearranging the terms in the above two inequalities, we obtain the following twoinequalities.

gAC <β N

Pt

and

gCA >gBA

β− N

Pt

c© 2010 Vaidya 52

Page 65: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Then, with gCA = gAC , we must have

gBA

β− N

Pt<

β N

Pt

The above inequality can be rewritten as

gBA <β(β + 1)N

Pt

Clearly, the path gains may turn out to be such that the above condition holds. Inessence, the fact that host C does not receive an RTS from A is not sufficient to concludethat host C will not cause a collision at host A. Therefore, to be conservative, hostC may stay silent long enough to allow host A to receive the Ack from C, as shownin Figure 3.11(b). Similarly, a host that does not receive the CTS may conservativelystay silent during the data transmission to avoid causing a collision with the datapacket.

Such a conservative approach may sometimes keep the hosts silent unnecessarily. Forinstance, what if host A’s RTS is not received reliably by host B? In this case, hostB will not respond with a CTS, and host A will not transmit data. But host D thatreceives the RTS will stay silent to allow time for both data and Ack transmission. Thisis an example of the trade-off between different types overheads that can potentiallyoccur in medium access.

Virtual carrier sensing mechanism can also be extended to data packets. In particular,the data packet can specify the duration of time required to complete the dialog after thedata packet has been transmitted. Thus, a host such as D can determine that it needs tobe silent during the Ack reception at host A, even if D does not reliably receive the RTS,but receives the data from A reliably.

The RTS-CTS handshake can be viewed as an attempt at reserving some “space” forthe proposed data transmission. We illustrate the space reserved by RTS-CTS using theexample in Figure 3.12. In this case, host A sends RTS to B, and B responds by sendingCTS to A. All hosts that receive the RTS from host A are within the large circle centeredat A, and similarly, the that receive the CTS are within the large circle centered at B.Such hosts, which are shaded in the figure, keep silent for the duration specified in the RTSand CTS, respectively. Thus, the shaded hosts do not interfere with the data transmissionfrom A to B, or the Ack from B to A. Thus, the area “occupied” by these silent hosts canbe deemed to have been reserved for A’s transmission. Note that this is only an intuitiveway to interpret the outcome of the RTS-CTS exchange, not a precise description. In thiscontext it is helpful to recall, from our discussion of transmission range in Section 2.6 ofChapter 2, that transmissions are not guaranteed to be received reliably by all hosts withinany particular area around a transmitter.

c© 2010 Vaidya 53

Page 66: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

A B CD

E

FG H

I

Figure 3.12 Space reserved by virtual carrier sensing mechanism using RTS-CTS: Althoughthe figure shows circular spaces, in reality, the shape will usually not be circular due tovariations in path gains, and differing interference levels.

As the above example illustrates, the use of RTS-CTS handshake reserves some areaaround the sender and receiver. Unlike the illustration in the figure, however, the area overwhich RTS and CTS transmissions are received reliably is not always circular, due to largescale and small scale path loss, and interference.

When only virtual carrier sensing is used (and physical carrier sensing is not used),the hosts that do not receive RTS or CTS can transmit packets. For instance, in our examplein Figure 3.12, if only virtual carrier sensing is used, but no physical carrier sensing is used,then host E can quite possibly transmit when A is receiving an Ack from B, since E does notreceive the RTS or the CTS. However, as the earlier discussion suggests, the transmissionfrom E may still cause collision with the Ack from B to A. Therefore, it is beneficial toutilize physical carrier sensing, even if virtual carrier sensing is also being used. Hosts thatdo not receive the RTS or the CTS may possibly be able to sense the data and/or Acktransmissions (this is not guaranteed, of course). Thus, physical carrier sensing providesprotection that is not provided by virtual carrier sensing. On the other hand, virtual carriersensing can help avoid collisions in certain environments where physical carrier sensing doesnot work well. For instance, in Figure 3.9, host C may not be able to physically sense thedata transmission from A, but the RTS-CTS exchange may help avoid a collision by hostC, since C may receive the CTS from B. Thus, both physical and virtual carrier sensingtechniques are of interest.

3.9 Reducing Collision Probability

The mechanisms discussed in Section 3.8 reduce possibility of collisions, however, theydo not eliminate collisions altogether. In case of random access protocols, two hosts can po-

c© 2010 Vaidya 54

Page 67: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

tentially start transmitting at approximately the same time leading to a collision. Suchtransmissions are said to be simultaneous, as defined earlier. Carrier sensing mechanismwill not allow a host to detect other simultaneous transmissions. Thus, alternative mecha-nisms must be utilized to reduce probability of collisions due to such events. p-persistence,discussed in the next section, is such a mechanism.

3.9.1 p-Persistence

The basic idea here is that, at each valid transmission opportunity, a host may attemptto transmit a packet only with probability p. We have already considered such a mechanismearlier in Section 3.3, when no carrier sensing is used. Recall that, in that case, each hosttransmits in a given slot with probability p. Clearly, if p is made very small, rate of attemptsto transmit will reduce, reducing collisions. However, a very small p will also degradethroughput by keeping too many slots idle. On the other hand, a large p will cause greaternumber of collisions. In general, optimal p is neither too large nor too small. In Section 3.3,we saw that for synchronized slot boundaries as well as unsynchronized slot boundaries, theoptimal access probability p is a function of the number of hosts n competing for the channel.In that analysis, each slot was implicitly considered to be a valid transmission opportunity.That is, a given host may potentially transmit in every slot. With carrier sensing, the notionof a valid transmission opportunity needs to be defined somewhat differently.

Before we define a valid transmission opportunity, let us observe that when a validtransmission opportunity occurs, a transmitter (say, S) can initiate a new dialog with areceiver (say, R). The dialog may potentially be defined in different ways:

• The dialog may consist of only a data packet sent by S to R.

• The dialog may consist of a data packet sent by S to R, followed by an Ack sent by Rto S, if R receives the data reliably.

• The dialog may consist of an RTS-CTS exchange between S and R, followed by data-Ack transmissions. Recall that CTS is sent only if S receives RTS reliably, data is sentonly if S receives CTS reliably, and Ack is sent only if R receives data reliably. WithRTS-CTS, we can implement virtual carrier sensing as discussed previously.

Depending on the definition of the dialog, the actual packets exchanged may vary. However,the dialog will be initiated only at a valid transmission opportunity, as discussed next.

Let us first consider the case when physical carrier sensing is used, but virtual carriersensing is not used. We now introduce a slotted access scheme that takes advantage ofphysical carrier sensing. The time is divided into slots. For now, let us assume that theslot boundaries are synchronized at the different hosts. The start of each slot is a potentialtransmission opportunity. The slot size is chosen such that the following conditions holds:

c© 2010 Vaidya 55

Page 68: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• When a host begins transmitting at a certain transmission opportunity, each hostwithin its “carrier sensing range” has at most one opportunity to start a simultaneoustransmission. A host T is said to be in the carrier sensing range of a host S, if T candetect a transmission from S using carrier sensing.

What is the smallest slot size that can satisfy the above conditions? The discussion ofsimultaneous transmissions in Section 3.5 should provide a hint. In particular, let us defineδ = τ + σ, where τ is the worst-case propagation delay, and σ is the physical carrier sensingdelay. Thus, if a host, say host S, starts transmitting a packet at time t, then a host T withinits carrier sensing range should sense this transmission by time t + δ. It follows that if wemake the slot size equal to δ, then host T will have at most one transmission opportunityduring [t, t + δ) to begin transmitting a packet.

Having defined the slot size, let us now summarize the p-persistence mechanism:

• The slots are assumed to be synchronized at each node. The start of each slot is apotential transmission opportunity.

• Each host continually senses the channel to detect any ongoing transmissions. At apotential transmission opportunity, if the carrier sensing mechanism at a host has notdetected the channel as being busy, then this transmission opportunity is said to bevalid for that host.

• At each valid transmission opportunity, a host may begin transmitting a packet withprobability p (provided, of course, that the host has a packet waiting to be transmit-ted).

What is the optimal access probability for p-persistence with physical carrier sensing?How does the performance compare with the case without carrier sensing? Consider thesimple network wherein only one transmission can succeed reliably at any given time, andall hosts can sense each other’s transmissions. Suppose that there are n hosts, which arealways backlogged. Suppose that all packets require transmission time L, and that eachdialog consists only of the data packet (thus, no RTS-CTS or Ack are sent). The analysisbelow also implicitly assumes that a packet finishes transmission exactly at a slot boundary.Once a transmitter stops transmitting, it takes the other nearby hosts up to 1 slot to detectthe idle channel status. Thus, the first valid opportunity occur at these hosts 1 slot after thehost stops transmitting. To be fair to the other hosts, after a host completes a transmission,it does not immediately begin transmission of a new packet, considering only the next slotboundary as a potential transmission opportunity. In essence, no host transmits for 1 slotinterval after the completion of a transmission, and each transmission or collision consumesL + δ duration of time.

In this network, when the channel is idle, a new successful transmission will beginat the next slot boundary with probability Psuccess = np(1 − p)n−1; the probability that

c© 2010 Vaidya 56

Page 69: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

a collision will occur due to multiple transmissions starting in the next slot is given byPcollision = 1 − Psuccess − Pnone, where Pnone = (1 − p)n. Since no collision detection isperformed, once a collision occurs, duration L + δ is wasted. A successful transmission alsorequires L+ δ duration, but results in the channel being fruitfully utilized for duration L, asshown in Figure 3.13. Thus, a successful transmission as well as a collision requires durationL + δ, and the cumulative probability of these two events is Psuccess + Pcollision = 1 − Pnone.With probability Pnone, the channel is kept idle for duration of 1 slot (δ duration). The

Α

C

L+ δ

data

τ σ

Figure 3.13 Duration required for a transmission

above discussion implies that the channel is used for successful transmissions for a fractionof time given by

Psuccess L

Pnoneδ + (1 − Pnone) (L + δ)=

Psuccess L

δ + (1 − Pnone) L(3.4)

The above quantity can be interpreted as the efficiency of channel access, or the fraction oftime for which data is transmitted reliably on the channel. Multiplying the above quantityby transmission bit rate yields throughput in bits/second. Observe that smaller δ will resultin a greater efficiency for a given value of p. The optimal value of p that maximizes theefficiency is a function of δ as well as the number of competing hosts (n). Figure 3.14 plotsthe throughput assuming that L = 1, that is, the time required to transmit a packet is takenas the unit of time. The graphs plot efficiency as a function of p for δ = 0.001, 0.01, 0.05and 0.1.

Note that the above analysis made several simplifying assumptions, which may nothold in practice. First, we assumed that all hosts are close to each other such that theycan all carrier sense each other’s transmissions. In general, as discussed previously, not allhosts can carrier sense each other’s transmissions. Also, different hosts will compete for thechannel with potentially different sets of hosts. Thus, the optimal value of p may not beidentical for all the hosts. Second, the transmissions may not always be reliable even in theabsence of collisions (due to channel effects such as fading). Third, the optimal value of pmay vary over time, due to time-varying network topology, as well as time-varying trafficpatterns. Under such realistic conditions, the above analysis does not hold. However, theabove simplified analysis provides intuition that can be useful in the general case.

c© 2010 Vaidya 57

Page 70: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1e-06 1e-05 0.0001 0.001 0.01 0.1 1

Util

izat

ion

p

0.10.050.01

0.001

(a) n = 10

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1e-07 1e-06 1e-05 0.0001 0.001 0.01 0.1

Util

izat

ion

p

0.10.050.01

0.001

(b) n = 100

Figure 3.14 Efficiency with physical carrier sensing. The different curves correspond todifferent values of δ = 0.001, 0.01, 0.05, 0.1, with L = 1. The value of δ is measured hererelative to the time required to transmit a packet. Thus, δ = 0.01 means that δ is 1% of thetime required to transmit a packet. The optimal efficiency decreases as δ increases, as maybe expected.

What if the slots are not synchronized when using physical carrier sensing? When theslots are not synchronized, as we have seen previously, the vulnerability of a transmissionincreases. Suppose that the slot size is δ, but the slot boundaries are not synchronizedInstead of analyzing the best possible performance with unsynchronized slots, let us considera suboptimal scheme in which we only allow each host to consider every alternate slot as apotential transmission opportunity. This scheme is illustrated in Figure 3.15. Observe thatwhen a host begins transmission at a certain transmission opportunity, other hosts have onlyone transmission opportunity that can cause interference with the ongoing transmission (this,of course, assumes that the hosts can sense the ongoing transmission).

In particular, suppose that each host may begin transmitting a packet at the start ofslots that begin at ˆ marks in the figure (thus, each host only uses alternate slots as potentialtransmission opportunities). Suppose that host B begins transmission at the slot boundarylabeled i. Notice that, if host C had started transmitting a packet at its slot boundary i−1,clearly host B would have sensed that transmission by its own slot boundary i, and wouldnot start transmitting at that time (this assumes that the packet size is large compared to2 slots). Also, once host B starts transmitting the packet at boundary i, host C will senseB’s transmission by its own i + 1 slot boundary. Similar argument holds for host A as well.Thus, host A and C only have 1 transmission opportunity (labeled i in the figure) to interferewith a transmission that begins at boundary i at host B. The performance of this schemecan be approximated using Equation 3.4 by replacing δ in that equation by 2δ. Then, thecurve labelled as 0.1 in Figure 3.14 will be the approximate performance of asynchronousslots with δ = 0.05. Comparing this curve with the curve labelled 0.05 in Figure 3.14, we

c© 2010 Vaidya 58

Page 71: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

see that lack of synchronization does degrade performance, however, the degradation is lessdramatic than the case of asynchronous slots in Section 3.3. Essentially, the use of carriersensing allows us to use small slots, reducing the detrimental impact of asynchrony.

host A

host B

host C

^ ^ ^

^ ^ ^

^ ^ ^

i i+1 i+2

i−1 i i+1

i i+1 i+2

Figure 3.15 Physical carrier sensing with unsynchronized slots

In the discussion above, we assumed that physical carrier sensing is used, but virtualcarrier sensing is not used. However, the approach can be easily extended to virtual carriersensing as follows. Suppose that the slot size is δ, with a new slot boundary at a hostoccurring when it senses the medium as changing state from busy to idle. The busy or idlestate of the channel may be detected using physical or virtual carrier sensing. As above, abacklogged host may transmit at a valid transmission opportunity with probability p. Theslot boundaries in this case will not be synchronized at the different nodes, since the differentnodes may not detect the medium as becoming idle at the same time.

3.9.2 Backoff Intervals

The p-persistence mechanism is memory-less in that the probability that a host trans-mits in a given slot does not depend on the duration since the last transmission attemptby that host. Thus, in theory, an arbitrarily large number of valid transmission opportuni-ties (slots) may pass before a host attempts to transmit a packet. An alternative approachwould be to ensure that the host will attempt to transmit after a bounded number of validtransmission opportunities. The goal of bounding the number of passed valid transmissionopportunities can be achieved using a variety of approaches. Let us discuss one such ap-proach, based on the notion of a backoff interval. In this case, as also with p-persistence,a host may begin to transmit in a given slot only if the channel is not detected busy (ahost may detect busy channel status using physical or virtual carrier sensing). Such a slotpresents a valid transmission opportunity. In the p-persistence approach, at each such op-portunity, the host decides with probability p whether to transmit or not. With the backoffinterval approach, on the other hand, the host picks a number b when a packet arrives atthe MAC layer, and transmits at the b-th valid opportunity after the arrival of the packet.

c© 2010 Vaidya 59

Page 72: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

This may be implemented as follows. When the MAC layer at a host receives a packet (fromupper layers) to be transmitted, it picks a non-negative integer value for b. Suppose thatwe initialize a counter with this value. Subsequently, a valid transmission opportunity isconsidered to arise if the host senses the channel as being free at the start of a slot. In thiscase, the host may transmit if its backoff counter is 0; else the host decrements its backoffcounter by 1. On the other hand, if the channel is sensed busy at the start of a slot, thenthis slot is not a valid transmission opportunity, and the counter is not decremented. Thehost may only transmit when the counter reaches 0.

Similar to the choice of suitable p in p-persistent protocol, in the context of backoffintervals, we need to somehow choose the appropriate backoff intervals. If the backoff inter-vals are chosen too large, then the channel stays idle for too much time, and if the backoffintervals are chosen too small, then there is a greater chance of collisions. The optimalchoice of backoff intervals depends on the network topology and traffic patterns.

While the backoff interval b may be chosen to be a finite number, there is a certainrisk in choosing b deterministically. For instance, a deterministic approach may be to alwayschoose backoff interval b to be equal to 20. To see the risk of such a deterministic approach,suppose that two different hosts, A and B, happen to both choose b = 20, and supposethat the two hosts receive packets to be transmitted at the same time as well. If they arelocated such that they both observe the channel as busy or idle identically, then they willboth attempt to transmit in the same slot, potentially causing a collision. If the choice ofb is fixed, then this scenario can also repeat on each retransmission attempt by the twohosts. To avoid such detrimental synchronization of transmission attempts, the value of bmay be chosen randomly over some range [bmin, bmax], so that even if the two hosts transmitsimultaneously on one attempt, they are likely to transmit at different times on the nextattempt.

3.9.3 Responding to Packet Loss

Consider a host A that uses the backoff mechanism described above to determinewhen to transmit a packet. In particular, host A chooses a backoff interval b uniformlyin the range [bmin, bmax]. For this discussion, let us assume that bmin = 0. Now supposethat MAC layer reliability is implemented by means of an immediate Ack from the receiver,followed by data retransmission if necessary. Thus, when host A transmits a data packetto, say, host B, host A expects an Ack right after sending the data packet. What happensif host A does not receive an acknowledgement? The lack of acknowledgement implies apacket loss. Either the data packet was not received reliably by the receiver, or the Ack sentby the receiver was not reliably received by the sender. The packet loss itself occurs whenthe SINR is sufficiently low. The absence of an Ack may be due to different causes:

c© 2010 Vaidya 60

Page 73: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• The data packet transmission may have collided with the transmission by another hostthat started transmitting simultaneously (i.e., within δ of A’s transmission initiation).In this case, host B, not having received the data packet reliably, would not send an ac-knowledgement. Physical carrier sensing cannot prevent collisions due to simultaneoustransmissions.

• Packet loss may also occur due to interference from concurrent transmissions byother hosts that do not sense the ongoing transmission, or interference from a non-cooperative source. The interference may result in the loss of the data packet sent byhost A, or in the Ack sent by host B.

In all cases above, host A may choose to retransmit the data packet. How should the backoffvalue b be chosen for the retransmission? One option, of course, is to choose b again from therange [0, bmax] as before, with the same value of bmax. However, if the cause of packet lossis collision due to simultaneous transmissions, we may want to reduce the probability thatthe two hosts will collide again when retransmitting. This can be achieved by increasing thevalue of bmax. One possibility is to increase the value of bmax such that the range [0, bmax] isdoubled before each retransmission. This approach is referred to as an exponential backoff.While increasing the value of bmax may seem appropriate in response to packet loss due tocollision by simultaneous transmissions, this action may degrade throughput unnecessarilywhen the loss occurs due to other causes, such as interference from non-cooperating sources.

It should be noted that collisions are not a symmetric phenomenon. For instance, inFigure 3.9, suppose that hosts D and B want to transmit data to hosts A and C, respectively.Given the proximity of A and B, B causes significant interference at A, leading to a collision.However, D is sufficiently far from C that it does not cause much interference. In this case,simultaneous transmission of data by D and B may cause a collision at A, but not at C. Thissort of asymmetry, when combined with exponential backoff, can lead to unfair division ofchannel time among the hosts, as we will discuss later.

3.10 Examples of Random Access MAC protocols

In this section, we briefly discuss two protocols, namely, Aloha [1] and IEEE 802.11Distributed Coordination Function (DCF) [10].

The Aloha Protocol

Many issues discussed in this chapter, and their solutions, are motivated by the workon the classic Aloha protocol. The original Aloha protocol, developed in the 1970s, allows a

c© 2010 Vaidya 61

Page 74: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

host to transmit a packet as soon as the packet arrives from the upper layers. The intendedrecipient of each packet is expected to send an acknowledgement on reliable reception ofa data packet. When the sender does not receive an acknowledgement within a suitabletimeout interval, it retransmits after waiting for a randomly chosen time interval. SlottedAloha was later developed to improve performance of the Aloha protocol. Similar to theslotted protocol in Section 3.3, in slotted Aloha, a packet can only begin transmission at aslot boundary.

Since the basic Aloha protocol does not use CSMA or any mechanisms to handlehidden terminals, the performance of Aloha is poor in many wireless environments. TheCSMA approach was developed in an attempt to alleviate the shortcomings of Aloha. Wehave already discussed the notion of CSMA, as well as p-persistent CSMA protocols. In wirednetworks, CSMA was augmented with collision detection (CD) to obtain the CSMA/CDprotocol. As discussed earlier, however, collision detection is difficult in wireless networks,leading to the use of collision avoidance mechanisms (CSMA/CA).

The analysis presented in Section 3.3 to obtain the limiting throughput of 1e

pack-

ets/slot with synchronized slots is based directly on the analysis of the slotted version ofthe Aloha protocol. Similarly, for Poisson traffic arrival, the unslotted version of the Alohaprotocol has been shown to achieve throughput worse by a factor of 2, as compared to theslotted protocol, similar to the result we derived for the unsynchronized slots in Section 3.3.

IEEE 802.11 Distributed Coordination Function

IEEE 802.11 is an IEEE standard that specifies two component MAC protocols: PointCoordination Function (PCF) is a centralized protocol, whereas Distributed CoordinationFunction (DCF) is a distributed random access protocol. While DCF is widely used today,PCF has not found much acceptance to date. DCF incorporates many mechanisms that wehave discussed in this chapter, including physical and virtual carrier sensing, backoff inter-vals, exponential backoff, per-packet acknowledgements, and retransmissions for reliability.

Each host maintains a Network Allocation Vector (NAV), which essentially remem-bers the duration of time that the host must stay silent. RTS, CTS, and data packets fora dialog announce the remaining time that is still needed to complete the dialog. When ahost receives one of these packets, it updates its NAV to be the larger of (i) the current NAVvalue, and (ii) the remaining duration of the overheard dialog as specified in the packet.

DCF specifies several inter-frame spacings (IFS), which, as discussed below, are du-rations of time for which the channel is expected to remain idle prior to various operationsperformed by a host. In particular, if the channel has already been idle for a duration calledDCF InterFrame Spacing (DIFS) when a packet arrives at the MAC layer at a host, thenthe packet is transmitted immediately. Idle channel status is determined using physical as

c© 2010 Vaidya 62

Page 75: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

well as virtual carrier sensing. We will discuss DIFS soon again. If the channel is sensedas busy when a packet arrives, then the host chooses a backoff counter value in the range[0, cw], where cw is called contention window. The initial value of cw is set to a certainminimum value, say CWmin. Note that cw in IEEE 802.11 is equivalent to bmax in our priordiscussion. A transmission attempt is said to fail if a CTS is not received in response to anRTS, or if an Ack is not received in response to a data transmission. When a transmissionattempt fails, the range [0, cw] is doubled by setting new cw value to be is set to 2cw − 1.This is how exponential backoff is incorporated in IEEE 802.11. On the other hand, if atransmission attempt is successful, cw is reset to CWmin for the next packet transmission. Apacket is retransmitted only up to a specified maximum number of transmission attempts.

The use of RTS-CTS is optional in DCF. Thus, a host may optionally choose totransmit RTS before sending a data packet. Why make the RTS-CTS exchange optional?As we discussed previously, the use of RTS-CTS reduces collisions due to hidden terminals,thus, reducing the time wasted on such events. However, RTS-CTS packets themselvesconsume the channel resource. In some instances, the cost of sending RTS-CTS may not bejustified by the reduction in the waste due to collisions (see Equation 3.3). For instance, ifthe data packet to be sent is small (say, the same size as the RTS), then there is no benefit insending the RTS. Note that RTS itself may be lost due to collision as well. So the benefit ofRTS comes from reducing collisions for the data packets, if the data packets are sufficientlylarge compared to the time required for RTS-CTS. In IEEE 802.11, RTS-CTS are exchangedprior to a data packet transmission only if the data packet size exceeds a certain thresholdcalled the RTS threshold.

DCF also incorporates the notion of priority between different types of packets. Recallthat a CTS packet follows successful reception of RTS, and an Ack follows a data packet.Consider host A sending RTS to host B. When host B receives the RTS, it requires Bsome time to begin sending the CTS packet. This delay includes the receive-to-transmitturnaround time for the wireless device. Now, consider some other host C that is able tophysically carrier sense A’s RTS transmission, but does not receive the RTS packet reliablydue to low SINR for RTS reception at C. In this case, C will defer transmitting while Ais transmitting due to physical carrier sensing, however, C may begin transmission soonafter host A finishes sending RTS; since C does not reliably receive the RTS, virtual carriersensing does not succeed in this case. The transmission from C may result in a collision withCTS reception at host A. To reduce the probability of such collisions, 802.11 DCF requiresthat before a host (such as C) may attempt transmission, or decrement the backoff counter,subsequent to a busy channel state, the channel must be idle for a duration called DIFS,as shown in Figure 3.16. The duration DIFS is long enough for host B to start sendingCTS in response to the RTS. In fact, the 802.11 specification requires that the CTS be sentSIFS (Short InterFrame Spacing) duration after receipt of RTS, where SIFS is shorter thanDIFS duration. DIFS being sufficiently longer than SIFS allows enough time for physicalcarrier sensing at host C to detect the CTS. Similarly, Ack is transmitted SIFS duration

c© 2010 Vaidya 63

Page 76: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

after reception of data, reducing the possibility of collision with the Ack. Essentially, theuse of SIFS versus DIFS ensures that an on-going dialog has a higher priority over theinitiation of a new dialog. Of course, due to the presence of hidden terminals, and channelvariations due to fading, this priority mechanism does not always work as intended. Whilethe SIFS and DIFS help provide priority to ongoing dialogs, other priority mechanisms canbe incorporated to provide priorities to certain traffic flows over other traffic flows [25]. Wewill discuss such priority differentiation mechanisms later.

SIFSSIFS

RTS

CTS

Data

Ack

SIFS

A

B

C

DIFSChannel sensed busy by physical andvirtual carrier sensing Host C may

decrement itsbackoff counteronly after this time

interval specified in RTS

interval specified in CTS

Figure 3.16 Illustration of interframe spacings in IEEE 802.11: The figure is not drawn toscale

c© 2010 Vaidya 64

Page 77: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

CHAPTER 4

Topics in Distributed Wireless Medium Access Control

4.1 Introduction

In Chapter 3, we discussed some basic concepts in the design of random access pro-tocols for wireless networks. In this chapter, we discuss additional issues in the context ofsuch protocols. We begin our discussion with service differentiation. In particular, we willdiscuss mechanisms to implement priority scheduling at the MAC layer. In addition, we willbriefly discuss the notion of fairness, and how wireless MAC protocol behavior affects fair-ness. Much of the discussion in this chapter will pertain to IEEE 802.11 DCF mechanism,which uses the CSMA/CA mechanism. In CSMA protocols, as discussed previously, eachhost performs physical carrier sensing before transmitting a packet. As discussed previously,this may be implemented using a carrier sense (CS) threshold. Also, when a host transmitsa packet, it must be transmitted at a certain transmit power level and transmit rate. In ourdiscussion so far, we assumed that the CS threshold, transmit power and transmit rate arefixed parameters. However, these parameters can potentially be adapted dynamically.

4.2 Service Differentiation at MAC Layer

For many applications, we need to provide differentiated services at various layersof the protocol stack, including the MAC layer. For instance, time-sensitive voice-over-IPtraffic may need a higher priority over file transfers. Similarly, customers paying more for thewireless service may demand a greater share of the available capacity. Various mechanismshave been investigated to provide such service differentiation in wired and wireless networks.We begin our discussion with mechanisms for priority scheduling in wireless networks.

c© 2010 Vaidya 65

Page 78: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

4.2.1 Priority Scheduling

The goal of priority scheduling is to allow packets with higher priority to be transmit-ted before low priority packets. When a single host has both high and low priority packetsto be transmitted, it can easily achieve the objective by scheduling low priority packets fortransmission only when no high priority packet is pending. However, the problem becomesmore complicated when the packets may be pending at different hosts. For instance, con-sider hosts A and B that have high and low priority packets, respectively, waiting to betransmitted. The ideal outcome should be that host A transmits its high priority packetsbefore host B transmits its low priority packets. How can we achieve this goal? A simpleintuitive solution is to utilize a coordinator host that determines which host transmits thenext packet. This host can make the scheduling decisions based on requests from other hostsfor sending packets with various priorities. However, such a centralized approach can be ex-pensive, and, of course, relies on a coordinator being available. Thus, distributed approachesthat do not assign special duties to any particular host are also of interest.

Inter-Frame Spacing Differentiation

One distributed priority scheduling approach can be obtained as a variation on IEEE802.11 DCF. Before introducing the protocol mechanism, let us consider a real-life scenarioof an office meeting. At an office meeting attended by a supervisor and his employees, theemployees may want to defer to their supervisor whenever the supervisor wishes to speak.Thus, when an employee stops talking, the other employees may wait for a sufficiently longduration to see whether the supervisor wishes to respond. If the supervisor does not speak upafter a long enough wait, then the employees may present their views. This protocol providesa higher priority to the supervisor without using any explicit communication between thesupervisor and the employees. However, there is implicit communication via the waitinginterval. The employees wait “long enough” to be sure that the supervisor does not want tospeak. In essence, the supervisor is expected to wait for a shorter interval before speaking,than the employees.

The above implicit communication through silences can be extended to MAC protocolsas well. In particular, we have previously seen that a silent interval of DIFS duration occursbetween two dialogs in IEEE 802.11. By modifying this duration, different priorities may beassigned to different transmissions. Let us illustrate this approach assuming that we needto implement only two priority levels: high and low. In IEEE 802.11, when the mediumchanges state from busy to idle, a host waits for DIFS interval before counting down itsbackoff counter (provided that the medium is still idle). To implement priorities, we canrequire the high priority packets to continue to use DIFS as the inter-frame spacing, butrequire the low priority packets to use a longer inter-frame spacing, say, LIFS (Long IFS),

c© 2010 Vaidya 66

Page 79: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

obtained asLIFS = DIFS + Bmax + 1

where Bmax is the largest possible backoff value that may be used for a high priority packet(LIFS and DIFS are both measured in slots here). Consider our example of hosts A and Bagain. Since hosts A and B have high and low priority packets, respectively, they will useinterframe spacing of DIFS and LIFS, respectively. Assume that the medium has changedstate from busy to idle at some time t. Even if the medium stays idle, clearly, host B willnot transmit for at least LIFS time duration after time t. On the other hand, if the mediumstays idle, host A will transmit the next packet before the LIFS time duration elapses. Recallthat host A will count down its backoff interval after the medium stays idle for DIFS, andthat its backoff interval is at most Bmax slots. This can ensure that, if host A has a highpriority packet, host A will be able to send that packet before host B attempts to transmita packet. While the above protocol may seem reasonable, two important issues need to beconsidered:

• The hosts with low priority packets always wait for a long time interval before they willtransmit a packet, since LIFS is large compared to DIFS. This can lead to significantperformance loss when there are no high priority packets waiting to be transmitted. Insuch cases, the channel will be kept idle for longer intervals of time, due to the largervalue of LIFS compared to DIFS.

• Hosts A and B in our example above may not see identical channel conditions. Considera host C that is close to A but far away from B. If host C happens to be transmittinga packet, then host A may sense the channel as busy, and freeze its backoff counter.However, host B may not sense the channel as busy, and continue to decrement itsbackoff counter. In this scenario, despite using a longer inter-frame spacing, hostB may transmit its low priority packet before host A can transmit its high prioritypacket. Thus, due to location-dependent channel conditions, above protocol can leadto priority inversions.

Backoff Interval Differentiation

The above priority differentiation mechanism chooses the inter-frame spacing as afunction of priority. As discussed earlier, this achieves implicit communication using thesilent interval. Backoff interval is another silent period during the execution of the IEEE802.11 DCF protocol. The backoff interval at a host is decremented after a given slot only ifthe host senses the channel as idle during that slot. Priority differentiation can be achievedby choosing the backoff interval as a function of the priority. In essence, by choosing thebackoff intervals appropriately, we can bias the outcome of contention resolution in favor

c© 2010 Vaidya 67

Page 80: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

of hosts with higher priority packets, such that the higher priority hosts have a higherprobability of “winning” the channel contention.

For instance, suppose that we want to implement two priority levels. Let us restrictthe initial contention window chosen for a high priority packet to be in the range [0, cwh]and that for low priority packets to be in [cwh + 1, cwl]. This will ensure that if two hostschoose backoff intervals simultaneously, then the host with a high priority packet will choosea smaller backoff interval than a host with a low priority packet. Thus, if these hosts perceiveidentical channel state (that is, busy or idle), then the host with the high priority packetwill transmit first. Thus it should be easy to see that choosing smaller backoff intervals forhigher priority packets can help in priority differentiation. However, priority inversions canstill occur. In particular, as discussed earlier, priority inversion can occur due to location-dependent channel conditions. There are other potential reasons for priority inversion asthe two examples below illustrate.

Example Suppose that host X has a low priority packet to transmit, and host Y hasa high priority packet to transmit. The low priority packet at host X arrives at time t1,earlier than the arrival of the high priority packet at host Y at time t2. Then, even thoughhost X picks a larger backoff interval for its packet than host Y, it is possible that host Xwill transmit the packet first, because by t2 X may have already counted down its backoffcounter significantly. In Figure 4.1 observe that host X can transmit a packet before hostY’s backoff counter reaches 0. 2

X

Y t2

Low priority

backoffinterval

backoff

t1

Figure 4.1 Competition between low and high priority transmissions

Example Suppose that there are three hosts X, Y, and Z, such that Y and Z have highpriority packets pending, and X has a low priority packet pending. Now suppose that hostsY and Z happen to count down their backoff counters to 0 simultaneously, while X’s backoffinterval is still non-zero. Therefore, hosts Y and Z will transmit simultaneously, which, letus assume, leads to a collision at their intended receivers. Thus, hosts Y and Z must chooseanother backoff interval and try again. Even though host X may have initially chosen alarger backoff counter than Y and Z, by the time the collision between Y and Z occurs, Xmay have a small backoff counter, which may be smaller than the new values chosen by Yand Z. In this case, X may transmit its packet before Y and Z. 2

c© 2010 Vaidya 68

Page 81: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

As the examples above illustrate, it is not always possible to completely avoid priorityinversions between competing transmissions. That is, when transmission of a low prioritypacket begins, it is not possible to guarantee that no higher priority packet is pending atanother host. However, in practical scenarios, higher layer protocols can often tolerate somepriority inversions.

In our examples above, we considered hosts whose transmissions “compete” for accessto the wireless channel. In other words, these transmissions can cause significant interferenceto each other. When transmissions from two hosts do not pose significant interference toeach other, these transmissions can be scheduled simultaneously. It is not necessary toenforce priority ordering between transmissions by such hosts. In fact, interference betweencompeting high priority transmissions may allow a low priority transmission to occur beforea competing high priority transmission, as illustrated next.

Example Consider three links l1, l2 and l3 such that links l2 conflicts with links l1 andl3 both. However, links l1 and l3 do not conflict with each other, and may be scheduledreliability together. Suppose that high priority packets are pending on links l1 and l2 both,and low priority packets are pending on link l3. In this case, whenever a high priority packetis transmitted on link l1, high priority packets pending on link l2 cannot be transmitted (dueto the conflict). However, low priority packets can be transmitted on link l3. Thus, in amaximal schedule, due to interference relationship between the different links in a network,low priority packets may be transmitted even though some links with pending high prioritypackets may not be scheduled for transmission.

4.2.2 Throughput Fairness

Intuitively, “fair” throughput allocation can be interpreted as providing equal through-put to different flows. For IEEE 802.11 DCF, let us consider a simple scenario in which thisinterpretation of fairness may seem reasonable. In particular, let us consider the “uplink”scenario wherein two hosts A and B need to send data to host C. Only one transmissioncan be performed reliably at any time. IEEE 802.11 DCF protocol is “symmetric” in thatall hosts execute an identical procedure. Despite the symmetry, several factors may preventthe two hosts A and B from achieving equal throughput, as discussed next.

Short-Lived Flows: In our uplink example, due to the symmetry of IEEE 802.11, thetwo hosts A and B may access the channel an equal number of times over a long enoughtime duration, provided that they sense identical channel conditions. However, the flows aresometimes short-lived, and the throughput of interest is only over the life of the flow (not anarbitrarily chosen large interval). Since backoff intervals are chosen randomly, over a certaininterval of time, one host may happen to choose small backoff intervals more frequently thanother hosts in its vicinity. A host choosing smaller backoff interval will wait a smaller numberof idle slots before transmitting, as we have seen in case of priority scheduling mechanisms.

c© 2010 Vaidya 69

Page 82: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Thus, the randomness in backoff selection may inadvertently give a flow higher priority thanother flows, potentially resulting in a short-term unfairness.

Collisions: Collisions can lead to a further degradation in short-term unfairness. In ourexample above, suppose that a collision occurs when hosts A and B both transmit to Csimultaneously. Consider such a collision, and assume that the contention window (cw)used by A and B both, prior to the collision, is 31 slots. Subsequent to the collision, bothhosts increase cw to 63 (due to exponential backoff), and choose new backoff intervals in therange [0,63]. Now, due to the random selection, it is possible that host A chooses a smallbackoff interval, say 4 slots, whereas host B chooses large value, say 54 slots. Host A willtransmit next by counting down to 0 before host B counts to 0; in the meantime, host Bcounts down to 50 (assuming that both A and B sense identical channel state). When A issuccessful, it will pick a new backoff interval for its subsequent packet using cw = 31 (recallthat a successful transmission results in resetting the cw to the minimum value). Now,certainly, the new backoff value chosen by host A will be smaller than 50 slots, and host Awill again win access to the channel before B can transmit again. Depending on the backoffvalues chosen by host A, host A may be able to transmit multiple packets before host B cantransmit again. This results in short-term unfairness; that is, over short intervals of timeone flow makes substantially more transmissions than the other flow.

Spatial Variations: Spatial variations in channel conditions can also cause further un-fairness. Even if all hosts in our network are relatively close to each other, they may notperceive same channel conditions due to effects such as fading, and interference from othersources. Thus, when one host senses the channel as busy, the other hosts may possiblysense the channel as idle. This will lead to different hosts reducing their backoff intervals atdifferent rates, causing unfairness. For instance, in our example, if host A senses the channelas busy most of the time (perhaps because of interference generated by another device nearA), but host B does not sense the channel busy as frequently, then host B will transmitmore packets than host A.

Number of Flows Per Host: The number of flows at each host also affects the throughputof the flows. Suppose that host A has one flow to C, and host B has two flows to C. All elsebeing equal, hosts A and B will transmit an approximately equal number of packets over asufficiently long interval of time. However, since B is transmitting packets from two flows,while A is transmitting packets from only one flow, the total number of packets sent for thetwo flows at host B will be comparable to the number of packets sent for the single flow athost A. If packets sent by the different flows are of the same size, this will lead to the flow athost C achieving a higher throughput than the individual flows at host B. The degradationin the per-flow degradation at host B occurs because of the disparity in the number of flowstransmitted by the hosts. This disparity can be alleviated by allowing host B to emulatetwo hosts, each emulated host transmitting one of the two flows at B. In effect, a separatebackoff counter will be maintained for each flow, and each flow at B (with symmetry) willtransmit approximately the same number of packets as the flow at A.

c© 2010 Vaidya 70

Page 83: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Channel Variations: The channel between hosts A and C may be quite different fromthe channel between hosts B and C. In particular, suppose that the path loss for the ACchannel is smaller than that for the BC channel. For convenience, assume that all hosts senseidentical channel status (busy or idle). Thus, due to the symmetry of the IEEE 802.11 DCFrandom access mechanism, over a long enough time interval, hosts A and B will have anapproximately equal number of transmission opportunities Now consider two possibilities:

• Option 1: Hosts A and B to transmit packets at the same bit rate. Due to the lowerSINR for B’s transmission, packets transmitted by B will be corrupted more oftenthan those sent by host A (at the same bit rate). Thus, although hosts A and Btransmit an equal number of packets to C, host B will achieve a lower throughputthan host A, since more of B’s packets will be lost (assuming that all data packets areidentical size). Exponential backoff following the packet losses can further degrade B’sthroughput when compared to A.

• Option 2: Host B transmits packets at a lower rate than host A such that both Aand B experience comparable packet loss rates. By symmetry, let us assume thathosts A and B transmit approximately equal number of packets over a sufficientlylong interval of time. Then, since host B transmits packets at a lower rate than A,host B will occupy the channel for a longer duration of time. Host A and B willobtain comparable throughput, since over a long enough time duration, the two hoststransmit roughly equal number of packets of identical size.

The above two options can result in significantly different outcomes. In the first case,the two hosts achieve different throughput, however, in absence of collisions, the two hostshave approximately equal transmission opportunities, and use the channel for approximatelyequal fractions of time (over a long enough time duration). In the second case also the twohosts will transmit approximately an equal number of packets. However, due to the lowertransmission rate, host B will use the channel for a longer duration than host A. For instance,if host B’s transmission rate is 1 Mbps, and host A’s transmission rate is 11 Mbps, thenhost B will use the channel for approximately 11 times greater fraction of time than host A.

The above discussion suggests that, aside from frequency of channel access, the trans-mission rates also significantly affect the outcome. It should be easy to see that the size ofthe data packet transmitted each time a host gains channel access can also be important.For instance, if in our example above, host A transmits a data packet that is 11 times largerthan data packets sent by host A, then the difference in data packet size can compensate thedifferences in the transmission rate, and the two hosts will use the channel for approximatelyequal durations of time (although now host A will achieve larger throughput than host B).

In the above discussion, we discussed some difficulties that can arise in achievingequal throughput for different flows. Defining “fair” as “equal” is not always appropriate,however, and a more general approach based on the notion of “utility” has been proposed

c© 2010 Vaidya 71

Page 84: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

to define fairness. For each flow f , let us define utility Uf as a function of the throughput rf

achieved by flow f . Then, network utility U is defined as the sum of the utility of all flowsin the network. That is,

network utility U =∑

f

Uf(rf )

As an illustration, let us consider two possible definitions of utility. In both definitionsbelow, wf is interpreted as weight of flow f , which is a non-negative constant.

Linear utility Uf (rf) = wf rf (4.1)

Log utility Uf (rf) = wf log rf (natural log used here) (4.2)

To understand how the utility function may affect the throughput desired for theflows, let us consider the uplink scenario again (see Figure 4.2). Suppose that there are onlytwo flows, flow 1 from A to C, and flow 2 from B to C, which are always backlogged. Letus assume that only one flow can transmit reliably at any time. Suppose that transmissionrates of 11 Mbps and 2 Mbps can be supported reliably from hosts A and B, respectively,to host C.

A

B

C

Figure 4.2 An example network

In this simple example, the choice of the utility function will affect the schedulingdecisions. In particular, choice of the utility function will determine the fraction of timethat each of the two flows will transmit on the channel. Let us first consider the log utilityfunction Uf (rf) = wf log rf . We know that, if host C spends fraction α and β of the timereceiving from hosts A and B, respectively, then the flow throughputs will be 11α and 2β,respectively (in Mbps), and the network utility will be given by

U = w1 log(11α) + w2 log(2β)

Clearly, we must have α + β ≤ 1. In fact, since the utility monotonically increases with αand β both, to maximize the utility we will want α + β = 1 (or, in other words, α = 1− β).Thus,

U = w1 log(11(1 − β)) + w2 log(2β)

c© 2010 Vaidya 72

Page 85: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

To maximize the network utility, we must find the optimal value of β. The optimal β in thiscase is obtained by differentiating the above equation with respect to β and equating it to 0.The optimal turns out to be β to be w2

w1+w2

. Therefore, optimal α = w1

w1+w2

. Therefore, the

optimal throughputs are given by r1 = 11w1

w1+w2

and r2 = 2w1

w1+w2

. Observe that α/β is w1/w2.

Consider the following cases:

• Case 1: Suppose we make w1 = 1/11 and w2 = 1/2 (the weight of each flow isinversely proportional to the corresponding transmission rate). Then it follows thatr1 = r2 = 11/13 Mbps. Thus, if by “fair” we mean “equal”, then in this particularnetwork, we can achieve this by making flow weight inversely proportional to thetransmission rate.

In this case, optimal α = 2/13 and optimal β = 11/13. Thus, the transmission times

used for hosts B and C are in the proportion 111

: 12

(that is, in the proportion w1 : w2).

Thus, host C spends a larger fraction of time receiving from host B. This disparity inthe transmission durations helps to compensate for the differences in the transmissionrates, yielding equal throughputs for the two flows.

• Case 2: Suppose we make w1 = w2 = 1. Then it follows that the optimal α and β areboth 1/2 (meaning that host C spends equal fraction of time transmitting to hosts Band C both). However, the flow throughputs in this case are not equal: in particular,the throughputs will be r1 = 11/2 Mbps and r2 = 1 Mbps.

• Comparison of the two cases: Comparing the above two cases, we see that by a suitablechoice of weights, the optimal schedule yields either equal time allocation for the twoflows, or equal throughput allocation. Other choice of weights will yield other possibletime and throughput allocations.

In case 1, the ratio w1/w2 is smaller than that in case 2. Observe that in case 1, theratio r1/r2 is also smaller than in case 2. This is true in general as well – a higherrelative weight for a flow will typically result in higher relative throughput. Thus, theweights allow us to differentiate between the different flows.

Now consider the linear utility function Uf(rf ) = wfrf . Again, to maximize theutility, we must have α + β = 1 (otherwise, host C will keep the channel idle for a fractionof the time). Thus, the network utility will be given by

U = w1 11(1 − β) + w2 2β

In this case, it turns out that there are three possibilities:

• Case A: If 11w1 > 2w2, then to maximize network utility it is best to transmit only tohost A (that is α = 1 is optimal). In this case, flow 2 achieves zero throughput, butflow 1 achieves 11 Mbps throughput.

c© 2010 Vaidya 73

Page 86: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Case B: If 11w1 < 2w2, then to maximize network utility, we need β = 1. Thus, flow1 achieves zero throughput, and flow 2 achieves 2 Mbps.

• Case C: If 11w1 = 2w2, then any schedule with α + β = 1 will maximize the networkutility.

When a centralized scheduler is used, the above analysis provides input to the sched-uler to determine the fraction of time each of the flows should be scheduled for transmission.Can we use the above analysis to share the channel “fairly” when using IEEE 802.11 DCFprotocol. The protocol is distributed, and each host locally makes decisions on when totransmit. However, we can bias these decisions to achieve the desired allocation of transmis-sion time on the channel. In particular, suppose that flows 1 and 2 transmit packets of sizel1 and l2. The transmission rates for flows 1 and 2 are 11 Mbps and 2 Mbps, respectively.Let us assume the two hosts sense identical channel status.

The analysis above provides us with the optimal values of α and β. In case of IEEE802.11, not all of the time on the channel is used for transmitting data. A fraction of timeis lost in collisions and other overheads of channel access. Thus, α and β can be interpretedas fraction of the time on the channel that is actually used to transmit data reliably bythe two hosts. In other words, the time durations for which flows 1 and 2 transmit datareliably are in proportion α : β. Since the two flows transmit at different rates, it followsthat the amount of data transmitted by flows 1 and 2 is in proportion 11α : 2β. Sincethe two flows use different packet sizes, the number of packets sent by the two hosts should

be in the proportion 11αl1

: 2βl2

. This goal can be achieved by using a suitable contention

window for each host, since the probability that a host will access the channel in a given slotis a function of the contention window. A larger contention window will reduce the accessprobability and vice versa. Ignoring complications arising from collisions and variationsin channel conditions, the number of transmission attempts by a host will vary inverselywith the contention window. Thus, the desired proportion of packet transmissions may be

achieved by choosing the contention windows at hosts A and B in the proportion l111α

: l22β

.

Observe that the contention window used by a host is proportional to its packet size, andinversely proportional to the transmission rate, and the desired channel occupancy fraction.It should be clear that the difficulties that prevent the flows from achieving exactly equalthroughput will also prevent them from achieving exactly the desired ratio of transmissiontimes on the channel. But a suitable choice of the contention window will help approximatethe desired performance.

In our discussion of throughput fairness, we considered a simple single-hop wirelessnetwork. The notion of fairness using utility function is also useful in multi-hop networkswherein the flows may traverse multi-hop routes. Choosing appropriate contention windowat each host in such a setting is a more difficult problem. We omit further discussion here,but from the above discussion it should be clear that adaptation of contention window sizecan be used to provide service differentiation in such networks.

c© 2010 Vaidya 74

Page 87: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

4.3 Rate and Power Control

The reliability of a packet transmission depends on various factors such as the mod-ulation scheme (which affects transmission rate), forward error correction strategy, andtransmit power. Here we consider the impact of the transmission rate and transmissionpower on reliability of reception. In general, keeping the SINR fixed, if the transmissionrate is increased, the bit error probability increases, leading to a higher packet loss prob-ability. However, with a higher transmission rate, as a trade-off, each packet transmissionattempt requires less time. Analogously, for a given transmission, keeping all other pa-rameters constant (including noise and interference at the receiver), increasing transmissionpower increases received signal strength, leading to higher SINR. This, in turn, improvesreliability of the transmission. However, higher transmission power leads to higher interfer-ence to other transmissions, degrading their SINR and reliability. Thus, it is important tochoose the transmit power and rate appropriately.

Protocols for performing power and rate control may be distributed or centralized.Centralized strategies are more appropriate for infrastructure-based networks, whereas forinfrastructure-less networks (such as ad hoc networks), distributed strategies are likely to bemore useful in practice. In a centralized mechanism, all necessary information (for instance,channel gains) is made available to a single host, which can then determine the appropriaterate or power to be used by each host. In this chapter, we discuss some simple distributedmechanisms.

Although rate and power both affect the reliability of transmission, rate control (whilekeeping transmit powers of all hosts fixed) is somewhat simpler than power control (whilekeeping the transmit rates fixed). Consider an example network consisting of 4 hosts, namelyA, B, C and D, wherein host A transmits to host B, and simultaneously host C transmitsto host D. Consider two possibilities:

• Rate control: In this case, assume that hosts A and C use fixed transmit power PA

and PC respectively. Now, the transmitters A and C can learn the SINR at thecorresponding receivers (for instance, using feedback from the receivers), and then usea transmission rate that is suitable for the given SINR.

• Power control: While in the rate control example, it is possible to choose transmissionrates that are appropriate for the given transmit powers (and the consequent SINR),this is not always true in case of power control. In particular, now we assume thathosts A and C want to transmit at a fixed rate rA and rC , respectively, and our goalis to choose transmit powers for A and C such that these rates can be supported withadequate reliability. Suppose that to achieve this goal we need to achieve SINR ofβA and βC at hosts B and D, respectively. Unlike rate control, now it may not bepossible to find suitable transmit powers PA and PC for hosts A and C such that theirrespective receivers see the desired SINRs. Recall that gXY is the power gain from host

c© 2010 Vaidya 75

Page 88: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

X to host Y. Let SINRB and SINRD denote the SINRs at host B and D, respectively.Denote noise power at each node as N . Then, we get:

SINRB =gABPA

gCBPC + N

SINRD =gCDPC

gADPA + N

Since we want SINRB ≥ βA and SINRD ≥ βC :

gABPA

gCBPC + N≥ βA

⇒ PA ≥ βA

gAB(gCBPC + N)

Similarly, PC ≥ βC

gCD

(gADPA + N)

Combining the above two inequalities,

PA ≥ βA

gAB

[

gCB

(

βC

gCD(gADPA + N)

)

+ N

]

This can be rewritten as

PA ≥ βAβCgCBgAD

gABgCDPA +

βA

gAB

(

βCgCB

gCD+ 1

)

N

Clearly, for some parameter values, the above inequality cannot be satisfied. For

instance, if 1 < βAβCgCBgAD

gABgCD

, then it would be impossible to satisfy the above inequality.

When the inequality is not satisfied, it implies that the specified transmissions cannotbe performed simultaneously while achieving the desired SINRs. Such a transmissionset is said to be infeasible. On the other hand, if the SINRs can be achieved with asuitable choice of transmit powers then the transmissions are said to be feasible.

Whether the power control algorithm can find a suitable transmit power for each host ornot depends on whether the set of chosen transmissions (at the chosen rates) are feasible ornot. In other words, the power control decisions are coupled with scheduling decisions. In asimilar manner, the end result achieved by a rate control algorithm is also a function of thescheduling decisions. Since the scheduling algorithm will determine the set of transmitters,the interference (and the SINR) at the various receivers will be a function of the schedulingdecisions. This will affect the rate chosen by the rate control algorithm. The goal of ourfollowing discussion is to understand some of the issues in performing rate and power control,not to present a complete solution.

c© 2010 Vaidya 76

Page 89: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

4.4 Rate Control

Goal of adaptive rate control is to maximize reliable transmission rate so as to improvethroughput. How should a host choose the transmission rate for a given packet transmission?As seen previously, different modulation schemes may potentially be used to achieve differenttransmission rates. However, in general, the error rate increases when the transmission rateis increased while keeping the SINR fixed. Thus, for a particular bit error rate (BER)requirement, and a given SINR, a host can choose the highest transmission rate (and thecorresponding modulation scheme) that will lead to a BER that does not exceed the BERconstraint. This approach will benefit the host that performs rate control. Will it affectperformance of other hosts? While varying the rate may not affect the interference powerlevel at other hosts (since transmit power is unchanged), it may affect the duration over whicha host poses interference to other hosts. Lower transmission rate requires more transmissiontime for a given packet size, thus, causing interference over a longer interval.

We will consider variations on IEEE 802.11 DCF in much of our discussion here. Tosimplify the discussion, let us consider the case when RTS/CTS exchange is not performed.In this case, recall that when a host counts down its backoff counter to zero, it will transmita data packet. The receiver, on successful reception of the data packet, will transmit an Ack.To allow the sender to perform rate control, the sender needs to be aware of the SINR atthe receiver. Two different approaches can be used to tackle this problem: explicit feedback,and implicit feedback. The goal of both mechanisms is to allow the sender to determine thesuitable rate for transmitting the data packets. We assume that the rate should be fixedfor the entire packet transmission, and cannot be changed once the packet transmissionbegins. Thus, of necessity, the rate selection mechanism must rely on historical informationon channel quality and SINR at the receiver to make the rate determination. Ideally, theinformation available to the sender should be from the recent past to most accurately reflectthe channel conditions likely to be experienced by its next transmission.

Implicit Feedback: The implicit feedback mechanism does not use any additional explicitcommunication between the sender and the receiver, beyond that already incorporated inthe underlying medium access protocol. In particular, in IEEE 802.11 DCF, the MACprotocol does not provide any explicit SINR feedback. Despite the lack of such feedback,based on the presence of absence of an Ack, the transmitter can make an inference aboutthe SINR at a receiver as follows. Consider a host A that is transmitting data packets tohost B. In response to a data packet sent by A to B, host A may or may not receive anacknowledgement.

• Ack is received: In this case, clearly, the SINR at host B was sufficient to achievereliable delivery at the currently chosen data rate. Host A, however, does not knowwhether the channel conditions will allow adequately reliable transmission to host Bat a higher data rate.

c© 2010 Vaidya 77

Page 90: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

When transmission at a chosen rate is successful, host A may “probe the channel”by transmitting the next packet at a higher data rate. To avoid changing the rate inresponse to short-term channel improvement, rather than increasing the transmissionrate after just one success at the currently chosen rate, instead host A may increasethe rate only if X consecutive transmissions are successful at the currently chosen rate(for some suitable choice of number X). Alternative rules for increasing the rate canalso be conceived. For instance, we may allow host A to increase the rate if at least acertain fraction of the last X transmissions are successful at the currently chosen rate(rather than requiring all X transmissions to be successful). The key point to notehere is that based on recent history of successful transmissions, host A may choose toprobe a higher rate.

• Ack is not received: In this case, host A does not receive an Ack in response to thedata packet sent to B. However, host A does not know whether the data packet waslost, or the Ack was lost. In the absence of this information, host A may conservativelyassume that the SINR for the data packet was not sufficient to achieve reliable deliveryat the chosen data rate. In this case, the transmission rate for the next data packetmay be chosen to be smaller than the rate used for the most recent data packet.Alternatively, to avoid changing the rate in response to short-term channel variations,host A may choose to decrease the transmission rate only when at least Y consecutivetransmissions (for some suitable number Y) are unsuccessful at the currently chosentransmission rate.

As an example, let us consider the case when X = 3 and Y = 2. Figure 4.3 illustratesthe above approach, assuming that X = 3 and Y = 2. In this figure, the horizontal axisrepresents the sequence numbers of data packets sent by host A (retransmissions are countedseparately), and vertical axis represents the chosen transmission rate. The Acks are notshown, but we assume that all transmitted Ack packets are delivered reliably. Supposethat host A may choose one of 4 possible transmission rates, R1, R2, R3 and R4, whereR1 < R2 < R3 < R4. By default, the sender host chooses rate R1 for the first packet.Assume that the channel gain and interference are constant, resulting in constant SINR. Letus assume that the SINR is such that reliable transmission is feasible at rate R3 and lower,but not at rate R4. When the first packet is received successfully by host B, host A receivesan Ack from host B. Since X is chosen to be 3, host A does not change the transmissionrate, and sends the next two packets at rate R1 as well. However, on receipt of Ack for thethird packet, host A increases the rate to R2 when sending packet 4. Similarly, the rateis increased to R3 after sending packets 4, 5 and 6 reliably at rate R2. Clearly, the rateadaptation scheme has been able to reach the maximum rate that can be sustained underthe given channel conditions. However, this adaptation scheme has a drawback that can beseen from the rest of the example. When transmissions at rate R3 are successful for packets7, 8 and 9, host A increases the transmission rate to R4 for packet 10. However, it turnsout that the rate R4 is too large given the SINR, resulting in loss of packet 10. Thus, the

c© 2010 Vaidya 78

Page 91: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

sender host will not receive an Ack for packet 10. However, since Y = 2, the sender sendspacket 11 also at rate R4. Note that packet 11 may be a retransmission of packet 10, if hostA performs retransmissions to improve reliability. When an Ack for packet 11 is also notreceived, host A reduces the rate to R3 when sending packet 12. At rate R3, the transmissionis successful. Thereafter, it should be easy to see that, the host A will repeatedly send X =3 packets at rate R3 successfully, followed by Y = 2 unreliable transmissions at rate R4.

1

2

3

4

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Inde

x i d

enot

es tr

ansm

it ra

te R

i

Packet number

TransmissionsPacket Loss

Figure 4.3 Illustration of rate control with X = 3 and Y = 2

In the above example, in steady state, 2 out of 5 packets, or 40% of the transmissionsare unreliable, even though the channel conditions are static! Static channel conditions offeran ideal environment for an adaptation algorithm, and yet, the above algorithm results inhigh levels of unreliable transmissions. This shortcoming can potentially be alleviated usingexplicit feedback as discussed later. Alternatively, the implicit feedback mechanism canalso be modified to reduce the loss of packets under slowly-varying channel conditions (byreducing the number of packets sent at rate R4 in our example). The intuition behind thisalternative is to make it difficult for host A to “leave” the best transmission rate, therebymaking it difficult to probe the higher unsustainable transmission rate. In particular, eachtime host A in our example probes rate R4, it fails to deliver the packets. To put it differently,each time host A increases the rate from R3 to R4, it returns to rate R3 soon afterwards.This observation can be used to make it harder to “leave” rate R3, by associating a differentthreshold Xi with rate Ri [24]. Whenever host A is unable to use rate Ri+1 successfully, the

c© 2010 Vaidya 79

Page 92: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

value of Xi is increased by 1; when host A uses rate Ri+1 successfully, the value of Xi maypotentially be decreased. Essentially, the goal here is to adapt the mechanism for increasingthe rate so that transmissions occur at the optimal rate more frequently. Such a mechanism,however, may not respond quickly enough when the SINR improves. Figure 4.4 shows thepacket trace with the modified scheme, assuming the initial value of Xi to be 3 for all ratesRi. Although here we assume a fixed value of Y, we can also choose Y adaptively for eachrate, similar to Xi.

1

2

3

4

5 10 15 20 25 30

Inde

x i d

enot

es tr

ansm

it ra

te R

i

Packet number

TransmissionsPacket Loss

Figure 4.4 Illustration of rate control with initial value of Xi = 3, and Y = 2

The modified scheme, however, has a drawback. Once X3 becomes large, it becomesdifficult to try the higher rate. Thus, even if the channel improves and rate R4 becomesfeasible, host A may not attempt to use the higher rate for quite some time, not benefittingfrom the better channel conditions.

In the above discussion, we assumed that when an Ack is not received by host A,host A conservatively assumes that the data packet was lost. In reality, an Ack packet mayalso be lost. Also, we have to choose a rate for transmission of the Ack itself. To minimizethe loss of Ack, we may choose the lowest available rate for the Ack. While this reducesthe loss probability for the Ack, the efficiency of the protocol is also reduced, since the Acktransmission will take a long time. Unfortunately, due to the lack of precise knowledge ofthe channel conditions, it is difficult to determine the right rate for transmitting an Ack.An alternative is to use the same rate for Ack as the rate used for the data transmission.

c© 2010 Vaidya 80

Page 93: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Thus, if host B receives data from host A at rate Ri, it will respond by sending Ack at rateRi. When an Ack is not received, host A may reduce the rate used for data, which, in turn,reduces the rate used for the Ack. Thus, both data and Ack reliability will be improved.

Explicit feedback: In the implicit feedback approach, host A needs to essentially guess onthe right action after success or failure of a previous dialog. Instead, in the explicit feedbackapproach, the receiver (host B in our example) sends feedback, which can help with thisdecision. For instance, host B has available to itself the SINR information for the previouslyreceived packets. Based on this information, host B may piggyback on each Ack the ratethat host B considers most appropriate for the next transmission. For instance, if the SINRestimate at host B exceeds a threshold βi, then host B may consider rate Ri viable. Host Bcan then piggyback the Ack with the highest viable rate information, and host A can thenuse this rate for its next transmission to host B. Of course, if host B does not reliably receivea previous data packet from host A, then host B will not respond with an Ack. In this case,host A does not receive any explicit feedback from host B. However, we can use the previousimplicit feedback approach to decide on host A’s action following a missing Ack. Host Acan also send explicit feedback to host B, informing host B about the best rate to use totransmit the next Ack to host B. Clearly, the feedback from a host is useful only for alimited duration after receiving the feedback. Once a long duration has elapsed, the channelstate may potentially change significantly enough invalidating the previous feedback. Insuch a case, a transmitter may choose to fall back on a default rate (possibly the lowestavailable rate), and “re-learn” the channel conditions for future transmissions.

In the above discussion of rate control, we assumed IEEE 802.11 DCF protocol as thebase protocol, but without the use of RTS/CTS. What happens if we use RTS/CTS? In thiscase, host A first sends RTS to host B, and receives a CTS from host B. Only then, host Awill send the data packet. Thus, there is opportunity for host A to obtain feedback from hostB right before sending the data packet. In case of explicit feedback, RTS/CTS exchangecan be used to improve the timeliness of the feedback. In particular, when host B in ourexample receives an RTS from host A, host B can send the explicit feedback piggybackedon the CTS. Based on this feedback, host A can choose the appropriate rate for the datapacket based. This approach provides timely feedback to host A, since the RTS transmissionoccurs very close in time to the data transmission. However, allowing the sender to choose anew data rate after the RTS has been sent creates a difficulty for the virtual carrier sensingmechanism, as illustrated next.

Interaction between rate control and virtual carrier sensing: Recall that in IEEE802.11, the RTS packet specifies the remaining duration of time required to complete theproposed data transmission. To calculate this duration accurately, the sender needs toknow the transmission rate to be used for the data transmission. With explicit feedbackpiggybacked onto the CTS, host A does not a priori know the transmission rate that will beused for the data packet. This makes it difficult for host A to determine the time durationto be specified in the RTS (the duration depends on the transmission rate). To calculate

c© 2010 Vaidya 81

Page 94: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

the duration, if the sender assumes a rate that is higher than the actual rate used for datatransmission, the time duration will be too short, and vice-versa. Recall that the timeduration included in the CTS is calculated using that in the RTS, thus, an error in theduration in RTS will cause a corresponding error in the duration in the CTS. Consider hostsA, B and C shown in Figure 4.5 below. In this case, host C learns the duration for whichit must keep silent from the duration specified in the CTS sent by host B. However, if thisduration is too large, then host C will keep silent for too long, potentially degrading itsperformance. On the other hand, if the duration is too short, host C may transmit beforethe transmission from A to B is complete, causing a collision at B. Thus, to allow host Ato utilize feedback piggybacked on the CTS to determine the rate for the subsequent datapacket, some modification to the IEEE 802.11 protocol is needed. One such possibility isto include in the RTS the size (in bits) of the data packet to follow, rather than the actualduration. Thus, a host overhearing the RTS can estimate the minimum possible durationfor the data transmissions (which occurs at the highest supported data rate), and updateits own NAV based on this information. When host B receives the RTS, it will specify adata rate in its feedback to host A, and also include this data packet size in CTS (the size isreceived in the RTS). Any host that overhears the CTS, can compute the appropriate timeto keep silent, by using the data packet size and transmission rate piggybacked in the CTS.A host that overhears the subsequent data packet can update its NAV using the informationincluded in the data packet. 2

A B C

Figure 4.5 An example for rate adaptation

With rate adaptation, how does a receiver know the rate at which the sender issending a packet? This problem can be solved by transmitting a part of each packet at afixed rate (independent of the rate at which the data is sent). In particular, each packetsent at the MAC layer includes a physical layer header, in addition to a MAC header andthe data itself. Thus, the physical layer header of the packet can be sent at a fixed rateknown to all hosts. This header can specify the rate to be used for the rest of the packet[10]. This approach allows the sender to choose any arbitrary rate for the data withouthaving to coordinate the rate a priori with the receiver. This is particularly useful in caseof implicit feedback, since host B in our example does not a priori know the rate at whichdata may be transmitted. In fact, in many routing protocols, performance benefits can beobtained if all hosts in the vicinity of the transmitter can “overhear” the packets that are notactually intended for them. Such overhearing will be difficult if the transmitter and receivernegotiate a transmission rate without the knowledge of the other hosts in the vicinity.

In this section, we discussed rate adaptation mechanisms, while keeping other pa-rameters (such as transmit power and carrier sense threshold) fixed. It is also possible to

c© 2010 Vaidya 82

Page 95: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

jointly adapt the rate along with other parameters such as transmit power and carrier sensethreshold. We will not discuss all of these possibilities in this chapter.

4.5 Power Control

Power control provides two benefits. First, by using the least transmit power neces-sary to perform a transmission reliably, a host can conserve energy. With battery-operatedwireless devices, energy conservation is of importance. Second, by reducing the transmitpower for a transmission, interference to other concurrent transmissions is reduced. How-ever, reduction in the transmit power by a host also reduces its signal level at the receiver.Thus, the power level should not be decreased to a point where the SINR is too low to allowreliable delivery of data.

Power control algorithm may be centralized or distributed. Centralized algorithmsrequire that information on channel conditions encountered by the various transmissions beavailable to a single host, so as to determine the transmit power to be used by the varioushosts. Once a centralized coordinator has information on various channel gains available,using this information, the coordinator can determine whether a set of transmissions isfeasible, and the transmit powers appropriate for the chosen transmissions. While thiscomputation can be difficult, conceptually the process of centralized power control is simplerthan distributed power control. In this section, we will consider some distributed protocols.

4.5.1 Distributed Power Control

Consider a transmitter i transmitting packets to a receiver ri at transmit power Pi.Suppose that the transmission by host i needs to achieve SINR at least βi at the receiver.Let us denote by ri the intended receiver for host i’s transmission. Then the SINR at thereceiver ri for transmission from i at power level Pi is given by

SINRi =Pi giri

k 6=i Pkgkri+ N

where N is the noise at receiver ri, and Pk is transmit power used by transmitter k totransmit to its receiver. Let us denote by Iri

the sum of interference and noise at receiverri. Now, it is desired that

SINRi ≥ βi

⇒ Pi giri∑

k 6=i Pkgkri+ N

≥ βi

c© 2010 Vaidya 83

Page 96: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

⇒ Pi ≥βi

(

k 6=i Pkgkri+ N

)

giri

⇒ Pi ≥ βiIri

giri

Let us consider a distributed power control algorithm, which chooses transmit power Pi(t)at host i in time slot t. The above SINR constraint suggests the following rule for updatingthe transmit power, where Iri

(t) denotes Irimeasured at receiver ri in slot t.

Pi(t + 1) =βi Iri

(t)

giri

(4.3)

Since the new power level Pi+1(t + 1) is set to be equal toβi Iri

(t)

giri

, we can view the quantity

βi Iri(t)

giri

as the “target power level” for the future transmission.

A set of transmissions is feasible if there exists a choice of the transmit power foreach transmission (that is, there exists a power vector) such that all the transmissions in theset meet their respective SINR thresholds. It turns out that, if the set of transmissions isfeasible, then the above algorithm eventually converges to a power vector that results in allthe transmissions meeting their SINR constraint [26]. When the set of transmissions is notfeasible, the algorithm may cause some of the hosts to keep increasing their transmit power.In practice, there is an upper bound on transmit power that may be used by a host. Whenthe transmissions are not feasible, the algorithm will cause some of the nodes to operate attheir maximum power level, and yet, all the transmissions will not be reliable. Determiningfeasibility of a set of transmissions in itself may be difficult, however.

A practical issue in implementing the algorithm is that of sending feedback from thereceiver. In particular, in the above algorithm the receiver ri needs to send its estimate of

the target power level (βi Iri

giri

) to host i. Similar to the case of rate control, we can design

explicit or implicit mechanisms for this purpose. The difficulty here is in estimating thetarget power level correctly, and ensuring reasonable reliability for the feedback packets.We will not further explore practical implementation of this protocol.

The algorithm in Equation 4.3 presumes that the set of transmitters is pre-specified,and these transmitters attempt to achieve a certain pre-specified rate. We now discussanother power control algorithm, which allows a host to determine the maximum transmitpower it may use, as a function of the ongoing transmissions in the network: then the hostmay only use transmission rates that are feasible at the allowed transmit power level.

c© 2010 Vaidya 84

Page 97: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

4.5.2 Power Control with Interference Margin Dissemination

In this protocol, a host that is busy receiving a data packet broadcasts informationregarding the maximum level of interference it can tolerate, without violating the minimumSINR requirement for the ongoing reception. Consider an example network in which host Ais sending a packet to host B, with hosts C and D being nearby. The interference posed by ahost, such as C or D, at host B depends on the channel gain between these two hosts. Thus,the interference posed by each potential interferer is a function of the respective channelgains. To avoid having to estimate all the channel gains, ideally, the solution should beindependent of these channel gains. One such solution is obtained using a separate busy-tone channel [14]. In this case, the receiver transmits a busy-tone on the busy-tone channelwhile receiving the data packet from the transmitter. The transmit power for the busy-toneis chosen to be equal to q/M , where q is a suitably chosen constant that is known to all hosts,and M is the additional interference that the receiver can tolerate (“interference margin”).If during the reception of the packet, the interference margin estimate M changes, then thetransmit power for the busy-tone q/M is also changed dynamically.

Suppose that host C receives this busy-tone from host B at power level Pb, andsuppose that host C chooses transmit power at most q/Pb for its own data transmission.With transmit power level q/Pb, the interference posed by host C at host B will be equal to(q/Pb)gCB. Assuming symmetric gains, that is, gCB = gBC , this interference will be equal toq ∗ gBC/Pb. Now, Pb itself is equal to (q/M)gBC . Combining the last two expressions, we seethat the interference at host B due to C’s transmission will be limited to qgBC/(qgBC/M) =M , which is the desired goal. This analysis shows that the busy-tone scheme will limitthe interference from any single interferer (such as host C) to be at most M . The aboveprocedure achieves this by using the busy-tone to announce an interference margin of M tothe receiver’s neighbors.

What if multiple interferers were to start transmitting simultaneously? In this case,while each interferer will result in interference of at most M , together they may cause inter-ference level higher than M . This problem can be mitigated by announcing an interferencemargin smaller than M , say, M/m, for a suitable m, such that even if m interferers were tostart transmitting simultaneously, they will not cumulatively cause interference higher thanM .

The above busy-tone mechanism generalizes on the threshold-based carrier sensingschemes. In threshold-based physical carrier sensing, if the received power at a host is abovea certain threshold, the host refrains from transmitting altogether. Thus, the decision isbinary: transmit, or not transmit. On the other hand, the above scheme yields a non-binaryoutcome, namely, an upper bound on the allowed transmit power. It should be noted thatthe concerns discussed in Section 3.8, such as gain difference between data and busy-tonechannel, also apply to the busy-tone scheme discussed here.

c© 2010 Vaidya 85

Page 98: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

BA

C

D

E

BA

C

D

E

(a) (b)

Figure 4.6 Example network using directional antennas

4.6 Impact of Directional Antennas

In our discussion so far, we have implicitly assumed a relatively simple model for thewireless device. In particular, it is assumed that the channel characteristics are independentof the choices made by a transmitter. This is not always true. For instance, when using IEEE802.11, a host has a choice of multiple frequency bands, each of which may have differentchannel gains and interference levels at the given time. Thus, the transmitter can exertsome control on the channel conditions encountered by its transmissions by choosing thefrequency band dynamically. Similarly, a host can exert additional control by dynamicallychanging the antenna beamform used for its transmissions and receptions.

In particular, in our discussion here, let us assume that each host is equipped with anomnidirectional antenna as well as a directional antenna, such that only one of the antennasis used for any particular transmission. The directional antenna can form a directional beamwith a high gain in a chosen direction, and lower gain in other directions. The benefit of suchdirectional antennas is that capacity of the network can be increased. For instance, considerFigure 4.6(a). If all the hosts were to use omnidirectional antennas, only one of node pairsAB and CD can communicate reliably at a given time. On the other hand, as shown inFigure 4.6(b), if the hosts use directional beamforms, then both node pairs may be able tocommunicate simultaneously. As this simple example illustrates, directional antennas canpotentially help improve performance, by improving spatial reuse of the spectrum. However,they also introduce additional concerns in the design of medium access control protocols.We discuss some of these issues here, with the example of IEEE 802.11 DCF.

c© 2010 Vaidya 86

Page 99: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Impact on Virtual Carrier Sensing: With virtual carrier sensing in IEEE 802.11, whena host overhears a packet, it remains quiet for the duration specified in that packet. Withdirectional antennas, however, this may be detrimental to performance. Consider Figure 4.6.In this case, host C may receive an CTS sent by host B to host A, and yet it is acceptablefor host C to transmit to D using directional beamform, since such a transmission will notcause significant interference with the communication between A and B. This suggests thatthe virtual carrier sensing mechanism should perhaps be made “directional” as well. Forinstance, we can associate a NAV with each direction in which a beam may be formed,and on receipt of a packet only update the NAV for the direction from which the packet isreceived.

Impact on physical carrier sensing: Each of the RTS, CTS, data and Ack packetscan be sent using a directional or omnidirectional beamform, leading to many possible ap-proaches. Clearly, if we want to benefit from greater spatial reuse with directional antennas,at least the data packet must be transmitted directionally. Consider Figure 4.6(b). In thisexample, when host A forms a directional beam towards host B to transmit the data, hostE cannot physically sense A’s transmission. On the other hand, if host A were to use anomnidirectional beamform, host E may have sensed this transmission. Thus, the use ofdirectional beam can result in poorer physical carrier sensing. Now, host E may decide totransmit in the direction of host B, and potentially cause a collision at host B. In effect,the use of directional beamforms can exacerbate the hidden terminal problem discussedpreviously.

Interaction with Collision Avoidance: In Figure 4.6(b), assume that host A is sendinga data packet to host B using a directional beamform, and thus, host E is unaware of thistransmission. Host E may now attempt to transmit a packet to host A while host A isstill busy transmitting to B. Therefore, host A will not respond to the packet from host E.When host E does not receive a response, following the rules in IEEE 802.11, it will performexponential backoff and try again. In the meantime, host A may complete transmittingits data packet to host B, and possibly start a new transmission to host B (after a shortbackoff interval). The above scenario may potentially repeat multiple times, leading tolower throughput for host E. In general, this phenomenon can lead to significant short-termunfairness, which can, in turn, lead to packet loss, since host C may drop a packet afterattempting to re-transmit a few times.

The above problem occurs because host E makes the conservative assumption thatthe lack of response from host A must be due to a packet loss caused by a collision. Thecontention window is doubled to reduce the probability of a further collision. However, sincein this case, the lack of response from host A is not really due to collision, host C’s responseleads to unnecessary performance degradation. This inability to distinguish between packetloss due to collision from other causes is analogous to TCP’s inability to distinguish betweencongestion-related packet losses and losses due to other causes, as discussed in Chapter 9.

c© 2010 Vaidya 87

Page 100: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

CHAPTER 5

Centralized Protocols for Transmission Scheduling in

Wireless Networks

5.1 Introduction

Medium access control or scheduling mechanisms can be divided into two categories:centralized and distributed. Chapter 3 discussed some issues that arise in the design ofdistributed random access protocols. In this chapter, we introduce centralized schedulingmechanisms. Centralized scheduling relies on a single entity, which we will refer to as thescheduler, to determine the appropriate transmission schedule. For the discussion in thischapter, we will assume that the time is slotted, and the schedule chosen by the schedulerdetermines which links are active (or transmitting) in each slot. The slots are synchronizedat all nodes.

A goal in the design of scheduling mechanisms is to utilize the wireless channel in the“best” possible manner. To help define “best” performance, we will first discuss the notionof a rate region.

5.2 Rate Region

When a transmitter T transmits to a receiver R, we will say that the transmissionoccurs over link (T,R). We may refer to such a link using its transmitter-receiver pair (T,R),or give the link a name such as l1. In a given wireless network, many such links may be used.For instance, Figure 5.1 shows a wireless networks in which 6 links are shown. Since no link

c© 2010 Vaidya 88

Page 101: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

is shown between nodes A and E, the implication is that no transmissions are performed onthis link (or, alternatively stated, link (A,E) is always used only with transmission rate 0).

Unlike point-to-point wired networks, these links in a wireless network are not inde-pendent of each other. Transmissions on one link can affect performance of transmissionson other links. To characterize this inter-dependence, we introduce the notion of rate regionfor a wireless network.

B C

D E

F

A

l

l

l

l l

l1

23

4

5

6

Figure 5.1 An example network with 6 links

Consider a set of links L = l1, l2, · · · , lm in a network. Let us define a feasible ratevector for the links in L as R(L) = [r1, r2, · · · , rm], with rate ri corresponding to link li, suchthat these average rates of reliable information delivery can be simultaneously supported onthe links in L. The set of all such feasible rate vectors for the links in L is defined as theirrate region. The shape of the rate region is a function of the channel characteristics, as wellas any constraints imposed on the operation of the wireless devices. To illustrate this, inthe following, we will discuss the rate region for two special scenarios:

• Common transmitter or Downlink scenario: In this case, we consider multiple receiversthat receive information from a single common transmitter. Thus, the power budgetat the transmitter needs to be shared across the transmissions to the various receivers.The name downlink for this scenario would seem meaningful if you visualize the trans-mitter as being high up (such as on a base stations), with the receivers at a lowerheight closer to the ground.

• Common receiver or Uplink scenario: In this scenario, multiple receivers need to trans-mit information to a single (common) receiver. Again, you will need to visualize thereceiver as being at a higher height than the transmitters for the name uplink to bemeaningful. In this case, each transmitter has its own power budget, independent ofthe other transmitters.

In general wireless networks, of course, the scenarios will be more complex, with manyreceivers and transmitters, and each host possibly acting as transmitter for some flows, andreceiver for other flows. However, the discussion below will suffice here to understand thenotion of a rate region, and how it may affect the scheduling protocols.

c© 2010 Vaidya 89

Page 102: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

5.2.1 Rate Region for Downlink Scenario

In the downlink scenario, all links share a single transmitter. We will identify therate region for the downlink scenario with just two links [22]. However, the ideas canbe easily extended to more than two links. Consider nodes 1 and 2 that need to receiveinformation from node B on links l1 (from node B to node 1) and link l2 (from node B tonode 2), respectively, as shown in Figure 5.2(a). In this network, node B may simultaneouslytransmit to nodes 1 and 2 both.

Let gXY denote the path gain of the link between X and Y. Let N0/2 be the noisepower spectral density, W the channel bandwidth, and P the maximum transmit power atnode B. When node B transmits to 1 and 2 simultaneously, then the total power of the twotransmissions will be at most P . Let us suppose that B transmits to node 1 at power P1

and to node 2 at power P2, such that P1 + P2 ≤ P . Thus, P2 = 0 if B transmits only tonode 1, and P1 = 0 if B transmits only to node 2.

B

1

2

l1l 2

(a) downlink scenario (b) uplink scenario

B

1

2

l1l 2

Figure 5.2 Downlink and uplink scenarios

Let us consider a simple strategy for transmitting information to nodes 1 and 2.Specifically, suppose that node B’s transmission to 1 is treated as noise at node 2, and vice-versa. Also, let us assume that the signals transmitted to nodes 1 and 2 are such that wecan use Equation 2.9 for capacity of AWGN channels – with interference treated as noise– to determine the rate of reliable data delivery to each of these nodes. The interferencepower level at node 1 due the transmission from B to node 2 will be P2 gB1. Thus, usingEquation 2.9, we can obtain rates r1 and r2 on links to nodes 1 and 2 as follows, whereP1 + P2 ≤ P .

r1 = W log

(

1 +P1 gB1

P2gB1 + N0W

)

r2 = W log

(

1 +P2 gB2

P1gB2 + N0W

)

c© 2010 Vaidya 90

Page 103: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

To visualize the rates achieved, let us consider some specific numerical values: W = 10 MHz,N0/2 = 4×10−21 W/Hz and P = 0.001 W. Also, let us assume gB1 = 10−12 and gB2 = 10−10.Assuming these parameters, and using the above equations for r1 and r2, Figure 5.3(a) plotsrates r1 and r2 as a function of transmit power P1 and P2 = P − P1. The same data isplotted in Figure 5.3(b) somewhat differently. In this case, the horizontal axis correspondsto the rate r1, and the vertical axis corresponds to the rate r2. Each point on this curvecorresponds to a different value of P1 (with P2 = P − P1). When P1 = P , the point onhorizontal axis (with r2 = 0) is achieved, whereas when P2 = P , the point on the verticalaxis (with r1 = 0 is achieved). The other points on the curve correspond to the case whenboth P1 and P2 are non-zero (as we go from left to the right in the curve, P1 increases from0 to P = 0.001 W).

The power constraint at node B is that P1 + P2 ≤ P . On the other hand, thecurve in Figure 5.3(b) is drawn for P1 + P2 = P . But it should be easy to see that whenP1 + P2 < P , the points under the curve in Figure 5.3(b) will be obtained. That is, anyrate vector obtained with P1 +P2 < P will be dominated by some rate vector obtained withP1 + P2 = P . Rate vector (s1, s2) is said to be dominated by (r1, r2), if s1 ≤ r1 and s2 ≤ r2.

The various rate vectors in Figure 5.3(b) can be obtained with a suitable choice ofpower levels, as discussed above. If the network is operated at one of these points in a certainslot, then link rates given by the corresponding rate vector are achieved for the various links.We will refer to the such rate vectors as operating points. In each slot, the scheduler choosesto operate the network at one of the feasible operating points.

Figure 5.3(c) includes the curve in figure (b), but also includes a straight-line segmentbetween the extreme points of the curve (the extreme points correspond to the case whennode B transmits to only one of nodes 1 and 2). The intermediate points on the straight-linesegment then corresponds to a “time-sharing” system, where node B transmits to node 1in some of the slots, and to node 2 in the other slots. Depending on the fraction of timedevoted to transmitting each of the nodes, different points on the straight line curve areobtained. The straight-line curve is an interpolation between the extreme points.

Consider a rate vector r is obtained by time-sharing between some operating points.Such rate vectors are not considered to be operating points, because the rate correspondingto r cannot be achieved within a single slot. Instead r can only be achieved as an averageover multiple slots.

Now we are ready to make several observations:

• Observe in Figure 5.3(a) that as we increase P1 starting from 0, rate r2 reduces.When P1 = 0, the denominator of SINR at node 2 (that is, Noise N + InterferenceI) is dominated by the noise, since interference from the transmission to node 1 is 0.However, when P1 is increased above 0, the interference will result in degradation inthe SINR at node 2.

c© 2010 Vaidya 91

Page 104: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

0 0.0002 0.0004 0.0006 0.0008 0.001

Rat

e (M

bps)

Power P1 (Watts)

Rate R1Rate R2

(a) Rates r1 and r2 (in Mbps) as a function of power level P1, with P2 = P − P1

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Rat

e R

2 (M

bps)

Rate R1 (Mbps)

Power-sharing

(b) Power-sharing curve: Rate r1 versus r2 with P1 + P2 = P

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Rat

e R

2 (M

bps)

Rate R1 (Mbps)

Power-sharingTime-sharing

(c) Time-sharing and power-sharing curves

Figure 5.3 Downlink scenario: power-sharing and time-sharing

c© 2010 Vaidya 92

Page 105: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Figure 5.3(b) shows the achievable pairs of rates for the two links. Can we do betterthan this? The answer is given by the time-sharing curve in Figure 5.3(c). Observethat, by transmitting to only one node at a time, but splitting the time across the twonodes, it is possible to obtain rate vectors superior to those in Figure 5.3(b). Eachpoint on the time-sharing curve in Figure 5.3(c) corresponds to a different fraction oftime being devoted to the nodes (with the leftmost point corresponding to the casewhen all the time is devoted to node 2, and rightmost point corresponding to the casewhen all the time is devoted to node 1). Thus, with time-sharing, the transmit powerused for transmitting to node 1 is 0 for some fraction of time (during which, essentially,signal for node 1 is not transmitted).

• The triangular region spanned by the two axes, and the time-sharing curve is convex.That is, if we connect any two points within this triangle, all points on the connectingsegment also lie within the triangle. We have already seen how to achieve the ratepairs on the time-sharing and power-sharing curves in Figure 5.3. But how do weachieve the other points within the convex region? Observe that the triangular regionis, in fact, a convex hull of three points, namely, the origin, and the end-points of thetime-sharing curve. A convex hull for a set of points in two dimensions is the smallestpolygon containing all these points. In general, the convex hull of a set of rate vectorsr1, r2, . . . , rn contains all rate vectors obtained as their linear interpolation, that is, asα1r1 + α2r2 + · · ·+ αnrn, where α1 + α2 + · · ·+ αn = 1, and 0 ≤ αi ≤ 1 for all i. Notethat we can achieve the rate vector corresponding to the origin (0,0) in Figure 5.3(c) bynot transmitting to either node. Since we know how to achieve the rates at the threecorner points in Figure 5.3(c), we can also achieve any point within the convex hullby “interpolating” between these points. Interpolation is achieved here by operatingat the three points for suitable fractions of time.

Incidentally, the time-sharing curve for the example above can also be obtained bysplitting the available bandwidth between the two downlinks, instead of splitting the timebetween the two receivers. Suppose that bandwidth W1 is used to transmit to node 1,and bandwidth W2 is used to transmit to node 2. The points on the time-sharing curvecan be obtained by simultaneously using P1 = αP , W1 = αW , P2 = P − P1 and W2 =W − W1, for 0 ≤ α ≤ 1. Recall that the noise power is proportional to the bandwidthused for a transmission. In this case, observe that the transmissions to one node do notpose any interference to the other node, since the two transmissions are orthogonal, due toseparation in frequency. In case of time-sharing as well, the transmissions to the two nodesare orthogonal, but due to separation in time. If this approach is feasible in a given network,the points on the time-sharing curve can be considered to be operating point, since we cannow operate the network at one of these points in any given slot.

In the above version of bandwidth-sharing, we chose to distribute power to the twotransmission in proportion of the bandwidth assigned to each transmission. However, in

c© 2010 Vaidya 93

Page 106: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

general, we can assign power differently, so long as P1 + P2 ≤ P . With this generalization,a larger set of rate vectors can be achieved by using bandwidth-sharing in conjunction withpower-sharing, as illustrated in Figure 5.4 for our choice of numerical parameters.

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Rat

e R

2 (M

bps)

Rate R1 (Mbps)

Figure 5.4 Set of feasible rate vectors using power-sharing and bandwidth-sharing

Now, are there any feasible rate vectors outside the set possible with bandwidth-sharing and power-sharing, as shown in Figure 5.4? We obtained the vectors in Figure 5.4under the assumption that each receiver treats the signal for the other receiver as noise.Thus, potentially useful information contained in the interference is ignored. An alternativestrategy may be used to exploit the information contained in the interference. Suppose thatthe gain to node 1 is no larger than the gain to node 2. That is, gB1 ≤ gB2. Now considerthe following strategy:

• Node 1 treats the signal for node 2 as noise and determines the information meant foritself. The SINR for node 1’s signal, as observed at node 1, is given by

SINR11 =P1 gB1

P2gB1 + N0W

Thus, we have,

r1 = W log

(

1 +P1 gB1

P2gB1 + N0W

)

(5.1)

• Node 2 first determines the information intended for node 1, by considering the signalintended for node 2 as interference. The SINR for node 1’s signal, as observed at node2, is given by

SINR12 =P1 gB2

P2gB2 + N0W

c© 2010 Vaidya 94

Page 107: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Since gB1 ≤ gB2, it follows that SINR11 ≤ SINR12. Intuitively, if node 1 can reliablydetermine the information sent to it, then node 2 should also be able to determinethe information sent for node 1 (and, therefore, also determine the received signalintended for node 1). Now the received signal intended for node 1 was treated as noisein our previous analysis, when decoding node 2’s signal. But in this approach, havingdetermined this interference, it can now be “cancelled” by node 2, before decoding itsown information. After this interference cancellation, effectively, the signal transmittedby B to node 1 will not affect the rate for node 2. That is, we will have

r2 = W log(

1 +P2 gB2

N0W

)

(5.2)

The above approach is called successive interference cancellation (SIC), which can be ex-tended to more than two receivers as well. The rate vectors (r1, r2) obtained with SIC, asgiven by Equations 5.1 and 5.2, are plotted as the SIC curve in Figure 5.5. The set labeled“Previous set” is same as that in Figure 5.4. In general, SIC can yield rate vectors that arenot achievable with bandwidth-sharing, time-sharing, or power-sharing.

0

0.5

1

1.5

2

2.5

3

3.5

4

4.5

5

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

Rat

e R

2 (M

bps)

Rate R1 (Mbps)

Previous setSIC

Figure 5.5 Feasible rate vectors using successive interference cancellation

The rate region is defined as the set of all feasible rate vectors. As the above discussionsuggests, this set is a function of mechanisms used to achieve the rate vectors. Specifically,in our discussion above, we have seen three rate regions:

• If host B is constrained to using time-sharing (with interference treated as noise), thenthe triangular convex region in Figure 5.3(c) is the rate region for the two links.

• If host B is allowed to use bandwidth-sharing and power-sharing both, the set offeasible vectors in Figure 5.4 is the rate region.

c© 2010 Vaidya 95

Page 108: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• If successive interference cancellation is used, then the rate region is the convex hullof the points on the SIC curve and the origin in Figure 5.5.

Clearly, the last rate region above is the largest. However, achieving this region requires thecomplexity of SIC. Thus, in practice, the networks may not necessarily try to achieve thelargest possible rate region.

Observe that all the three rate regions above are convex. This is true in generalwhen time-sharing is permitted. By time-sharing among rate vectors that are feasible bysome means, a convex rate region can always be obtained. Note that, with time-sharing,some of the rate vectors in the rate region may only be obtained over long time intervals, notwithin a single slot. For instance, the mid-point on the time-sharing curve in Figure 5.3(b) isobtained by operating at each of the end-points for half the time (for instance, by alternatelytransmitting to hosts 1 and 2 in each slot).

5.2.2 Rate Region for Uplink Scenario

The network for the uplink scenario is shown in Figure 5.2(b). In the uplink scenario,suppose that nodes 1 and 2 both need to transmit information to node B. Let r1 and r2

denote the rate of reliable information delivery from nodes 1 and 2 to node B, respectively.Also let P1max and P2max be the maximum power used by nodes 1 and 2, respectively, whereaslet P1 and P2 be the actual power used by each of these nodes (P1 ≤ P1max and P2 ≤ P2max).In this case, similar to the downlink scenario, we will consider three approaches:

• Simple approach: A simple approach is for node B to treat signal from node 2 as noisewhen decoding the information from node 1, and vice-versa. Thus, in this case,

r1 = W log

(

1 +P1 g1B

P2g2B + N0W

)

(5.3)

r2 = W log

(

1 +P2 g2B

P1g1B + N0W

)

(5.4)

• Time-sharing: In this case, at any given time, exactly one of nodes 1 and 2 transmits.Thus, the two transmissions will be orthogonal, and not pose interference to each other.It should be easy to see that, if α fraction of time is given to node 1, the followingrates can be obtained:

r1 = αW log

(

1 +(P1/α) g1B

N0W

)

(5.5)

r2 = (1 − α)W log

(

1 +(P2/(1 − α)) g2B

N0W

)

(5.6)

c© 2010 Vaidya 96

Page 109: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

In the above expression, the power used by node 1 is P1/α but only for α fraction ofthe time, resulting in the average power over the entire duration being P1. Thus, inthis case, P1max is treated as a constraint on average power, rather than the maximumpower. Similarly, the power used by node 2 for 1 − α fraction of time is P/(1 − α).Note that when α = 0, we will have r1 = 0, and when α = 1, r2 will be 0.

The same result can also be achieved by splitting the bandwidth between the twotransmitters, instead of splitting time. In particular, if nodes 1 and 2 use bandwidthαW and (1 − α)W , the above rates will be obtained. In this case, nodes 1 and 2transmit all the time, using power P1 and P2, respectively. The noise at nodes 1 and2 will now be αN0W and (1 − α)N0W , respectively, again yielding the above rateequations.

• Successive interference cancellation: In successive interference cancellation, we havetwo choices, depending on which signal is first decoded by node B. Suppose that node Bfirst decodes the signal from node 1, considering the signal from node 2 as interference.In this case, we will have

r1 = W log

(

1 +P1 g1B

P2g2B + N0W

)

Having determined the signal from node 1, now node B can cancel the interferenceposed to the reception from node 2, and obtain rate

r2 = W log(

1 +P2 g2B

N0W

)

Observe that, in this case,

r1 + r2 = W log(

1 +P1 g1B + P2 g2B

N0W

)

Alternatively, the receiver can decode the signal from node 2 first, and then the signalfrom node 1. It is easy to see that, in this case as well, we will obtain the aboveexpression for r1 + r2.

5.2.3 Operating Points

All rate vectors in a rate region are said to be feasible rate vectors. In the abovediscussion, we saw that some of the rate vectors correspond to operating points, while othersdo not. The rate vector corresponding to an operating point can be achieved within agiven slot, by appropriately choosing parameters such as power and allocated bandwidth.

c© 2010 Vaidya 97

Page 110: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

On the other hand, some of the rate vectors cannot be achieved in any one slot, but canbe achieved as an average over longer time intervals (essentially, by time-sharing betweendifferent operating points).

Let us denote by∼Γ the set of all rate vectors corresponding to the feasible operating

points. Physical layer constraints will determine the set of feasible operating points.∼Γ may

not necessarily be convex. However, as we have seen before, by using time-sharing between

the operating points in∼Γ, we can obtain the convex-hull of

∼Γ. This convex hull is the rate

region for the network, and will be denoted as Γ.

A rate vector r in a set of rate vectors is said to be maximal in that set if no other

rate vector in that set dominates r. Thus,∼Γ will contain some maximal rate vectors, while

other rate vectors may not be maximal. If performance metric of interest is an increasingfunction of flow throughputs, then clearly it is always desirable to use a maximal rate vector.An operating point that yields a maximal rate vector will be said to be a maximal operatingpoint.

5.2.4 Practical Considerations and Approximate Rate Regions

The discussion above considered rate regions for the relatively simple uplink anddownlink scenarios. Computation of the rate region is a difficult problem in general. Inpractice, it may not be easy for any node to obtain all the information (particularly, channelgains) necessary for computing the rate region. Besides, channel gains change with time,thus the actual channel gain for a future transmission may be different from the prior channelestimates.

For such reasons, practical systems may constrain the manner in which the wirelessresources are shared. For instance, in a IEEE 802.11-based wireless LAN, an access pointuses a channel that is not used by any nearby access point. In this case, transmissions to orfrom different access points can be treated as being orthogonal (since they pose negligibleinterference to each other), and each access point may independently schedule the transmis-sions on its allocated channel. Similarly, although successive interference cancellation (SIC)can yield better performance, some practical protocols, such as IEEE 802.11, do not useSIC.

In multi-hop wireless networks, it is particularly difficult for any node to preciselyknow the channel gain for all the links in the network. In such cases, scheduling algorithmsare often designed using approximate estimates of the rate region. We now discuss onesuch approximate model named conflict graph model, which is often used in the design ofscheduling algorithms.

c© 2010 Vaidya 98

Page 111: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

The conflict graph model relies on the notion of a conflict between links. A link l2is said to conflict with link l1 if scheduling l2 while l1 is scheduled is likely to result in anunreliable transmission on link l1. Recall from our physical layer discussion that whether atransmission is successful or not depends on the SINR as well as the chosen transmission rate.Thus, the conflict definition assumes a particular set of parameters (such as transmission rateand power) for the links. Also, the interference from link l2 may not make every transmissionon l1 unreliable, since the errors may be introduced probabilistically. Thus, the conflictrelation may be viewed as a deterministic approximation of a probabilistic phenomenon.

The conflict is defined here for a pair of links. In reality, the reliability of transmissionon l1 depends on interference due to interference from all the other transmissions that arescheduled along with l1. For instance, even if transmissions on link l1 may be sufficientlyreliable when either l2 or l3 (but not both) transmit simultaneously with l1, l1 may not beadequately reliable if l2 and l3 both transmit along with l1. The pair-wise conflict relationdoes not allow us to capture this behavior. Thus, we can only approximately model theinterference relationship between the various links using the conflict graph model.

The conflict graph model defines for each link l a subset of other links I(l) suchthat if l is scheduled for transmission then none of the links in I(l) should be scheduledsimultaneously. Thus, all the links in I(l) “conflict” with link l. We will call I(l) the conflictset of link l.

In general, an interference conflict may not be symmetric. That is, if links l and mare scheduled simultaneously, one of the transmissions, but not both, may be unreliable.However, for simplicity, in our discussion of conflict graphs, we will assume that the conflictrelationship is symmetric.

The conflicts may be defined differently for the two directed links in opposite direc-tions between a pair of hosts. Thus, link (A,B) may possibly have different conflicts thanlink (B,A).

Our discussion above used interference to define the conflict relationship. We will referto such a conflict as an interference conflict. Conflicts can arise due to hardware sharing aswell. For instance, if an interface can be used to transmit to only one receiver, then interfaceconflicts also arise. For instance, links (A,B) and (A,C) cannot be used simultaneously, ifthey must share an interface at host A. In this case, links (A,B) and (A,C) have an interfaceconflict, and the conflict set of link (A,B) will include link (A,C), and vice-versa. Linkscausing interface conflict with a link l are also included in I(l).

The conflict relationship between links is represented by the conflict graph. A link inthe wireless network will be represented by a node in the conflict graph. An edge is drawnbetween two nodes in the conflict graph if the corresponding two links in the wireless networkconflict with each other. Such a conflict graph is useful to determine the set of links thatmay be scheduled for transmission simultaneously without causing conflicts: in particular, a

c© 2010 Vaidya 99

Page 112: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

set of links do not include any conflicting links if and only if the set of corresponding nodesin the conflict graph do not contain any nodes that are adjacent in the conflict graph.

Two special cases of the conflict-based model are of particular interest.

• Primary interference model: The primary interference model assumes that two linksconflict if and only if the two links share a common host as an endpoint. Thus, links(A,B) and (A,C) have a primary interference conflict. This model is useful when eachhost is equipped with a single interface, and each each link in the network is assigneda different channel. Alternatively, links may be assigned channels such that two linksusing the same channel are so far apart that they pose negligible interference to eachother. In this case, only interface conflicts occur, and conflict set I(l) for link l consistsof links that need to use one of the end-hosts that is also used for link l.

• Distance-Based Model: In this model, two links are considered to be conflicting if theyare “too close” to each other. Depending on how the conflict is defined exactly, we getdifferent models: we discuss the hop-based and physical distance models.

– Hop-based model: Consider two links (A,B) and (C,D). Consider the minimumhop route between the end-hosts of (A,B) and end-hosts of (C,D). If at least oneof these four routes contains h − 1 hops, and the other routes contains no lessthan h − 1 hops, then the distance between links (A,B) and (C,D) is defined ash hops.

The hop-based model stipulates that, for some positive integer d, two links oper-ating on the same channel conflict if and only if they are at distance at most dhops from each other. This model may be applied to IEEE 802.11, since its vir-tual carrier sensing mechanism attempts to ensure that no two links at distanceup to 2 hops will transmit simultaneously.

– Physical distance model: In this case, physical distance between nodes is usedto determine whether two links conflict or not. For instance, we can define aninterference range such that a link (C,D) is likely to interfere with the transmissionfrom A to B on link (A,B) if node B, which is the receiver on link (A,B), is withininterference range of node C, which is the transmitter on link (C,D). Similar tothe above models, physical distance model is also an approximation of the reality.For instance, the notion of interference range is not quite accurate in practice,since cumulative interference from all interference sources affects reliability, notjust the interference from one source. Assuming a circular interference range isalso not quite accurate. However, such approximate models often make networkanalysis simpler, and allow us to gain insights that can be useful in practice.

The conflict graph provides a means for the scheduler to determine the subset of linksthat can simultaneously transmit reliably in a given slot. Thus, the conflict graph can be

viewed as a representation of the operating points in∼Γ.

c© 2010 Vaidya 100

Page 113: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

5.3 Centralized Scheduling

Let us assume an ideal centralized scheduler that can somehow learn the operatingpoints for the network. Let us assume that the time is divided into time slots, and thescheduler must decide which links should be active in each slot: an active link can transmitpackets in that slot at a rate specified by the scheduler.

The scheduling decisions are made on a per-slot basis: this means that the scheduleruses one particular operating point in each slot. There is no time-sharing within each time

slot. Thus, the rate vector used for each slot belongs to∼Γ. In our discussion of scheduling

protocols, we will primarily consider the conflict graph model. Thus,∼Γ is represented in the

form of a conflict graph.

For each link, we assume that there is a queue containing packets that need to betransmitted on that link. The queue may possibly be empty. Let ql denote the queue forlink l (we will also refer to size of this queue as ql). Figure 5.6 shows a link l, and queue ql,and a flow with arrival rate λl.

r l

ql

link lλ l

Node A

B

transmision rateArrivalrate

Figure 5.6 Queue for a link

Example:

Consider the network shown in Figure 5.1, and assume that each link conflicts withlinks within distance 1 hop. The resulting conflict graph is shown in Figure 5.7 Let us

l3

l 1 l 4

l 2 l 5

l 6

Figure 5.7 A conflict graph

assume that all transmissions occur at rate R in the absence of a conflict. The set of links

in this network is l1, l2, l3, l4, l5, l6 and the following maximal rate vectors are in∼Γ.

[R, 0, 0, 0, R, 0], [R, 0, 0, 0, 0, R], [0, R, R, 0, 0, R], [0, 0, R, R, 0, 0], [0, 0, R, 0, R, 0]

c© 2010 Vaidya 101

Page 114: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

The above rate vectors are feasible operating points. The other operating points areobtained by replacing one ore more R entries in these vectors by 0. The convex hull of theabove maximal rate vectors and [0,0,0,0,0,0] is the rate region Γ for this case.

How should the scheduler choose the schedule in each slot? The answer to thisquestion depends on the goal the scheduler is attempting to achieve. For instance, let usconsider the case where we would like to achieve rate R/2 on links l1 and l6 both, andrate R/3 on links l2 and l3 both. This goal can be achieved by using the following “cyclic”schedule repeatedly:

( [R, 0, 0, 0, R, 0], [R, 0, 0, 0, 0, R], [0, R, R, 0, 0, R] )

With this cyclic schedule, in the first slot, the network is operated at the operatingpoint [R, 0, 0, 0, R, 0] (that is, only links l1 and l5 transmit). In the second and third slots,operating points [R, 0, 0, 0, 0, R] and [0, R, R, 0, 0, R] are used, respectively. This scheduleis then used repeatedly, repeating once every three slots. Observe that link l1 is scheduledevery 2 slots out of 3 slots, yielding a rate of 2R/3, which exceeds the desired rate of R/2.Similarly, the above schedule achieves or exceeds the goal for the other links as well. Itshould be clear that there exist many other possible schedules that can also satisfy the flowrate requirements.

In the above example, we assumed a certain desired rate vector for the various flows,and found a schedule that can support the corresponding rates on the various links. InSection 5.5, we will discuss a generic algorithm that can determine an appropriate scheduleprovided that the desired traffic rate vector is inside the rate region. Although we used rateregion defined using the conflict graph model in the example above, it should be easy to seethat such schedules may potentially be computed for arbitrary rate regions as well.

5.4 Scheduling For Always Heavily Backlogged Flows

A flow is presently defined as traffic that originates at one node, and is intended foran adjacent node. The packets from a flow are transmitted on the link between its sourceand its destination. We will assume that there is one flow on each directed link.

We will say that the flow on link l is heavily backlogged if there are always enoughpackets pending in ql such that, if link l is scheduled for transmission during a time slot ata certain rate then there is enough data in ql to fully utilize the slot duration. The heavilybacklogged flows may be viewed as being greedy in that the flows generate enough packetsto maintain an adequate backlog. Clearly, there are many different ways of choosing theschedule in each slot. Let us consider the max-sum-rate scheduler below.

c© 2010 Vaidya 102

Page 115: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Max-Sum-Rate Scheduler

As the name implies, the scheduler tries to pick a schedule that maximizes the sumof rates of the scheduled transmissions. Formally, the scheduler picks a rate vector r withrate rl for link l such that

r = arg maxs∈

Γ

l

sl (5.7)

The summations of the form∑

l in this case should be interpreted as summation over all thelinks that have flows scheduled on them. arg max above is the argument (or rate vector)s that maximizes the sum

l sl. The intuition here is that we want to pick a rate vectorthat will maximize the aggregate rate at which data will be transmitted. Recall that we areconsidering heavily backlogged flows.

While such a strategy seems intuitive, is it a good strategy? The strategy is goodif our performance metric is aggregate over all the flows. But the strategy is not too goodif we care about fairness – fairness means that each flow should get its “fair” share. Wehaven’t quite defined what “fair” means, but it should be intuitive that maximizing the sumof rates might lead to some flow starving. For our example in Figure 5.7, using the abovealgorithm will result in using the operating point [0, R, R, 0, 0, R] in all the slots, starvingflows on links l1, l4 and l5.

What should we do if we care about fairness? The first step then is to define whatwe mean by fairness. An intuitive definition is that the schedule is fair when each link getsidentical throughput. However, it is not always possible to satisfy this goal without under-utilizing some of the links in the network. As a simple example, consider a network of threelinks l1, l2, l3 such that l2 and l3 conflict, but l1 does not conflict with any other link. In this

case, the maximal rate vectors in∼Γ are [R, 0, R] and [R, R, 0]. There is a flow on each of

the three links. To achieve identical throughput for all three flows, the scheduler must usea non-maximal schedule in some slots. For instance, scheduling [0, 0, R] and [R, R, 0] withequal frequency results in equal throughput (R/2) for the three flows. However, the non-maximal operating point [0, 0, R] does not fully utilize the available spectrum. For instance,by scheduling [R, 0, R] and [R, R, 0] alternately we achieve throughput R for the first flow,and R/2 for the remaining two flows, which is an improvement over throughputs achievedby scheduling [0, 0, R] and [R, R, 0] with equal frequency.

As discussed in Section 4.2.2, defining “fair” to mean “equal rate” is not alwaysappropriate if we care about efficient use of channel resources, as the example above alsoillustrates. To fully utilize the resources, we must use maximal schedules in each slot. Thus,an alternative definition is necessary to define fairness. In Section 4.2.2, we introduced autility function to define fairness. In particular, for each flow f , let us define utility Uf as afunction of the average throughput rf achieved by flow f . Then, network utility U is defined

c© 2010 Vaidya 103

Page 116: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

as the sum of the utility of all flows in the network. That is,

network utility U =∑

f

Uf(rf )

With this definition of utility, the scheduler is said to be fair if it maximizes the networkutility. As per this definition, the max-sum-rate scheduler is fair if utility of each flow isequal to its throughput. In general, different utility functions will lead to different allocationof wireless resources to the flows by the centralized scheduler.

5.5 Scheduling for Flows Within Rate Region

In the previous section, we assumed that the flows are always heavily backlogged.Thus, clearly it is not possible to serve all data that all the flows can possibly produce. Inthis section, we assume that the flows produce traffic at rates that are, in fact, schedulable.In general, the flows may produce data at time-varying rates, and the rate region Γ itselfmay also be time-varying. However, in our present discussion, we will assume that the flowsgenerate data at a constant rate, and the rate region is independent of time. In this section,we consider flows for which the rate vector is “inside” the rate region Γ. Meaning of theterm “inside” will be made more precise later. The scheduler discussed here is said to beThroughput-Optimal, since it can schedule any flows inside Γ.

Recall that presently we are considering only single-hop flows. ql denotes the size ofthe queue for directed link l. ql will change with time, as new data arrives from the source,or when data from the corresponding queue is transmitted. We may use the notation ql(t) toindicate that ql varies with time t. The goal of the scheduler is to make scheduling decisionssuch that the flow demands are met [8].

Throughput-optimal (TO) scheduler: Choose the rate vector as a function of queuesizes as follows:

r = arg maxs∈

Γ

l

ql sl (5.8)

Thus, if the TO-scheduler chooses rate vector r, then

l

ql rl ≥∑

l

ql sl for all s ∈∼Γ (5.9)

Observe that Equations 5.7 and 5.8 are similar except that the rate is weighted by the queuesize in Equation 5.8.

c© 2010 Vaidya 104

Page 117: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Since Γ is the convex hull of∼Γ, and

l ql sl is a linear operation on the rates,Equation 5.9 implies that

l

ql rl ≥∑

l

ql sl for all s ∈ Γ (5.10)

Stability property of throughput-optimal (TO) scheduler [8]:

Let us assume that the time is slotted, with the slot duration being 1 time unit (thus,rates are specified using slot duration as the time unit). The slots are numbered 0, 1, 2, etc.Our goal in this section is to argue that the various queues in the network remain “stable”.We will show this indirectly by proving that an increasing function of queue sizes cannotbecome very large. In particular, let us define a function L(t) as follows, where t denotesthe slot number.

L(t) =∑

l

q2l (t)

and define∆L(t) = L(t + 1) − L(t) =

l

q2l (t + 1) −

l

q2l (t)

Observe that ∆L(t) is the change the value of function L from slot t to slot t + 1. Now, inslot t, the TO-scheduler chooses rate vector r(t) defined by Equation 5.8. Thus, queue ql isserved at rate rl(t) for 1 slot duration (1 time unit). λl is the traffic arrival rate for link l.Therefore, given the slot duration of 1 time unit, λl units of data is added to ql in slot t.Assume that only data that is already in queue ql at the start of slot t may be served duringslot t (that is, transmitted on link l during slot t at rate rl(t)). Then queue size at the endof slot t, or equivalently the queue size at the start of slot t + 1 is given by

ql(t + 1) = λl + max(ql(t) − rl(t), 0) (5.11)

The max(ql(t)− rl(t), 0) term indicates that if ql(t) is less than rl(t), then at most ql(t) datamay be served in slot t. Now, for any non-negative real numbers v, u, r and a, it can beshown that, if v ≤ a + max(q − r, 0) then

v2 ≤ q2 + r2 + a2 − 2q(r − a) (5.12)

From Equations 5.11 and 5.12, we get that

q2l (t + 1) ≤ q2

l (t) + r2l (t) + λ2

l − 2ql(t) (rl(t) − λl)

⇒ q2l (t + 1) − q2

l (t) ≤ r2l (t) + λ2

l − 2ql(t) (rl(t) − λl)

⇒∑

l

(

q2l (t + 1) − q2

l (t))

≤∑

l

(

r2l (t) + λ2

l − 2ql(t) (rl(t) − λl))

c© 2010 Vaidya 105

Page 118: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

From the above inequality, and the definition of ∆L(t), we have that

∆L(t) ≤∑

l

(

r2l (t) + λ2

l − 2ql(t) (rl(t) − λl))

Now, let us suppose that λmax is an upper bound on λl for all l, and let rmax be an upperbound on rate rl for all l. Assume that rmax and λmax are both finite. Define

B =∑

l

(

r2max + λ2

max

)

Then it follows that B is a finite positive constant, and

∆L(t) ≤ B − 2∑

l

ql(t) (rl(t) − λl(t)) (5.13)

Suppose that there exists a positive value ǫ such that µl = λl+ǫ and rate vector µ∈ Γ.This is what we mean by the traffic rate vector being “inside” Γ. Recall from Equation 5.10that

l

qlrl(t) ≥∑

l

qlsl for all rate vectors s ∈ Γ

Therefore,

l

qlrl(t) ≥∑

l

qlµl since µ ∈ Γ

⇒∑

l

qlrl(t) ≥∑

l

ql(λl + ǫ)

⇒∑

l

ql(rl(t) − λl) ≥∑

l

qlǫ

⇒ −∑

l

ql(rl(t) − λl) ≤ −ǫ∑

l

ql

The above inequality and Equation 5.13 imply that

∆L(t) ≤ B − 2ǫ∑

l

ql

Then from the definition of ∆L(t), we have that

L(t + 1) − L(t) ≤ B − 2ǫ∑

l

ql

Since B is a constant, if the queue for any one link is larger than B2ǫ

then the right hand

side of the above inequality will be negative, implying that L(t + 1) will be smaller than

c© 2010 Vaidya 106

Page 119: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

L(t). Since L(t + 1) is sum of square of the queue lengths, this in turn implies that, withthe TO-scheduler, the queues cannot grow unboundedly. Thus, the queues remain “stable”,and thus the scheduler is able to schedule any flows inside the rate region.

An interesting property of TO-scheduler is that although it is able to schedule theflows inside the rate region, it does not actually need to know the actual flow rates. What iseven more remarkable is that the scheduler can schedule the flows even if the flow rates varywith time, provided that the average flow rates are inside the rate region. In addition, thescheduler can schedule the flows when the rate region itself is also time-varying, so long asthe average flow rates are inside the average rate region. In case of time-varying flow ratesand rate regions, the flow rates need to satisfy additional technical constraints, which we willnot elaborate on here. Here we also do not discuss the proof of stability under time-varyingconditions.

5.6 Summary

In this chapter, we introduced the notion of a rate region. The rate region is con-strained by parameters such as maximum transmit power and available bandwidth, and alsoby hardware constraints (for instance, a wireless interface may be able to transmit to onlyone node at any given time). A scheduler should only choose rate vectors that are withinthe available rate region. However, due to the difficulty in identifying the exact rate region,a practical scheduler may use an approximate definition of the rate region. The chapter alsodiscussed some centralized scheduling algorithms.

c© 2010 Vaidya 107

Page 120: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

CHAPTER 6

Routing in Wireless Networks

This chapter addresses two topics in the context of routing in mobile wireless envi-ronments:

• Mobile IP: The Internet Protocol (IP) resides at the network layer of the protocolstack. IP provides the routing functionality, which allows a source host to send packets(possibly via other nodes in the network) to other hosts in the network. An IP addressis used to identify source and destination of an IP packet. IP version 4 (IPv4) addresscontains 32 bits. Each interface at a host can be assigned a different IP address. Inour discussion, when we refer to a host’s IP address, implicitly we are assuming thatthe host is equipped with just one network interface, and the host’s IP address is theaddress assigned to that interface. However, it should be easy to see that the ideasdiscussed in this chapter can also be extended to the case when a host is equipped withmultiple interfaces. IPv4 address assigned to an interface consists of two parts: thenetwork part specifies the subnetwork (subnet) to which the interface is connected, andthe host part, which uniquely identifies the interface on the specified subnetwork. ForIP to be able to route packets to a host, the host must have an IP address appropriatefor the subnetwork to which it is connected. This feature of IP addressing affectsthe handling of mobile hosts. A host’s mobility can cause it to connect to differentnetworks over time. For instance, a user may be connected to a wireless LAN whenthe user is in her office, and then connect to a wide-area cellular network as the userbegins to walk to her car. Ideally, we would like the host to continue to maintain anyongoing communication (e.g., file transfer, or a voice-over-IP call) despite the changeof subnetwork. We will discuss Mobile IP mechanisms proposed to handle mobility ofthis form.

• Routing in multi-hop wireless networks: Mesh networks, mobile ad hoc networks, andsensor networks are examples of wireless network that may require the use of multi-hop wireless routes. In a mobile ad hoc networks, hosts forward packets on each

c© 2010 Vaidya 108

Page 121: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

other’s behalf without relying on an infrastructure (such as access points). In a meshnetwork, a set of wireless relays (typically fixed) form a mesh that other wirelessclients can connect to. Some of the mesh nodes may also provide connectivity to awired network. A sensor network includes nodes that are equipped with the capabilityto sense physical phenomenon of interest.

In this chapter, in the context of multi-hop networks, we will primarily consider routingin ad hoc networks. Many of the issues encountered in ad hoc networks are alsorelevant in other multi-hop wireless networks. In mobile ad hoc networks, in presenceof host mobility, the rate of link failure and repair may be relatively high comparedto traditional networks. Also, the wireless devices may have capabilities not seen intraditional wired devices, such as channel switching, and power control, and also newlimitations, such as energy constraint. These factors have led to significant activity indesigning new routing mechanisms for ad hoc networks.

In this chapter, we first discuss routing in mobile ad hoc networks, followed by a discussionof Mobile IP.

6.1 Unicast Routing in Mobile Ad Hoc Networks (MANET)

Unicast routing protocols provide a means to deliver packets from a source host to adestination host. In this chapter, we use the term routing to refer to unicast routing. Forour discussion here, we will assume that the multi-hop network under consideration is an adhoc networks, and the routes contain only wireless links between the hosts in the network.In hybrid networks, the routes may contain wireless and wired links both.

Two classes of routing protocols are of interest:

• Next-Hop Table-Based Routing: In case of next-hop table-based routing, each hostmaintains a routing table, which provides information regarding the “next hop” to beused for forwarding packets to each destination. The next hop information may alsobe represented for aggregates of hosts – for instance, if the next hop is identical forall hosts whose IPv4 address is of the form 130.126.142.* then it is sufficient to makea single entry for this aggregate, as opposed to one entry per host. The table belowshows partial output of the route command on a linux machine. The non-zero bitsin the Genmask indicate the bits in the Destination that constitute the destinationnetwork address. Thus, any host IP address that is formed by this network address,and either 0 or 1 in the remaining address bits will match the corresponding routingtable entry. For instance, the first row of the table below corresponds to all hosts whoseIP address is of the form 10000010 01111110 10001xxx xxxxxxxx, where x may be 0

c© 2010 Vaidya 109

Page 122: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

or 1. Note that 130, 126 and 136 in decimal are 10000010, 01111110, and 10001000 inbinary. The destination network may also be specified as 130.126.136.0/21 to indicatethat the most significant 21 bits of the address are the ones that specify the network.The * in the Gateway column means that there is no need to use any router to reachthese addresses; thus, the hosts with address of the form 10000010 01111110 10001xxxxxxxxxxx can be reached directly using interface eth0 specified in the Iface column.The second row of the table specifies a default route for any IP address that doesnot match Destination in the previous rows. In this case, 130.126.136.1 is to be usedas the gateway (that is, next hop), which itself can be reached directly using interfaceeth0.

Destination Gateway Genmask Iface

130.126.136.0 * 255.255.248.0 eth0

default 130.126.136.1 0.0.0.0 eth0

To simplify our discussion here, we will assume that the routing table stores a next-hopentry for each destination host separately.

With next-hop table-based routing, when a host S wants to send a packet to host D,host S looks up its routing table and sends the packet to the host that is specifiedas the next hop on the route to host D. By design, the next-hop host is one of theneighbors of host S, say host X. When host X receives the packet from host S, withdestination address D, host X will look up its own routing table for the next hoptowards destination D, and forward the packet to the corresponding host. At least twoapproaches exist for maintaining the routing table:

– Next hop as a function of the destination: In this case the next-hop stored in therouting table depends on the destination of the packet, but not on the source.This approach is used commonly today.

– Next hop as a function of the source-destination pair: In this case, the next-hop for forwarding a packet is a function of the packet’s source and destinationboth. This approach provides more flexibility than the above approach, allowingflows from different sources to use independent routes to the same source. Ingeneral, the next hop may be made a function of other parameters, such as “flowidentifier”. In this case, different flows between the same source-destination pairmay use different routes. In the rest of our discussion, unless stated otherwise,we implicitly assume routing as a function of just the destination address.

Eventually, if the routing tables at the various hosts are maintained correctly, thepacket should reach destination D (assuming that a route from S to D exists). Ifsome host receives a packet for destination D, but does not have a next-hop entry fordestination D, the host may simply discard the packet.

c© 2010 Vaidya 110

Page 123: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

If care is not taken, the next-hop routing table entries may become such that the packetis forwarded repeatedly along a loop. This is an undesirable situation, and routingprotocols take precautions to avoid such loops. When loop avoidance is imperfect,often a limit is imposed on the number of times a packet can be forwarded beforeit reaches the destination. This limit is referred as the time-to-live (TTL) for thepacket. When the number of hops traversed by a packet exceeds its TTL, the packetis discarded. This is a safety mechanism to prevent a packet from going around a loopindefinitely. However, such a mechanism should ideally be combined with mechanismsthat avoid formation of loops, at least long-term loops.

• Source routing: As we saw above, in case of table-based routing, each host only makesa decision on whom to forward a packet. In particular, the source host only choosesthe first hop on the route, and each subsequent host chooses only the next hop on theroute. With source routing, however, the source has complete control on selection ofthe entire route. In this case, the source host specifies in the packet header the entireroute to be used from the source to the destination. Each host receiving the packetforwards the packet along the next hop specified in the source route in the packet. Forinstance, suppose that host S specifies route S-X-Y-Z-D in the packet header. Thenhost S will send the packet to host X. Host X will forward the packet to host Y, sincethe source route in the packet specifies Y as the next host on the route after host X.Eventually, the packet will reach host D. Clearly, the route chosen by host S shouldbe such that, links SX, XY YZ and ZD indeed exist in the network. Otherwise, theroute chosen by source S would be invalid, and a packet may be discarded by a hostthat is unable to forward the packet on the specified route.

Source routing has certain advantages over next-hop table-based routing protocols.Source routing makes it easier to avoid loops in the route used, since the source hostcan ensure that no IP address appears in the source route more than once. Also, whenmultiple routes are available to the same destination, the source host may choose dif-ferent routes for different packets, for instance, to balance the load on the routes.Source routing has the disadvantage of requiring larger packet headers when the pack-ets traverse longer routes.

The routing functionality may be potentially incorporated into different layers of the protocolstack.

• One possibility is to view the entire ad hoc network as a single link, and to implementdata forwarding within the ad hoc network at the link layer. In this case, the adhoc network will appear as a single link to the higher layers, much like the Ethernetswitches make the switched Ethernet appear as a single link to the network layer. Inthis case, even though a packet may travel multiple links within the ad hoc network(using a link layer mechanism), to the network layer, the packet will appear to havetaken a single hop over the ad hoc network.

c© 2010 Vaidya 111

Page 124: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• An alternative is to implement routing at the network layer. A benefit of this approachis that ad hoc routing can be implemented on top of legacy link layer protocols, aswell as new link layer protocols designed for ad hoc networks.

In our discussion, we will assume the second approach, however, many of the techniques wediscuss can also be applied with the first approach.

Routing protocols are required in all networks that span multiple links. Many routingprotocols have been designed in the past, some of which have been used in the internet formany years. Do we need new protocols for ad hoc networks? In principle, routing protocolsdesigned for the wired networks with point-to-point links can potentially also be used in adhoc networks. However, from the discussion in Section 2.6, recall that the notion of a link ina wireless is not very precise. Specifically, in many wired networks a link either “exists” or itis “broken”. On the other hand, in a wireless network, the wireless link state is non-binary.Yet we may want to use routing protocols that assign a binary state to the link: in effect,the routing protocol may consider only a subset of the links as being usable for the purposeof routing. This decision can be based on some measure of link quality, such as packet lossprobability for transmissions on the link (which is affected by chosen rate, power, and packetsize).

Detection of such usable links can potentially be achieved by means of a neighbordiscovery sub-layer. A simple mechanism for neighbor discovery is based on periodic trans-mission of “hello” messages. Each host transmits a “hello” message specifying its own IPaddress. The MAC address for this packet is set to the broadcast address so that MAC layerat all hosts receiving the packet will forward the packet to the network layer. We refer tothis as a local broadcast. Receipt at host A of a hello message from host B can be viewed assignifying the presence of a link from host B to host A. This does not, however, necessarilymean that there is a usable (or adequately reliable) link from A to B. If the routing protocolwants to utilize only bidirectional links, then the neighbor discovery procedure needs to beable to determine which links are bidirectional links. To detect bidirectional links, whensending the hello message, each host can include the list of hosts from which it has receiveda hello message in the recent past – let us call it the hello list. Thus, if host B receives ahello message from A containing B in the hello list, then host B may assume that the linkAB is a bidirectional list.

Does the above neighbor discovery procedure really work? While deceptively simple,and apparently intuitive, the neighbor discovery procedure contains two potential flaws.First, the packet reception is probabilistic in nature. Some, but not all, hello packets sentby a node may be received by its neighbor. Thus, reception of a single hello packet is notalways an adequate measure of link reliability. Therefore, host B may decide that the linkAB “exists”, if it receives a sufficiently large fraction of hello packets sent by host A in recentpast (for instance, 3 out of the last 4 hellos). Secondly, reliability of transmissions is also afunction of packet size. Suppose that the hello packets are small compared to data packets

c© 2010 Vaidya 112

Page 125: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

that the hosts may need to forward to each other. Thus, even if host B is able to reliablyreceive a hello (a small packet) from A, host B may not be able to reliably receive largerdata packets from host A. This problem can be alleviated by artificially making the size ofhello packets large.

A neighbor discovery mechanism such as that described above may potentially beused in conjunction with previously developed routing protocols for networks with point-to-point links. In effect, we abstract the wireless network as a network of point-to-pointlinks (detected using neighbor discovery), and then apply previously developed protocols tothe abstract network. For instance, we can use the traditional link state or distance vectorrouting protocols on ad hoc networks. While such an approach may lead to correct protocols,the protocols may not always perform well. The above neighbor discovery protocol, forinstance, does not provide information on the packet loss probability on a given link. Also, inwireless environments, particularly, with mobile hosts, the routes may break more frequentlythan in traditional wired networks. Motivated by these factors, researchers have developedmany optimizations to existing protocols, and also developed new protocols for routing inad hoc networks.

Another perhaps more important issue is that the abstraction of point-to-point linksdoes not fit the wireless channel very well. Due to broadcast nature of the wireless channel,the link quality is a function of not only the channel gain between that pair of hosts, butalso of the interference caused by traffic carried on other links. In contrast, in case of point-to-point networks, traffic on one link does not affect the quality or capacity of other links.Unfortunately, routing protocols proposed for ad hoc networks often ignore this observation,and tend to view the ad hoc network as consisting of point-to-point links.

In this chapter, we discuss a few routing mechanisms for ad hoc networks. We beginwith a classification of routing protocols:

• Proactive protocols: Proactive routing protocols, as the name suggests, proactivelyattempt to maintain routes between all host pairs, regardless of whether there is datatraffic to be carried between the host pairs.

• Reactive protocols: In contrast to proactive protocols, the goal of the reactive routingprotocols is to only identify routes that are deemed necessary to carry data trafficpresent in the network. Thus, reactive protocols should incur little or no overheadwhen there is no traffic in the network. The overhead should scale with increasingtraffic. Intuitively, since reactive protocols do not perform unnecessary work to main-tain a route between a host pair if there is no traffic between that host pair, theoverhead incurred by reactive protocols may be expected to be lower than the proac-tive protocols. On the other hand, the latency in delivering data could be higher witha reactive protocol since the protocol may have to determine a route once the networklayer realizes that there is traffic between a host pair. This may delay delivery of

c© 2010 Vaidya 113

Page 126: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

packets. Thus, proactive protocols may incur higher overhead, but with lower latency,as compared to reactive protocols. This intuition is valid in many situations, althoughnot always. For instance, when all host pairs have intermittent traffic to carry, thereactive protocols may be potentially more expensive.

• Hybrid protocols: In general, neither reactive nor proactive protocols are optimal in allenvironments. Hybrid protocols attempt to combine proactive and reactive elementsin the hopes of being able to adapt their behavior to the given environment.

6.2 Proactive Protocols

We consider two types of proactive routing protocols:

• Link state routing

• Distance vector routing

These protocols, as discussed below, differ in the information disseminated in the networkto determine the routes. Both types of protocols have been used in the internet. In thissection, we will discuss the basic mechanisms for such protocols, and ways of adapting themfor ad hoc networks.

6.2.1 Link State Routing

Periodically, using the neighbor discovery protocol, each host determines the links ithas available. In addition, the host may determine a cost metric for the link (which maybe a function of parameters such as the packet loss rate and load). The host constructs alink state packet containing the status of all its links (i.e., cost for each available link), andtransmits it to all its neighbors. This could be achieved by means of a local broadcast (whichis not necessarily reliable), or reliable unicast to each neighbor of the host. The term localbroadcast is used here to imply a MAC-layer broadcast. The neighbors, in turn, propagatethe received information to their neighbors. In this manner, the information on the state ofeach available link is propagated through the entire network. Failure of a previously existinglink can be disseminated by associating ∞ cost with that link in the next link state update.

Since the status of the same link may be disseminated many times, to allow a host todetermine the most recent status, a monotonically increasing sequence number is associatedby the source to each link state information disseminated. A host, on receiving new linkstate information, computes the least cost (or shortest) paths to other hosts in the network,

c© 2010 Vaidya 114

Page 127: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

using, say, Dijkstra’s shortest path algorithm. The first hops on the shortest paths are thenused to update the routing table entries at the host.

Let us illustrate link state routing with the help of the network in Figure 6.1(a).In the figure, a link is shown between a pair of hosts if the network layer believes thatreliable communication is possible between that pair of hosts. In our example here, it isassumed that each link is bidirectional (that is, communication is feasible in both directions).Figure 6.1(a) shows the links for which link state information is disseminated by the hosts ata particular point in time. When host A receives the link state information for all the linksshown in the figure, it computes the shortest path to all other hosts in the network. Assumein this example that a cost of 1 is associated with each link. The first hops on the shortestpaths are used to create the routing table entries at host A, as shown in Figure 6.1(b). Forinstance, the next hop entry for destination G at node A is D, since A-D-E-G is a least costroute from A to G.

B

A

C

D

E

F

G

(a)

B B 1

C B 2

D D 1

E D 2

F D 2

G D 3

(b)

destination next−hop cost

Figure 6.1 Illustration of link state routing

Link state routing has been used in the OSPF (Open Shortest Path First) protocolin the internet. When applied in the context of wireless networks, it is useful to improve theprotocol to reduce its message overhead. The overhead may be reduced using two relatedapproaches:

• Disseminating information in a reduced scope

• Disseminating smaller amount of information

Disseminating information in a reduced scope: In the basic link state routing mech-anism, information on the status of all links is disseminated through the entire network. Ineffect, under ideal conditions, this approach will make each host aware of the accurate statusof each link. Let us consider three mechanisms to reduce the overhead of link state routing:

c© 2010 Vaidya 115

Page 128: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Hazy-sighted link state dissemination: In hazy-sighted link state (HSLS) dissemination[20], each host disseminates its link state information to other hosts in the network.However, the distance – as measured in number of hops from the source – to whichthe link state information is propagated is dynamically adjusted. Specifically, linkstate is propagated more frequently to shorter distances, and less frequently to largerdistances. For instance, the link state information may be propagated up to distanceof i hops at time intervals of 2iT for some value of T . This optimization is motivatedby the observation that knowing somewhat older state for far away links can still allowa host to make reasonable (although not necessarily optimal) routing decisions.

This approach is analogous to the real-life situation of driving from one location toanother location. For instance, suppose that John wants to drive from his office at theUniversity of Illinois to the airport 8 miles away. The car garage at his office has twoexits. Thus, the first “routing” decision John must make is which garage exit to use.Does John need to know the status of all the streets? Clearly, John must know thestatus of the nearby streets. For instance, if the street leading from one of the exitsis closed, then John must use the other exit. Now assume that independent of whichexit John takes, John will eventually follow the same streets near the airport. In sucha case, it is not necessary for John to know the status of streets near the airport beforemaking a decision on which garage exit to use. On the other hand, suppose that eachgarage exit takes John to a different highway, which further lead to entirely differentroutes to the airport. In this case, the local decision on which exit to use affects theroute dramatically. This latter situation can occur in practice, but the first situation isexpected to be more common. Hazy sighted link state dissemination relies on a similarintuition in wireless networks. Similar to the possibility of the exits leading John totwo dramatically different routes, in networks as well, it is possible to create topologiessuch that a routing decision based on incomplete (or stale) information can lead tosignificantly suboptimal route selection. However, in typical situations, the route isexpected to be close enough to the optimal to justify the reduction in link state updateoverhead obtained by the above mechanism. Figure 6.2 presents an example of linkstate routing using hazy-sighted link state dissemination.

• Uncoordinated selective forwarding: When a host transmits link state information toits neighbors, ordinarily, all the neighbors will propagate the information to all theirneighbors, and so on. In a dense network, this results in the link state informationreaching a given host along multiple routes from the source. For instance, host D inFigure 6.1(a) may receive the link state updates from host A directly, as well as alongroute A-B-C-D (that is, B receives the link state from A, C receives A’s link statewhen forwarded by host B, and then D receives this link state when forwarded by C),and route A-B-C-E-D. Clearly, it is sufficient for host D to receive the informationonce. The overhead in delivering the information multiple times is unnecessary.

c© 2010 Vaidya 116

Page 129: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

(b)(a)

B

A

C

D

E

D

C

E

G

E

F

B

A

C

D

E

G

D

C

E

F

G

GF

E

G

Figure 6.2 Example of hazy-sighted link state (HSLS) dissemination: In figure (a), assumethat each host knows the status of all the links correctly. Near each host in figure (a) thenext-hop at that host for destination G is shown. For instance, next-hop for destination G athost A is D. Host G now moves somewhat, breaking the link between F and G. The resultingnetwork is shown in (b). Now, suppose that, using HSLS routing, host F disseminates itslink state information to up to 1 hop. Consequently, host D learns that link FG does notexist anymore; D’s knowledge of other links remains unchanged. Consequently, host Drecomputes the shortest path to host G, and sets its next-hop for host G as E. As shown infigure (b), at the remaining hosts, the next-hop entries for destination G remain unchanged.In particular, host A does not know about the topology change, therefore, it forwards tohost D any packets destined for host G. Host D, however, uses the new next-hop entry, andforwards the packet to host E, which subsequently forwards it to host G. Thus, the packetsfrom host A do reach the destination host G correctly. In fact, the packets are delivered overa route containing 3 hops, which is the shortest route from A to G. In general, however,hazy-sighted routing can result in the packets being delivered over sub-optimal routes.

One possibility for reducing the overhead would be to allow each host to forward linkstate information with some probability p ≤ 1. Choosing p = 1 results in the originallink state routing protocol. However, when p < 1, a host does not always forward thelink state information. A small value of p may cause too few hosts to forward link stateinformation, such that many hosts may not learn the status of a given link, potentiallyresulting in poor route selection. On the other hand, using large p will not reducethe link state forwarding overhead significantly. Thus, there is a trade-off between theoverhead and quality of route selection. The mechanism is completely uncoordinatedin that each host independently decides whether to forward a particular link stateinformation or not.

It is possible to design heuristics that utilize more information, instead of makinga random choice on forwarding. For instance, a host may decide to forward stateinformation for a link L, with a sequence number s, only if it has not already hearda sufficient number of other hosts forwarding information about link L with sequence

c© 2010 Vaidya 117

Page 130: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

number at least s. The intuition here is as follows: when a certain host X forwardslink state information about link L, the neighbors of host X receive this information.However, if a sufficient number (i.e., exceeding a certain threshold value) of hosts inthe vicinity have already transmitted recent link state information for link L, then,quite likely all neighbors of X have already received the state information. Thus, it isunnecessary for host X to also transmit the same information.

This is an imperfect heuristic, as illustrated with Figure 6.3. In this figure, host Y canreceive a link state information for link L only from host X. Even though host X mayhear the same information from as many as 5 hosts, it does not necessarily mean thatall neighbors of host X (particularly host Y) have heard it as well. Thus, if host Xchooses a threshold of 4, then after hearing the link state for link L from hosts C, D,E, F and G, host X will decide to not forward the information. In this case, Y will notreceive the link state information. However, if such scenarios are not common, thenthe above heuristic reduces overhead of link state dissemination without degradingroute selection significantly. Similar to hazy-sighted dissemination, hosts can oftendetermine a good route (not necessarily optimal) without knowing the entire networktopology accurately. Similar to the probabilistic approach, in this case as well, thereis no explicit coordination among the hosts.

In the above example, why would it be the case that host X has not forwarded the linkstate information about link L until it receives the threshold number (4 in our example)of copies of that information? This may happen for two reasons: (a) First, host X maynot forward the link state immediately on receipt from another host; instead host Xmay wish to merge several different pieces of information before forwarding them. (b)Second, the transmissions from X compete with hosts C, D, E, F and G for mediumaccess; thus, it is entirely possible that host X’s transmission is delayed, while thosefrom other hosts are being performed.

A B

C

D

E

F

G

X YL

Figure 6.3 Uncoordinated forwarding may not always propagate link state updates through-out the network

c© 2010 Vaidya 118

Page 131: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Coordinated selective forwarding: In this approach, hosts exchange information withnearby hosts to help determine which hosts should forward link state information. Onesuch approach requires each host, say host A, to identify a subset of its neighbors asthe relay set [5]. Hosts in the relay set of host A are the only hosts that forward linkstate information received from host A. Since all the relay hosts are A’s neighbors,they can be sent the information in a single broadcast or multiple unicasts.

How should a host select the relay set? The goal of link state dissemination is to leteach host learn the state of each link in the network. For simplicity, suppose that weonly want to disseminate information regarding bidirectional links. The relay set ofhost A can be a subset of neighbors of host A to which host A has a bidirectionallink (or, more precisely, a subset of hosts to which the routing protocol believes thatbidirectional links exist) – let us call the hosts to which host A has a bidirectional linkits 1-hop neighbors.

Let 2-hop neighbors of host A be hosts to which shortest route from host A contains 2bidirectional links. Suppose that we select the relay set such that each 2-hop neighborof host A is a 1-hop neighbor of at least one host in the relay set. Thus, if each hostin the relay set broadcasts the information received from host A, then each 2-hopneighbor of A is likely to receive the information (in absence of collisions or errors).Even when unicasts are used to forward packets to the relays, other neighboring hostsmay receive the packet by promiscuous listening. Promiscuous listening at the MAClayer implies that the MAC layer will pass to the network layer all packets it receives,even if the MAC destination address for the packet is for another host. By an inductiveargument, if each host X forwards a packet received from another host Y if X is in therelay set of host Y, then (in the absence of packet loss) the information will reach eachreachable host in the network. To reduce packet loss, packets may be transmitted tothe relay hosts using reliable unicast, although this results in a higher overhead thanusing an unreliable broadcast.

The use of relay sets can help reduce the number of nodes that forward a given linkstate information, in turn, reducing the message overhead and energy consumption,which is desirable in wireless networks. Figure 6.4 shows an example network, anda minimal relay set for each of the hosts in the network. Observe that, for a givenhost, there may be multiple choices for a relay set. In fact, there may also be multiplechoices for minimum size relay sets.

To determine the relay set, each host needs to know its 1-hop and 2-hop neighbors.This can be achieved by a modified neighbor discovery using “hello” packets. Forinstance, for each host X can periodically transmit a hello packet, which specifies thelist of other hosts from which host X has recently received a hello packet, and a alsolist of hosts to which host X has detected a bidirectional link. When a host Y receivesa hello packet from host X that states that X has received a hello from Y, it allowshost Y to detect a bidirectional link to host X. Thus, from recent hello packets, each

c© 2010 Vaidya 119

Page 132: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

B

A

C

D

E

G

D

A,E or C,E

E

F D,E

C,D

D,E or B,E

Figure 6.4 Relay sets

host can determine the hosts to which it has 1-hop or 2-hop routes consisting of onlybidirectional links. Using this information, each host can then determine a suitablerelay set. Ideally, we want to choose a small relay set to reduce the overhead. But otherfactors such as energy availability at the hosts may also be taken into consideration inidentifying the relays.

In the above discussion, we assumed that when a host obtains the link state informa-tion, it determines least cost routes to various destinations, and modifies the next hop entryin the routing table. In principle, link state dissemination may also be used in conjunctionwith source routing. Since each host can learn the entire network topology (although someof the information may be stale), each host can determine the source routes to desired des-tinations. However, when optimizations such as hazy-sighted link state dissemination areused, a host is more likely to have poor state information on links far away, and may chooseinvalid source routes to faraway destinations.

6.2.2 Distance Vector Routing

Distance vector routing, unlike link state routing, does not disseminate the state ofall the links to all the hosts. Instead, each host periodically broadcasts (to its neighbors)a distance vector, which contains a “digest” of the information available to that host. Inparticular, each host maintains a routing table whose dimension is equal to the number ofhosts to which a route is known (as we discussed previously, the entries may also correspondto aggregates of hosts, but we will assume per-host entries in the routing table).

Let RX denote the routing table at host X, and let RX [Y ] be the entry in RX fordestination Y. RX [Y ] contains two pieces of information:

• Next-hop: The next host on the route from X to the destination Y. The next-hopassociated with RX [Y ] is denoted by RX [Y ].nexthop.

c© 2010 Vaidya 120

Page 133: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Cost: The cost of the route from X to Y, for which the next hop is specified above.The cost associated with RX [Y ] is denoted by RX [Y ].cost.

Each host maintains an estimate of the cost of the links to its neighbors. Let CXY

denote the cost of directed link XY. In general, the costs of directed links XY and YX maybe different. If a link from node X to Y is not known to exist, the cost of the link is deemedto be ∞. Initially, if link XY is known to exist, then RX [Y ].nexthop is initialized to Y, andRX [Y ].cost is initialized to CXY . If a route to some destination P is not know (or not valid),then RX [P ].nexthop = ⊥ and RX [P ].cost = ∞. (Note that ⊥ denotes null.)

Each host periodically transmits a distance vector to its neighbors. The distancevector sent by host X, denoted as DX , consists of the costs in the routing table. Specifically,DX [Y ].cost = RX [Y ].cost. When a host Z receives a distance vector DX from host X, hostZ performs the following operation:

for all destinations Y such that Y 6= Zif RZ [Y ].nexthop = X

RZ [Y ].cost = DX [Y ].cost + CZX

else if DX [Y ].cost + CZX < RZ [Y ].costthen

RZ [Y ].cost = DX [Y ].cost + CZX

RZ [Y ].nexthop = X

In effect, if host Z learns a better route via host X to some destination Y, then hostZ will update its routing table entry for that destination. In addition, if host Z detectsthat link ZX is broken, then for each destination Y for which X is the next hop (that isRZ [Y ].nexthop = X), the route cost RZ [Y ].cost is updated to ∞, and the next hop is setto ⊥.

This protocol is illustrated in Figure 6.5. In Figure 6.5(a), the routing tables at hostsA and B are shown. Cost of each link is shown near the link in the figure. Subsequently, thecost of link AD increases from 2 to 5, and this cost change is detected by host A. When hostD sends to A the distance vector shown in Figure 6.5(b), host A uses the new cost estimatewhen computing the new routing table (as shown).

As shown in Figure 6.5(b), when host A receives the shown distance vector from hostD, it updates its own distance vector table entries for destinations C, D and E (note thatthe next hop for these destinations is D, hence these entries must be updated); the newrouting table at host A is also shown in Figure 6.5(b). Subsequently, host A receives thedistance vector from host B (as shown in the figure). Now host A learns lower cost routesto destinations C, D, E (via host B), and hence host A updates its routing table as shownin Figure 6.5(b).

c© 2010 Vaidya 121

Page 134: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

New routingtable at Aafter receivingdistance vectorfrom D

New routingtable at Aafter receivingdistance vectorfrom B

B

A

C

D

E

2

1

1

1

2

5

Destination next−hop cost

Distancevectorsent by D

Destination cost

A 2 B 2

C 1

E 1 D 0

E 3

Destination cost

D 2 C 1 B 0 A 2

vectorDistance

sent by B

E D 6D D 5C D 6B B 2A * 0

E B 5D B 4C B 3

Destination next−hop cost

B B 2A * 0

B

A

C

D

E

2

1

1

1

2

2

B B 2C D 3D D 2E D 3

Destination next−hop cost

A * 0

Destination next−hop cost

Routing tableat host A

Routing tableat host B

A A 2B * 0C C 1D C 2E C 3

(b)

(a)

Figure 6.5 Illustration of distance vector protocol: Next-hop marked as * indicates that norouting is required

c© 2010 Vaidya 122

Page 135: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Consider a certain destination Y. The distance vector protocol allows the varioushosts in the network to determine their distance to destination Y. However, observe that,the distance information propagates in the opposite direction, that is, away from Y. Forinstance, in the algorithm above, when the distance vector is sent by X to Z (on the link fromX to Z), Z may update its routing table to start using the link from Z to X as the next hoptowards destination Y. Clearly, the distance vector was transmitted in a direction oppositeto the direction in which the link will be used. Thus, implicitly, we have assumed that thelinks used by the algorithm are bidirectional. Although the costs in the two directions maynot be identical in general, we will assume identical costs in our examples.

When link failures occur, the distance vector protocol, as described above, can resultin monotonically increasing route costs in the distance vectors at some of the hosts, withouta convergence of the distance vectors to stable values. This problem is known as counting-to-infinity. For a similar reason, when link costs increase substantially, significant numberof distance vector exchanges may be needed before the distance vectors stabilize. Let usillustrate this using an example.

Example of counting-to-infinity: Suppose that the initial network state is as shownin Figure 6.6(a). Note that costs of ∞ and null next hops are shown as − in Figure 6.6.Subsequently, let us assume that all the links in the network, except link AD, break simul-taneously. The cost of link AD remains unchanged. When D detects that links to C and Ehave failed, it will consider the costs of those links as being ∞. In addition, D invalidatesthe routing table entries for destinations B, C and E, since their next-hop entries were Cor E (that is, it sets the cost of routes to these destinations as ∞, and next hop as ⊥).Similarly, host A modifies its state as shown in Figure 6.6(b).

Subsequently, host D receives the distance vector sent by host A, which specifies aroute to destination C with cost 3. In response, as shown in Figure 6.6(c), host D willupdate its next-hop for destination C to be A, and cost to be 3 + 2 = 5 (cost of link DA is2, and the total cost of 5 is smaller than the ∞ cost of the route to C in D’s routing table).

Now, D sends a distance vector to host A, with cost for destination C being 5, asshown in Figure 6.6(d). Since, D is the next-hop for destination C in A’s routing table, hostA must update its cost for the route to host C. In particular, host A updates the cost fordestination C to be 5 + 2 = 7.

Subsequently, when D receives distance vector from host A, D must update the costfor destination C, since RD[C] = A. It should be easy to see that whenever D and A receivedistance vector from each other, they will increase the cost of the route to destination C.Thus, the cost will continue to grow monotonically. Since the costs in the distance vectorcan grow to infinity (at least in theory), this problem is referred to as counting-to-infinityproblem. 2

Several solutions have been proposed to try to solve the counting-to-infinity problem.We discuss one such solution. Observe that the counting-to-infinity problem arises above

c© 2010 Vaidya 123

Page 136: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

after receivingdistance vector

New routingtable at D

from A

Distancevectorsent by A

Distancevectorsent by D

after receivingdistance vector

New routingtable at A

from D

(a)

B

A

C

D

E

2

1

4

1

2

2

(b)

(c)

A 2

Destination cost

B

A

C

D

E

(d)

2

Destination cost

Destination next−hop cost

E D 5D D 2C D 3B − −A * 0

Routing tableat host A

E − −

A A 2B − −

C − −D * 0

at host DRouting table

Destination next−hop cost

Destination next−hop cost

A A 2B − −C A 5

E A 7D * 0 E 5

D 2 C 3

A 0

E 7 D 0 C 5

Destination next−hop cost

E D 9D D 2C D 7

A * 0

Destination next−hop cost

E D 5D D 2C D 3B B 2A * 0

Routing tableat host A

E C 3

A A 2B C 2

C C 1D * 0

at host DRouting table

Destination next−hop cost

B − −

B −

B −

Figure 6.6 Illustration of distance vector protocol with link failure: ∞ costs and null nexthops are shown as - in the figure. Next hop * indicates that routing is not needed.

c© 2010 Vaidya 124

Page 137: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

essentially because of formation of a loop. In particular, host A uses D as the next hop fordestination C, and D uses A as the next hop for destination C. When host D sets its costfor route to C as ∞ (after detecting failure of link DC) the cost in A’s routing table is still3, even though A’s route goes via host D. In other words, the routing table entry at host Ais obtained using information that is stale, or older than the information available at hostD. Yet, host D later relies on the distance vector received from host A to update its owndistance vector, making A the next hop towards destination C. This results in the formationof a loop. As this example suggests, a mechanism to avoid using stale information may help.

One possible approach for this is to associate a tag with each routing table entry andeach distance vector entry. The tag can potentially be defined in various ways. We willconsider a tag formed using a destination sequence number [18]. Each host – acting as adestination – is given a sequence number. The tag is formed as a tuple (destination sequencenumber, distance). Distance is defined as the sum of the costs of links on a route. Tagsassociated with invalid routes will have the distance component as ∞. We will say that tag(s1, d1) is better than tag (s2, d2) if one of the two conditions below holds:

• s1 > s2 (that is, the first tag has a larger sequence number)

• s1 = s2 and d1 < d2 (that is, the two tags have the same sequence number, but thefirst tag contains smaller distance).

We will use the notation > to represent the better than relation. Thus (s1, d1) > (s2, d1)represents “(s1, d1) better than (s2, d2)”. A tag is associated with each routing table entry;the tag is computed as described below. Initially, before a host learns any route to a certaindestination, tag for the route entry for that destination is deemed to be (−1,∞) by default.

Distance vector sent by a host X contains the next hop and tag associated witheach routing table entry at host X. Specifically, DX [Y ].cost = RX [Y ].cost and DX [Y ].tag =RX [Y ].tag. Note that we use the dot (.) notation as a shorthand for “associated with”.Thus, DX [Y ].tag means the tag associated with distance vector entry DX [Y ].

Before transmitting a new distance vector to the neighbors, host X increments itsown destination sequence number (in the tag corresponding to itself as destination) by 2.This new tag is included in the distance vector. The distance value used to form this tag is0. Thus, the tag attached by a host to its own entry is of the form (n, 0), where n is alwayseven (n is initially 0, and incremented by 2 before each new distance vector is transmittedto neighbors).

The distance vector algorithm using tags has two components:

• Response to link failure: Suppose that a host Z has a valid routing table entry RZ [Y ]with tag (m, d) and next hop as node P (a routing table entry is valid, if the nexthop is not null). Now, suppose that host Z detects that the link ZP has failed. In

c© 2010 Vaidya 125

Page 138: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

this case, host Z increments the sequence number in routing table entry RZ [Y ].tag by1, and the distance to destination Y is now deemed to be ∞. Thus, the new tag forRZ [Y ] will be (m + 1,∞), and the corresponding next hop is set to null (⊥). Notethat (m + 1,∞) > (m, d).

Due to the manner in which tags are updated on receipt of a distance vector, thesequence number field of each valid route table entry (that is route table entry withfinite distance metric) is always even. Thus, the above increment-by-1 operation ondetection of a broken next hop causes the sequence number in the tag associated withthe newly invalidated routing table entry to be odd, and larger than the previousdestination sequence number in the tag. In particular, in our example above, m + 1will be odd.

• Response to a received distance vector:

Consider host Z that receives distance vector DX from host X (on link XZ). The firststep on receipt of the distance vector is to modify the tags in the distance vector:

for all destinations Y such that Y 6= Zif tag associated with DX [Y ] is (a, b)

modify that tag to be (a, b + cost of link ZX)

The above step increments the second component of the tags in DX by the cost of linkZX, so that the distance component of the tags in the distance vector now representsthe cost of routing to the various destination from Z via host X. In the discussionbelow, the tags in DX before performing the above step will be referred as the originaltags in DX , and the tags after the above step are called modified tags. The modifiedtags are used below in the pseudo-code for the remaining steps taken by host Z onreceipt of DX .

for all destinations Y such that Y 6= Zif RZ [Y ].nexthop = X

RZ [Y ].tag = DX [Y ].tagelse if ((distance in DX [Y ].tag 6= ∞)

and DX [Y ].tag > RZ [Y ].tag)) then

RZ [Y ].nexthop = XRZ [Y ].tag = DX [Y ].tag

The above steps ensure that, for any X, Y and Z, if RZ [Y ].nexthop = X then thecondition RX [Y ].tag > RZ [Y ].tag is true (as argued below). This implies that, starting

c© 2010 Vaidya 126

Page 139: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

from any host, if we follow the next hop entries for any particular destination, the tagassociated with the routing table entries (corresponding to that destination) monotonicallyincrease until we reach the destination, or reach a host with a null next hop entry. Thismonotonicity property ensures that no routing loops occur.

To see that the monotonicity property continues to hold, consider the following:

• Claim 1: The condition RX [Y ].tag > RZ [Y ].tag holds at the time that RZ [Y ] is setequal to X, assuming that RX [Y ].tag does not change from the time X transmits DX

to Z until Z updates RZ [Y ].tag in response to DX : When RZ [Y ] is modified, RZ [Y ].tagis set equal to modified DX [Y ].tag. Also, original DX [Y ].tag > modified DX [Y ].tag,and original DX [Y ].tag = RX [Y ].tag (at the time X transmits DX to Z). Thus, itfollows that statement above (that RX [Y ].tag > RZ [Y ].tag) is true. Also, it is easy tosee that new RX [Y ].tag > old RX [Y ].tag.

• Claim 2: Once RZ [Y ].nexthop is set equal to X, the condition RX [Y ].tag > RZ [Y ].tagcontinues to hold true so long as RZ [Y ].nexthop is not updated: To argue the correct-ness of this claim, we need to consider two possibilities:

– While RZ [Y ].nexthop remains equal to X, host X modifies the tag associated withRX [Y ]:This tag is modified only under two conditions:

∗ The next hop is broken, in which case the new RX [Y ].tag is larger than theold RX [Y ].tag, as we have seen previously.

∗ The routing table entry RX [Y ] is modified on receipt of a distance vector,resulting in a new RX [Y ].tag . Since RX [Y ] is modified, it must result in thenew RX [Y ].tag being larger than the old RX [Y ].tag (due to claim 1 above).

Thus, the new RX [Y ].tag can only be larger than the old tag. Therefore, theinequality RX [Y ].tag > RZ [Y ].tag will continue to hold.

– Tag RZ [Y ].tag is modified:Again, there are two possibilities.

∗ Failure detection of link ZX resulted in the tag for RZ [Y ] being modified.After this update, we will no longer have RZ [Y ].nexthop = X.

∗ RZ [Y ].tag was modified due to the receipt of a distance vector from anotherhost. In this case, again, due to claim 1 above, the desired property will holdfor the new next hop for RZ [Y ].

The above argument suggests that so long as RZ [Y ].nexthop = X, we will haveRX [Y ].tag > RZ [Y ].tag. Since the tags must monotonically increase along any valid route,the route cannot contain loops. Does the use of tags help avoid the counting-to-infinityproblem? Let us revisit our example.

c© 2010 Vaidya 127

Page 140: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Counting-to-Infinity Example Continued: Reconsider the example in Figure 6.6. Fig-ure 6.7(a) shows the routing tables containing tags at some point of time. Observe that allsequence numbers in these tags are even, since all the routing entries are valid. Subsequently,when nodes A and D detect the link failures, they update their own routing tables as shownin Figure 6.7(b). Before host A sends a distance vector to D, it increments own destinationsequence number from 2 to 4. The distance vector sent by host A to host D is shown inFigure 6.7(c), as well as the distance vector received from A after the tags are modified byhost D (recall that host D will decrement the distance component of the tags on receiptof the distance vector from host A). Unlike the case of Figure 6.6(c), now host D does notmodify its routing table entries for destinations C and E, because the modified tag includedin the distance vector entries for destinations C and E are not better than the correspondingentries in D’s own routing table. In particular, the tags for destination C in the routingtable at D, and the modified distance vector from A, are (7,−) and (6,−5) respectively.

6.3 Reactive Protocols

As seen above, determining suitable routes requires network-wide dissemination oflink state information (as in case of link state routing), or a digest of such information(as in case distance-vector routing). In case of proactive protocols, such dissemination isperformed continually, independent of traffic patterns. Reactive protocols attempt to avoidsuch information dissemination in the absence of data traffic in the network. However, whentraffic is present from some host S to host D, necessarily, adequate link state informationmust be disseminated somehow to allow host S to determine a route to host D. The reactiveprotocols improve on proactive protocols by using the following optimizations (separatelyor together):

• Limiting the scope of information dissemination: Since the goal of a reactive routingprotocol is to find a route only between certain host pairs – as opposed to all hostpairs – a reactive protocol has the luxury of limiting the scope of search to a subset ofhosts in the network that is likely to contain the desired routes. On the other hand,since proactive protocols attempt to find all-pair routes, they must search the entirenetwork.

• Limiting the amount of disseminated information: Again, due to the limited goal offinding routes between only certain host pairs, it can suffice to disseminate only theinformation that is likely to be helpful in finding the desired routes.

As a combination of the above optimizations, a smaller fraction of information need only bedisseminated within a limited scope, as a function of the routes to be determined. Let us

c© 2010 Vaidya 128

Page 141: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

B

A

C

D

E

2

Destination tag

E (8,7)

D (2,4) C (6,5)

A (4,2)

after distances in thedistance vector areincremented by D

by D from A

Distance vectorreceived

B (5,−)

(a)

B

A

C

D

E

2

1

4

1

2

2

E D (8,5)D D (2,2)C D (6,3)B − (5,−)A * (2,0)

A A (2,2)B − (5,−)

D * (2,0)

Routing tableat host D

C − (7,−)

E − (9,−)

(b)

Distancevector

sent by A

to D

E D (8,5)D D (2,2)C D (6,3)B B (4,2)A * (2,0)

A A (2,2)B C (4,2)

C C (6,3)D * (2,0)E C (8,3)

Destination next−hop tag

Destination next−hop tag

Destination next−hop tag

Destination next−hop tag

Destination tag

E (8,5)

D (2,2) C (6,3)

A (4,0) B (5,−)

Routing tableat host A

Routing tableat host A

Routing tableat host D

(c)

Figure 6.7 Distance vectors using tags

c© 2010 Vaidya 129

Page 142: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

discuss this using an example in Figure 6.8. In this figure, we assume that packets sent over“links” shown in the figure are the only ones that may be received reliably. However, it isworth reminding that, in reality, reliable delivery of a transmission is a function not only ofthe sender and receiver hosts, but also of the interference posed by other transmissions.

S

B

A H

C

EF

G

I

K D

J

M L

N

Z Y

Figure 6.8 Reduced need for information with reactive protocols

Now we describe a simple reactive routing protocol. The procedure below is used byhost S to discover a route to host D. Therefore, the procedure is called route discovery.

1. When a source host S needs to determine a route to host D, it initiates the routediscovery by broadcasting a Route Request (RREQ) packet, which may be receivedby all its neighbors. In this reactive protocol, host S does not necessarily know theidentity of all its neighbors (or even how many neighbors it has), therefore, reliableunicast delivery of RREQ to all neighbors is not possible. Instead, unreliable broadcastis used for the RREQ. The RREQ is propagated through the network using the nextstep below.

2. Each host, say host R, on receiving an RREQ from another host, say host Q, performsthe following two steps:

(a) Host R records the fact that the RREQ sent by host Q was received on link QR.Depending on the manner in which this link information is stored, we obtain twoimplementations of reactive route discovery, as we will see below.

(b) Host R broadcasts the RREQ to propagate it to the hosts in its vicinity.

c© 2010 Vaidya 130

Page 143: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

The above procedure for propagating the RREQ is called flooding, since it can resultin the RREQ reaching all the hosts in the network. Note that flooding can be used todeliver data to a destination as well, but clearly that is an expensive approach.

3. When host D, the intended destination, receives an RREQ, it replies by sending aRoute Reply (RREP) to host S. Now, host D may not know a route to host S. Therefore,one simple mechanism to send RREP to D is to flood the network with RREP. Wewill consider alternatives to flooding below. In general, host D may receive multipleRREQ messages corresponding to a single route discovery performed by host S – forsimplicity, assume that D only responds to the first RREQ it receives. To allow a hostto determine that an RREQ is duplicate, a unique sequence number is attached toRREQs corresponding to each route discovery initiated by a given source.

4. When S receives the RREP, route discovery is complete, and as we will see below, Swill have enough information to be able to forward data to host D. If S does not receivea RREP within a certain timeout interval, it may perform another route discovery fordestination D.

As the hosts in the network forward RREQs, RREQ is propagated through the net-work. In general, the RREQ may travel along multiple routes from the source to anothernode in the network (including the intended destination). We want the source to eventuallydiscover at least one of these routes. To facilitate this, the list of links that is traversed by theRREQ needs to be stored for later use. Two possibilities exist for storing this information:

• Centralized link list (in RREQs): In this case, the route information is stored in theRREQ itself in the form a list of links traversed by the RREQ so far. Suppose thatthe broadcast of RREQ by S is received by C, the subsequent broadcast of RREQ byC is received by G, and the broadcast by G is received by K. Then, hosts C, G and Kwill add corresponding information to the RREQ in that order. For instance, host Cwill add link SC to the link list in the RREQ (the link list is empty in the RREQ sentby source S). As a result, the RREQ transmitted by K will contain link list [SC, CG,GK] indicating the links over which the RREQ was received, including their order (thelist is ordered). Now note that adjacent links in the link list must have one host incommon; for instance, SC and CG have host C in common. So we can compress theabove link list to [S,C,G,K] without any loss of information. It is easy to see that thisis, in fact, the list of hosts traversed by the RREQ until its transmission by host K.Such a link list can be maintained by requiring a host to simply append its identifierto the RREQ (in step 2(a) above) before the RREQ is forwarded.

To allow determination of the route cost, in addition to the node list, the RREQ canalso maintain the total cost of links traversed so far. To achieve this, when a host, sayY, receives an RREQ from a neighbor X, host Y should increment the route cost inthe RREQ by the cost of link XY.

c© 2010 Vaidya 131

Page 144: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

For simplicity, let us assume that each host forwards only the first RREQ it receives,discarding the rest. Figure 6.9 shows the link lists included in the RREQ transmittedby the hosts (the lists are shown close to the corresponding hosts). In the figure, anarrow is shown on a link, say link YZ, if host Z responds to the RREQ received fromhost Y – if the node Z is not the intended destination, it will respond by forwardingthe first RREQ, else it will respond by sending a route reply (RREP). For instance,even though host C may receive the RREQs transmitted by hosts S, B, E, H and G, itonly responds to the first RREQ it receives. In this example, we assume that the firstRREQ that host C receives is directly received from S. Therefore, Figure 6.9 shows anarrow from S to C.

S

B

A H

C

EF

G

I

K D

J

M L

N

Z Y

[S][S,E]

[S,E,F]

[S,E,F,J]

[S,E,F,J,M]

[S,E,F,J,M,L][S,B]

[S,B,A] [S,C,H]

[S,C][S,C,G]

[S,C,G,K]

Figure 6.9 Illustration of the use of a centralized list stored in RREQ

Observe that host D may receive the RREQ from hosts J and K both, but it doesnot forward the RREQ since it is the intended destination for the route discovery. Onreceiving an RREQ, host D learns a route from S to D. For instance, on receipt ofRREQ containing [S,E,F,J] from J, node D learns the route S-E-F-J-D from S to D. Inour example, since host D may receive one RREQ each via hosts J and K, it can learntwo routes from S to D. For simplicity, let us assume that D sends a RREP (routereply) in response to the receipt of the first RREQ.

It is also possible that host D does not receive any RREQ at all. In particular, inour example, the RREQs sent by nodes J and K may overlap in time, leading to acollision at node D, which may prevent node D from receiving either RREQ reliably.Thus, the route discovery process does not guarantee discovery of a route even if sucha route exists. For similar reasons, host I in the figure does not receive a RREQ, dueto collision of the transmissions of RREQ by hosts G and H. The RREQ does notreach nodes Y and Z, since there is no path from S to these nodes.

c© 2010 Vaidya 132

Page 145: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Distributed link list: The second possibility is to maintain state at node Z to recordthat an RREQ was received on link YZ. This is in contrast to the centralized list, whichis stored in RREQ. With a distributed link list, following the example in Figure 6.8,host B will record (locally) that the RREQ was received on link SB, host A will recordthat the RREQ was received on link BA, and so on. Pictorially, this can be visualizedas an arrow pointing from B to S (pointing to the host from which the first RREQwas received), an arrow from A to B, and so on. Let us call these arrows reversepointers, since they point in the reverse direction of the direction in which the RREQis traveling. Note that a host, in general, may receive multiple copies of an RREQduring a single route discovery initiated by host S. Let us assume that a host responds(by setting up a reverse pointer) only to the first RREQ it receives for a particularroute discovery. The reverse pointers are shown in Figure 6.10. Destination host Dpoints to J, since D receives the first RREQ via host J.

S

B

A H

C

EF

G

I

K D

J

M L

N

Z Y

Figure 6.10 Illustration of reverse pointers

Observe that the arrows in Figure 6.10 are opposite the arrows in Figure 6.9. Thearrows in Figure 6.9 depict the progress of the RREQ away from S, whereas thearrows in Figure 6.10 point in the direction from which RREQ is received.

For brevity, let us introduce notation RREQ(S,D) to represent an RREQ messagethat is part of a route discovery initiated by host S for a route to host D. Similarly, letRREP(S,D) represent a Route Reply sent by host D to S, as part of the route discoveryinitiated by host S for a route to host D.

For the present, let us pretend that all links in the wireless network are bidirectional.Thus, following either of the above link list methods, when host D receives a RREQ, the

c© 2010 Vaidya 133

Page 146: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

link list contains enough information to deliver RREP from host D to S, as explained below.Depending on whether we want to use source routing or next-hop table-based routing, therouting state can also be updated as the RREP travels from D to S:

• Centralized link list: In this case, the RREQ received by D contains the list of linkstraversed by the RREQ (in the specified order). For instance, as seen in Figure 6.9,when host D receives the RREQ from J, it will contain the list [S,E,F,J]. Thus, Dlearns that there is a route [S,E,F,J,D] from S to D. Since we are assuming that thelinks are bidirectional, this also implies that there is a reverse route [D,J,F,E,S] fromD to S. Now, D can send RREP to host S using this route. Specifically, D can sendthe RREP to S by using this route as the source route. Then the RREP will reachS via hosts J, F and E. We can utilize the centralized link list to implement sourcerouting or next-hop table-based routing, as follows:

– Source routing: The RREP contains the entire route from S to D. When theRREP reaches host S, host S can store this route in a routing table, and use itas the source route when sending packets to host D. In our example, host S willlearn the route [S,E,F,J,D] to D. Also, host S learns the existence of links SE,EF, FJ and JD – this knowledge can be used to find other routes (for instance, aroute from S to F).

– Next-hop table-based routing: When some host Y receives RREP(S,D) from hostX, associated with a route discovery performed by host S for host D, host Y canupdate its routing table to store X as the next-hop on the route to destinationD. For instance, hosts E and F in our example will update their routing tableentries for destination D to store F and J, respectively, as the next-hop. Thus, bythe time the RREP reaches S, all the hosts on the link list will have the abilityto route packets towards host D.

• Distributed link list: In this case, when host D receives the RREQ from J, it willcreate a reverse pointer pointing to J. Now, the trail of reverse pointers leads us fromD to S, via hosts J, F, and E. Host D can thus send the route reply (RREP) to hostS, by requiring the intermediate hosts to forward the RREP along the stored reversepointers. Unlike the centralized case, no single host knows the entire route from D toS, however, enough information is available at each host to be able to reach S fromD. The distributed link list approach can also be used to implement source routing ornext-hop table-based routing, as follows:

– Source routing: To implement source routing, host S will need to be able to learnthe entire route from S to D. To achieve this, as the RREP is forwarded from D toS using the reverse pointers, the hosts can add themselves to a link list stored inthe RREP, much like the link list stored in the RREQ in the centralized link listapproach. Thus, when the RREP reaches host S, it will contain the list of all the

c© 2010 Vaidya 134

Page 147: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

hosts on the route from D to S. Since we assume the links to be bidirectional, thislist also provides S with the entire route from S to D, which can be subsequentlyused for source routing.

– Table-based routing: Similar to the case of table-based routing with centralizedlink list, when some host Y receives RREP(S,D) from a neighbor host X, host Ycan update its routing table to store X as the next-hop on the route to destinationD. By the time the RREP reaches host S, all the hosts along the route [S,E,F,J,D]will have a next-hop entry for destination D in their routing tables.

For brevity in our remaining discussion of reactive routing protocols, we focus on two possibleinstances of the protocol:

• Dynamic Source routing (DSR): In this case, we will consider source routing, in con-junction with centralized link list approach.

• Dynamic Next-Hop Routing (DNHR): In this case, we will consider next-hop table-based routing in conjunction with the distributed link list approach.

The specification of reactive protocols above is incomplete in that we have not spec-ified how to handle link failures, or multiple route discoveries. We will discuss these possi-bilities in the rest of this section.

6.3.1 Handling Link Failures with Reactive Protocols

Our discussion so far only focused on conducting a route discovery to determine aroute in a given network topology. However, a route discovered during such a route discoverymay become invalid over time (due to link failures). Thus, hosts on routes affected by thelink failure need to be made aware of the failure. In addition, subsequent route discoveriesshould not result in routing loops, due to adverse interactions with routing state createdduring previous route discoveries.

Detecting a broken link: If a previously existing link in an ad hoc network breaks, thenroutes utilizing that link will not be able to deliver packets to their destinations. Considera packet from source S for destination D, such that links XY and YZ are on the route.When host Y receives this data packet from host X, with next-hop on the route being Z,host Y will attempt to transmit the packet to Z. However, if Y is unsuccessful in deliveringthe packet to Z (possibly after retransmission attempts), host Y may conclude that the linkYZ is broken. This is a reactive mechanism for detecting link failure (and consequent routefailure), since the failure is not detected until a source attempts to transmit a data packeton the route. On detection of the link failure, host Y will invalidate the corresponding routefor destination D in its routing table.

c© 2010 Vaidya 135

Page 148: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Informing hosts of link failure: Consider a packet, from source S destined for destinationD, which arrives at host Y from upstream host X. If the route to the destination is broken,then other hosts, particularly source S, needs to be informed of this failure. In case of DSRand DNHR both similar approaches may be used:

• DSR: With source routing, the entire route from the source S to destination D isavailable in the data packet itself. Under the assumption that the links on the routeare bidirectional, using this source route Y can deliver a Route Error (RERR) messageto source S to inform S that link YZ is broken. On receiving this message, the sourceshould delete all routes in its routing table that utilize link YZ, and perform a routediscovery for destination D if no other route to the destination is known to S. Whenthe links on the routes may be unidirectional, host Y will have to use an alternateway to deliver the RERR to source S (for example, RERR may be piggybacked on aRREQ(D,S) sent by D to discover a route to S).

• DNHR: In this case as well, the source of the packet needs to be informed of the routefailure. Host Y can utilize a known route to the source S to deliver a RERR to S,informing S that its route to destination D is broken. If a route to host S is not known,then a route must first be determined using a route discovery – in this case, to speedup the delivery of the RERR, the route error message may be piggybacked on theRREQ(D,S) for the route discovery performed by D. Additionally, host Y may alsoinform the uplink host X of the broken route. Host X on receiving this RERR willinvalidate its own route for destination D. This allows for propagation of the routeerror information to other hosts in the network.

A host that does not have a valid route to a desired destination will have to perform a routediscovery to obtain the route before sending data to that destination. Thus, the receipt ofRERR messages may lead to new route discoveries. 2

6.3.2 Interaction Between Multiple Route Discoveries

In our discussion above, we implicitly assumed that only one route discovery is inprogress at any given time. What if there are multiple sources-destination pairs communi-cating simultaneously? In general, a single host may be source of traffic intended for multiplehosts, and a single host may be a destination of traffic originating at multiple hosts. Theabove protocols need to handle such possibilities, while avoiding formation of routing loops.

Consider the case when multiple route discoveries occur. If the different route dis-coveries are for distinct destinations, then these route discoveries will not interact with eachother, since the routing state information is associated with a specific destination. In effect,

c© 2010 Vaidya 136

Page 149: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

the hosts can treat route discoveries for different destinations as parallel non-interactingexecutions of the protocol.

What happens when two different hosts perform route discovery for the same desti-nation host, say host D, simultaneously? While we have used centralized and distributedlink lists quite similarly so far, the solution for handling multiple route discoveries need tobe somewhat different for DSR and DNHR.

DSR: Recall that DSR uses a centralized link list, and source routing. In this case, theentire route is available in the RREQ and RREP packets. Each host can independentlydetect formation of a loop by inspecting these routes. Thus loop avoidance is easy in caseof DSR.

Let us now consider DNHR.

Augmenting DNHR With Tags

Recall that DNHR uses a distributed link list, and next-hop table-based routing.In this case, there are two issues to consider for multiple route discoveries for the samedestination: (a) interaction due to RREQs corresponding to different route discoveries, and(b) interaction due to RREPs corresponding to different route discoveries.

Interaction due to RREQs: When multiple route discoveries for the same destinationare in progress, interaction between these route discoveries may occur when a host forwardsRREQ corresponding to both the route discoveries. When a host forwards a route request,it is expected to set up a reverse pointer. How should these reverse pointers be set up inresponse to multiple route discoveries?, The solution we will adopt here is to associate eachreverse pointer with a specific source-destination pairs (corresponding to the RREQ that ledto the reverse pointer). When a route reply, say RREP(S,D), is received by a certain node,it will only forward the RREP along the reverse pointer associated with the (S,D) pair.

Interaction due to RREPs: Despite the above solution of associating reverse pointerswith the corresponding source-destination pair, routing table updates on receipts of RREPsdue to different route discoveries for the same destination will still affect the same routingtable entry (because next hop is a function only of the destination). This can potentiallylead to the formation of a routing loop. Let us consider an example to illustrate such a loop.

Example of loop formation: Suppose that in Figure 6.8 hosts S and K are both per-forming route discovery for a route to host F. Since the RREQs are propagated using anunreliable broadcast, not all neighbors of a host may receive its broadcast. Suppose that thefirst RREQ(S,F) to reach F travels along route S-C-G-F, and the first RREQ(K,F) to reachF travels along route K-G-C-E-F. Hosts C and G are on routes taken by both RREQ(S,F)and RREQ(K,F), although in opposite orders. RREP(S,F) and RREP(K,F) sent by F willtravel along the reverse pointers set up when the RREPs were forwarded. In particular,

c© 2010 Vaidya 137

Page 150: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

RREP(S,F) will travel along route F-G-C-S, and RREP(K,F) will travel along route F-E-C-G-K. Suppose that host G receives RREP(S,F) followed by RREP(K,F), whereas hostC receives RREP(K,F) followed by RREP(S,F). When host G handles RREP(S,F), it willupdate the next-hop for destination F to be F itself, only to be modified again to C when Ghandles RREP(K,F) received via host C. Similarly, after host C has handled RREP(K,F),its next-hop next-hop for destination F will be E, but will be modified to be G, when hostC subsequently handles RREP(S,F) received by host C. Clearly, this introduces a routingloop, with hosts C and G using each other as the next-hop for destination F. 2

A solution to avoid routing loops is to associate a tag with each routing table entry,similar to the tags used for the distance vector protocol discussed previously. In particular,to form the tag, each host – acting as a destination – is given a destination sequence number.The tag is formed as a tuple (destination sequence number, distance). As we will elaboratelater, source of a route discovery attaches to its RREQ a tag corresponding to the desireddestination. When a destination responds to an RREQ, the destination increments its owndestination sequence number by a positive integer, such that the new sequence number isalso larger than the sequence number in the RREQ tag. Thus, successive RREPs sent by ahost include tags with monotonically increasing destination sequence numbers.

When a host, say host X, receives RREP(S,D) from another host, say Y, the followingsteps are performed:

• Host X adds cost of link XY to the second component of the tag in the RREP. Thus,when a host X forwards RREP(S,D), distance component in the tag is the cost of thediscovered route from host X to destination D. The RREP tag used in the step belowis that obtained after this increment operation. (The increment operation is analogousto the increment operation on receipt of a distance vector, as discussed earlier.)

• As in case of the distance vector protocol, tag (n1, d1) is considered to be better than(n2, d2), that is (n1, d1) > (n2, d2), if either (i) n1 > n2, or (ii) n1 = n2 and d1 < d2. If(and only if) the modified tag in the RREP is better than the tag associated with therouting table entry for destination D (that is RX [D].tag), then host X updates its nexthop for destination D to be equal to Y, and sets the tags for the routing table entryto be equal to the updated tag for the RREP. If a next-hop entry for the destinationis not present in the routing table at a host, then the tag for the non-existent entry isassumed to be (−1,∞). by default.

Revisiting the example of loop formation: With the above procedure using tags, let ussuppose that host F sends RREP(S,F) in response to RREQ from host S’s route discovery,followed by RREP(K,F) in response to an RREQ from host K’s route discovery. Clearly,the destination-sequence field of the tag associated with RREP(K,F) will be larger. Then,in our example above, host C will update its routing table in response to RREP(K,F), butwill not subsequently update it when it later receives the RREP(S,F). On the other hand,

c© 2010 Vaidya 138

Page 151: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

host G will update its routing table entry when it receives the RREP(S,F) and RREP(K,F)both, in that order. When C and G have both handled RREP(S,F) and RREP(K,F), thenext hop for destination F at host C and G will be E and C, respectively. There will be norouting loop: the route taken from host S to F will be S-C-E-F, and that from host K to Fwill be K-G-C-E-F. 2

The tag-based mechanism helps avoid loops. Analogous to the distance vector scheme,observe that at the time when a host Y updates its next-hop entry for destination D to beX, on receipt from X of an RREP sent by host D, the following condition holds: the tagassociated with Y’s entry is smaller than that associated with X’s entry. Will this conditionhold in the future, even if host X were to update its next-hop entry at a later time? Theanswer is yes, based on an argument very similar to that used in case of distance vectorprotocol with tags. Thus, updates to any host’s next-hop entry due to RREPs it mayreceive in the future will not violate the condition that the tags monotonically increasewhen we follow next-hop entries from any host. Due to this monotonicity property, loopscannot be formed.

Recall that in case of the distance vector protocol, a host that detects failure of anext hop, invalidates the next hop and increments the sequence number in the associatedtag. An analogous operation is required in case of DNHR as well.

• Consider host X that has RX [D].nexthop = Y . If host X detects that link XY isbroken, then (i) it sets RX [D].nexthop equal to null, and (ii) sets distance componentof RX [D].tag equal to ∞. The new tag is attached to any RERR message sent inresponse to the detected link failure.

• When a host P receives an RERR message informing it that its routing table entry fordestination D is now invalid, host P will (i) set RP [D].nexthop equal to null, (ii) setdistance component of RP [D].tag equal to ∞, and then (iii) if the tag for the RERRis better than RP [D].tag, then RP [D].tag is made equal to the RERR tag.

The tag-based scheme above requires that a host updates its routing table entry onlywhen the tag associated with the RREP (after increment of the distance field of the tag)is better than that for the previously existing routing table entry. What happens if somehost Y receives an RREP(S,D) such that the tag in the RREP is not better? Two differentactions may be taken:

• Option 1: If there is a reverse pointer towards the source host S that corresponds tothe route discovery, then send an RREP packet along the reverse pointer, but modifythe RREP to contain the tag associated with RY [D].

• Option 2: Discard the RREP. In this case, the source may re-initiate the route discov-ery if it does not receive any RREP.

c© 2010 Vaidya 139

Page 152: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

As should be clear from the above discussion, the tags are essentially used to deter-mine whether a route is newer (based on destination sequence number) and shorter (basedon distance). By ensuring that a host updates its routing table entry only using better in-formation, we can avoid loops. To complete this procedure, we require source S of a routediscovery for destination D to attach a tag D to the RREQ(S,D) as follows: if the tag atS for destination D is (n, c), then tag (n, 0) is attached to the RREQ. This, along with theprocedure used for generating the tag for the RREP, ensures that the tag for the RREP willbe better than the tag in the corresponding RREQ(S,D).

In the above discussion, we have incrementally modified the DNHR protocol in severalsteps. The resulting protocol is quite simple, and can be summarized as follows:

• Each host maintains a tag corresponding to each destination. Let us focus on destina-tion D here. By default, all routing table entries initially have a tag (−1,∞) and allhosts have their initial destination sequence number as 0.

• When a source S performs a route discovery for D, it attaches a tag to the RREQ(S,D).In particular, if RS[D].tag is (n, c), then the tag attached to RREQ(S,D) is (n, 0).

• When host D receives an RREQ, it increments its own sequence number, and sendsan RREP(S,D) with a tag better than that in the RREQ(S,D).

• A host X responds to a RREP(S,D) if the tag attached to the RREP is better thanRX [D].tag.

• RERR and RERR tags are suitable generated and handled in response to detectedroute failures.

Several additional questions arise in the context of the routing protocols discussedabove:

• What happens if some links are unidirectional?

• Can we reduce route discovery overhead?

• Our discussion above assumed that a host responds to only the first RREQ it receivesfor a particular route discovery. Is there a benefit to responding to multiple RREQs?By choosing to respond to the first RREQ, implicitly, the delay in RREQ forwardingis used as a metric for goodness of a route. What if we want to use other metrics, suchas energy cost, or load?

• The above protocols make no use of locality exhibited by physical location of hostsover time. There may also be some correlation between physical location of the hostsand the network “topology” as perceived by the routing protocol. Can the routingprotocol exploit this correlation?

c© 2010 Vaidya 140

Page 153: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

We will address some of the above questions in the rest of this chapter.

6.4 Unidirectional Links

A link between hosts, say, A and B, is said to be unidirectional if host A can send pack-ets to host B reliably, but B cannot send packets to host A reliably. In wireless networks,many parameters, including transmit power, rate, and interference level affect reliability.Thus, when determining whether a link is unidirectional or not, the feasible range of pa-rameters should be taken into account. Also, a wireless link, in general, may deliver only afraction of transmitted packets reliably. Thus, whether a link is reliable or not may have tobe decided based on a minimum threshold on delivery success. An unidirectional link AB(or, A → B) may arise, for instance, if the level of interference at host A is much higherthan at host B. Another possible reason for the asymmetry may be that the channel gain inthe two directions may potentially be different. This may occur, for instance, when the twohosts, A and B, are equipped with two wireless cards each (and their associated antennas),one card on each host is tuned to channel 1, the other card is tuned to a non-overlappingchannel 2. Suppose that channel 1 is used by host A to send data to host B, and channel 2is used by host B to send date to host A. In this case, the channel gains for links AB andBA may be different since different channels and antennas are used in the two directions.

Unidirectional links may make it impossible to detect the presence of a route fromsome source S to a destination D. In particular, suppose that all routes from S to D containa unidirectional link, such that, even though there is a route from S to D, there is no routefrom D to S. In this case, the reactive and proactive protocols we have discussed will notdetect a route from S to D, even though such a route exists. These routing protocols requirea route along which routing information can flow back from D to S (for instance, a RouteReply, a link state update, or a distance vector). However, in the absence of a route fromD to S, such information cannot reach source S. Does there exist any routing protocol thatcan deliver data from S to D in such a case? Indeed, the answer is yes. Flooding can beused to deliver data from S to D, so long as there is a route from S to D, even if a reverseroute does not exist. However, flooding can be expensive, as discussed previously. Also, inthe absence of a reverse route, it will not be possible to determine whether the data reachedD reliably or not.

The above discussion suggests that when a route from D to S does not exist, thetypical reactive and proactive routing protocols are not useful. What if there is a routefrom S to D, and also a route from D to S? Suppose that the lowest cost route from S toD contains an unidirectional link. In such cases, link state routing protocols can detect thelowest cost route. To see this, consider a link XY on the lowest cost route from S to D.Clearly, there is also at least one route from X and Y both to D. In addition, we assumed

c© 2010 Vaidya 141

Page 154: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

above that there is a route from D to S. Thus, any link state information sent by host X orY can reach host S via host D (and possibly other routes as well). Thus, host S can learnthe costs of all links on all routes from S to D, and will be able to identify the lowest costroute.

The distance vector routing protocols have additional difficulties not encountered incase of link state routing. The difficulty arises because the distance vector protocols commu-nicate less information in the distance vector, as compared to the information communicatedby link state routing protocols. It is possible to modify the distance vector protocol to beable to detect routes containing unidirectional links, however, such a modified protocol willneed to exchange more information than the distance vector protocol we discussed earlier.For brevity, we omit the details of such a protocol.

Now let us consider unidirectional links in the context of reactive routing protocols.The basic reactive route discovery procedure described previously does not require a hostto be aware of the identities of its neighbors. When a host does not know who its neighborsare, it is not feasible to implement a reliable broadcast mechanism to transmit packets tothe neighbors. Thus, the broadcasting of RREQs is typically performed using unreliablebroadcast – no acknowledgements are transmitted by the recipients of the broadcast. As aside effect, this allows an RREQ broadcast to be received on a unidirectional link withoutthe recipient realizing that the link is unidirectional. For instance, host Y may receive theRREQ from host X on a unidirectional link XY; however, if later Y needs to send RREPto host Y, that transmission might fail. Subsequently, the source of the route discovery, notreceiving the RREP, may retry the route discovery, and the above scenario may recur. Thereare two approaches to deal with unidirectional links when designing routing protocols:

• Avoid using unidirectional links on a route: An important motivation in avoidingunidirectional links – and limiting the routes to bidirectional links – is that the MACprotocols often require bidirectional links to ensure reliable delivery at the MAC layer.

• Tolerate unidirectional links on a route: While limiting to bidirectional links has itsadvantages, in some cases the only routes available between a certain pair of hostsmay contain unidirectional links. In such situations, protocols that rely on bidirectionallinks will fail to discover a route, even if a route containing unidirectional link(s) exists.Whether this is a tolerable outcome or not depends on the application scenario.

In most scenarios, the simplicity achieved by limiting routes to bidirectional links is likely tomake the first approach above attractive. The following mechanisms may be used to avoidunidirectional links:

• Bidirectional link discovery: This mechanism utilizes the neighbor discovery procedurewe discussed earlier, using hello messages, to allow a host to determine other hosts towhich it has bidirectional links. With this information, when a host Y receives a RREQ

c© 2010 Vaidya 142

Page 155: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

from some host X, host Y should respond to the RREQ only if link XY is determinedto be a bidirectional link; otherwise, the RREQ should simply be discarded. With thischange, RREQ received on unidirectional links will be discarded, and unidirectionallinks will not appear on chosen routes. Of course, since the link quality changesdynamically over time, the neighbor discovery procedure may have determined linkXY to be bidirectional, but the link may have subsequently become unidirectional, andvice-versa. Thus, it is still possible that a host will attempt to utilize a unidirectionallink, however, the use of the neighbor discovery procedure will make this less likely. Adrawback of this approach is that it incurs additional overhead, since the hello-basedneighbor discovery procedure is proactive in nature.

• Blacklisting: The second approach does not proactively determine whether a link isbidirectional or not. Instead, each host forwards RREQs as described in the originalprotocol. Suppose that host X receives RREQ(S,D) from host Y, and forwards theRREQ to its neighbors. Subsequently, suppose that host X receives the correspondingRREP(S,D) sent by destination D. Host X should forward the RREP to host Y.However, if link YX is unidirectional, then host X will not be successful in transmittingthe RREP to host Y. When host X is unable to forward RREP to host Y, it willblacklist the link YX. The failure to forward RREP on link XY implies that, althoughX received RREQ from Y (on link YX), it is not able to reliably deliver packets toY. Once link YX is blacklisted, if host X receives another RREQ from host Y (onlink YX), then host X will simply discard the RREQ. This procedure allows detectionof unidirectional links, and elimination of route requests traversing the unidirectionallinks. Obviously, a unidirectional link may later become bidirectional; therefore, theblacklisting should be time-limited, and eventually a link should be removed from theblacklist.

While the blacklist approach does not have the overhead of proactive hello messagesabove, during each route discovery, at most one unidirectional link can be identified,and blacklisted. Subsequent route discoveries will effectively suppress route requestsfrom propagating to the destination along any route that contains the previously de-tected unidirectional links. However, in general, since there may be multiple unidirec-tional links in a network, and detection of a single unidirectional link may not suppressall routes containing unidirectional links, multiple route discoveries may be necessaryto detect a route containing only bidirectional links (if it exists).

c© 2010 Vaidya 143

Page 156: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

6.5 Optimizations for Reactive Protocols

Many optimizations can be incorporated into the basic reactive routing protocolsdiscussed above to improve their performance. In this section, we discuss few such opti-mizations.

6.5.1 Allowing Intermediate Hosts to Respond to RREQ

As seen before, when a host performs route discovery, the Route Request (RREQ)is propagated through the network. Each host propagates the RREQ regardless of whetheror not it already knows a route to the destination. However, if an intermediate host knowsa route to the destination, we can reduce the overhead of route discovery, by allowing thehost to respond using the information it already has, instead of forwarding the RREQ. Thismay reduce the overhead of route discovery, since the RREQ need not be propagated all theway to the destination. Also, the delay in discovery of a route may be reduced as well, sincean intermediate host may generate an RREP earlier than the destination might. However,unless care is exercised, routing loops can occur. In the following, we discuss DSR andDNHR both.

• DSR: In this case, loops are rather easy to detect. Suppose that source host S performsroute discovery for destination D, and some host P receives the RREQ, carrying the linklist, say, [S,A,B,C]. If host P is already aware of a route, say [P,Q,R,D] to destinationD, then host P can potentially send an RREP containing route [S,A,B,C,P,Q,R,D] toS along route [P,C,B,A,S].

Clearly, if any host appears twice on this route, then a loop is detected. Suppose thatthe route P knows is instead [P,Q,B,R,D]. Then, by concatenating the route [S,A,B,C]in the RREQ to the route stored at P, we would get [S,A,B,C,P,Q,B,R,D]. Detectingthat there is a loop due to repeated presence of host B, host P may either decide to notsend an RREP using its locally stored routing information, or, alternatively deduce aloop-free route [S,A,B,R,D] and send an RREP providing this route. In case of thelatter option, while the RREP informs S of the route [S,A,B,R,D], the RREP will haveto be routed on route [P,C,B,A,S] from P to S.

Why is it that P knows a route to D via host B, but host B lets the RREQ propagatebeyond itself? It may be that host B has deleted the previously known route todestination D to make space for other routes, or in an effort to avoid letting routecache entries becoming stale. Alternatively, the route [P,Q,B,R,D] known to P maybe invalid as well, but P may not be aware of this.

• DNHR: In this case, the situation can be more difficult, since the routes are maintainedin a distributed manner. Similar to the example above for source routing, suppose that

c© 2010 Vaidya 144

Page 157: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

a host P receives RREQ(S,D), and host P has a valid next-hop entry for destination D.Should P send a RREP to S, instead of forwarding the RREQ? This can potentiallylead to loops. Previously, we have introduced a tool (specifically, tags) that allowsus to prevent loops during simultaneous route discoveries by two sources. This toolwill also help prevent formation of loops if P replies using its knowledge of a routeto destination D. The only additional step required is that, when P generates anRREP(S,D), host P should attach RP [D].tag to the RREP. Any host that receivesthis RREP(S,D) generated by host P handles the RREP identically to an RREP(S,D)generated by the destination D. Since host S will ignore RREP attached with a tagthat is not better than the RS[D].tag, host P should generate RREP (S, D) only ifRP [D].tag is better than the tag attached to the RREQ(S,D) received by P.

6.5.2 Learning Routes Opportunistically

When using reactive routing protocols, a host may have opportunities to learn newroutes without performing a route discovery. For instance, if a host X overhears an RREPpacket being transmitted by some host P to another host Q, the contents of the RREPpacket can be used by host X. In particular, with DSR, if the RREP contains route A-B-C,then host X learns that links AB and BC exist in the network. This knowledge can be usedto determine a route from X to other hosts. Host X may also conclude that link PX exists,although the link may be unidirectional. In the same manner, source route included inoverheard data or RREQ packets can also be used to set up source routes. For instance, if Xhears data packet containing route [A,P,Q,R] being sent by P to Q, then X learns a potentialroute [X,P,A] to host A, and route [X,P,Q,R] to host R. These routes can subsequently beused by host X to source route data packets.

While such overhearing allows hosts to learn routing information, potentially reducingthe number of route discoveries performed, it also increases the possibility of stale routesbeing used. The overheard routing information may be old by the time a route based onthis information is used. By the time such a route is used, it may be stale (or broken). Toprevent performance loss due to this phenomenon, the cached routing information shouldbe purged after a sufficiently long interval of time.

In case of next-hop table-based routing, the overheard data packets do not containtags, therefore, to maintain loop-freedom it is not advisable to use the information in theoverheard data packets to update routing tables. Overheard RREP may be used to updatea routing table entry. Suppose that host Y transmits RREP(S,D) to host X, but host Zoverhears the RREP. In this case, the routing table update may be performed at host Z asif the RREP was, in fact, being sent to Z by host Y (whether the table is actually updatedor not depends on the tag values).

c© 2010 Vaidya 145

Page 158: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Similar to overhearing RREQ or RREP, a host can also learn useful informationby overhearing RERR. For instance, suppose that host Y transmits an RERR to host X,specifying that link YZ on a route to destination D is broken. If some other host, say W,hears this RERR, host W can invalidate any routes that utilize link YZ. In particular, withsource routing, host W can invalidate all routes in its route cache that contain link YZ.With table-based routing, if host W has host Y as the next-hop to destination D, then hostW may invalidate its routing table entry for destination D.

6.5.3 Sending Replies to Multiple Route Requests

When hosts that are not the destinations of route discoveries are allowed to sendRREPs using routing information available to them, it is possible that the source of theroute discovery receives multiple route replies. We can generalize this, and also allow thedestination to send multiple route replies, if it receives multiple route requests. Two benefitscan be achieved by allowing such multiplicity of route replies:

• Better routes: Consider source routing first. If the source receives multiple route replies(corresponding to different routes), then it can choose to use the better of the availableroutes. For instance, the routes with smaller number of hops may be preferred. Inthe basic procedure discussed previously, each host only responds to the first RREQit receives. Now, the first received RREQ may not necessarily correspond to the bestroute. By allowing the hosts to respond to more than one RREQ, we increase theprobability of finding a good route. Clearly, there is a trade-off here. If hosts respondto too many RREQs, overhead of RREPs will increase. One alternative is to allow ahost to respond to more than one RREQ only if there is a reason to believe that thenew response will help to sufficiently improve on the route that may be learned byresponding to the previous RREQs.

Similar benefit can be obtained in case of DNHR as well. In this case, when thedestination receives multiple RREQs corresponding to the same route discovery, itmay respond to more than one RREQ by sending multiple RREPs.

• Multi-path routing: With multi-path routing, a host can use multiple routes to sendpackets to the same destination. Multiple RREPs, in case of source routing, naturallyprovide the ability to perform multi-path routing, since each RREP will contain adifferent route. In case of next-hop table-based routing, more complex modificationsare required to maintain multiple routes in a loop-free manner. We will not discussmulti-path next-hop table-based routing here.

c© 2010 Vaidya 146

Page 159: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

6.5.4 Expanding Ring Search

In general, the RREQs may propagate through the entire network, leading to a sig-nificant overhead. Allowing other hosts that are not the destination to respond to a routerequest can reduces the propagation of RREQs somewhat. However, other optimizationsmay also be incorporated for this purpose. Expanding ring search is one such optimization.With this optimization, the route discovery protocol searches the network within close prox-imity of the source first, and then searches increasingly larger parts of the network until aroute is found. In the extreme case, the entire network may be searched. This approach canbe implemented by associating a Time-to-Live (TTL) field with the RREQs, and decrement-ing the TTL on receipt at any host. A host may forward the RREQ only if the modifiedTTL is positive. Thus, if TTL is set to 2 by the source, then only the hosts that receivethe RREQ from the source will forward the RREQ, but not the hosts that receive it subse-quently. In general, if TTL is initialized to the value L, then the RREQ will be propagatedup to L hops from the source. If a route reply is not received within a reasonable period oftime, the source host can consider the route discovery as having failed. If route discoverywith the initial small value for the TTL does not yield a route to the destination, the sourcecan try again with a larger TTL. Alternatively, the TTL can be set to a value representinginfinity, so that the RREQ propagation will not be limited to any particular number of hops.

This approach is called the Expanding Ring Search, since the initial TTL of L limitsthe search to a “circle” with radius L hops around the source, and larger values of initialTTL result in an expansion of this circle.

6.5.5 Bounding the Scope of Route Discovery

In addition to expanding ring search, other alternative approaches may also be usedto reduce the route discovery overhead, particularly, by limiting the scope of dissemination ofthe route requests. We discuss three such possibilities, all of which allow a host to selectivelyforward route requests (RREQ).

• Coordinated and uncoordinated selective forwarding: These approaches are identicalto the approaches we discussed previously in the context of proactive protocols, withthe difference that here we use them to decide when a host should forward a RREQpacket. Recall that the coordinated approaches require the hosts in the network toknow the nearby nodes. This, in turn, will require a proactive procedure for each nodeto detect its neighbors.

• Location-aided forwarding: This approach relies on the knowledge of the physicallocation information as well as speed of the destination host. Suppose that host Sneeds to find a route to destination D. If host S has no information on a past location

c© 2010 Vaidya 147

Page 160: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

of host D, then this optimization is not used. However, if host S knows that host Dwas at location l1 at some time t1 in the past, then host S can reduce the scope ofroute discovery. In particular, suppose that host D can move at a maximum speedof v (and that host S is aware of this). Then, as shown in Figure 6.11(a), host Scan determine a circular region of radius v(t− t1) centered at l1, such that the regioncontains host D’s current location, where t is current time. Let us call this the expectedzone that contains host D. Now, host S can use the knowledge of its own location, andthe expected zone, to determine a region that is likely to contain a route from S toD. For instance, this region may be chosen as the rectangle called request zone inFigure 6.11(a). Note that the request zone contains the current location of S, as wellas the expected zone for D. When host S sends an RREQ for a route discovery forD, it can include the specification of the request zone in the RREQ. Any host thatreceives the RREQ, and resides in the specified request zone, may forward the RREQ;other hosts should not forward the route request. For instance, in Figure 6.11(a), hostB will forward the RREQ with the specified request zone, but host A will not. Thus,the location-aided forwarding mechanism limits RREQ forwarding to the request zone.Thus, not all hosts in the network will receive the RREQ. However, if a route fromS to D is fully contained in the request zone, it can be discovered using the limitedpropagation of route requests. When host D sends an RREP in response to an RREQ,host D can include its current location, so that host S can use this location informationwhen performing a future route discovery for D.

In the event that a route is not discovered using the chosen request zone, source S hasthe option of performing another route discovery using a larger request zone (whichmay possibly span the entire network). While the location-aided routing approach canreduce the route discovery overhead, it requires the nodes to be aware of their ownphysical location.

In the event that the source host, and the destination are far away, the above approachfor choosing the request zone might result in a request zone that is very large, reducingthe benefit of the approach. An alternative choice for the request zone is shown inFigure 6.11(b). In this case, fewer hosts are likely to be in the request zone comparedto Figure 6.11(a) reducing the overhead of RREQ propagation, but also reducingthe likelihood of finding a route. For instance, host F is within the request zonein Figure 6.11(a), but not in Figure 6.11(b). Let us consider two variations on thisapproach:

– In Figure 6.11(b), note that the area covered by the request zone close to thesource is small compared to Figure 6.11(a). Thus, it is possible that there are noneighbors of the source host within this region. In such cases, the route discoverywill not result in RREQ propagation from the source at all. Thus, if the sourceknows the locations of its neighbors, then it can potentially choose the requestzone so as to include at least one of its neighbors.

c© 2010 Vaidya 148

Page 161: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

(t−t1)v

l1

S

expectedzone

request zone

AB

C

E

F

G

H

J

K

M

(a)

(t−t1)v

l1

S

expectedzone

AB

C

E

F

G

H

J

K

M

(b)

request zone

Figure 6.11 Location-aided forwarding

– In the above discussion, we assume that the request zone is specified by thesource of a route discovery, and remains unchanged thereafter. An alternativeapproach is to allow intermediate hosts to modify the specified request zone beforeforwarding the RREQ. Figure 6.12 shows the request zones specified the RREQsforwarded by hosts S, B and J. Notice that the request zones specified by B andJ are smaller, since B and J are closer to the expected zone for the destination.

• Connectivity-aided forwarding: While the above approach holds the promise of re-ducing route discovery overhead significantly, while maintaining reasonable likelihoodof successful route discovery, it relies on the knowledge of physical location informa-tion. Obtaining such information may require addition hardware (e.g., GPS receivers),and/or additional message overhead. The connectivity-aided forwarding approach at-

c© 2010 Vaidya 149

Page 162: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

(t−t1)v

l1

S

expectedzone

AB

C

E

F

G

H

J

K

M

request zone in RREQ sent by S

request zone in RREQforwarded by B

request zone in RREQ forwarded by J

Figure 6.12 Adaptive request zone

tempts to provide similar benefits, but without requiring the knowledge of physicallocations.

This approach relies on the assumption that if an existing route to a destination breaks,then a new route to the destination can be found in the “vicinity” of the old route.How we define vicinity affects the exact nature of this optimization. For instance, letus consider source routing using the centralized list approach. In this case, we mightallow the new route discovery to discover source routes that contain at most m newhosts that were not on the previously known source route from S to D. To implementthis optimization, when sending the RREQ, S also includes the last known route (toD) in the RREQ. As the RREQ makes progress, it accumulates the list of hosts on theroute taken by the RREQ so far. If a host that is not on the previous route receivesthe RREQ, and finds that there are already m hosts in the list in RREQ that were noton the previous route, it will simply discard the route request. As in case of location-aided forwarding, the route discovery may not always be successful for a small valueof m. If the source concludes that the route discovery has failed, it has the option ofperforming another route discovery using larger m.

Consider the example network shown in Figure 6.13. Suppose that host S uses sourcerouting, and knew route S-A-B-D to host D. However, link A is now broken, and Sperforms a route discovery for D with parameter m = 2. Thus, S is looking for a newroute to D that contains at most 2 hosts that are not on the previous route S-A-B-D.In this case, suppose that hosts B and H receive the first RREQ(S,D) from G, andthis RREQ has traveled along the route S-F-G. Thus, the accumulated route in theRREQ(S,D) already has m = 2 hosts that were not on the previously used route S-A-B-D. Thus, host H, which was also not on the previous route, will discard the routerequest. However, host B, which was on the previous route, will forward the routerequest to its neighbors.

c© 2010 Vaidya 150

Page 163: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

S A B

C DE

F GH

J

Figure 6.13 Connectivity-aided forwarding

6.6 Host Mobility in IPv4

Wireless hosts are often mobile, changing location over time. This mobility of awireless host may cause the host to connect to different networks at different points of time.Mobility is not limited to wireless devices. For instance, a user may connect her laptop todifferent Ethernets at different times of the day. Similarly, a wireless host may not necessarilybe mobile. For instance, a user may connect his desktop to a wireless network rather thana wired network (such as Ethernet). In this case, the desktop is not likely to be movedmuch once it has been installed. Thus, wireless connectivity and mobility are independentproperties, although wireless hosts are generally more likely to be mobile.

As we have discussed previously, the IP address used for an interface connected to aparticular network must include the network’s address in the network part of the IP address.Such an IP address is said to be topologically correct. Thus, when a host disconnects fromone network and connects to another network, its IP address must change so that it can betopologically correct. This creates difficulties in maintaining communication while also beingmobile. In particular, consider a user that has a long-lived TCP connection. This may occurif the user is performing a large file transfer (for instance, downloading a movie) using FTP.FTP uses a TCP connection to perform the file transfer. Continuity of a TCP connectionrequires that the IP address of the two endpoints remain unchanged. On the other hand,topologically correct addressing requires that the IP address assigned to a mobile endpointchange when the end host moves from one network to another network. These apparentlycontradictory requirements cannot be satisfied without additional protocol support. MobileIP provides such a functionality.

Before discussing Mobile IP, let us consider an everyday example of user mobility.In particular, consider a student who has a multi-year subscription to several magazines.This student changes his apartment every semester. How do the magazines get delivered tohis new address? Ordinarily, when the student moves to a new apartment, his mail will bedelivered to the old address. Fortunately, the postal office provides a forwarding service. Toensure that the mail will be delivered to his new address, the student can submit a change

c© 2010 Vaidya 151

Page 164: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

of address card at the post office. Thereafter, the post office will forward to the student’snew address any mail that is sent to his old address. When a post office responsible fordelivering mail to the old address receives a magazine for the student, the post office affixesa new address on top of the old address, and puts the magazine back in the mail system forrouting to the new address. Mobile IP uses a similar mechanism to ensure that a host willcontinue receiving packets despite mobility.

6.6.1 Mobile IP Terminology

In mobile IP, the role of the post offices in the above example is filled by nodes calledhome agents and foreign agents. Each host is associated with a home network, and a homeagent is associated with the home network. Each host (or more precisely, each interface) isassigned an IP address that is topologically correct for its home network. This address issaid to be the host’s permanent address.

From the perspective of a given host, any network other than its home network issaid to be a foreign network. When a host is connected to a foreign network it is consideredto be a foreign host in that network. A foreign agent is associated with each network, whosejob is to keep track of the foreign hosts in that network, as we will soon discuss. Whena host is connected to a foreign network, it is assigned an IP address that is topologicallycorrect for that foreign network. This IP address is said to be the host’s foreign address orcare-of-address (COA).

6.6.2 Data Forwarding in Mobile IP

The job of a mobile host’s home agent is to keep track of the network to which themobile host is connected. This information can then be used for the purpose of routingpackets for the mobile host. We will illustrate mobile IP by means of an example scenario.The scenario unfold in several steps:

• Consider a mobile host MH whose permanent IP address is 130.126.142.206. The homenetwork for MH is 130.126.142/24. The notation /24 implies that the first 24 bits ofthe binary representation of 130.126.142 form network part of the topologically correctaddresses on this network (note that 130, 126 and 142 each correspond to 8 bits). Thehome agent HA1 for MH is also connected to the home network (130.126.142/24) ofMH. Thus, when the mobile host MH is “home”, MH and its home agent HA1 are onthe same network. Suppose that initially host MH is connected to its home network,and MH starts a TCP connection with another host referred to as a correspondenthost (CH) with IP address 128.174.254.29. CH is thus sending IP packets to MH, with

c© 2010 Vaidya 152

Page 165: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

130.126.142.206 as the destination IP address. Since MH is presently connected to itshome network, the address 130.126.142.206 is topologically correct for the current net-work of MH. Thus, packets with destination address 130.126.142.206 will be deliveredto MH by the underlying routing protocol.

• Now host MH moves, disconnecting from its home network, and connecting to the net-work 128.174.254/24. Topologically correct IP addresses for network 128.174.254/24are of the form 128.174.254.*. Despite the fact that MH 130.126.142.206 is no longerconnected the network 130.126.142/24, the IP packets sent by CH continue beingrouted to that networks, because the IP packets have destination address as 130.126.142.206.To allow these packets to reach MH at its current location, mobile IP relies on thehome agent and foreign agent as follows. Refer to Figure 6.14 for this discussion.

• Each foreign agent periodically broadcasts in its network an agent advertisement, whichis received by all the hosts on that network. When a new host joins the network, it canidentify the foreign agent on receiving this advertisement. In our example, when ourmobile host MH (with IP address 130.126.142.206) joins the foreign network, it receivesan agent advertisement from foreign agent FA1 whose IP address is 128.174.254.29.This advertisement also announces the care-of-address (COA) that MH may use. Inparticular, the care-of-address may be the IP address assigned to the foreign agentitself. Let us assume that the COA will be 128.174.254.29, the foreign agent’s IPaddress.

On learning the IP address of the foreign agent FA1, MH sends to FA1 a registrationrequest, which is also forwarded to the home agent of MH. The registration allows theforeign agent FA1 to learn of the presence of MH in its network, and to learn its linklayer address. The registration allows the home agent HA1 to learn the care-of-addressof MH.

• After the registration, the home agent is in a position to “re-route” the packets forMH. As a first step, after receiving the registration, the home agent ensures that it canintercept any packets intended for the permanent address 130.126.142.206 of MH. Onemechanism to achieve this is as follows: the home agent can broadcast a GratuitousARP message on its network, which will cause other nodes on the network to associatethe home agent’s link layer address with the IP address 130.126.142.206. (ARP is theabbreviation of Address Resolution Protocol.) Subsequently, any node on the homenetwork of MH, including any routers, transmits a packet for 130.126.142.206, it willbe sent with link layer address of HA1 as the link layer receiver. Thus packets for MHsent by any correspondent host will be intercepted by the home agent (steps 1 and 2in Figure 6.14).

Since the home agent is aware that MH is on a foreign network, home agent cannow forward the packet to the current location of MH. This is akin to the post officeaffixing a new address on a letter in our earlier example. In case of mobile IP, this

c© 2010 Vaidya 153

Page 166: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

RegistrationMessage

RegistrationMessage

130.126.142/24Network

HA1 FA1

Network128.174.254/24

R1

Internet

CH

Internet

MH

128.174.254.29

1

2

3

5

6

4

Figure 6.14 Registration and routing in mobile IP

is achieved by means of IP-in-IP encapsulation. Specifically, the home agent createsa new IP packet, with source IP address as its own IP address, and the destinationIP address as the care-of-address of MH (namely, 128.174.254.29). The IP packet hasan IP header and a body – the body of this packet consists of the original IP packetintended for 130.126.142.206. Since the IP packet is contained in this new IP packet,the protocol mechanism is called IP-in-IP encapsulation. In the IP header of the newpacket, the protocol field specifies that the packet is IP-in-IP.

Following the underlying routing protocol, the new packet will be delivered to theforeign agent 128.174.254.29 (step 3 in Figure 6.14). The foreign agent will recoverthe original IP packet by decapsulating the received IP-in-IP packet. The recoveredIP packet will then be transmitted to MH by the link layer (step 4). Recall that thelink layer address of MH is known to the foreign agent due to the registration by MH.

This mechanism allows a mobile host to continue receiving packets destined to its permanentaddress. The packets sent by CH are routed indirectly via the home agent to the mobile host.This indirection allows the correspondent host to remain oblivious to the current locationof the mobile host, and yet allows it to communicate with the mobile host.

c© 2010 Vaidya 154

Page 167: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Triangular Routing: The indirect routing mechanism has the shortcoming that all packetsintended for MH are first routed to its home agent, and then routed to its current location,potentially resulting in a long route. This is also referred to as the triangular routingproblem. To understand the name, visualize a triangle formed by the correspondent host,the home agent, and the mobile host. Indirect routing results in the packet traversing twosides of the triangle. Such triangular routing leads to longer delays as well as higher loadon the network. This overhead can be reduced if we are willing to incorporate additionalintelligence at the correspondent host (CH), to allow the packets to traverse just the thirdside of the above triangle (directly from CH to MH).

In particular, correspondent host CH can learn the care-of-address from the homeagent HA1 (step 5 in Figure 6.14), and then send an IP-in-IP packet destined to foreignagent FA1, with IP destination address as 128.174.254.29, and the body of IP-in-IP packetconsisting of the packet intended for MH 128.174.254.29. Thus, instead of home agent HA1,the correspondent host CH performs IP-in-IP encapsulation, and sends the packet to thecurrent COA of MH (step 6 in Figure 6.14).

6.6.3 Multi-Level Indirection

The basic mobile IP mechanism discussed above uses one level of indirection. Insteadof the packets being routed directly to the mobile host, they are routed via the home agent.This has the shortcoming that whenever a mobile host connects to a new network, its homeagent needs to be informed (via registration messages). Consider a user that normally residesin New York city, but is presently traveling in Paris. Each time the user connects to a newnetwork, the registration messages must travel back to the home agent in New York, acrossthe Atlantic Ocean. Can we improve on this situation?

An alternative is to introduce an additional level of indirection in the manner inwhich data is routed to the mobile host. Let us introduce a new kind of agent, called anchoragent. Each anchor agent is “responsible” for a set of foreign agents. To put it differently,each anchor agent’s scope contains a subset of the networks that a mobile host may visit.Each such network is in the scope of exactly one anchor agent. To understand the modifiedscheme, it will help to visualize a hierarchy of agents, with the home agents at the top,anchor agents in the middle, and the foreign agents at the bottom.

• A mobile host registers with the foreign agent for the network it is connected to.

• The registration is always forwarded to the anchor agent responsible for the foreignagent. Thus, the anchor agent is always updated with the current location of themobile host.

c© 2010 Vaidya 155

Page 168: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Once in a while, mobility of a mobile host will cause it to cross from the scope of oneanchor agent into the scope of a new anchor agent. At such crossings, the registrationmessage is forwarded to the mobile host’s home agent as well.

Following this procedure, the home agent will know the anchor agent that is responsible forkeeping track of the current location of the mobile host, and that anchor agent will knowthe current care-of-address of the mobile host. The packets meant for a mobile host will befirst intercepted by its home agent, which can forward the packets to the appropriate anchoragent (using IP-in-IP), and, in turn, the anchor agent can then forward the packets to thecare-of-address of the mobile host (again using IP-in-IP). This added level of indirection canpotentially result in longer routes for the packets. As a trade-off, the home agent needs tobe updated only when a mobile host crosses between the scope of different anchor agents.In our example of the visitor from New York traveling in Paris, if all the networks in Parisare within the scope of a single anchor agent, then mobility of the user within Paris willrequire no updates at the home agent.

The optimization for triangular routing can be used the added level of indirection aswell. In particular, the correspondent host can be informed of the care-of-address (COA)of the mobile host, and thereafter, the correspondent host can send packets directly to theCOA. Of course, when the care-of-address of the mobile host changes, additional messagesneed to be send to inform the correspondent host that the old care-of-address has becomeinvalid.

The three-level hierarchy of agents can, in general, be extended to a larger numberof levels, providing a trade-off between update (or registration) costs when a mobile hostmoves, and the cost of routing to the mobile host.

c© 2010 Vaidya 156

Page 169: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

CHAPTER 7

Topics in Routing in Mobile Ad Hoc Networks

7.1 Geographic Forwarding

Geographic forwarding relies on physical locations to route packets to its destination.This bears some similarity to the location-aided forwarding mechanism discussed previously.As presented previously, location-aided forwarding was used to forward route request packetstowards the destination. Subsequently, data packets are sent using traditional source basedor table-based forwarding schemes. As an alternative, the network can use location-aidedforwarding to deliver data, instead of route requests. The geographic forwarding protocolsuse this approach.

7.1.1 Greedy Geographic Forwarding

This approach requires that each host keep track of the physical location of its neigh-bors, as well as the location of the hosts to which it needs to send packets. When a hostP, which may or may not be the source of a packet, needs to deliver the packet to destina-tion D, it uses a greedy approach, with the intention of bringing the packet closer to thedestination after each forwarding of the packet. Specifically, from amongst all its neighbors,host P forwards the packet to a host, say X, if (i) location of host X is closer to destinationD’s location than the location of host P, thus ensuring forward progress, and (ii) location ofhost X is closest to destination D among all the neighbors of host P (thus maximizing theforward progress at this step). If no such host X, satisfying conditions (i) and (ii), exists,then the packet is discarded.

For instance, in Figure 7.1, suppose that host S wants to send a packet to host D.Source S will forward the packet to C, since C is closer to the destination than node S, and

c© 2010 Vaidya 157

Page 170: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

among the neighbors of S, C is closest to the destination node. Similarly, host C will forwardthe packet to host F. Subsequently, host F will forward the packet to host H, which willdeliver it to destination D. Observe that the packet was forwarded by each node using onlythe knowledge of the location of the destination, and the locations of the neighboring nodes.The geographic forwarding algorithm is greedy in that, at each forwarding step, it attemptsto maximize progress towards the destination. However, the algorithm has two drawbacks:

• Even if the algorithm results in the packet being delivered to the destination, theroute may not necessarily be optimal in terms of the number of hops needed. In ourexample in Figure 7.1, the number of hops required for greedy geographic forwardingis 4, whereas the shortest path S-A-B-D contains 3 hops.

S A E

C DF

BG

H

Figure 7.1 Greedy geographic forwarding

• The greedy algorithm can fail to deliver the packet to the destination, even if a routeexists. Consider the network in Figure 7.2, and suppose that host S wants to senda packet to host D. In this case, host S forwards the packet to host C, and host Cforwards the packet to F. Now host F does not have any neighbor that is closer todestination D than F itself. In this case, host F will discard the packet. There isindeed a route from S to D, however, the greedy protocol is insufficient to discover thisroute.

This shortcoming of the geographic routing protocol arises due to the use of physicalproximity as a potential indicator of existence of wireless links between the hosts.While hosts in physical proximity of each other may often be able to communicatewith each other, this is not always true.

7.1.2 Location-Aided Graph Traversal

Graph traversal is the process of visiting each node in a graph, starting at any givennode in the graph. When viewed as a graph, a traversal algorithm can potentially be usedfor routing. In particular, in our Example in Figure 7.2, suppose that we start at the

c© 2010 Vaidya 158

Page 171: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

S A E

C DF

BG

J

Figure 7.2 Greedy geographic forwarding

source node S and traverse the graph formed by the available links in the network. Thegraph traversal will visit each node in the network, eventually visiting the destination node.At this point, we can stop traversing the graph, since destination of the packet has beenreached. Figure 7.3 shows a possible order in which the nodes may be visited by a graphtraversal algorithm. In essence, the packet will forwarded along the edges in the order shownin Figure 7.3, starting from host S. Thus, route S-C-F-J-F-A-B-D.

S A E

C DF

BG

J

15

6

7

23 4

Figure 7.3 Depth-first traversal

Observe that host J receives the packet from F. Since J does not have any neighborsbesides F, the packet is returned to host F. Host F next forwards the packet to node A – itdoes not forward the packet to node J, since node J has already been “explored”. Host Fdoes not yet send the packet back to host C, from whom F received the packet in the firstplace, since F has not yet explored one of its neighbors, namely host A. This approach fortraversal is called depth-first traversal.

The depth-first traversal approach has the drawback that the algorithm may oftentraverse parts of the network that are in the “wrong direction”. For instance, in our Examplein Figure 7.3, rather than exploring node C first, the algorithm may very well explore nodeG first, resulting in the route S-G-S-C-F-J-F-A-B-D, instead of S-C-F-J-F-A-B-D.

c© 2010 Vaidya 159

Page 172: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Can we use the location information to improve performance of the routing algorithm?This is indeed possible, and here we present a simple modification of the greedy forwardingalgorithm that makes use of location information, in conjunction with graph traversal. Thealgorithm allows a packet to remain in one of two phases:

• Greedy forwarding phase: A packet starts at the source in the greedy forwarding phase,and remains in this phase so long as a host is able to forward the packet using thegreedy forwarding scheme discussed previously.

When a host is unable to find a suitable next-hop using the greedy forwarding scheme,the packet changes state to the graph traversal phase. The location L of the host atwhich the phase change occurs is also stored in the packet.

• Graph traversal phase: In this phase, the packet is forwarded using a graph traversalalgorithm until a host that is closer to the destination than location L is reached.At this point, the packet changes back to the greedy forwarding phase. The graphtraversal phase is designed to help the packet go around a “void” in the network,which causes greedy forwarding to fail. Thus, graph traversal is not needed at allwhen greedy forwarding alone is sufficient to route the packet to the destination.

Performance of the graph traversal phase may potentially be improved by making useof the location information. For instance, suppose that we use depth-first traversal(DFT). When a host has the choice of multiple neighbors as the next hop, it mayprefer the host that is closest to the destination from among the neighbors that havenot yet been visited during the graph traversal phase. To help in this decision, alist should be maintained in the packet to remember the hosts that have been visitedduring the current graph traversal phase.

7.2 Opportunistic Routing

The routing protocols typically try to use only the “good” links in the network.Usually, a link is considered good if it can deliver packets with a high reliability. Supposethat we use a route S-A-B-C-D to deliver packets from S to D, such that links betweenadjacent nodes on the route are very reliable, but links between nodes that are 2 hops awayon the route only deliver 50% of the packets reliably. Due to the unreliable nature of linkSB, it is not used to deliver packets from S to D. However, when host S transmits a packetto host A, there is a 50% chance that host B will receive this packet reliably. Similarly, whenhost B forwards a packet to host C, there is a 50% chance that D will receive this packetreliably. Thus, with 25% probability, a packet can be delivered to D via route S-B-D withjust 2 transmissions, instead of 4 transmissions.

c© 2010 Vaidya 160

Page 173: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

S A B C D

50% 50%

95% 95% 95% 95%

50%

Figure 7.4 Opportunistic Routing

Opportunistic routing mechanisms attempt to exploit such reliable transmissions thatmay occur on unreliable links. To opportunistically exploit such reliable transmissions,additional protocol mechanisms are necessary. In particular, host A will need to knowwhether host B received a transmission from S or not – host A should forward a packet to hostB only if B does not receive it from S directly. Clearly, this will incur additional overhead.However, the performance gains from opportunistic routing can potentially outweigh theoverhead.

7.3 Network Coding

In our discussion so far, we have focussed on store-and-forward mechanism for routingdata through the network. In other words, we have treated contents of a data packet asbeing unalterable. Of course, we want the destination to receive the information that wassent by the source, however, the protocols also preserve this information while the packetsare forwarded through the network. This is an artificial constraint, and removing thisconstraint can potentially improve performance. The network coding approach is based onthis observation. With network coding, when a host routes packets, the forwarded packetsare obtained as a function of the received packets, but may not necessarily be identical tothe received packets. Also, the source node may transmit packets that are functions of thedata packets it wants to deliver to the destination. In this section, we will consider twosimple examples of the use of network coding for unicast traffic.

7.3.1 Network Coding for Two-Way Traffic

Let us consider a network consisting of 3 nodes, A, B and C. In this network, supposethat hosts A and C route packets to each other via host B. That is, packets from A to Care sent on route A-B-C, and the packets from C to A are sent on route C-B-A. With theusual approach to routing, when host B receives a packet from A, it forwards the packet toC, and when B receives a packet from C, it forwards the packet to A. Clearly, each packet

c© 2010 Vaidya 161

Page 174: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

requires 2 transmissions before reaching the destination. Thus, we have the “throughput”of 1/2 packet delivery per transmission.

Now consider an alternative implementation using network coding. Suppose thathost B first receives 1 packet each from hosts A and C, which will require 2 transmissions(refer Figure 7.5). Let these packets be denoted as PA and PC . For simplicity, assume thatPA and PC have identical size. Then, host B transmits a packet PB obtained as bit-wiseexclusive OR (XOR) of PA and PC . That is,

PB = PA ⊕ PC

Transmission of PB constitutes the use of network coding, since host B is transmitting apacket that is a function of multiple data packets, rather than being identical to any ofthe data packets. When host A receives PB, since it already knows packet PA, host A canrecover PC as follows:

PB ⊕ PA = (PA ⊕ PC) ⊕ PA = PC

Similarly, host C can recover PA by the operation PA = PB ⊕ PC . Thus, with 1 additionaltransmission from host B, we can deliver both packets to their destination. Thus, thethroughput with network coding is 2/3 packets per transmission (since we can deliver 2packets in 3 transmissions). This represents a significant improvement over the traditionaldata forwarding scheme. Additional protocol mechanisms are also needed to implementnetwork coding. For instance, host C needs to specify in PC information about the packetsthat are used to obtain PC .

A B C

PA PC

PB

Figure 7.5 Network coding with two-way traffic

7.3.2 Opportunistic Routing with Network Coding

In Section 7.2 we discussed the notion of opportunistic routing. The opportunisticrouting approach can also be used in conjunction with network coding. We will illustratethis using the simple example shown in Figure 7.6. Suppose that host S routes packetsto host D via host A. Links SA and AD deliver all packets reliably, whereas link SD onlydelivers 50% of the packets.

c© 2010 Vaidya 162

Page 175: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

50%

100% 100%S DA

Figure 7.6 Network coding with opportunistic routing

To facilitate the use of network coding, the new protocol delivers packets from S toD in blocks of N packets. For our illustration, suppose that N = 4. Let us consider a blockcontaining 4 packets, P1, P2, P3 and P4. The protocol performs as follows:

1. Host S transmits all the four packets to host A. Host A receives these packets reliably.

2. When host S transmits the four packets to A, host D happens to reliably receivepackets P1 and P4.

3. Host A sends to host D packets that are obtained as random linear combinationsof the four packets it received from host S. Along with each such coded packet, thecoefficients used to compute the linear combinations are also included.

4. Host D attempts to determine the four packets using the two packets it receiveddirectly from host A, and the linear combinations received from host A. As soon asD can recover the four packets, it sends an acknowledgement to host S, via host A,informing it that the entire block of four packets has been received reliably. Host Awill then stop sending the linear combinations of the current block of packets, andhost S can start sending the next block of data packets to A.

As an example, suppose that the first two linear combinations sent by host A to hostS are computed as follows:

P1 + P2 + 2P3 + P4

P1 + 2P2 + P3 + P4

The first linear combination has coefficients 1, 1, 2, 1 and these coefficients are stored in thepacket sent by host A. Host D also has received 2 packets (P1 and P4) previously. Those2 packets, and the above 2 packets, can be viewed as forming 4 simultaneous equations in4 variables (namely, the 4 packets). If these equations are independent, then these equa-tions can be solved to determine all four packets correctly. In fact, the above two linearcombinations along with P1 and P4 suffice for this purpose.

In general, this approach can be applied to blocks containing a larger number of pack-ets, with randomly chosen linear combinations of packets being forwarded. Intuitively, the

c© 2010 Vaidya 163

Page 176: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

reason that random linear combinations can be used here is that random linear combinationshave a high probability of being independent.

It should be easy to see that the above approach can be generalized to allow thesource node itself to send random linear combinations of the data packets, and to allowother nodes to forward random linear combinations of whatever packets they have received.It is important to note that the coefficients used for the linear combinations must also bestored in the packet, to allow the destination to solve the simultaneous equations.

Before we move on to the next topic, two questions for you to think about:

• In the network in Figure 7.4, there are several different paths along with linear combina-tions of data packets may be propagated, including as S-B-D, S-B-C-D, and S-A-C-D.Different paths may have different probability of reliably delivery, since different linksmay have different reliability. Should each node forward linear combinations at thesame rate, or should some nodes forward more linear combinations than other nodes?Note that different links in the network may compete for channel access.

• What happens if a node in the network is malicious and computes erroneous linearcombinations? For instance, if node A in Figure 7.6 sends erroneous value for linearcombination P1 + P2 + 2P3 + P4, will host D be able to correctly determine all thepackets?

7.4 Multi-Channel Routing

In our discussion of routing protocols, we have so far assumed that all hosts areequipped with one wireless interface, and all wireless interfaces are tuned to the same chan-nel. In general, the available spectrum may be divided into several channels by means offrequency division. For instance, IEEE 802.11g provides several channels that are orthog-onal. Simultaneous transmissions on orthogonal channels do not pose interference to eachother. In addition, with decreasing cost of wireless interface cards, it is now practical toequip some wireless hosts with more than one wireless card. Use of multiple cards alsofacilitates simultaneous use of multiple channels on a single wireless host. Availability ofmultiple channels can be exploited to improve throughput. We consider two examples toillustrate this, assuming that orthogonal channels numbered 1 through 5 are available to awireless network:

• In the network shown in Figure 7.7(a), hosts A and C have flows destined for hosts Band D, respectively. If host A and C use channels 1 and 2, respectively, to transmit toB and D, then both transmissions can be successfully performed simultaneously. In asingle channel network, these two links would have to use the same channel, and hence

c© 2010 Vaidya 164

Page 177: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

interfere with each other. Thus, the use of multiple channels can improve aggregatethroughput of different flows in the network, by reducing inter-flow interference.

• Consider the network shown in Figure 7.7(b), with host S using route S-A-B-D todeliver packets to destination D. In the single channel scenario, all the links on thisroute will use the same channel. Due to interference between the different links, onlyone link can be used reliably at any given time, when using a single channel. Whenmultiple channels are available, we can improve the throughput of this flow by usingthe channels appropriately. In particular, suppose that each host is equipped withtwo wireless interfaces which can be tuned to different channels. In this case, while Stransmits data to host A on channel 1, host A can simultaneously transmit data tohost B on channel 2, and host B can transmit to host D on channel 3. This is feasiblebecause hosts S and A can both tune one of their interfaces to channel 1, hosts Aand B can both tune an interface to channel 2, and simultaneously hosts B and D canboth have an interface tuned to channel 3. As this example shows, multiple channelsmay be used to improve the throughput of a single flow, by reducing the intra-flowinterference.

A B

C D

1

2 1 2 3A B C D

(a) (b)

Figure 7.7 Routing in multi-channel networks

7.5 Hybrid Protocols

In Chapter 6, we discussed reactive as well as proactive routing protocols. In general,it is possible to design protocols that have proactive as well as reactive components. In thissection, we discuss two such possibilities:

• Proactive route failure detection in reactive routing protocols: In our discussion ofroute failures in case of reactive protocols, the route failure detection as well as thesubsequent route discovery are assumed to be reactive in nature. That is, route failure

c© 2010 Vaidya 165

Page 178: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

is detected only when an attempt is made to use the route, and a route discovery fora new route will not occur until failure of the previously known route is detected.

An alternative is to detect “deterioration” of a link, which may be detected whentransmitting a data packet on that link. The deterioration may be indicated by alow transmission rate being used by the MAC protocol, or by a low SINR. Whensuch deterioration is detected – which may occur before a link “fails” – the sourceof the data packet can be asked to perform a new route discovery in anticipationof a route failure. Thus, the route discovery is performed proactively, even thoughthe currently known route is not broken. This proactive component in the otherwisereactive routing protocol can reduce the duration for which a route is unavailable. Asa trade-off, sometimes the deteriorated link may again improve, making the proactiveroute discovery unnecessary.

• Locally proactive and globally reactive routing: In this approach, some routes are main-tained using a proactive mechanism, and others are discovered using reactive mech-anisms. In particular, suppose that each host disseminates the status of its links upto K hops from itself. Thus, each host can learn the status of links at hosts up to Khops away, and can proactively determine routes to these hosts. However, routes tohosts that are further away will not be detected by the proactive mechanism. For suchroutes, a reactive routing mechanism (such as DSR) can be used. With a small K, theprotocol behavior will be similar to the reactive protocol, while with large K it will besimilar to the proactive protocol.

7.6 MANET Protocol Standards

The IETF is considering several proposals for ad hoc routing, including dynamicsource routing (DSR) [11] and ad hoc on-demand distance vector (AODV) [16]. Our dis-cussion of the centralized link list mechanism and DSR is based on DSR protocol in [11].AODV is a next-hop table-based routing protocol. Our discussion of DNHR in Chapter 6 isbased on AODV [16].

c© 2010 Vaidya 166

Page 179: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

CHAPTER 8

Address Assignment in Wireless Networks

8.1 Introduction

Any form of communication requires an appropriate naming or addressing mechanismsuch that the intended target of the communication can be uniquely identified. For instance,when sending a letter by mail, an address must be included on the letter for it to be deliveredto the appropriate recipient. Similarly, at various layers of the protocol stack, to enablecommunication between the peers, an appropriate addressing or naming scheme must beused to uniquely identify the intended recipient(s). This chapter presents an overview ofmechanisms for addressing and naming in wireless networks. The nature of the mechanismused depends on the following factors:

• Scope of the address: Routable IP addresses need to be unique network-wide, whereasit is sufficient for a MAC (medium access control) address to be unique on a given“link”.

• Availability of an address server: In some environments, an address “server” (such asa DHCP server [6]) may be available to perform the address assignment, considerablysimplifying the address assignment problem. In other environments, such servers maynot be available.

• Constraints on address size: Most protocols impose a limit on the address size. Thus,the address assignment mechanism must be designed to take into account this con-straint. In energy-poor environments, such as sensor networks, there is an incentiveto keep the address size small.

In our discussion in this chapter, unless specified otherwise, we pretend that each host has asingle interface, to which an address needs to be assigned. Thus, we use the terms interface

c© 2010 Vaidya 167

Page 180: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

and host interchangeably. When a host has multiple interfaces requiring multiple addresses,the protocol descriptions below can be modified suitably. This chapter primarily discussesIP address assignment. Section 8.3 briefly discusses MAC address assignment.

8.2 IP Address Assignment

In any subnetwork, the address assignment problem can be solved simply by stati-cally assigning each host a subnetwork-wide unique IP address. However, management ofstatically assigned IP addresses is rather difficult in practice. When performed by a human,address assignment is prone to errors, which may result in multiple hosts erroneously as-signed identical addresses. Even if the static address assignment were to be automated toavoid such errors, static assignment is not adequate in many practical scenarios. In partic-ular, in environments wherein hosts may temporarily connect to a network, the number ofsuch hosts may far exceed the number of addresses available. To overcome such limitations,in practice, most large subnetworks make use of dynamic address assignment mechanisms.DHCP (Dynamic Host Configuration Protocol) is commonly used for dynamic address as-signment. DHCP relies on availability of address servers, called DHCP servers, to performunique address assignment. DHCP can be used in wireless networks as well. However,in wireless networks, host mobility may potentially create a situation in which some hostsbecome partitioned from the DHCP servers. If it can be guaranteed that such partitionswill not occur, then the problem of address assignment is much simpler. Alternatively, evenwhen such partitions may occur, if the address assignment mechanism is allowed to stallin the presence of a partition, then again the problem can be solved easily using addressservers, as elaborated later in this chapter. However, in some networks, it is not possible tomake these concessions, and alternative mechanisms must be designed. In the rest of thissection, we discuss several alternative mechanisms for IP address assignment.

8.2.1 Static Self-Assignment of IP Addresses

In many environments, each host in the network already has a unique name, such asits domain name, the MAC address, manufacturer’s serial number, or a public key used forpublic key cryptography. In the following, we will refer to such per-host unique informationas a “key”. Unique IP addresses can be created by embedding the key into the IP address.For instance, Figure 8.1 shows an IP version 4 address formed in this manner; the bitsavailable for the host address must be shared between the host’s key and the interfaceaddress at the host. As shown in the figure, if each host follows identical rules for formingits IP address as a function of the subnet address and the key, then a unique address canbe guaranteed for each interface (provided that the host knows the subnet address, and the

c© 2010 Vaidya 168

Page 181: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

subnet address itself is unique). Since each host may have multiple interfaces, each of whichmay be assigned an IP address, care needs to be taken to allow creation of a unique addressfor each interface. In Figure 8.1, this is achieved by embedding (along with the key) aninterface address, which only needs to be unique local to the host.

Subnet address Key

Subnet address Host address

32 bits

Interface address

(a) (b)

32 bits

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

Host addressSubnet address

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

Figure 8.1 Auto-configuration of IPv4 address: (a) Format. (b) Example address formedfor interface 6 on a host with key 1000111011001 and subnet address 10000010 01111110

The above procedure has two shortcomings:

• The unique IP address is created above by embedding the unique key into the IPaddress. Thus, the key needs to be small enough to fit in the available number ofbits. For instance, the MAC address may contain 48 bits, which is larger than thesize of IP version 4 address (32 bits). Therefore, the key embedding approach is notalways practical for IPv4. However, an IP version 6 (IPv6) address contains 128 bits.Therefore, if each interface were to have a unique MAC address, a unique IPv6 addresscan be formed as illustrated in Figure 8.2. The key in Figure 8.2 is obtained using the64-bit Extended University Identifier (EUI) defined by IEEE for uniquely addressinginterfaces. While MAC addresses and EUIs are supposed to be unique for each device,if duplicate MAC addresses arise due to misconfiguration, the IP addresses using theabove method may also be duplicated by different devices.

In case of IP version 4, if the key cannot be embedded into the IP address, how aboutusing an IP option to include the source and destination’s keys as part of the IP header?The routing protocol can then utilize the key included in the option field in the IPheader, along with the IP destination address field, to make the routing decisions. Thisapproach is not always desirable, since it requires the use of a new option. In addition,each packet now requires option processing – this may be a concern if computingresources are limited. Thus, it is worthwhile to explore strategies for obtaining uniqueaddresses without making changes to the IP header format, and without introducingnew IP options.

• The above procedure to create unique IP address relies on the availability of a uniquekey. Such a unique key is not always available. This issue can be alleviated byrandomly choosing an appropriately sized key. If an n-bit key is chosen randomly with

c© 2010 Vaidya 169

Page 182: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

128 bits

Key

64 bits64 bits

Link prefix

Figure 8.2 Auto-configuration of IPv6 address

a uniform distribution, a given pair of hosts will choose the same key with probability1/2n. To make the probability of choosing the same key small, n should be made largeenough. Of course, no matter how large n is, the probability will never be equal tozero. In practice, however, a small enough probability may be acceptable. The value ofn should also be small enough such that the key can be embedded within the address,as seen earlier. We will discuss random address selection later again.

In the rest of the section, we discuss dynamic address assignment mechanisms.

8.2.2 Dynamic Address Assignment Using Address Servers

DHCP servers are commonly used in networks today to uniquely and dynamicallyassign addresses. In DHCP, each host that needs a new IP address sends a request to aDHCP server. Each DHCP server is responsible for a pool of addresses, and can assignone of the available addresses in response to a request from a client host. The addressesare assigned for a specified duration of time. At different times, the same address maypotentially be assigned to different hosts. However, no two hosts will be assigned the sameaddress at any given time. Clearly, for a host to receive a new IP address, it must have aroute to a DHCP server. This can be achieved easily in many networks. For instance, incase of Ethernet, if one of the hosts on the Ethernet is a DHCP server, then each host on thenetwork can directly communicate with the server. In infrastructure-based wireless LANs,the access point may also act as a DHCP server, again allowing the wireless hosts to easilycommunicate with the DHCP server. In general, however, the DHCP server need not beon the Ethernet directly. Alternatively, a host on the Ethernet may act as a DHCP “relay”whose job is to forward DHCP messages from hosts on the Ethernet to a DHCP server.Similarly, wireless access points may also act as relays. In brief, the DHCP mechanism [6]can be used as follows by host H wanting an address:

• Host H broadcasts (at the link layer) a DHCP DISCOVER message.

• Any DHCP relays that hear the DHCP DISCOVER message, forward the messageto a DHCP server (different relays may potentially forward to different servers). ADHCP server may also receive the message from host H directly, if they are neighborson the same link.

c© 2010 Vaidya 170

Page 183: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• A DHCP server who has an address available responds with a DHCP OFFER messagespecifying the address.

• If host H receives one or more DHCP OFFER messages, it responds to one of them bysending a DHCP REQUEST message requesting the address specified in that OFFER.The DHCP OFFER is relayed by a DHCP relay, if the OFFER is generated in responseto a DISCOVER message forwarded by that relay. Similarly, the DHCP REQUESTis also forwarded via the same relay.

• DHCP server receiving the REQUEST responds by sending a DHCP ACK, which isrelayed if necessary. On receiving the DHCP ACK, host H can start using the assignedaddress.

The DHCP approach can be adapted to ad hoc networks as well, provided that oneor more hosts act as a DHCP server [13]. The simplest approach would be to require eachhost, which has already obtained an IP address for itself, to also act as a DHCP relay.Now, any host H wanting an IP address can locally broadcast (at the MAC layer) a DHCPDISCOVER message. When a neighbor of host H, say R, that already has an IP addresshears a DHCP DISCOVER from host H, it will forward the DISCOVER to a known DHCPserver; the DISCOVER will be forwarded using the underlying routing protocol (this maypossibly cause the network layer at host R to perform a route discovery for a route to theDHCP server). Note that each relay will be aware of a DHCP server, since a node becomesa relay only after it has itself acquired an IP address. While this approach might work,clearly, it can lead to significant overhead; in particular, the overhead can be high sincemany neighbors of host H may potentially forward the DHCP DISCOVER message to aDHCP server.

An alternative approach would be to require host H to identify one of its neighborsthat already has an IP address, and send the DHCP DISCOVER only to that neighbor. Theneighbor, then acting as DHCP relay, can forward the DISCOVER to the DHCP server. Thiswill prevent from multiple relays from forwarding the DISCOVER message.

Similarly, the DHCP approach can be applied in a hybrid network, wherein the DHCPserver may be a wireless host, or a host on the infrastructure network. In all cases, so long asa route exists between a DHCP server and a host needing an address, it should be possibleto use the DHCP server to assign a unique address to that host. In the event that, routeunavailability prevents a host from communicating with a DHCP server, the host will not beable to receive an IP address. When the likelihood of such a scenario is small, the occasionaldelay in obtaining an address might be acceptable in practice.

c© 2010 Vaidya 171

Page 184: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

8.2.3 Distributed Dynamic Address Assignment

Address assignment using DHCP servers is an example of centralized address assign-ment. Each DHCP server is given the responsibility to manage a certain partition of theaddress space. In environments wherein all hosts are equal in that no hosts can be giventhe special responsibilities of an address server, fully distributed mechanisms are called for.

One possible distributed procedure for dynamic address assignment is to allow a hostto pick an IP address randomly from the address space assigned to its subnetwork [17], asdiscussed earlier. In this case, however, there is a possibility that two hosts pick the sameaddress. For instance, the graph in Figure 8.3 plots the approximate probability that twohosts in the network will pick the same address, as a function of the number of hosts inthe network (both axes are plotted in log scale). Graphs are plotted for the cases whenthe number of bits that can be chosen randomly is 16 or 32 (that is, number of addresses

available is 216 or 232, respectively). The address space available to a subnet contains 216

addresses in case of IPv4 if the subnet part contains 16 bits and the host part contains 16bits. On the other hand, if the entire IPv4 address space is available for the ad hoc network,then the total number of addresses is 232. In both cases, note that the probability of addresscollisions grows significantly with increasing number of hosts.

From the above graphs, it is clear that in sufficiently large networks, to ensure thatthe chosen address is not already in use, a duplicate address detection (DAD) proceduremust be performed following the random selection of an address. The DAD procedure willallow a host to determine whether the randomly chosen address is already being used byanother host or not. A simple approach to implement DAD is to exploit the underlyingrouting protocol to perform duplicate address detection. In particular, suppose that a hostH randomly selects address a. Subsequently, to determine whether the address is a duplicate,the host H attempts to obtain a route to address a [17]. If the underlying routing protocolis able to identify a route to a host with address a, that must mean that some other host isalready using address a. The exact implementation of this approach will depend somewhaton the routing protocol and the underlying network architecture. For instance, suppose thatan ad hoc network uses a reactive routing protocol with distributed link lists and sourcerouting. In this case, after having randomly picked address a, host H can initiate routediscovery for address a by transmitting a Route Request to find a route for address a. Otherhosts then forward the Route Request so that it is flooded through the network. If anotherhost with address a indeed exists already, it may eventually receive this route request, andsend a Route Reply in response. Will this Route Reply reach host H? Note that host Hdoes not yet know whether address a is unique or not. Thus, host H should not use addressa as its own address during the route discovery. One approach for solving this problem isto allow host H to use one (or more) of its neighbors that already has an IP address as a“proxy” for performing the route discovery for address a. Essentially, the proxy neighborcan perform the route discovery for address a on behalf of host H, and then return the result

c© 2010 Vaidya 172

Page 185: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

1e-08

1e-07

1e-06

1e-05

0.0001

0.001

0.01

0.1

1

1 10 100 1000 10000 100000

prob

abili

ty q

(n)

number of hosts n

16 bits32 bits

Figure 8.3 Probability of duplicate address assignment using address spaces with 216 and232 addresses: the corresponding curves are labeled in the figure as 16 bits and 32 bits,respectively. This graph is obtained using results derived for the Birthday Paradox. Birth-day paradox refers to the observation that in a room containing 23 people, there is a 50%probability that two people will have identical birthday, if all birthdays in a year are equallylikely. Similarities to the random address selection problem should be obvious. The proba-bility q(n) that all n randomly chosen numbers (with uniform distribution) from among r

possible values will not be distinct can be approximated as q(n) ≈ 1 − e−n(n−1)/(2r). Thegraphs in this figure were obtained using this approximate expression. Note that the graphis plotted on a log-log scale.

of the discovery to host H. The neighbors of host H can communicate with H despite H nothaving a valid IP address, since the neighbors can make use of the MAC address for host Hto communicate at the link layer.

In the above procedure, a failure to receive the Route Reply within a certain timeoutinterval after initiating route discovery for address a may be construed as an indication thatno other host with address a exists. However, the lack of a route reply may also be becauseof unreliable delivery of messages (particularly, Route Requests). Thus, the above processmay be repeated several times – if none of the attempts evokes a Route Reply, then there ishigher confidence that no other host is using address a.

The above approach can correctly perform duplicate address detection, only if mes-sage delays in the network are bounded. A timeout is necessarily used in the route discoveryprocess to determine whether a Route Reply failed to materialize. This timeout must belarge enough for a host with address a to receive the Route Request, if such a host exists, andfor the Route Reply to reach the source of the Route Request. Such timeouts are routinely

c© 2010 Vaidya 173

Page 186: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

used in route discovery procedures for known addresses. However, in the current context,the route discovery process is being used to detect the presence of a host with address a, asopposed to route to a known host with address a. The distinction is subtle, but raises animportant problem. In particular, if the above timeout interval is too small, then duplicateaddress detection may fail, since an existing host with address a may not always receivethe Route Request within the timeout interval. For a timeout based mechanism to workcorrectly, the message delays in the network must be bounded. In most ad hoc networks, itis not always easy to determine such a bound on message delays, since the delays dependnot only on traffic in the network under consideration, but also on interference from otherdevices in the environment.

The above approach also fails when partitions can occur for unbounded intervalsof time. For instance, consider two separate partitions of the network, as shown in Fig-ure 8.4(a). The hosts in the two partitions cannot communicate with each other. Host Ain one partition has already chosen address a. Now host K also randomly chooses addressa, and issues a Route Request for address a. Since A and K are in two separate partitions,A does not receive the Route Request from K, and therefore, host K does not receive anyRoute Reply. After a timeout interval, host K concludes that address a is unique, and as-signs itself that address. However, eventually, when hosts move, the two partitions mergeinto a single connected component, as shown in Figure 8.4(b). Now hosts A and K bothare within the same connected network and both use address a. Clearly, this creates anambiguous situation where packets meant for one host may be received by another host.When packets meant for host K are delivered to host A, host A may simply discard thepackets (for instance, the packets may appear to belong to a TCP connection for which hostA does not have any state), or the packets may corrupt state at host A (this may occur, forinstance, if hosts A and K both happen to have a TCP connection to the same host, bothconnections using similar sequence numbers). Even if state at host A is not corrupted, mis-routing packets intended for K can degrade performance for host K. To avoid such incorrectbehavior, the above address assignment scheme must be augmented with a procedure thatdetects merging of partitions, and then takes suitable actions to detect duplicate addressesin the merged partitions. One approach for this is described below [15].

Considering that partitions may occur, and subsequently merge, it is useful to let eachhost determine the partition it is in. For this purpose, a way of naming the partitions isneeded. Suppose that each host is associated with a unique key, as discussed previously. Thiskey can be used to determine names or identifiers for the partitions. In particular, supposethat each host uses the smallest key associated with the reachable hosts as its partitionidentifier. That is, among the hosts that host X can reach, if host Y has the smallest key,then host X would consider Y’s key as its partition identifier. With this scheme, when twopartitions merge, the merging can be detected easily. In particular, when a host P detects anew link to host Q, and if P and Q have different partition identifiers, host P can determinethat two partitions have merged. Once partition merge is detected, a partition-wide search

c© 2010 Vaidya 174

Page 187: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

A

B C

D

E

F

G

H

K

LF

G

H

K

L

IP address = a

IP address = a

(a) (b)

IP address = a

IP address = a

A

B C

D

E

Figure 8.4 Partitions may defeat duplicate address detection

can be performed for duplicate addresses. We illustrate this with the example in Figure 8.5.Initially, as shown in Figure 8.5(a), the network is divided into two partitions. In eachpartition, the hosts determine their partition identifier as the smallest key in their partition(i.e., among the reachable hosts). Determination of the smallest key among the reachablehosts may be performed in a variety of ways; for instance, with proactive routing protocols,the smallest key among the keys associated with the addresses to which a route is knownmay be used as the partition identifier. Thus, hosts R and S have partition identifiers 7 and23, respectively. Now, as shown in Figure 8.5(b), hosts in the two partitions move closer,and a new link is formed between hosts R and S. When hosts R and S detect this link (e.g., Rmay detect the link when it hears a packet transmitted by S), they exchange their partitionidentifiers. When the partition identifiers are detected to be different, R and S know thattwo partitions have merged. Therefore, a procedure to detect duplicate addresses will besubsequently initiated by the hosts in the network. For instance, host R (or S) may floodthe network to inform the hosts of partition merge, and subsequently, each host receivingthis information can initiate a Route Request for its own IP address, similar to the duplicateaddress detection procedure discussed previously. This approach, however, may cause manysimultaneous route discoveries incurring high overhead. An alternative mechanism is torequire each host to maintain a list of (IP address,key) tuples for all the IP addresses it isaware of. With this approach, when hosts R and S detect that partitions have merged, theycan simply exchange the lists of (IP address,key) tuples. If two tuples match in their IPaddresses, but mismatch in the keys, then address duplication is detected.

A difficulty with this approach arises in determining when partitions have occurred.Recall that hosts in different partitions are required to use different partition identifiers.

c© 2010 Vaidya 175

Page 188: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

(a) Two partitions

(b) Merged network

S

T

U

P

Q

RS

T

U

P

Q

R

key = 7 key = 79

key = 92

key = 56

key = 23

key = 102

Partition identifier: 7

key = 7 key = 79

key = 92

key = 56

key = 23

key = 102

Partition identifier: 23

Figure 8.5 Detection of merging partitions

However, if the hosts cannot reliably detect partitions when they occur, the partition iden-tifiers cannot be maintained accurately. In asynchronous environments without bounds onmessage delays, it is impossible to reliably determine within a finite bounded duration thatthe network has become partitioned. As a practical heuristic, timeout-based schemes maybe used to detect partitions. For instance, a host X may determine that it is partitionedfrom host Y, if X cannot find a route to host Y within some timeout interval τ . As dis-cussed earlier, such timeout-based mechanisms can fail if message delays are unbounded.Thus, it is possible that hosts in two different partitions that merge may be using identicalpartition identifiers! Thus, the above procedure for performing address assignment despitenetwork partitioning is not reliable with unbounded message delays. In general, the variousprocedures discussed above may fail in two different ways:

• Delayed duplicate address detection: In some of the procedures, address duplicationmay be detected eventually, but not immediately. Thus, there will be a time windowduring which two hosts with identical IP addresses may reside within the same con-nected component of the network. During this window of time, packets may be routedto the wrong host.

• Undetected duplicate addresses: In this case, address duplication is never detected.

c© 2010 Vaidya 176

Page 189: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

When packets are misrouted to the wrong host, the applications may fail. For instance, ifan http request is sent to the wrong host, then the wrong host will not be able to sendthe desired response. This will result in loss of service at the application layer. Such a lossof service, if temporary, may be tolerable in some applications. However, permanent lossof service is generally undesirable. Thus, duplicate address detection procedures should atleast ensure eventual detection of address duplication. As an example of this approach, wenow discuss the weak duplicate address detection approach.

8.2.4 Weak Duplicate Address Detection

Weak duplicate address detection (weak DAD) relaxes the requirement of duplicateaddress detection by not requiring detection of all duplicate addresses [23]. Informally, weakDAD requires that packets “meant for” one host must not be routed to another host, evenif the two hosts have chosen the same address. This is now illustrated by an example. InFigure 8.6(a), the hosts belong to two partitions. In the partition on the left, host A haschosen IP address a, and in the other partition, host K has chosen IP address a as well.Initially, as shown in Figure 8.6(a), packets from host D to host A travel via hosts E andC. Note that the packets to host D from host A are routed using destination IP address aincluded in the IP packet header. Now, Figures 8.6(b) and 8.6(c) both show the networkafter the two partitions have merged. However, the behavior in the two figures is different.In Figure 8.6(b), after the partitions merge, packets from host D with destination address aget routed to host K (previously they were routed to host A), whereas in Figure 8.6(c), thepackets continue being routed to host A even after the partitions merge.

The situation in Figure 8.6(b) is usually not acceptable (since it deprives host A ofthe packets from host D), while the situation in Figure 8.6(c) may potentially be tolerated.Essentially, duplicate addresses may potentially be tolerated so long as packets reach thedestination host “intended” by the sender, even if the destination’s IP address is also beingused by another host. We now present a somewhat more formal definition of weak DAD[23].

Weak DAD: Let a packet sent by some host, say host X, at time t to destination addressa be delivered to host Y that has chosen address a. Then the following condition must holdeven if other hosts also choose address a: After time t, packets from host X with destinationaddress a are not delivered to any host with address a other than host Y.

Using a weak DAD mechanism, it can be guaranteed that packets sent by a givenhost to a particular address are not delivered over time to two different hosts both of whichare assigned the same address. For instance, in Figure 8.6(c), if the weak DAD condition is

c© 2010 Vaidya 177

Page 190: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

A

B C

D

E

F

G

H

K

A

B C

D

E

F

G

H

K

A

B C

D

E

F

G

H

K

L

L L

IP address = a

(a)

IP address = a

(b)

IP address = a

(c)

IP address = a

IP address = a IP address = a

Figure 8.6 An Example: Hosts A and K choose the same IP address

satisfied, packets from host D sent to address a will not reach host K even after the partitionsmerge, because they were delivered to host A before the partitions merged.1

Weak DAD can be implemented by augmenting the routing mechanism. In thissection, we present a weak DAD mechanism as applied to the DSR protocol discussed inChapter 6. For this discussion, let us assume that each host has a unique MAC address,and this MAC address is used as the node’s “key” in the protocol below.

From the discussion of DSR, recall that a host S performs route discovery to find aroute to host D by flooding the network with a Route Request (RREQ) message. As theRREQ makes progress through the network, the route traversed by the RREQ is accumulated

1The notion of weak DAD is motivated by the notion of weak consistency in shared memory systems [2]. Incase of distributed shared memory, one option is to maintain a consistent state at all times. Alternatively,a weaker consistency model may be used, which requires that the memory be made consistent only atcertain synchronization operations. Duplicate address detection and shared memory are somewhat differentproblems, however, in both cases, the weak approaches attempt to improve performance by weakening the

problem requirements.

c© 2010 Vaidya 178

Page 191: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

by requiring each host to add its IP address to the RREQ. To implement weak DAD, wenow require that, in addition to its IP address, each hosts should also add its key to theRREQ. Thus, for each host on the route taken by the RREQ, the RREQ will contain the(IP address, key) pair for that host. Similarly, for each IP address appearing in the body(not IP header) of any routing-related message, such as Route Reply or Route Error, thekey associated with the IP address should also be included. As an illustration, Figure 8.7shows the information included in the body of RREQ messages sent by host S and B in thefigure, when S performs route discovery for host D. IPS and KS are the IP address and keyof host S, and IPB and KB are the IP address and key of host B.

DF

A

C

G

E

B

S (IPs, Ks)

(IPs, Ks), (IP , K )B B

Figure 8.7 Achieving weak DAD

Since the key in this case is identical to a host’s MAC address, the routing messages(particularly, RREQ and RREP) provide a mapping between IP address and the MACaddress for the hosts to be used for routing purposes. We will assume that the IP-MACmappings are only learned in this manner. Thus, the Address Resolution Protocol (ARP)is not used – alternatively, ARP may be used, but would need to be suitably augmented toensure that weak DAD is performed correctly.

Each host caches all the (IP address, key) pairs it learns from the information includedin any RREQ, RREP and RERR messages it receives. When a host becomes aware of two(IP address, key) pairs with identical IP addresses but mismatching keys, it detects addressduplication. In particular, suppose that host S becomes aware of (IPD, K1) and (IPD, K2)pairs. Now, if host S has previously communicated with the host with IP address IPD, andthe associated key was K1, then host S should not use a route to a host with IP addressIPD if the associated key is not K1. This ensures that weak DAD is achieved.

Note that, while the keys are included in the body of the routing packets such asRREQ or RREP, they are not included in the IP header. Routes learned by overhearing datapacket transmissions do not provide the keys associated with the route. Utilizing such routescan lead to failure of weak DAD. Therefore, for weak DAD to occur in conjunction withthe DSR protocol, hosts should not utilize routes learned from the source routes includedin data packets. However, the hosts can learn routes from the information included in the

c© 2010 Vaidya 179

Page 192: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

body of RREQ and RREP messages (since, within the body of the messages, IP address andthe corresponding key are both included). With the above modification to dynamic sourcerouting (DSR), weak DAD can be achieved. However, this approach has three shortcomings:

• The first shortcoming arises due to the fact that the applications, which reside abovethe network layer, also make use of IP addresses, which are network layer identifiersfor the hosts. Consider Figure 8.8(a) as an example. Assume that source route at hostA for address a leads the packet along the route A-P-F-M to host M. Let us assumethat the application layer at host R provides a certain service called Foo. While thenetwork is partitioned, as in Figure 8.8(a), the application layer at host E performs aservice discovery for service Foo, and discovers that the host with IP address a (i.e.,host R) provides this service. Application layer at host E records the mapping betweenservice Foo and IP address a. Note that the application layer has no knowledge ofthe keys associated with the IP addresses. Now the two partitions merge as shown inFigure 8.8(b). After the partitions merge, the application layer at host A performs aservice discovery for service Foo, and learns from host E that this service is availableat a host with IP address a. Thereafter, host A sends a service request to IP addressa. This request is delivered to host M using the source route for address a at host A.Thus, the request is not delivered to host R that actually provides service Foo.

IP address = a

IP address = a

DP

A

M F

Q RE

IP address = a

(a) (b)

DP

A

M

Q RE

IP address = a

F

Figure 8.8 DAD interaction with applications

The above scenario can occur despite Weak DAD. The unintended outcome occursbecause the application layer at host A relies on IP address information provided byhost E, but application layers at hosts A and E know two different hosts that areboth assigned address a. Thus, the state at hosts A and E is inconsistent. To avoid

c© 2010 Vaidya 180

Page 193: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

the above situation, if any protocol module other than the routing protocol and lowerlayers (link layer and physical layer) at some host, say host X, is delivered a packetfrom another host (potentially several hops away), then the network layer at host Xmust be aware of all (IP address, key) pairs known to the sender of the packet. Thiswill ensure that protocol layers above the network layer (i.e., above routing protocol)at host X will not use a packet sent by another host whose (IP address, key)-pairdatabase is inconsistent with that at host X. We leave it as an exercise to determinea modification to the weak DAD protocol discussed earlier to incorporate the aboveidea.

• Observe that the weak DAD approach augments the routing protocol to perform dupli-cate address detection. As such, the weak DAD implementation may delay detection ofduplicate addresses until there is potential for misrouting of packets using the routingprotocol. What about packets that are delivered without using the routing state? Inparticular, data packets may be delivered by means of flooding as well. For instance,if host S wants to send a data packet to host D, it may simply flood the network withthe packet, with the hope that the packet will reach host D. In this case, the aboveweak DAD scheme will fail to detect duplication of addresses, and may deliver thepacket to the wrong host (more precisely, the wrong host may find a match betweenthe destination IP address of a packet, and its own IP address). In general, if forward-ing of a data packet at any step uses a broadcast operation (even locally), then theabove weak DAD implementation may not always perform correctly.

• The definition of weak DAD used in above discussion is designed to work around theambiguity that arises in determining the appropriate destination of a packet, whenmultiple hosts have chosen the same address. Such an ambiguity can also arise indetermining the source of a packet [4]. In particular, consider two hosts A and B thathave chosen the same IP address a. Even if we use weak DAD as specified above,it is possible that packets sent by hosts A and B both with source IP address a willreach some host C. This source ambiguity is undesirable as well. We will leave it as anexercise to determine how to modify the weak DAD mechanism for DSR to alleviatethe source ambiguity.

8.2.5 Passive Duplicate Address Detection

While the various duplicate address detection mechanisms discussed so far (actively)take explicit steps to detect address duplication, an alternative approach is to passivelyperform duplicate detection. For instance, in one possible passive mechanisms for DAD,each host listens promiscuously to the wireless channel. If a host X hears a packet containingits own identifier, such that the packet is incompatible with the state at host X, then hostX may detect address duplication. For instance, if host X hears a packet with X itself as

c© 2010 Vaidya 181

Page 194: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

the sender IP address, but host X has not sent that packet, clearly there must be anotherhost with the same IP address as host X. Similarly, when using a link state protocol, if hostX hears a link state packet specifying the link state for link (IPX , IPY ), but host X did notsend such a packet previously, again host X will detect address duplication. While passiveDAD is helpful, it does not make any guarantees on the reliability of DAD, or on the delayincurred before a duplicate address is detected.

In this section, we discussed IP address assignment. The next section discusses MAClayer address assignment.

8.3 MAC Layer Address Assignment

Traditionally, for MAC protocols (such as IEEE 802.11), it has been assumed that theMAC addresses used by any two interface cards will be globally unique – this is often ensuredby hard-wiring a unique address when a interface card is manufactured. One approach toassign globally unique MAC addresses is to divide the MAC address into two fields, onefield specifying the vendor (or manufacturer) of the interface card, and the other field thatis unique within all interface cards manufactured by that vendor. This arrangement allowsunique MAC address assignment despite the interface cards being manufactured by multiplevendors (this bears similarity to the subnet identifier and host id fields in the IP address).For instance, the MAC-48 address format used for many MAC technologies (including IEEE802.11) consists of 24 bits of Organizational Unique Identifier (OUI), which specifies theorganization that assigned the MAC identifier; the remaining 24 bits need to be chosenuniquely by that organization for each interface it produces.

Some interface cards allow programmable MAC addresses. Thus, there is a potentialfor duplication of MAC addresses. When MAC addresses are dynamically programmed,it becomes necessary to use suitable mechanisms for maintaining uniqueness of MAC ad-dresses. These mechanisms will, of necessity, will have some similarity to mechanisms usedfor assignment of unique IP addresses. However, such mechanisms are not in popular usefor dynamic MAC address assignment.

8.4 Summary

This chapter presents an overview of techniques to assign unique addresses to thehosts in a wireless network. We discussed address assignment at the network layer, as wellas the MAC layer. At the network layer, several different mechanisms may be used. Onepossibility is to use mechanisms based on the DHCP protocol. While such mechanisms can

c© 2010 Vaidya 182

Page 195: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

work well in some environments, they rely on connectivity between a DHCP server and thehosts needing to acquire IP addresses. In environments where such access to DHCP serverscannot be assured, distributed address assignment mechanisms are of interest. In particular,we discussed approaches that allow a host to select an arbitrary address for itself, but alsoincorporate means to allow the host to detect whether the address is a duplicate (or in useby another host already). In asynchronous systems, wherein the message delays may beunbounded, it is not feasible to guarantee that two hosts will not choose identical addresses.An alternative in such environments is to weaken the requirement that is satisfied by theduplicate address detection (DAD) procedure. We discussed one such possibility, namelyWeak DAD. Weak DAD does not necessarily detect address duplication, but it preventspackets from being misrouted to the wrong recipient host.

At the MAC layer as well, it is desirable to prevent hosts from using identical ad-dresses. Such addresses may be assigned statically, or dynamically.

c© 2010 Vaidya 183

Page 196: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

c© 2010 Vaidya 184

Page 197: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

CHAPTER 9

TCP Over Wireless

Copyright c© 2009 Nitin VaidyaJanuary 19, 2010

9.1 IntroductionTCP (Transmission Control Protocol) is a transport layer protocol used quite com-

monly in the internet. Since a significant fraction of the traffic in the internet is carried usingTCP, it is important to consider performance of TCP in the context of wireless networks.TCP is designed to perform reliable in-order delivery, while using IP to route packets. Assuch, TCP should work correctly on a typical wireless network. However, packet losses due totransmission errors and mobility can adversely impact TCP performance, as we discuss laterin this chapter. This chapter discusses the impact of such packet losses on TCP throughput,followed by selected approaches to improve TCP performance over wireless networks. Webegin this chapter with a brief overview of salient features of TCP.

9.2 TCP Overview

Transmission control protocol (TCP) provides reliable in-order delivery of packetsfrom a source to a destination. Also, TCP provides an end-to-end semantics, which impliesthat the receiver receives an acknowledgement for a packet only after the packet has beendelivered to the destination. The jargon often used to refer to the TCP packets is “segment”.However, we will use the term packet in our discussion. In addition to reliable in-orderdelivery, an important element of TCP is its congestion control mechanism. TCP is designedto respond to congestion in the network. Congestion occurs when the rate at which traffic isinjected into the network exceeds the capacity of the network. With sustained congestion,the packet queues at some links in the network begin to grow, eventually resulting in packet

c© 2010 Vaidya 185

Page 198: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

loss due to buffer overflow. TCP responds to such packet losses by reducing the sendingrate, as discussed in this section.

We begin our overview on TCP with a discussion of acknowledgements used in TCP.Note that the description of TCP in this chapter is meant as a review; for more details,please refer to other texts devoted to TCP.

9.2.1 TCP Acknowledgements

Our discussion of TCP typically assumes that the TCP data flows from a certainsender to a certain receiver. In practice, the TCP connections are bi-directional (in thesense that the data can flow in both directions). However, our discussion will typicallyconsider data flowing in one direction, with one of the end hosts identified as the TCPsender, and the other end host identified as the TCP receiver.

When a TCP receiver receives a packet from the sender, it may respond by sendingan acknowledgement (abbreviated as Ack). The acknowledgement in TCP is cumulative inthe sense that it acknowledges not just the receipt of a single packet, but the receipt of allpackets up to a certain point in the TCP flow. For instance, the TCP ack may acknowledgethat the receiver has received the first 20000 bytes. TCP sender assigns a sequence numberto each byte of data sent by the sender. The receivers acknowledges the receipt of first20000 bytes (bytes numbered 0 through 19999) by storing sequence number 20000 in theack packet, which can be viewed as the next in-sequence byte expected by the receiver, butnot yet received.

For future reference, note that all our examples will assume that each TCP datapacket contains 1000 bytes. Thus, the first byte of each data packet will have sequencenumber equal to L thousand, for some non-negative integer value L. When discussing (orpictorially depicting) a packet, we will refer to data packet as L to indicate that it containsbyte L*1000 through (L*1000+999). We will also use a similar abbreviated notation foracknowledgements. Since all data packets in our example will contain 1000 bytes, the TCPack will always contain a sequence number of the form (L+1)*1000, indicating that thereceiver has received all packets up to and including packet L, each containing 1000 bytes.We will label an ack simply as L in this case.

Using the above notation, Figure 9.1 shows acks sent by TCP receiver D in responseto data packets received from TCP sender S. Host B is an intermediate host on the routefrom S to D. The data packets are shown above the links in the figure, whereas TCP acksare shown below the links. The status in Figure 9.1(a) is that D has already receiveddata packets 0 through 36 and most recently sent an ack labeled 36, after having receiveddata packet 36. Ack 36 acknowledges the receipt of all packets through packet 36 (again,recall that TCP uses byte sequence numbers, however, our notation is somewhat different).

c© 2010 Vaidya 186

Page 199: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Subsequently, when host D receives data packet 37, it sends Ack 37 in response, since hostD has now received all packets through packet 37.

c© 2010 Vaidya 187

Page 200: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

S DB

40 39 3738

3533

S DB

41 40 3839

35 37

3634

3634

i data acki

Figure 9.1 Illustration of TCP acknowledgements (Ack)

c© 2010 Vaidya 188

Page 201: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

In our example in Figure 9.1, packet 37 is the next in-sequence packet that host Dexpects after packet 36. Also, in this example, the receiver generates an ack after receivingeach in-sequence packets. In reality, TCP receiver need not send an acknowledgement foreach in-sequence packet. The “delayed ack” mechanism allows the TCP receiver, on receiptof a data packet, to delay sending ack until it receives a second data packet, or until a suitabletimer expires, whichever occurs first. Thus, with delayed ack, the receiver may possiblysend one ack for every other data packet received, reducing ack traffic, and the load on thereverse route from D to S. Such delaying of acks is acceptable, since the acknowledgementsare cumulative. Figure 9.2 provides an illustration of delayed acks. In the first snapshot inthe figure, host D has sent Ack 35 on receipt of data packet 35, but does not send any ack onreceipt of packet 36. Subsequently, as shown in the second snapshot, when D receives datapacket 37, it sends Ack 37, acknowledging all packets through 37, including data packet 36.

What happens when a packet is lost, for instance, due to transmission error on awireless link? Consider the example in Figure 9.3. As shown in the first snapshot, D hasjust sent Ack 36 on receipt of data packet 36. The next in sequence packet 37 is lost dueto transmission errors on the wireless link between hosts B and D (the dotted line depicts awireless link). Thus, the next packet that host D receives reliably is packet 38. However, hostD is not expecting this packet, hence, this is considered to be an out-of-order (OOO) packet.In response to such an OOO packet, as shown in the second snapshot in Figure 9.3, host Dagain sends Ack 36 to indicate that it has received all data through packet 36. Since host Dhas already once sent Ack 36, the second Ack 36 is said to be a duplicate acknowledgement,or dupack for short.

In the example in Figure 9.3, when host D receives packet 39, it will yet again senda dupack 36, since 39 is OOO, and the last in-sequence data packet received was 36. Whilethe packet loss in our example was caused due to errors on a wireless link, such a loss canoccur due to congestion as well (perhaps the more common case in many networks). Forinstance, packet 37 could have been lost if the buffer at host B were full when that packetarrives at B from S. In this case as well, the dupack shown in Figure 9.3 will be generated.

While packet loss can lead to generation of dupacks, out-of-order delivery of data alsoleads to dupacks, as illustrated next. Out-of-order delivery of TCP data packets can occurbecause IP (internet protocol) does not guarantee ordered delivery. Consider the illustrationin Figure 9.4. The first snapshot in this figure shows that host D has just sent Ack 36 onreceipt of packet 36 (all previous data packets have been received by D as well). Observethat on link BD, the order of packets 37 and 38 is switched; packet 37 is being deliveredout of order by IP. In this case, when D receives packet 38, it will send dupack 36 (see thesecond snapshot in Figure 9.4). Later, on receipt of packet 37, host D will send Ack 38,since it has now received all packets through 38; this ack is labeled as new ack in the thirdsnapshot in Figure 9.4.

Now, the number of dupacks that will be generated depends on how much out-of-order a packet is. Let us consider Figure 9.5. In this case, packet 37 is two places away from

c© 2010 Vaidya 189

Page 202: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

S DB

40 39 3738

3533

S DB

41 40 3839

35 37

Figure 9.2 Illustration of delayed acknowledgements

S DB

40 39 3738

3634

S DB

42 41 3940

36 36

DupackOn receipt of 38

Figure 9.3 Illustration of duplicate acknowledgement

S DB

40 39 3837

3634

S DB

41 40 3739

36 36

Dupack

S DB

42 41 3940

36 36 38

New Ack

New

AckNew Ack

New Ack

34

New Ack

DupackNew Ack

Figure 9.4 Out-of-order delivery by network layer can lead to dupacks

c© 2010 Vaidya 190

Page 203: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

its nominal position. Packet 37 should be delivered after packet 36. Instead, the networklayer delivers the packets in the following order: 36, 38, 39, 37. Suppose that, as shown inthe first snapshot in Figure 9.5, the receiver has already received packets through 36, andhas just sent Ack 36. Subsequently, receiver D receives packets 38 and 39, respectively, andsends Ack 36 (dupacks) in response to each of these out-of-order packets. Note that dupacksare not delayed by the TCP receiver. In the last snapshot in Figure 9.5, host D receivesTCP data packet 37, and then sends the new ack Ack 39, since it now has all TCP datapackets through packet 39. Observe that, since packet 37 was delivered out-of-order by twopositions, two dupacks were sent by the TCP receiver between the new acks Ack 36 and Ack39.

c© 2010 Vaidya 191

Page 204: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

S DB

40 37 3839

3634

S DB

41 40 3937

36 36

Dupack

S DB

42 41 3740

36 36 36

Dupack

NewAck

New Ack

New Ack

34

New Ack

DupackNew Ack

S DB

43 42 4041

36 36 39

New AckDupackDupack

36

New Ack

Figure 9.5 Number of dupacks depends on how much out-of-order a packet is delivered

c© 2010 Vaidya 192

Page 205: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

9.2.2 Detection of Packet Loss

TCP uses two approaches for detecting a packet loss: timeouts and duplicate acks.Let us consider the timeout mechanism first. Our discussion will adhere to TCP specificationin spirit, but not in the exact details. Essentially, when TCP sender sends a data packet L,it sets a timer to go off after a suitable retransmission timeout (RTO) interval. If an ackthat acknowledges packet L is not received before the timer expires, then the TCP senderassumes that packet L is lost. Note that Ack M will acknowledge packet L so long as L ≤M. After the loss of packet L is inferred on a timeout, the TCP sender retransmits packetL, and sets the retransmissions timer again. However, the RTO value is now chosen to bedouble the previously used value. This is referred to as exponential backoff. If the timer wereto expire again before getting an ack for packet L, then the packet would be retransmittedyet again, again doubling the timeout value. Thus, consecutive failures to receive an ackfor a data packet result in successively longer timeout intervals (RTO) being used for theretransmission attempts.

The above exponential backoff procedure explains how the timeout interval is chosenfor a retransmission. How do we choose the timeout for the first transmission of a packet?If the timeout value is too small, the sender will unnecessarily timeout, and retransmit apacket that is not lost. On the other hand, if the timeout interval is too large, then the delaybefore detection of a packet loss will be larger. To address these concerns, TCP chooses thetimeout interval as a function of the actual delays in the network. On receipt of each ack,the TCP sender can determine an estimate for the round-trip time (RTT), which is the timerequired for a data packet to reach from S to D, and an ack acknowledging that packet toreach from D to S (the estimated RTT is affected by the use of the delayed ack mechanism).The TCP sender maintains a moving average of the RTT samples, and also keeps track ofthe mean deviation (similar to standard deviation, but simpler to calculate) of the RTT. TheRTO value for first transmission of a packet is chosen as mean RTT + 4*mean deviation.Thus, the RTT estimates as well as the variance of the RTT estimates both affect the RTOvalue. In addition, a lower bound is imposed on the RTO value, independent of the RTTsamples.

The RTO interval used in the above timeout mechanism is often much longer thanthe actual instantaneous RTT, since RTO accounts for variance in RTT as well. This canpotentially lead to long delays in detection of packet loss. An alternative mechanism issuggested by the illustration of dupacks caused by a packet loss. From the earlier examples,it should be clear that when a packet (or a sequence of consecutive packets) is lost, the nextTCP data packet received by the TCP receiver will trigger a dupack from the receiver. Onreceipt of this dupack, say, dupack L, the source can infer that packet L+1 is lost. Whilethis may appear to be a reasonable conclusion, sometimes the conclusion is erroneous. Inparticular, even when a packet is not lost, but merely delivered out-of-order by the networklayer, a dupack is generated by the receiver as we have seen previously. Thus, a dupack mayresult due to a lost packet or out-of-order delivery by lower layers. Assuming that every

c© 2010 Vaidya 193

Page 206: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

dupack is an indication of a packet loss will result in an erroneous conclusion whenever thenetwork layer delivers packets in the wrong order. Clearly, in case of out-of-order delivery,there is no need to retransmit any packet, since no packet is lost. TCP uses a somewhatarbitrary rule to try to differentiate between the two causes. In particular, if the senderreceives at least 3 dupacks consecutively, say, dupack L, then the sender concludes thatpacket L+1 is lost. Thus, even if the network layer delivers packets out-of-order, so long asa packet is not delivered “too” out-of-order (specifically, within two positions of its nominalposition, leading to at most two dupacks), TCP sender will not mistake out-of-order deliveryfor packet loss.

Detection of packet loss following 3 dupacks can often occur much sooner than de-tection using the timeout mechanism, particularly when packet losses occur in small bursts(including the case of single packet loss). However, when losses occur in large bursts, theloss may not be detected using dupacks. For instance, consider the possibility that linkBD fails for a long interval of time, causing loss of all in transit TCP data packets startingfrom packet 37 (lower layers will normally discard packets when the link failure is detected).In this case, since data packets are not reaching the receiver, it will not generate dupacks(generation of dupacks requires the receiver to receive an out-of-order packet). Thus, in thiscase, the TCP sender will detect the packet loss only when a retransmission timeout occurs.

9.2.3 Congestion Control

TCP sender uses a sliding window mechanism to determine which packets may betransmitted to the receiver. Only packets within this window may be transmitted by thesender. When a new ack is received, the window slides to include new data. For instance,Figure 9.6 shows the sender’s sliding window of size 5 packets before and after the senderreceives ack 6 (we will specify window size in number of packets, however, in reality, TCPmeasures window size in bytes, since TCP data packets are not fixed size).

The size of sender’s sliding window is bounded by two parameters: buffer spaceavailable at the receiver, and congestion window maintained by the sender. The bufferspace available at a TCP receiver is communicated to the TCP sender by means of thereceiver’s advertised window field included in TCP acks. For simplicity, we will assume thatthe sliding window size is equal to the congestion window (that is, the buffer size at thereceiver is not a constraint). Under this assumption, in our subsequent discussion, we willrefer to the sender’s window as the congestion window.

We say that a data packet is “outstanding” when the packet has been sent by the TCPsender, but it has not received an acknowledgement for that packet. Since only the packetswithin the congestion window can be transmitted at any given time, only a congestionwindow worth of data can be outstanding at any time. That is, only the packets in thecongestion window could have been transmitted, but not yet acknowledged. Another way to

c© 2010 Vaidya 194

Page 207: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

look at this is that (for our example with window size of 5 packets), after sending the firstpacket (with smallest sequence number) within the congestion window, the sender may sendat most 4 more packets (since congestion window size is 5 packets) without having receivedan ack for the first packet. Since it requires RTT duration to receive an ack after sendingthe data packet, the above discussion implies that, within one RTT, the sender may onlytransmit one congestion window (cwnd) worth of data. Thus, the throughput achieved byTCP is upper bounded by cwnd/RTT. This observation is used to implement the congestioncontrol mechanism in TCP. In particular, observe that, if cwnd is chosen to be too small,then the available capacity may not be utilized. On the other hand, if cwnd is too large,then the TCP sender will send too many packets within a RTT leading to queueing in thenetwork, and possibly packet loss. What is the right window size? Recall that the slidingwindow mechanism allows the sender to send all the packets within the congestion windoweven if the first packet in the window is not acknowledged. Given that the round-trip timeis RTT, and the capacity of the route from S to D is C, what is the right congestion windowsize? For simplicity, let us assume that the acks are sent on a separate route, and that routeis not a bottleneck to TCP performance. Now, the time required for the first data packetin the congestion window to reach the receiver, and for the resulting ack from the receiverto reach the sender will be the round-trip time RTT of interest here. How much data canthe sender possibly deliver to the sender during this RTT interval, if the route capacity isC ? Clearly, the amount of “outstanding data” (that has not been acknowledged as per thesender’s knowledge) can be at most RTT*C. If the sender attempts to send more data thanRTT*C, the excess amount will have to be buffered at the bottleneck link on the route (alink with capacity C can only transmit RTT*C during RTT interval). On the other hand, ifthe sender sends less than RTT*C data during the RTT interval, the route capacity will beunder-utilized. The quantity RTT*C is often called the “delay-bandwidth” product for theroute. The term bandwidth, strictly speaking, refers to a slice of the frequency spectrum;however, the term is also loosely used to refer to the available capacity. The intendedmeaning of the term should be clear from the context. The above discussion, thus, impliesthat the ideal congestion window size is equal to the delay-bandwidth product for the routetaken by the TCP flow.

Instead of using estimates of delay and bandwidth to predict the suitable congestionwindow size, TCP uses a probing mechanism. In particular, on receipt of each new ack(which indicates successful delivery of new data to the receiver), the TCP sender increases itscongestion window. On the other hand, whenever a packet loss is detected (either by receiptof 3 dupacks, or by a timeout), the TCP sender decreases the congestion window. TCP usesa additive increase, multiplicative decrease algorithm for adjusting the congestion window.That is, on successful delivery of new data, the congestion window is increased (additively)by a small amount, while on packet loss, the congestion window is decreased much moredramatically (multiplicatively), reducing to half its value (on receipt of 3 dupacks), or to theminimum possible value (on a timeout) of 1 Maximum Segment Size (MSS), which we willrefer as 1 packet. The window growth on the reception of a new ack occurs at different rates

c© 2010 Vaidya 195

Page 208: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

depending on whether the congestion window is less than a so-called slow start threshold(ssthresh) or not. The slow-start threshold (ssthresh) itself is also modified on a packet loss.We will omit the discussion of these details here. Figure 9.7 depicts the idealized evolution ofcongestion window for a hypothetical TCP connection, with time being measured in RTTs.Note that while cwnd is less than ssthresh, the cwnd doubles after each RTT (during the so-called slow-start phase), whereas it grows linearly with time during the congestion avoidancephase that follows. The important point to remember here is that the congestion windowdecreases significantly after a packet loss.

c© 2010 Vaidya 196

Page 209: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

2 3 4 5 6 7 8 9 10 11 131 12

Sender’s window

Acks received Not transmitted

2 3 4 5 6 7 8 9 10 11 131 12

Sender’s window

2 3 4 5 6 7 8 9 10 11 131 12

Sender’s window

Ack 5

(a)

(b)

Figure 9.6 Sliding window

c© 2010 Vaidya 197

Page 210: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

On the detection of a packet loss due to three dupacks, the sender retransmits thelost packet, as seen previously. This is called fast retransmit, since the loss detection ispresumably faster than that using a timeout. The fast retransmit is followed by fast recovery,during which the cwnd grows linearly with time. Important issue to note here is that, afterthe packet loss, at the start of fast recovery, the congestion window is reduced to half itsvalue prior to the detection of the packet loss (by three dupacks).

With the above discussion, we conclude our brief overview of TCP. Readers who areunfamiliar with TCP may wish to read other texts on this topic for further details.

9.3 Performance of TCP over wireless links

We will consider two types of wireless networks. Our initial discussion will focus onthe case of TCP flows for which the last link on the route from the TCP source to TCPreceiver is a lossy wireless link. In Figure 9.8, host S is the TCP source, and D the TCPreceiver. Link BD is a wireless link that is prone to transmission errors. The first snapshotin the figure shows that host D has just sent a new ack 36, and that data packet 37 is loston the wireless link due to transmission errors. In the second snapshot, no new packet isreliably received by host D, hence it does not send any ack (the new ack shown in snapshot(b) is the new ack sent in snapshot (a)). As snapshots (c), (d) and (e) show, host D sendsdupack 36 on the reception of packets 38, 39, and 40, respectively. When these three dupacksreach host S, it will detect the loss of packet 37, and perform fast retransmit. Since host Shas detected packet loss on receipt of 3 dupacks, the congestion window used by host S willbe reduced in half.

Now, the reason for reducing congestion window in response to a packet loss is thatTCP conservatively treats each packet loss as having occurred due to congestion. Reducingcongestion window reduces the load on the network, alleviating the congestion. However,when packet loss occurs due to transmission errors unrelated to congestion, TCP’s responseis still to reduce congestion window quite significantly. The reduced window may quitepossibly be much smaller than the ideal cwnd value. This leads to lower throughput until thecwnd eventually grows closer to the optimal value. Figure 9.9 shows the throughput of a TCPconnection for a 2 Mbps full-duplex wireless link. The horizontal axis in the graph showsinverse of the error rate, and vertical axis shows TCP throughput. In this case, no packetsare lost due to congestion. TCP throughput drops with increasing error rate. Of course,with increasing error rate, we expect the throughput to degrade, since not all packets aredelivered reliably on the wireless link. For instance, if 10% of the TCP data packets are loston the wireless link, then one may anticipate 10% throughput degradation compared to theperformance on a loss-free link. However, as seen in Figure 9.9, the throughput degradationcan be far worse. This result occurs due to the TCP sender reducing its congestion window

c© 2010 Vaidya 198

Page 211: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

0

2

4

6

8

10

12

14

0 1 2 3 4 5 6 7 8 9 10

ssthresh

RTT

cw

Figure 9.7 Congestion window dynamics

S DB

40 39 3738

3634

S DB

41 40 3839

3634

S DB

42 41 3940

36 36

dupack

S DB

40

363636

duplicate acks

4143 42

S DB

41

3636

3 duplicate acks triggerfast retransmit at sender

4244 43

36

new ack

(a)

(b)

(c)

(d)

(e)

Figure 9.8 Fast retransmit due to packet loss

c© 2010 Vaidya 199

Page 212: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

in response to the packet losses on the wireless link, even though the losses may not haveoccurred due to congestion.

Packet losses due to transmission errors can also cause a timeout at the TCP sender.This may occur, for instance, if several data packets are lost consecutively on the wirelesslink. If an insufficient number of packets from a congestion window is delivered reliably, thenthe resulting dupacks (if any) may not be sufficient to result in a fast retransmit. Thus, theonly way the TCP sender will detect a packet loss in this case is when a timeout eventuallyoccurs. Again, TCP sender will reduce its congestion window to a small value, which is notalways necessary in response to transmission errors, since the network may not really becongested.

Much of the rest of this chapter deals with approaches to improve TCP performanceover routes in which the last hop is an error-prone wireless link, and other links are error-free. We will refer to such routes as “last-hop wireless routes”. In addition, towards theend of the chapter, we will address the issue of TCP performance over multi-hop wirelessnetworks.

9.4 Improving TCP Performance over Last-Hop Wire-

less Routes

As the above discussion indicates, the TCP throughput degrades over wireless linksbecause of two factors:

• Packets losses occur due to a cause (specifically, transmission errors) that is unrelatedto congestion, and

• TCP responds to such packet losses by reducing the congestion window, which is aninappropriate response to non-congestion related packet losses.

The above simple observation suggests different ways of improving TCP performance.We first present two classifications of the different approaches, followed by some exampletechniques for improving TCP performance.

Classification 1

This classification is based on the type of action taken to improve TCP performance.Two types of actions can be designed to address each of the factors above:

c© 2010 Vaidya 200

Page 213: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Hide wireless packet loss from the TCP sender: In this case, since the TCP sender willbe unaware of packet losses due to transmission errors, it will not respond inappropri-ately, avoiding significant throughput degradation.

• Make TCP sender aware of the cause of packet loss: In contrast to the above ap-proaches, the second class of schemes allow the TCP sender to become aware of thepacket losses due to errors, but also provide the TCP sender additional informationabout the cause of the packet losses. Knowing the cause, the TCP sender can respondappropriately for each type of packet loss (i.e., reduce congestion window only if thepacket loss is deemed to be due to congestion).

Classification 2

Clearly, to improve TCP performance in presence of errors, we may need to makesome protocol changes. The second classification is based on the location where such changesare made:

• Modify TCP sender only: A significant amount of wireless TCP traffic is likely to befrom web servers to wireless web clients. In such cases, much of the data is transferredwith the web server acting as the TCP sender. If by making changes to the TCPimplementation at the sender we can improve TCP performance, then this improve-ment is attained without having to change the code at large number of wireless clientdevices.

• Modify TCP receiver only: Knowing that the wireless device will operate as the TCPreceiver for the most part, the designers may want to incorporate wireless-specificoptimizations in the TCP receiver code. Such changes can potentially benefit TCPperformance without having to modify the code on other (non-wireless) devices.

• Modify only intermediate hosts: For instance, if performance of TCP can be improvedby incorporating intelligence only at intermediate nodes (for instance, host B in ourexamples), then such benefits can potentially be attained without modifying TCP atall.

• Hybrid schemes combining different approaches above.

In addition to the location where changes are made, the protocol layers at which thechanges are made also affect usefulness of the schemes. Several schemes to improve TCPperformance have been proposed in the past. In this chapter, we discuss a few selectedschemes, beginning with link layer mechanisms.

c© 2010 Vaidya 201

Page 214: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

9.5 Link Layer Recovery

The degradation of TCP performance over wireless links occurs due to transmissionserrors that result in packet losses. A natural solution to this problem is to improve thequality of the wireless link, either by reducing the occurrence of packet losses due to errors,or by hiding such losses from the TCP sender. Two link layer approaches to recover fromerrors may be used: forward error correction and link layer retransmissions.

Forward Error Correction (FEC)

In this case, the sender encodes the transmitted packet, incorporating some redun-dancy, such that the packet can be decoded correctly by the receiver despite the occurrenceof some transmission errors. We discussed Hamming codes in Chapter 2. In practice morecomplex codes are typically used for forward error correction in wireless networks.

Link Layer Retransmissions

An alternative to FEC is to incorporate only limited redundancy to allow the receiverto detect errors in the received packet, as opposed to being able to correct the errors. Thelevel of redundancy required is again a function of the desired error detection capabilities.If we want to guarantee that up to t bit errors can always be detected, then it is necessaryto employ a code with minimum distance t + 1. Observe that t-error detection requiressignificantly smaller minimum distance (and hence lower level of redundancy) compared tot-error correction.

Once an error is detected (by the receiver) in the received packet, the transmitter(at the other end of the wireless link) can be informed to retransmit the corrupted packet.The mechanism to inform the transmitter may be implicit, such as absence of a link layeracknowledgement, or explicit, such as a negative (link layer) acknowledgement. For ourillustrations, let us assume that the link layer at the receiver sends a link layer acknowl-edgement for each link layer packet (often referred to as a frame) received correctly, andsends no response when a corrupted frame is received (this is similar to the IEEE 802.11acknowledgement mechanism). The benefit of link layer retransmissions is that, in absenceof errors, this approach incurs little overhead (only to facilitate error detection). Additionaloverhead in the form of retransmissions is incurred when errors actually occur. The retrans-missions do incur additional delay. However, since link layer retransmissions provide “localrecovery” from errors, there is potential for recovering from the packet loss sooner than usingthe “end-to-end” recovery performed using TCP retransmissions.

We illustrate the advantage of local recovery over end-to-end recovery using Fig-ures 9.10 and 9.11. Figure 9.10 shows the case when link layer retransmissions or FEC are

c© 2010 Vaidya 202

Page 215: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

not employed. In this case, the TCP source S sends data packets 6, 7, 8 and 9 at time 1000ms, 1002 ms, 1004 ms and 1006 ms, respectively, which reach host B at 1040 ms, 1042 ms,1044 ms, and 1046 ms, respectively. Packet 6 is lost due to transmission errors on link BD,but packets 7, 8 and 9 reach the receiver at 1043 ms, 1045 ms and 1047 ms, respectively(we assume a much shorter delay on link BD as compared to route from S to B, which maycontain multiple hops not shown in the figure). The duplicate acks sent by receiver D inresponse to receipt of packets 7, 8, and 9 (since packet 6 was lost) reach source S at 1084ms, 1086 ms, and 1088 ms, respectively. Thus, at 1088 ms, source S can retransmit packet6, 88 ms after its original transmission. This retransmitted packet will reach D 42 ms laterat time 1130 ms (in the absence of further packet loss).

Now consider Figure 9.11. In this case, after having sent packet 6 to host S at 1040ms, the link layer at host B expects to receive a link layer acknowledgement (not shownin the figure) for packet 6 by 1042 ms (allowing for 2 ms round-trip delay on the wirelesslink). Since packet 6 was corrupted on the wireless link, host D does not send a link layerack for this packet, and host B will retransmit the packet at 1042 ms, which will reach Daround 1043 ms. Thus, the recovery of the lost packet can occur by 1043 ms with link layerretransmission scheme, as opposed to 1130 ms with the end-to-end recovery by TCP.

c© 2010 Vaidya 203

Page 216: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

0

400000

800000

1200000

1600000

16384 32768 65536 131072

1/error rate ( bytes)

bit

s/s

ec

on

d

Figure 9.9 Performance of TCP in presence of errors: The results presented here correspondto a certain two-hop network, with route S-B-D used between source S and destination D,with link BD being a wireless link.

6 7 8 9

1000

1004

1002

1006

Host S

Host B

Host D

1040

1042

1044

1046

6 7 8 9

Notation: Solid arrow represent TCP data packets Dashed arrows represent TCP ack packets Arrows pointing to the timeline indicate incoming packets Arrows pointing away from the timeline indicate outgoing packets 4 digit numbers represent time

dupack 5

1045

1047

1043

7 8 9

dupack 5

dupack 5

6

1084

1086

1188

Figure 9.10 End-to-end recovery using TCP retransmissions

c© 2010 Vaidya 204

Page 217: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

6 7 8 9

1000

1004

1002

1006

Host S

Host B

Host D

1040

1044

1046

6 7 8 9

1045

1047

1043

7 8 9

1084

1042

6 dupack 5

dupack 5

6

dupack 5 new ack 7 dupack 5

1086

new ack 7new ack 9

new ack 7

new ack 9

denotes link layer retransmission

Figure 9.11 Benefit of local recovery using link layer retransmissions

c© 2010 Vaidya 205

Page 218: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Figure 9.12 pictorially illustrates the solutions that use link layer transmissions. Thefigure shows protocol layers at hosts S, B and D, where S is the TCP sender, D is theTCP receiver, and B is an intermediate host, with link BD being a wireless link. Link layerretransmissions (rxmt) are incorporated on the wireless link. To be able to implement thelink layer retransmission, the transmitter on the wireless link, namely, host B, must maintaina buffer for packets that have been transmitted on the wireless link, but are not known tohave been delivered successfully. This buffer is shown in the figure as link layer state. Notethat a single buffer is used, independent of the number of TCP connections to host D viahost B. In essence, the link layer at host B does not distinguish between different TCPconnections. Similarly, the link layer at host D must maintain a buffer too, for packets thatmay be sent from D to B at the link layer; this buffer is not shown in the figure. Observethat the packets from S to D reach up to the network layer at host B (for routing purposes),and then go down the layers again until reaching the physical layer, and then transmittedon the wireless channel.

As seen above, link layer retransmission can be implemented provided that an errordetection mechanism is also provided to allow detection of corrupted packets. In general, acombination of FEC and retransmissions may also be used. FEC may be used to recoverfrom a small number of errors without having to retransmit a packet, whereas the corruptedpacket can be retransmitted in case of excessive errors.

Let us now identify the circumstances under which link layer transmissions is likelyto help improve TCP performance substantially. One issue that affects the performanceimprovement is whether the link layer delivers packets in-order, or as they arrive (potentiallyout-of-order).

In-Order versus Out-of-Order Delivery at the Link Layer

Figure 9.13 illustrates in-order delivery of frames at the link layer, despite retrans-missions. The frames show two sequence numbers, the number shown on the left in a packetis a link layer (LL) sequence number, and the other one is a TCP sequence number. Thelink layers normally use their own numbering scheme for the frames, independent of theprotocol that may be used at the transport layer. To avoid ambiguity in this discussion, wewill prefix a sequence number with LL or TCP. In our example in Figure 9.13, frame LL-23(that is, the frame with link layer sequence number 23) is corrupted on its first transmission;however, the retransmission is delivered correctly. The order in which frames are receivedby host D’s link layer is shown in the figure. Also shown is the order in which packetsare delivered by the link layer to the higher layers at host D. Notice that, although frameLL-24 was received prior to the correct reception of frame LL-23, the delivery of this frameis delayed until frame LL-23 is reliably received. This delay is necessary to ensure ordereddelivery of frames from the link layer to the higher layers.

c© 2010 Vaidya 206

Page 219: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

S DBwireless

physical

link

network

transport

application

physical

link

network

transport

application

physical

link

network

transport

application

rxmt

TCP connection

Link layer state

Figure 9.12 Protocol stack illustrating link layer retransmissions

22 10

22 10 24 12 25 13

Framessent bylink layer

Framesreceivedby linklayer athost D

at host B

receivedat transport

24 12 23 11 25 13

23 11

layer at D

TCP packets

(link layer headers, although shown here, are removed before sending the packets to transport layer)

22 10 23 11 24 12 23 11 25 13

Figure 9.13 In-order delivery at the link layer

c© 2010 Vaidya 207

Page 220: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Why would host B transmit frame LL-24 prior to retransmitting frame LL-23? Whynot use the stop-and-go protocol at the link layer? In the stop-and-go protocol, the trans-mitter (host B in our case) does not transmit a new frame until it has been able to deliverthe previous frame reliably, possibly after retransmissions. Thus, after host B has sent frameLL-23 to host D, host B expects to get an acknowledgement (link layer ack) from host D.Failing to receive the ack within a suitable time interval, host B will retransmit the frame.This will continue until host B is able to receive an ack for the frame (alternatively, aftercertain number of attempts, host B may deem the link as broken, drop the frame, and informthe upper layer of the link failure). Such a stop-and-go protocol ensures that the link layerat host D will not receive frame LL-24 before frame LL-23 (unless frame 23 is dropped).Thus, the link layer achieves in-order delivery. In this case, there is no need to delay receivedframes at the link layer at host D, since the received frames will be necessarily in-order. Infact, this is indeed the approach taken in some practical systems, notable among them isIEEE 802.11a/b/g. In case of IEEE 802.11a/b/g, the maximum distance between hostsis up to a few hundred meters, limiting the propagation delay to be a few microseconds.Also, the maximum bit rate is under 100 Mbps. Clearly, in this case, the delay-bandwidthproduct of the wireless link is quite small, and the use of a stop-and-go protocol does notsacrifice performance significantly (the per-frame link layer acknowledgements do incur someperformance cost).

However, the stop-and-go protocol is not appropriate for links with higher delay-bandwidth products. For instance, consider a wireless link where the link delay is of theorder of 10 ms, and the bit rate is 10 Mbps. For this link, the delay-bandwidth product is100 Kbits, which is equivalent to many 1000 byte frames. Note that the link delay may alsobe due to processing delay at the receiver (e.g., decoding), in addition to propagation delay.For such a link, if we use stop-and-go protocol, the link will be kept idle most of the time,reducing efficiency (and throughput) significantly. On links with large delay-bandwidthproduct, a sliding window protocol (similar to TCP) is more appropriate than stop-and-go.With the use of a sliding window at the link layer, the scenario depicted in Figure 9.13 canpotentially occur. Specifically, if the delay-bandwidth product for the link layer is of theorder of W frames, then a transmission of a given frame, and its retransmission (or twoconsecutive retransmissions) may be separated by W − 1 frames, if we want to maximizethe channel utilization.

When W is larger than 1, should we require the link layer to deliver frames in-order?It is important to emphasize here that the ordering we are referring to is at the link layer. If,somehow, host B in our example receives packets from S out-of-order, then that is the orderin which the link layer at B will deliver them to D. When W is large, the link layer shoulduse a protocol such as the sliding window protocol to maximize efficiency. At the same time,the link layer can provide in-order delivery by the use of buffering. In our example above,the link layer at host D buffers frame 24 until frame 23 is received reliably. When this frameis received reliably, frames 23 and 24 are released to the upper layer in that order, achieving

c© 2010 Vaidya 208

Page 221: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

in-order delivery at the link layer. So long as the link layer delivers frames in-order, thetransmission errors on the wireless link will not cause dupacks from the TCP receiver athost D. So, does in-order delivery solve our problem? There are two potential concerns:

• In-order delivery requires buffering of packets as we have seen above. In addition,as seen in our example, there is also some delay in delivery of the packets, sincethe delivery must wait for the retransmission to succeed We can impose an upperbound on how long a packet may be buffered at the receiver, in order to avoid waitingindefinitely in case of link failures. Potentially, the delay can become long enoughthat the TCP sender may timeout while the wireless link layer is attempting to deliverthe packet to the receiver. This would result in retransmission by the TCP sender,in addition to the link layer retransmissions. This phenomenon is sometimes referredto as “interference” between TCP retransmissions and link layer retransmissions (thisshould not be confused with interference in SINR calculations). The likelihood of TCPtimeout, while the link layer is still attempting to retransmit the packet, is higher whenthe wireless link delay represents a large fraction of the end-to-end delay, or when linklayer retransmissions of a packet are also erroneous.

• Not all traffic on the wireless link may require in-order delivery of information, or beable to tolerate the delay incurred due to buffering for in-order delivery. In particular,for voice traffic, an application layer (or transport layer) redundancy mechanism maybe used to improve reliability, instead of relying on link layer mechanisms. In thiscase, imposing reliable in-order delivery at the link layer may worsen the perceivedvoice quality. One solution to this dilemma is to selectively use retransmission orin-order delivery for TCP traffic, but not for other traffic that does not need thesefeatures. However, this will require the link layer to be aware of the transport layerrequirements.

Nevertheless, practical implementations do often provide in-order delivery at the linklayer. This solution is particularly attractive for wireless links with relatively smallretransmission delays.

Many other solutions have been developed for the case when the link layer deliverymay possibly be out-of-order, or no link layer retransmission capability is available. We nowdiscuss some such solutions below.

9.6 Split Connection Approach

The split connection approach does not rely on the availability of a link layer retrans-mission mechanism. Instead, it achieves a similar result by splitting the TCP connection into

c© 2010 Vaidya 209

Page 222: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

two connections. Recall that, in our example, the TCP connection is between the transportlayers at hosts S and D, where the route includes the wireless link BD. The split connectionapproach replaces this single TCP connection by a TCP connection between S and B (nowireless links on the route taken by this connection), and a TCP connection between B andD (going over the wireless link). At the intermediate host B, which is one endpoint of thewireless link, packets from the receive buffer of the first TCP connection are moved to thesend buffer of the other TCP connection, as the send buffer space permits.

Figure 9.14 illustrates the split connection approach. As shown, now there are twoTCP connections replacing our original TCP connection. Also, the intermediate host B mustmaintain per-TCP connection state (namely, send and receive buffers) for each TCP connec-tion that traverses the wireless link BD. This is in contrast to the link layer retransmissionscheme discussed earlier, which does not maintain separate state for each transport layerconnection. When a packet is lost due to transmission errors on link BD, the TCP senderof the second TCP connection (over link BD) will detect the packet loss and retransmit thelost packet, in addition to reducing its congestion window. However, sender S is shieldedfrom any losses on link BD, since the TCP connection originating at S now terminates athost B.

Since the TCP sender at host S does not need to respond to the losses on the wirelesslink, the TCP connection between S and B does not incur performance degradation due toany wireless loss. However, the TCP connection on link BD may possibly have a reducedthroughput due to the wireless losses, since the TCP sender at host B will react to these lossesby reducing its congestion window. However, the resulting detrimental impact is likely to besmaller than in the case of the original TCP connection from S to D because the delay overlink BD is smaller than that over route SD. This implies that, even if the TCP connectionon link BD reduces its congestion window in response to a wireless loss, it will sooner reachthe optimal congestion window. Recall that the TCP congestion window growth dependson the RTT (smaller RTT resulting in faster growth). Therefore, the smaller RTT over linkBD (as compared to route SD) helps in reaching the suitable congestion window sooner.This reduces the period during which the TCP connection over BD loses throughput.

The split connection approach can thus significantly improve performance. It achievesthis benefit by retaining the local recovery advantage of link layer retransmissions. The splitconnection approach, however, has some potential disadvantages:

• Violation of end-to-end semantics: Consider the example shown in Figure 9.15(a). Asshown, host B has already received packets 39 and 40 on the SB TCP connection. Asa result, B sends a TCP ack 40 to host S. However, as shown, host B is yet to transmitpacket 40 to host D on the BD TCP connection. Thus, host S might receive ack 40even before that packet has reached the intended destination D. This violates TCP’send-to-end semantics, and any application relying on this semantics may break if wereplace standard TCP by split TCP.

c© 2010 Vaidya 210

Page 223: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Hard state at intermediate host: In Figure 9.15(a), packets 39 and 40 are shownbuffered at host B. When host S receives ack 40, it no longer needs to store packets 39and 40 in its own buffer. Now, we have a situation where packets 39 and 40 are notyet delivered to the destination D, but the source S has already discarded the packets.If host B were to fail and lose the contents of its buffers, packet 39 and 40 will notbe delivered to the destination. This violates the correctness of TCP, since packetdelivery is no longer reliable. The standard TCP protocol ensures reliable delivery solong as the source and destinations (S and D) do not fail, and there is a route betweenthe two hosts. With split TCP, we also require an intermediate host to maintain TCPstate reliably.

• Increased overhead with mobility: A consequence of the fact that the state at host Bis hard is that, with mobility, this state may have to be transferred to another host.Suppose that host B is a base station, and that host D is a mobile host as shown inFigure 9.15(b). If host D were to move out-of-range of base station B, and move closerto base station C, then the state at host B (particularly, packets 39 and 40) will have tobe transferred to host C, the new base station. Otherwise, as in the previous scenario,these packets may not be delivered to host D, violating TCP’s reliability guarantee.

• Asymmetric links: When the forward and reverse paths between hosts S and D do notboth traverse the wireless link, split TCP is not as effective. Consider the examplein Figure 9.16. Here, the link between B and D is an asymmetric satellite link –D can receive packets from B, but does not have the capability to transmit back toB. Thus, D can receive TCP data packets on the BD link. However, the TCP ackshave to be sent on another link, namely, link DU, which may be a dialup connection(over telephone lines). In this case, we cannot obtain a significant benefit by splittingthe TCP connection at host B. With split connection, the TCP acks for the secondconnection will have to follow a relatively long route, not yielding the local recoveryadvantage expected of split TCP.

c© 2010 Vaidya 211

Page 224: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

S DBwireless

physical

link

network

transport

application

physical

link

network

transport

application

physical

link

network

transport

applicationrxmt

Per-TCP connection state

TCP connection TCP connection

Figure 9.14 Protocol stack illustrating the split connection approach

S DB

40

39

3738

3640

S DB

40

39

3738

3640

D Hand-off

40

39

new base station

(a)

(b)

Figure 9.15 Disadvantages of split connection approach

c© 2010 Vaidya 212

Page 225: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

D

Bdata

ackU

S

Figure 9.16 Impact of link asymmetry on the split connection approach

9.7 TCP-Aware Link Layer Retransmission

While split TCP does improve performance, it may result in violation of the end-to-end semantics and reliability guarantees, as seen above. An alternative mechanism isto implement link layer retransmissions, but in a TCP-aware manner, such that the linklayer takes actions that are appropriate for TCP. Figure 9.17 illustrates the protocol stackfor this approach. Unlike split TCP, here the TCP connection is not split into two TCPconnections. This helps preserve the end-to-end semantics. Also, the state at intermediatehost B is soft state – loss of this state may result in degradation in performance, but nota loss of correctness. An important difference from the link layer retransmission schemediscussed previously is that in the TCP-aware scheme, the link layer maintains per-TCPconnection state. Clearly, to be able to implement this approach, the link layer needs to beable to view the TCP headers. This will not be feasible if the TCP headers are encrypted(when using IPsec, for instance) and the intermediate host is not trusted. Similar to thelink layer schemes, the retransmissions in response to wireless losses typically occur only onthe wireless link, preserving the local recovery advantage.

c© 2010 Vaidya 213

Page 226: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

S DBwireless

physical

link

network

transport

application

physical

link

network

transport

application

physical

link

network

transport

application

rxmt

Per TCP-connection state

TCP connection

Figure 9.17 TCP-aware link layer

The TCP-aware link layer retransmission approach works as follows. Similar to theprevious link layer scheme, the link layer at host B buffers TCP packets so that they canbe retransmitted if needed on the wireless link. However, this scheme does not use linklayer acknowledgements, instead relying on TCP acknowledgements to determine whether acertain TCP packet has been delivered successfully on the wireless link or not. The protocolis implemented at the intermediate host, such as host B in our example. In this case, hostB buffers packets that it has received from S, but that are not known to have reached hostD yet. When the link layer at host B determines that a packet was lost before reaching hostD, it transmits that packet provided that the packet is available in the buffer at host B. Onthe other hand, if the packet did not reach B either (because it was lost before reaching B)then, of course, host B cannot transmit that packet.

Let us consider an example, starting with the first snapshot in Figure 9.18. In thisexample, all sequence numbers are TCP sequence numbers. As shown in the snapshot, hostD has just sent ack 36 on reception of data packet 36 from S. Host B has just received TCPack 34 and forwarded it to host S. On reception of TCP ack 34, host B learns that all TCPpackets through 34 have been received by D. Therefore, it need not keep them in its localbuffer anymore. On the other hand, it has received TCP packets 35 through 38 from S, buthas not yet seen a TCP ack from D for these packets. Consequently, host B buffers thesepackets. The buffered packets at B are shown above host B in the figure. Since host Bdecides which packets to remove from the buffer based on the TCP acks it receives from D,host B needs to be able to read the TCP sequence number in the TCP ack.

Since packet 37 is corrupted on the wireless link, no TCP ack is generated whenpacket 37 is delivered at D, as seen in snapshot (b) in Figure 9.18. Next, as seen in snapshot(c), when host B receives packet 39, the packet is added to the local buffer. Also, since Breceives Ack 36 from D, host B removes packets 35 and 36 from its local buffer. As seenabove, data packet 37 is lost on the wireless link due to transmission errors. Subsequently,when host D receives packet 38, host D will send dupack 36, since 36 is the last in-order

c© 2010 Vaidya 214

Page 227: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

S DB

40 39 3738

3634

36

37

38

35TCP state

maintained atlink layer at B

S DB

41 40 3839

3634

36

38

39

35

37

S DB

42 41 3940

36 36

dupack

37

3839

40

(a)

(b)

(c)

S DB

41

3636

3744 43

36

37

38

39

40

41

42

Discarddupack

Dupack triggers retransmissionof packet 37 from host B

S DB

42

36

36

4346 45

36

37

38

39

40

41

42

43

41

36

44

S does not

fast retransmit

(d)

(e)

Figure 9.18 Illustration of TCP-aware link layer retransmission scheme

c© 2010 Vaidya 215

Page 228: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

packet received by host D. Similarly, receipt of TCP packets 39, 40 and 41 will also generateTCP dupack 36 from D. In the meantime, host B is receiving other packets from host S,which are then buffered at host B.

Snapshot (d) in Figure 9.18 illustrates the key action taken by the TCP-aware linklayer retransmission scheme. Observe that, when host B receives the first of the dupack 36sent by host D, host B realizes that host D has not yet received packet 37, but did receivea subsequent packet.

Now, packet 37 is in host B’s local buffer. Thus, it is clear that packet 37 wastransmitted to D by host B, but not received reliably by host D. In this case, host B detectsthe loss on the wireless link, which is presumed to be due to errors, not congestion. HostB then transmits data packet 37 from its local buffer. In this manner, this scheme provideslocal recovery of losses on the wireless link. Ordinarily, host B being an intermediate hoston the route from D to S, it will simply forward the dupack on its route to host S. However,forwarding the dupacks to S will eventually trigger a fast retransmit from sender S, as wellas a reduction of congestion window at S. To avoid this, particularly since host B is ableto retransmit the lost packet, host B discards the dupacks in addition to retransmittingpacket 36 to host D. Snapshot (d) shows that host B has retransmitted packet 37, and alsodiscarded one dupack 36. Subsequently, host B will receive other dupack 36 sent by host D,and discards these as well. It continues to buffer new packets received from host S. Until Breceives a new ack from D, no packets can be removed from the buffer.

Eventually, packet 37 retransmitted by host B reaches host D. Previous to this, hostD has received all packets through 41 except packet 37. Therefore, on receipt of packet 37,host D sends ack 41, as seen in snapshot (e) in Figure 9.18. When host B receives ack 41,it can remove all data packets through 41 from its local buffer. All new acks, including thisack 41, are forwarded to source S.

As seen above, by retransmitting the lost packet from its local buffer, and droppingthe dupacks, host B is able to achieve reliable delivery of packet 37, and also hide thepacket loss from TCP source S. This ensures that the TCP source S does not respondinappropriately to the loss on the wireless link.

A few issues need further attention. First, what happens if the wireless link loses somany packets that no dupack is received by host B? To allow the link layer to detect suchpacket loss, host B will need to utilize a timeout-based scheme. This may be implementedsimilar to the TCP timeout mechanism, except that in this case the round-trip delay on thewireless link will have to be used to determine the suitable timeout interval at host B.

The second issue is that, as described above host B discards dupack 36. What happensif the retransmitted packet 36 is lost too? This will also lead to additional dupacks. If hostB were to simply discard these dupacks, then it will not be able to quickly detect the loss ofretransmitted packet 36 (it may detect this eventually using a timeout). To allow host B todetect the loss of a retransmitted packet, host B should not discard more dupacks than the

c© 2010 Vaidya 216

Page 229: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

number of TCP packets sent between the two transmissions of the lost packet (packet 37above). With these modifications, the above scheme can often recover from wireless losseswithout the TCP sender S detecting the loss.

9.8 Impact of Long Outages

Consider two scenarios, which both result in similar detrimental impact on TCP:

• Scenario 1: Consider a wireless host using a cellular link. When the host passes througha tunnel, or behind an obstacle, there is a possibility of link outage for non-negligibledurations. A similar situation also arises in case the route includes a satellite links,and the satellite link encounters long durations of poor quality.

• Scenario 2: Consider a mobile ad hoc network using a reactive routing protocol. Whenan existing route breaks, it may take the network layer a substantial amount of timeto rediscover a new valid route.

In both cases above, the TCP sender may timeout before packet delivery resumes to thereceiver, as illustrated in Figure 9.19(a). As seen in this example, when a route breaks(either because the cellular link becomes unavailable, or due to host mobility in ad hocnetworks), packets en route to the destination cannot be delivered, and are discarded bythe lower layers (here we assume that the lower layers do not indefinitely try to retransmitpackets to the host). Subsequently, the route is repaired. However, the TCP sender will notmake an attempt to transmit a packet until a timeout occurs. Thus, the TCP connectionwill not obtain useful throughput until the TCP sender times out. Clearly, while the routeis broken, we cannot expect TCP to be able to send packets, however, the loss of throughputbetween route repair and TCP timeout is unnecessary, and is caused by TCP’s congestioncontrol mechanisms.

This detrimental impact can be more pronounced with larger route repairs delays.Let us consider the case where the route is not yet repaired when TCP sender times out(Figure 9.19(b)). Thus, the retransmission following the timeout is lost as well. Again, TCPsender will not attempt to send another packet until the next timeout occurs. However,due to the exponential backoff mechanism, the next timeout interval is twice as long as theinitial timeout interval. In this case, there is a potential for loss of throughput for a longerduration of time, as seen in Figure 9.19(b).

The performance degradation above occurs because the TCP sender is unaware thatthe packet loss occurred due to route failure, as opposed to congestion. Thus, TCP relieson the timeout mechanism to determine when to make the next transmission attempt. Toalleviate this performance impact, one solution is to send TCP sender an explicit notification

c© 2010 Vaidya 217

Page 230: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

mobility causes

link breakage,

resulting in

route

failure

TCP data and acks

en route discarded

TCP sender times out.

Starts sending packets

again

Route is

repaired

No

throughputNo throughput

despite route repair

mobility causes

link breakage,

resulting in route

failure

TCP sender

times out.

Backs off timer.

Route is

repaired

TCP sender

times out.

Resumes

sending

No throughput

No throughput

despite route repair

(a)

(b)

Figure 9.19 Impact of long outage on TCP

c© 2010 Vaidya 218

Page 231: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

that the route has been repaired. In case of cellular networks, this notification could poten-tially be generated by the base station. In case ad hoc networks, the network layer (possiblyat the sender) will have to send a notification to the transport layer that the route has beendiscovered. This may be implemented in the form of an ICMP message. On receiving thenotification, the TCP sender may resume transmission immediately instead of waiting forthe timeout to occur. In other words, the sender can pretend that the timeout occurred atthe time of the reception of the explicit notification. This explicit notification approach canindeed improve TCP performance, however, it requires additional signaling, in the form ofthe explicit notification, between TCP and the lower layers.

A secondary issue to consider in the context of explicit notification is the choice ofcongestion window after the TCP sender receives the explicit notification. In the case whenlong interval of time elapses between route failure and repair, clearly, the congestion windowused prior to the failure may not be appropriate for the state of the network after routerepair (even if the new route is same as the old route). Secondly, when the new route isdifferent from the old route, it may have a different level of congestion than the old route,even if the route repair delay happens to be short. A conservative response after route repairis to initiate slow-start, analogous to the standard TCP response after a timeout.

In case of ad hoc networks, the behavior illustrated in Figure 9.19 may interact detri-mentally with route caching for reactive protocols. With route caching, hosts utilize routesfrom their cache, when the route in use breaks. However, there is a risk that the cachedroute is broken too. In this case, after each timeout, a new route from the cache may beused, only to discover after another (larger) timeout interval that it is broken as well. Dueto exponential backoff, the timeout value, and therefore, the time between consecutive re-transmission attempts increases. Together, exponential backoff and stale caches can degradeperformance significantly. The use of explicit notifications can reduce the time between suc-cessive attempts, however, stale caches will still result in the retransmissions being sent onbroken routes. Thus, it is important to improve route cache accuracy to avoid detrimentalimpact on TCP performance.

9.9 TCP over Ad Hoc Networks

In the previous discussion, we have already considered the impact of route repairlatency, as well as interaction with route caching. In ad hoc networks, TCP performanceis also affected by the number of hops on the wireless route. To understand the impact ofnumber of hops, let us consider routes with various number of hops. We will consider thechain network illustrated in Figure 9.20, where host 1 is the TCP source, and host n is theTCP destination, in case of a chain with n hosts. Assume that IEEE 802.11 DCF (or similar)MAC protocol is being used with half-duplex wireless interfaces, with single interface per

c© 2010 Vaidya 219

Page 232: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

1 2 3 n−1 n

Figure 9.20 A chain topology

host (all hosts being on the same channel). Assume that simultaneous transmissions on twolinks can be successful only if they are separated by at least two hops; links closer than thatpose too much interference to each other leading to packet loss.

Let us start with a chain network with just two hosts (single hop route). In thiscase, the TCP data packets from 1 to 2, and TCP acks from 2 to 1 have to share thewireless channel. Let us now consider the TCP throughput in this case as the baseline forcomparison with longer chains. Now, consider a 2-hop chain (3 hosts). In this case, theTCP packets have to travel from 1 to 3 via host 2. Since host 2 is half-duplex, we caneither have transmission on link 1-2 or link 2-3. This results in degradation in throughputby approximately a factor of 2 when compared to the single hop chain. Note that this effectwill occur for UDP and TCP both, and is not caused by TCP behavior as such. In case of the3 hop chain (with 4 hosts), since links 1-2 and 3-4 are too close to each other, we cannot havesimultaneous successful transmissions on those two links. Effectively, we can only schedulereliable transmissions on any one link at a given time. This degrades throughput by roughlya factor of 3 compared to the baseline single-hop scenario. The interference between links1-2 and 3-4 is sometimes referred to as self-interference, since packets from the same TCPflow transmitted on those two links interfere with each other. In case of the 4-hop network(with 5 hosts), links 1-2 and 4-5 can potentially transmit packets simultaneously. Thus, wedo not anticipate more degradation due to self-interference than that in the 3-hop network.However, the greater number of hops increases the round trip delay, and that degradesthroughput somewhat, since TCP’s congestion window growth is slower with larger RTT.

If the hosts were to be closer to each other, and if interference between links separatedby 3 hops were to result in collisions, then the degradation in throughput due to self-interference will continue up to a 5 hop networks. Clearly, whether the interference is toohigh or not depends on path losses as well as transmission rate and power, but the examplehere illustrates that self-interference phenomenon degrades throughput when number of hopson the route is greater than one.

c© 2010 Vaidya 220

Page 233: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

CHAPTER 10

Capacity of Wireless Networks

Determination of exact capacity region of multi-hop wireless networks is a difficultproblem. Rather than determining the exact capacity region, an alternative approach is todetermine the trend in the capacity as a function of parameters of interest, for instance,the number of nodes in a wireless network, or the number of channels. Such results, whilenot providing exact upper bound on performance, can still yield useful insights on thenetwork behavior, and can potentially help in protocol design. In the rest of this chapter,we consider this alternative approach for capacity analysis of store-and-forward wirelessnetworks wherein nodes may relay information (thus flows may use multi-hop routes).

10.1 Arbitrary Networks

We will first consider a formulation of the wireless network capacity problem [9] in thecontext of arbitrary networks. In the arbitrary network setting, the goal is to characterizethe best possible performance for a network of n nodes. The location of nodes, and trafficpatterns can all be controlled. Since any suitable traffic pattern and node placement can beused, the bounds for this scenario are applicable to any network. Therefore, the arbitrarynetwork bounds may be viewed as the best case bounds on network capacity.

Since we can control the placement of the nodes, one strategy to improve aggregatethroughput of all the nodes in the network may be to place the source-destination pairsvery close to each other, and place each source-destination pair as far away as possible fromthe other source-destination pairs. However, the aggregate throughput measure does notcapture the fact that the information is transmitted between nearby nodes. To account forthe distance, we can instead use a weighted sum of the throughputs, where the throughputof a flow is weighted by the distance between its source and destination. This metric will

c© 2010 Vaidya 221

Page 234: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

have the units bit-meter/second, and is referred to as the transport capacity of arbitrarynetworks.

As noted above, it is difficult to find the exact capacity region. Instead of attemptingto determine the exact capacity, we will obtain expressions that tell us how the capacitychanges with n, particularly when n is large.

We will use the following notation in our discussion:

• O(g(n)) : A function f(n) is said to be O(g(n)) if there exists some constant d andinteger N such that f(n) ≤ d g(n) for n > N . We will also state this as f(n) = O(g(n)).

• Ω(g(n)) : A function f(n) is said to be Ω(g(n)) if g(n) = O(f(n)). We will also statethis as f(n) = Ω(f(n)).

• f(n) = Θ(g(n) if and only if g(n) = O(f(n)) and f(n) = O(g(n)).

In the subsequent sections, we present upper and lower bounds on capacity of arbi-trary networks. The results here are obtained under the assumption that the nodes use thestore-and-forward approach for relaying information. Specifically, if node A relays informa-tion to C via node B, then A must transmit the information to B, B must receive and decodethe information reliably, and then forward to C. More complex strategies for relaying canalso be conceived (for instance, node B may not be able to decode the information correctly,and yet forward it to node C – if node C receives multiple potentially corrupted copies of theinformation along multiple routes, it may still be able to recover the information correctly).We do not consider such complex strategies in our discussion here.

In wireless networks, capacity is limited by the interference between different trans-missions. In the analysis of arbitrary networks, we will use an approximate model to capturethe impact of interference. This model, named the “protocol model” [9] stipulates that atransmission at some rate W from a node i to a node j is successful, if for every othersimultaneously transmitting node k, the following condition holds

d(k, j) ≥ (1 + ∆)d(i, j), ∆ > 0

where d(a, b) is the distance between nodes a and b, and ∆ is a “guard” parameter thatensures that concurrently transmitting nodes are sufficiently farther away from the receiverto prevent excessive interference.

Gupta and Kumar [9] have shown that in an arbitrary network of n nodes, network

transport capacity scales as Θ (W√

n) bit-meters/second.

c© 2010 Vaidya 222

Page 235: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

10.2 Upper Bound on Transport Capacity of Arbitrary

Networks

In an arbitrary network, the location of nodes, and traffic patterns can be controlled.Recall that the network is said to transport one “bit-meter/sec” when one bit has beentransported across a distance of one meter in a second. The bit-meters/sec metric can beviewed as a measure of the “work” that is done by the network in transporting bits.

Assume that n nodes can be located on the surface of a torus of unit area [7, 12].The assumption of a torus enables us to avoid technicalities due to boundary effects, whichmay arise if we assume a square area. However, the results are applicable for a unit squareas well.

In this section, we derive the upper bound on the arbitrary network capacity of anetwork of n nodes as O (W

√n) bit-meters/sec [9]. In our derivation, we assume that the

available bandwidth is used as a single channel. The result, however, also holds when theavailable bandwidth is divided into multiple channels, and each host has as many interfacesas the number of channels, so that each host can potentially use all the available channelssimultaneously.

Assume that the network of n nodes transports a total of λn bits in 1 second. Letthe average distance between source and destination pairs for the bits (averaged over all the

bits) be denoted as L. Then the transport capacity of the network, by definition, is λnLbit-meters/sec.

Consider any time period of length one second. In this time interval, consider a bitb, 1 ≤ b ≤ λn. Assume that bit b traverses h(b) hops on the path from its source to its

destination, where the h-th hop traverses a distance of rhb . Since the distance traversed by

a bit from its source to its destination is at least equal to the length of the line joining thesource and the destination, by summing over all bits we obtain,

λn∑

b=1

h(b)∑

h=1

rhb ≥ λnL (10.1)

Let us define H to be the total number of hops traversed by all bits in a second,

i.e., H =∑λn

b=1 h(b). Therefore, the number of bits transmitted by all nodes in a second(including bits relayed) is equal to H . The total bits that can be transmitted per second by

all the n nodes is at most Wn2

(each transmission requires two nodes, one transmitting and

another receiving). Hence, we have,

H ≤ Wn

2(10.2)

c© 2010 Vaidya 223

Page 236: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Under the protocol model, a transmission over a hop of length r is successful onlyif there is no transmitter within a distance of (1 + ∆)r. Suppose node A is transmitting abit to node B, while node C is simultaneously transmitting a bit to node D, and both thetransmissions are over a common channel. Then, using the interference model, we have

d(C, B) ≥ (1 + ∆)d(A, B)

d(A, D) ≥ (1 + ∆)d(C, D)

The above two inequalities imply that

d(C, B) − d(A, B) ≥ ∆ d(A, B)

d(A, D) − d(C, D) ≥ ∆ d(C, D)

Adding the above two expressions together, we get

d(C, B) − d(C, D) + d(A, D) − d(A, B) ≥ ∆(d(A, B) + d(C, D))

Now, by triangle inequality, we have

d(B, D) + d(C, D) ≥ d(C, B) ⇒ d(B, D) ≥ d(C, B) − d(C, D)

d(B, D) + d(A, B) ≥ d(A, D) ⇒ d(B, D) ≥ d(A, D) − d(A, B)

From the above three inequalities, we can conclude that

2 d(B, D) ≥ d(C, B) − d(C, D) + d(A, D) − d(A, B) ≥ ∆ (d(A, B) + d(C, D))

Thus,

d(B, D) ≥ ∆

2(d(A, B) + d(C, D))

This implies that the receivers of two simultaneous transmissions are separated by adistance proportional to the distance from their senders. This may be viewed as each hop

consuming a disk of radius ∆2

times the length of the hop around each receiver. Since the

area “consumed” on each channel is bounded above by the area of the domain (1 squareunit), we have

λn∑

b=1

h(b)∑

h=1

π∆2(rhb )2

4≤ W (10.3)

Note that the W on the right side is multiplied by the area occupied by the network, whichis 1 square unit. The above inequality can be rewritten as,

λn∑

b=1

h(b)∑

h=1

1

H(rh

b )2 ≤ 4W

π∆2H(10.4)

c© 2010 Vaidya 224

Page 237: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

It can be shown that

λn∑

b=1

h(b)∑

h=1

1

Hrhb

2

≤λn∑

b=1

h(b)∑

h=1

1

H(rh

b )2 (10.5)

(Observe that the left side above is the square of the average of rhb , whereas right side is the

average of (rhb )2.) From (10.4) and (10.5),

λn∑

b=1

h(b)∑

h=1

rhb ≤

4WH

π∆2(10.6)

Substituting for H from (10.2), and using (10.1) we have,

λnL ≤ W

2n

π∆2(10.7)

This proves that the network capacity (λnL) of an arbitrary network is O (W√

n) bit-meters/sec.

10.3 Lower Bound on Transport Capacity of Arbitrary

Networks

In this section, we construct a network to establish a lower bound on the networkcapacity. The order of the lower bound matches that of the upper bound, implying that theorder of the bounds are tight.

Step 1: Consider a torus of unit area. Partition the area into n8

equal-sized square

cells, and place 8 nodes in each cell. Since the total area is 1, each cell has an area of 8n,

and sides of length l =√

8n.

Step 2: The 8 nodes within each cell are placed as shown in Figure 10.1. Nodesplaced at locations S1, S2, S3, S4 act as senders, and nodes placed at remaining locationsact as receivers. The sender locations S1 through S4 are at a distance of r∆ from the centerof the cell (recall that ∆ is the “guard” parameter from the protocol model of interference),

where r = l2(1+2∆)

= 1(1+2∆)

2n. The receiver locations R1 through R4 are at a distance of

r(1 + ∆) from the center of the cell. Therefore, the distance between S1-R1, S2-R2, S3-R3,and S4-R4 is equal to r. Each receiver location is at a distance of r∆ from nearest edge of

c© 2010 Vaidya 225

Page 238: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

S2S1

R3

R4

R2

S4

R1

S3

r r∆ r∆

r(1+ )∆

l = 2 r (1 + 2 )

Figure 10.1 The placement of nodes within a cell

the cell, and each sender location is at a distance of r(1+∆) from the nearest edge of the cell.

Step 3: Consider a pair of communicating nodes A and B that are located at, say,S1 and R1, respectively. Then, the nearest senders within the cell, other than A (located atS1), are located at one of S2, S3, S4, and are at least a distance of r(1 + ∆) away from B(located at R1). Similarly, in every cell, senders are at least r(1 + ∆) distance from the cellboundary. Therefore, senders in adjacent cells of B are at least a distance of r(1 + ∆) awayfrom B as well. Hence, under the protocol model of interference, the transmission betweenA and B is not interfered with by any other transmission in the network, and this propertyholds for all communicating pairs.

From the above construction, there are n2

pairs of nodes, each transmitting at a rate

of W over a distance r = 1(1+2∆)

2n. Hence, the total capacity of the network (summing

over all n nodes) is n2Wr = W

(1+2∆)

n2

bit-meters/sec. Thus, the transport capacity of the

network is Ω (W√

n) bit-meters/sec, since ∆ is a constant.

The upper bound and lower bound on the order of the capacity of arbitrary networksmatch, indicating that the order of the bounds is tight.

c© 2010 Vaidya 226

Page 239: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

10.4 Random Networks

In the random network setting, node locations are independently and uniformly dis-tributed in a unit area. Each node sets up one flow to destination node, chosen as one of theremaining nodes that is closest to a randomly (independently and uniformly distributed)chosen location in the unit area.

The interference in case of random networks is modeled using a protocol model thatis slightly different from that in case of arbitrary networks. In this case, the protocol modeluses a transmission range parameter r, and stipulates that two node i can transmit to nodej reliably at rate W only if for every other simultaneously transmitting node k, the followingconditions holds

d(i, j) ≤ r

d(k, j) ≥ (1 + ∆)r

In the random network model, we do not control the locations of the nodes or theselection of the destinations. Since the destination location is chosen randomly, the averagedistance between source-destination will be of the roughly a constant (more precisely Θ(1)).In this case, taking the distance into account is not as necessary as in the case of the randomnetworks. Keeping this in mind, the capacity metric in this case does not take distance intoconsideration. However, in this case, since we may want reasonable performance for all theflows, we do take into account the lowest throughout achieved over all the n flows. Supposethe lowest throughput among the flows is λ(n). Then the network capacity – referred to asthe throughput capacity – is defined as nλ(n) (measured in bits/second).

Gupta and Kumar [9] have shown that, in a random network, the throughput capacity

scales as Θ(

W√

nlog n

)

bits/second with high probability, as n → ∞. The bounds for random

networks hold with high probability (whp), which means that the probability that the boundshold approaches 1 when n approaches ∞.

10.5 Throughput Capacity of Random Networks

Assume that n nodes are randomly located on the surface of a torus of unit area.Each node selects a destination close to a randomly selected point, to which it sends λ(n)bits/sec. The highest value of λ(n) which can be supported for every source-destinationpair with high probability is defined as the per-node throughput of the network. The trafficbetween a source-destination pair is referred to as a “flow”. Since there are a total of nflows, the throughput capacity of the network is defined to be nλ(n).

c© 2010 Vaidya 227

Page 240: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

The capacity of random networks is constrained by the need to ensure that thenetwork is connected, so that every source-destination pair can successfully communicate.Since node locations are randomly chosen, there is some minimum transmission range eachnode should use to ensure the network is connected. Gupta and Kumar [9] show that

to ensure a connected network the transmission radius r(n) must be at least Ω(

log nn

)

.

Since, as seen earlier, each transmission “occupies” an area proportional to the square ofthe minimum transmission range, the minimum transmission range required for connectivityleads to a bound on the number of simultaneous transmissions that can occur in the network.In this section, we present a somewhat informal argument to show this bound.

10.5.1 Upper Bound (Informal Argument)

Suppose that the average distance between each source-destination pair is L, andtransmission range used for each transmission is r(n). The average number of hops on theroute hops on the route taken by each flow will be inversely proportional to r(n), say, L/r(n)for some L. Thus, the aggregate throughput over all links in the network will be given by

Lr(n)

n λ(n). Recall that each link occupies area π∆2r2(n)/4. Thus, we have that

L

r(n)

π∆2r2(n)

4n λ(n) ≤ W

where the W on the right side is multiplied by 1 square unit area of the torus. Thus,

λ(n) ≤ 4W

Lπ∆2 n r(n)

Since r(n) is Ω(

log nn

)

, it follows that

λ(n) ≤ W k1√

n log n

for some constant k that does not depend on ∆ or W . In other words, λ(n) is O(

W 1√n log n

)

bits/sec. When aggregated over the n nodes, the network capacity is given by nλ(n) or

O(

W√

nlog n

)

bits/sec.

This bound is applicable to multi-channel networks as well, wherein the availablebandwidth W is divided into multiple channels, and each host has one interface operatingon each of the channels.

c© 2010 Vaidya 228

Page 241: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

D

S

P

Figure 10.2 Straight-line routing: Packets from a flow are first routed via nodes in cellsthat are intersected by the straight line segment joining the source (node S in the figure)and the pseudo-destination (point P in the figure) for that flow. Once a packet reaches thecell containing the pseudo-destination, it is then transmitted to the destination node D ona single additional hop. Within each cell along the straight-line route, any node may bechosen for forwarding the packets of a flow.

10.5.2 Lower Bound Construction

The lower bound is established by constructing a routing scheme and a transmissionschedule for any random network. The order of the lower bound matches that of the upperbound implying that these bounds are tight (in the order).

Cell construction:

The surface of the unit torus is divided using a square grid into square cells (see

Figure 10.2), each of area a(n) [7]. In particular, let a(n) = 100 log nn

.

The lemma below provides a bound for the number of nodes that are present in eachcell [7].

Lemma 1 If a(n) > 50 log nn

, then each cell has Θ (na(n)) nodes per cell, with high probability.

By the above cell construction, we have a(n) = 100 log nn

. Thus, with our choice of

a(n), Lemma 1 holds, and each cell has Θ (na(n)) nodes per cell, with high probability, as

c© 2010 Vaidya 229

Page 242: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

n approaches ∞.Thus, each cell contains a non-zero number of nodes with high probability.

The transmission range of each node, r(n), is set to be√

8a(n). A node may only

communicate with nodes within its transmission range. With the chosen transmission range,a node in one cell can communicate with any node in its eight neighboring cells. Note that

for the chosen a(n) we have r(n) =√

800 log n/n.

A transmission originating from a node S interferes with another transmission fromA to B, only if S is within a distance of (1 + ∆)r(n) of receiver B (based on the protocolmodel). Since the distance between A and B is at most r(n), the distance between thetwo transmitters, S and A, must be less than (2 + ∆)r(n) if the transmissions were tointerfere. Thus, any transmission can possibly interfere with only those transmissions fromtransmitters within a distance of (2 + ∆)r(n). Therefore, nodes in a cell can be interferedwith by transmissions from only the nodes in cells within a distance of (2+∆)r(n), and thisinterfering area is contained within a larger square of side 3(2 + ∆)r(n). Therefore, since

r(n) =√

8a(n), there are at most (3(2+∆)r(n))2

a(n)= 72(2 + ∆)2 interfering cells. Observe that

the number of interfering cells, c1, is upper bounded by a constant 72(2 + ∆)2 that dependson ∆ but not on a(n) or n.

Routing Scheme:

Packets are routed through the cells that lie along the straight line joining the sourceand the pseudo-destination. Recall that the destination is another node closest to the pseudo-destination (the pseudo-destination is just a randomly chosen point in the unit area). Anynode in each cell traversed by the straight line is used to relay (or forward) traffic belongingto that flow. Figure 10.2 shows an example of the cells used to route data for a flow betweensource S and destination D: recall that destination node D is chosen as another node closestto a randomly chosen pseudo-destination (point P in the figure). Once a packet reaches anode in the cell containing the pseudo-destination P, that node forwards the packet tothe destination node D. Since each cell contains at least one node with high probability,the destination node will either be in the cell containing the pseudo-destination itself or aneighboring cell. Thus, with one additional hop beyond the straight-line route, the packetcan be delivered to the destination node. It can be shown that the maximum number ofsuch routes that pass through any specific cell (including routes originating and terminating

in the cell) is O(

n√

a(n))

, with high probability [7].

Scheduling Transmissions:

A transmission schedule for each node in the network must satisfy the constraintthat any two simultaneous transmissions do not interfere with each other (as specified bythe protocol model).

c© 2010 Vaidya 230

Page 243: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Recall that transmission from a node in a given cell only interferes with transmissionfrom a node in at most c1 other cells. If we construct an “interference graph” where twocells are connected by an edge only if transmissions from nodes in that cell may interferewith each other, then the maximum degree of such a graph would be c1. It is possible tonode color this graph using c1 + 1 colors numbered 0 through c1 (node coloring implies thatno two adjacent nodes in the interference graph are assigned the same color). Suppose thatwe divide a 1 second interval into c1 + 1 time slots numbered 0 through c1. Also, let usrequire that a transmission from a node in a cell with color i can be performed only duringslot i. The slot duration is 1/(c1 + 1), which is independent of n, since c1 is independent ofn. With this choice of slot assignment to cells, nodes in interfering cells will not transmitsimultaneously.

Recall that O(n√

a(n)) routes go through any given cell. Suppose that we divide each

slot of 1/(c1 +1) duration into O(n√

a(n)) mini-slots of duration Ω(

1c1+1

1

n√

a(n)

)

, such that

each flow routed via a cell can be assigned one mini-slot in each chosen slot. In particular,during the slot in which a cell is scheduled to transmit (by the coloring scheme above), we use

one mini-slot for each of the O(n√

a(n)) flows going through that cell. Consequently, each

link on the route used for each flow is scheduled to transmit for duration Ω(

1c1+1

1

n√

a(n)

)

within each 1 second interval. Hence each flow achieves throughput of Ω(

W 1c1+1

1

n√

a(n)

)

.

By replacing a(n) by 100 logn/n, we have that the per-flow throughput is

λ(n) = Ω

(

W1

c1 + 1

1√100 n log n

)

In other words, λ(n) is Ω(

W 1√n log n

)

. Aggregating over the n nodes, the throughput

capacity obtained using the above construction is

nλ(n) = Ω

(

W

n

log n

)

10.5.3 Impact of Area Scaling

In deriving the above results, we assumed that the nodes occupy a unit area. Insteadsuppose that the nodes occupy area A. In this case, the result for throughput capacityof random networks remains unchanged, since the throughput capacity does not explicitlyaccount for the distance traversed by the flows. However, in case of arbitrary networks,if the area is changed to A from 1, then this amounts to scaling of distances between the

c© 2010 Vaidya 231

Page 244: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

nodes in the network by a factor of√

A. Correspondingly, the transport capacity of arbitrary

networks scales as Θ(W√

An) bit-meter/second.

10.6 Impact of Channelization

In the proof of the capacity result presented above, we assumed that all the availablebandwidth is used as a single channel. When a node transmits, it uses all the availablebandwidth. In general, the available bandwidth may be divided into multiple channels, say,c channels. The results presented above are also applicable to the case when each node isequipped with c wireless interfaces, so that each host can potentially use all the available cchannels simultaneously. What if the number of interfaces available at the hosts is smallerthan the number of available channels? This is a common scenario today, for instance,when the hosts use IEEE 802.11. Multiple channels are available to the wireless devices,however, each interface can use only one of the channels at any given time, and the numberof interfaces available to each host is usually small (often just one or two). In such situations,the above capacity results are not always applicable [12].

In this section, we will review the results on the capacity of wireless networks withchannelization. Channelization of the available bandwidth may be used in practice forvariety of reasons.

• Contention reduction: Suppose that in an office building there are 200 wireless devices,and also that the available spectrum is used as a single channel using a “randomaccess” protocol. In this case, up to 200 devices will be competing for access to thewireless channel. However, if we divide the available spectrum into 10 channels, andassign 20 hosts to each of the channels, then only 20 hosts may compete to transmiton any one channel. A smaller number of hosts competing for a channel tends toreduce the overhead of channel contention resolution. Similarly, the use of channelscan make it easier to manage the “spatial reuse” of the wireless channel in cellular orinfrastructure-based networks.

With channelization, since each channel uses smaller bandwidth than the “un-channelized”system, the transmission rate with channelization will be lower. Despite this, perfor-mance of the network as a whole can be greater, since multiple transmissions canoccur simultaneously utilizing all the available spectrum, while reducing the channelcontention overhead.

In practice, there is also some loss of available spectrum due to “guard bands” betweenadjacent channels. The guard bands represent small parts of the spectrum that areleft unused to provide better separation between adjacent channels.

c© 2010 Vaidya 232

Page 245: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• Device complexity: Suppose we have the choice of using the available spectrum as asingle 1 GHz channel, or twenty 50 MHz channels (thus the aggregate bandwidth with20 channels is also 1 GHz). Suppose that the transmit rate is linearly proportional tothe bandwidth used for a channel. In the first case, when an interface uses the 1 GHzchannel it will have to transmit/receive at a much higher rate than the second case.This can potentially lead to a greater device complexity and cost than the lower ratedevice that can be used with the narrower channels.

• Bandwidth-independent overhead: Networking protocols incur overheads that can bedivided into two categories: bandwidth-dependent overheads and bandwidth-independentoverhead. The time spent on bandwidth-dependent (or rate-dependent) overheads isa function of the transmit rate used for transmissions. For instance, if the header ofa packet contains 200 bits, then the time spent on transmitting the header will besmaller if a higher transmission rate is used. However, the time spent on bandwidth-independent (or rate-independent) overhead does not depend on the transmission ratechosen.

For instance, consider the case when node S sends a data packet to node D, and nodeD responds with an Acknowledgement (Ack). How much time will be required for thistransaction to complete? The total time required includes the transmission time for thedata (of size DATA bits) and the Ack (of size ACK bits), as well as the propagationdelay (τ second) for the data and the Ack. Clearly, the transmission time will dependon the transmission rate (R bits/second), but the propagation delay is independentof the rate. If we ignore all other potential overheads, then the throughput of such aprotocol will be given by

T =DATA/R

(DATA + ACK)/R + 2τ× R =

DATA × R

DATA + ACK + 2τR

Let us define efficiency as the ratio of throughput T and the transmission rate R.

efficiency =T

R=

DATA

DATA + ACK + 2τR

The curves in Figure 10.3(a) and (b) labeled c = 1 plot throughput and efficiency forthe single channel scenario, as a function of rate R, assuming that data and Ack packetscontain 4000 and 100 bits respectively, and τ = 1 microsecond (propagation time isdetermined by the distance between the transmitter and the receiver and the speed oflight). Observe that, as the rate R increases, while the throughput also increases, theefficiency decreases. With increasing rate R, with fixed packet sizes, the time spent ontransmitting the data and Ack, (DATA + ACK)/R, reduces, however the time lostdue to propagation delay 2τ remains unchanged. Thus, with increasing transmissionrate, an increasing fraction of time is lost due to the propagation delay. Thus, the

c© 2010 Vaidya 233

Page 246: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

efficiency of channel usage – defined as the fraction of time devoted to transmittingdata – decreases with increasing R. It should be easy to see from the above equationsthat the efficiency approaches 0, and the throughput approaches DATA/(2τ), whenrate R → ∞.

Now suppose that we divide the available bandwidth into c channels, each channelsupporting rate R/c, and simultaneously use all the available channels for transmittingdata. In this case, the aggregate throughput over all the channels will be obtained as

T = c × DATA/(R/c)

(DATA + ACK)/(R/c) + 2τ× (R/c) =

DATA × R

DATA + ACK + 2τ(R/c)

and the efficiency is obtained as T/R. Figure 10.3 plots the aggregate throughputand efficiency as a function of aggregate transmission rate R and number of channelsc. As seen in the figure, due the presence of the bandwidth-independent overhead,the efficiency and throughput improve with increasing c. One approach for mitigatingthe loss of efficiency at higher rates is to transmit larger packets when rate is higher.However, in practice, this is not always possible, since a given node may not have toomany packets pending for a given neighbor at any time.

The above example illustrating the benefits of channelization is somewhat simplisticin that the overheads associated with channelization are ignored. In general, insteadof the performance improving monotonically with c, the optimal performance mightbe optimized at some finite value of c larger than 1.

0

1e+09

2e+09

3e+09

4e+09

5e+09

6e+09

7e+09

0 2e+09 4e+09 6e+09 8e+09 1e+10

bits

/sec

ond

Rate (bits/second)

Throughput c = 1Throughput c = 2Throughput c = 4

Throughput c = 10

(a) Throughput

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 2e+09 4e+09 6e+09 8e+09 1e+10

Eff

icie

ncy

Rate (bits/second)

Efficiency c = 1Efficiency c = 2Efficiency c = 4

Efficiency c = 10

(b) Efficiency

Figure 10.3 Impact of channelization on performance

The above example was simplified in that we assumed that all the channels can beused simultaneously in the given network, and we implicitly assumed single-hop flows. Ingeneral, as we have seen previously, the routes used for the flows may need to include multiple

c© 2010 Vaidya 234

Page 247: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

hops in order to maximize the performance. Also, the number of interfaces, say m, on agiven nodes may be smaller than the number of channels c, making it impossible for a singlehost to use all the channels simultaneously. Thus, the capacity of the wireless network inthis case depends on both the number of channels c, and the number of channels a singlehost may use simultaneously (say, m).

Suppose that each host is equipped with just one interface. Then a given host canonly use one channel at any given time. But if there are a sufficiently large number of nodesin its “neighborhood” then they can use the remaining channels. In other words, so long aswe have a sufficiently dense network, the nodes can collectively use the available channels,even if a single node cannot use them all at the same time. However, when we have a largenumber of channels, we cannot use the channels as effectively. In particular, when we havetoo many channels (that is, large c), we run into an interface bottleneck. With n nodes in thenetwork, each with m interfaces, we cannot use more than nm/2 channels at any given time,leaving c − nm/2 channels idle. Thus, at some point, increasing the number of channelssimply amounts to throwing away more spectrum.

The interface bottleneck may also affect routing decisions, as we now illustrate. Sup-pose that we have two flows in the network A to B, and C to D. Also suppose that we wantto use 2-hop routes for these flows, with two alternative intermediate nodes E and F. Eachhost is equipped with 1 interface, and the available spectrum is divided into 2 channels.Also assume that, for all practical purposes, nodes E and F are exactly at the same loca-tion, and experience identical channel conditions. Now consider the two alternative routingsshown in Figure 10.4; in both cases, flow A-to-B is routed via E. However, in Figure 10.4(a),flow C-to-D is routed via E, but via F in Figure 10.4(b). The numbers shown on the linksrepresent the channel to be used on the corresponding link. Thus, different channels arebeing used for the two flows. Although the channels used in both figures are identical, theperformance in figure (b) is likely to be better. In figure (a), although node E can use twochannels, it only has one interface, so it can only use one channel at any given time, limitedby the interface constraint. In figure (b) on the other hand, since nodes E and F togetherhave two interfaces, they can collectively use the two channels simultaneously. To facilitatethe performance improvement, as in figure (b), the routing protocol must prefer routes thatbalance the load across the nodes, even if the nodes are in each other’s vicinity.

In designing practical protocols, other issues also need to be addressed, particularlythe channel switching delay (that is, the delay incurred when a wireless interface switchesits channel).

c© 2010 Vaidya 235

Page 248: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

10.7 Impact of Infrastructure on Capacity

In our analysis of wireless capacity so far, we have assumed that only the wirelesschannel must be used to transmit information. What if we have a hybrid network in whichsome of the nodes had access to a wired network? Suppose that some of the hosts act asaccess points, and the access points are connected to each other by a separate high-speedwired network that is not the performance bottleneck. Thus, in the hybrid network, theinformation can be transmitted on the wireless channel or the wired network connecting theaccess point. The wired network has the benefit of being able to transmit the informationbetween potentially distant access points, without having to use the wireless resources. Thus,intuition suggests that the availability of the access points should help improve performance.This intuition is indeed accurate, as capacity results for infrastructure-based networks haveshown.

10.8 Capacity with Mobility

In our previous discussion, we have implicitly assumed that the hosts are fixed. Ifthe hosts were to be mobile, can we improve performance? A hint at the answer comes fromthe above discussion of hybrid networks. In hybrid networks, we can improve performanceby utilizing the wired network when appropriate: these transmissions can move data acrossthe network without using the wireless channel. Can we exploit mobility to the same end?For instance, if the source and destination nodes periodically come close to each other, wecould simply wait for this to occur, and the have the source transmit the information tothe destination (instead of using a multi-hop wireless route as in our prior discussion). Ithas been shown that under certain assumptions about host mobility, it is indeed possibleto improve capacity by exploiting mobility, although the above strategy of waiting until thedestination comes close to the sender does not yield the optimal performance.

We briefly discuss a strategy to exploit mobility informally, omitting some importantmathematical details. Let us consider a “random” mobility model such that that each nodecomes close to each of the other nodes equally frequently. Suppose that the time is dividedin slots, such that a slot duration is sufficient to transmit one packet from any host to itsnearest neighbor. In each slot, a source host transmits one packet to its nearest neighbor.If this neighbor is the intended destination of the packet, then no more forwarding of thepacket is needed. If, however, the recipient of the packet is not the intended destination, thenthe recipient waits until it finds the destination as its nearest neighbor, and then transmitsthe packet to the destination. Thus, each packet is forwarded over at most two hops (nopacket traverse more than two hops). This strategy results in all nodes “carrying” roughly1/n fraction of the packets for each flow. Each such node will find each destination node

c© 2010 Vaidya 236

Page 249: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

as its closest neighbor 1/n fraction of the time, allowing enough time for the packets to bedelivered to their destinations. One important detail that we have ignored is that for eachtransmission, one node must be a receiver. To address this issue, in each time slot, we canrandomly choose half the nodes as transmitters, and have them pick the nearest node amongthe remaining half of the nodes as the receiver.

While the above approach has the benefit of improving per-flow throughput capacityof the wireless network to Θ(1), it has the disadvantage of significantly increasing the delayin delivery of the information.

A

B

C

D

E

F

A

B

C

D

EF

(a) (b)

Figure 10.4 Alleviating interface bottleneck

c© 2010 Vaidya 237

Page 250: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

APPENDIX A

Error Control Codes

As discussed in Section 2.2.4, error control codes are useful at different layers of theprotocol stack, to perform error detection and error correction. For instance, as elaboratedin Section 2.4, a receiver demodulates the received signal to obtain a sequence of bits asan estimate of the transmitted bit sequence. Let us refer to the demodulated bits as thereceived bits. As also seen in Section 2.4, due to the noise (or interference), the receivedbits may be erroneous. For instance, the transmitted bits may be 0111 whereas the receivedbits may be 0110. Unless additional precautions are taken, the receiver will not be able torecover the correct data. In fact, the receiver may not even detect that the received bitsare in error. To allow a receiver to detect the errors, and possibly correct the errors, someredundancy must be incorporated in the transmitted bits. Error control codes (ECC) areused for this purpose.

For the purpose of illustration, Let us consider a simple error control code, whichis an example of a family called the Hamming codes. The coding process for this examplecode is illustrated in Table A.1. In this case, the sender encodes 4 bits of data into a 7-bitcodeword, and the code is said to be a (7,4) code. For instance, when the four data bits are

0010, the codeword is 0010 111. The rate of the code is 47, since on average 4

7bits of data is

encoded in each bit transmitted on the channel.

If the transmitter wants to send more than four bits while using the (7,4) Hammingcode, then the transmitted bits are divided into block of four bits each, and each blockencoded separately using the Hamming code. Similarly, at the receiver, the receiver willdecode each received vector independently.

The 3 bits added during the encoding process are called checkbits. The redundantinformation encoded in the checkbits can be useful to correct errors. In fact, with this code,any single bit error can be corrected. The algorithm for error correction is quite simple:when a vector v is received (possibly containing an error), choose the codeword u fromTable A.1 that differs from v in the fewest number of bits. The first four bits of u will be

c© 2010 Vaidya 238

Page 251: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

the output of the decoder at the receiver. The number of bits in which v and u differ is saidto be the hamming distance between v and u.

The Hamming code has the interesting property that, if at most one transmitted bitbecomes erroneous, then two conditions hold: (a) the transmitted codeword differs from thereceived vector in 1 bit, (b) all other codewords differ from the received vector in more than1 bit. These conditions guarantee that, if at most one bit in the codeword is erroneous,the above decoder will choose the codeword u, and the decoded data will be correct. Forinstance, suppose that the transmitted codeword is 0010 111 and the most significant bit iscorrupted during transmission, such that the received vector is 1010 111. Observe that thetransmitted codeword is, in fact, the closest codeword. In particular, the received vectordiffers only in one bit from the transmitted codeword, and at least in 2 bit positions fromevery other codeword. Thus, the single transmission error can be corrected by assumingthat the codeword closest to the received vector is the correct codeword.

How does error correction help in improving reliability of transmission? Supposethat our “packet” contains 4 bits of data, and suppose that bit error probability is p. Ifwe do not use any error control code, then the probability that the 4 bit data packet willbe received unreliably is given by 1 − (1 − p)4. If p = 10−3 then the packet unreliability is

1 − (1 − p)4 = 0.004. On the other hand, if we use the (7,3) single-error correcting (SEC)

code, then the packet unreliability is given by 1 − (1 − p)7 − 7p(1 − p)6 = 0.00002. Clearly,the use of error correcting code can improve reliability of transmissions.

While the above Hamming code can correct single bit errors, it cannot correct twoerrors. For instance, assume that the transmitted codeword is 0010 111, and that the twomost significant received bits are erroneous. Thus the received vector will be 1110 111,which will be decoded to the closest codeword 1111 111, with the decoded data being 1111.Clearly, in this case, the decoded data is erroneous. The receiver will use decoded data 1111without realizing that the data is incorrect. In general, which error patterns can be correcteddepends on the set of codewords used. More redundancy generally allows the decoder tocorrect more errors.

It is also possible to design codes that allow the receiver to correct some of the errors,and detect a larger class of errors. For instance, Table A.2 shows an (8,4) code obtainedby adding an even parity bit to the codewords in the (7,4) code in Table A.1. In this code,any pair of codewords differs in at least 4 bit positions. This property can be exploited todesign a decoding algorithm that can obtain the correct codeword if at most 1 received bit iserroneous, and detect the presence of 2 erroneous bits. Thus, the code is said to be a singleerror-correcting double error-detecting (SEC-DED) code. In particular, here is the decodingalgorithm to be applied to received vector v:

• If a codeword u differs from v in at most 1 bit position, assume that u is the transmittedcodeword.

c© 2010 Vaidya 239

Page 252: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Data Codeword

0000 0000 0000001 0001 0110010 0010 1110011 0011 1000100 0100 1100101 0101 1010110 0110 0010111 0111 0101000 1000 1011001 1001 1101010 1010 0101011 1011 0011100 1100 0111101 1101 0001110 1110 1001111 1111 111

Figure A.1 (7,4) Hamming code

• If all codewords differ from v in at least two bit positions, then declare that more than1 received bit is erroneous. In this case, the receiver will reject the received vector,and not produce any decoded data.

The (8,4) code includes greater redundancy than the (7,4) code, and the (8,4) code improveson the (7,4) code by being able to detect two errors. But the new code still cannot correctmore than one error. Also, the above algorithm can result in incorrect outcome if more thantwo errors exist in the received vector.

For a given code, we can trade-off its ability to correct errors with its ability to detecterrors. In particular, again consider the (8,4) code. We used it above as a SEC-DED code.Instead, we can also use the code to perform only error detection. In this case, we will notattempt to perform any error correction, but as a trade-off, we will now be able to detectup to 3 errors. The decoding algorithm for this purpose is simple: (a) if the received vectoris identical to a codeword, decode to this codeword, (b) else declare that the received vectoris erroneous.

The above simple examples make three important points:

• The ability to detect and correct errors is a function of the redundancy incorporatedin the code. A greater capability requires greater levels of redundancy.

c© 2010 Vaidya 240

Page 253: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

Data Codeword

0000 0000 00000001 0001 01110010 0010 11100011 0011 10010100 0100 11010101 0101 10100110 0110 00110111 0111 01001000 1000 10111001 1001 11001010 1010 01011011 1011 00101100 1100 01101101 1101 00011110 1110 10011111 1111 1111

Figure A.2 (8,4) Single error-correcting, double error-detecting code

c© 2010 Vaidya 241

Page 254: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

• The ability to detect errors and correct errors can be traded with each other. Witha given level of redundancy, in order to be able to improve the probability of errordetection, we have to be willing to accept a lower probability of obtaining correctdecoded data.

• No error control code can correct an arbitrary set of errors. Similarly, no useful errorcontrol code can detect an arbitrary set of errors.

The last observation above has led to the use of error control codes (ECC) at various levels ofthe protocol stack. In particular, while the higher layers of the protocol stack benefit fromthe error control capabilities incorporated at the lowers layers, the higher layers usuallyinclude some error detection and/or correction capabilities as well, to protect against thepossibility that the lower layer error control may fail. We discuss some examples:

• The IEEE 802.11a physical layer uses a convolutional code to perform error correction.As noted earlier, some errors patterns in the received bits may result in incorrectdecoding. Thus, the higher layers need to use additional error protection.

• The IEEE 802.11 MAC header includes cyclic redundancy check, which can be usedto detect some errors in a MAC layer frame.

• Despite the use of error correction and detection mechanisms at the physical andlink layers, the packets received by the network layer (IP) may still contain errors.In addition, errors may also be inserted into a packet due to hardware failure (forinstance, due to memory corruption in a buffer at a router). To facilitate detectionof such errors, IP uses a header checksum in each IP header. This checksum onlyallows detection of errors in the IP header, offering no protection to the data in an IPdatagram. If errors are detected in the IP header, the datagram is discarded – thisevent is perceived as a packet loss by the higher layers.

• TCP header also contains a checksum that covers the TCP header as well as the data ina TCP segment. This checksum is used only for error detection. If errors are detectedin the TCP segment, the segment is discarded, and this event is viewed as a packetloss by the TCP receiver.

• The ultimate responsibility for achieving reliability rests at the application layer.Therefore, many applications incorporate additional application-layer mechanisms toachieve the desired level of reliability. For instance, consider an application that needsto transmit data reliably from source computer A to computer B. This goal may pos-sibly be achieved by using a TCP connection between A and B, by relying on TCP’sretransmission mechanism. An alternative is to use a UDP connection from A to B. Inthis case, however, some of the packets sent by A may be lost, either due to detectionof errors at the lower layers (for instance, using the IP checksum), or due to buffer

c© 2010 Vaidya 242

Page 255: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

overflow at an intermediate host. To allow recovery of the data despite such packetlosses, the sender host A can send the data packets, followed by redundant packetsobtained as a function of the data packets. If the redundant packets are designed cor-rectly, then after a sufficient number of redundant packet transmissions, the recipientcan recover all the data packets, despite the loss of a small number of such packets.

Despite the use of error control codes at the various layers of the protocol stack, there isalways a non-zero probability that some errors may escape detection by all the error controlmechanisms. In practice, this probability can be made small enough by using adequateredundancy at the different layers of the protocol stack.

c© 2010 Vaidya 243

Page 256: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

APPENDIX B

Frequency-Domain Representation of Signals

The frequency-domain representation discussed here associates complex “weights”corresponding to each frequency component in the signal. Therefore, we begin this sectionwith a brief discussion of complex numbers. A complex number has two parts: real andimaginary. For instance, in the complex number a + jb, a is the real part and b is the

imaginary part. j represents√−1 (the imaginary unit). Complex number a + jb can be

represented on a two-dimensional graph as depicted in Figure B.1(a), where the horizontalaxis corresponds to the real part of the complex number, and the vertical axis correspondsto the imaginary part. An alternative representation for a + jb is using a vector pointingfrom the origin to a + jb, as shown in Figure B.1(b). Let φ denote the angle made by thisvector with the positive direction of the horizontal axis, and let m denote the length of thevector. m and φ are the magnitude and phase of the vector, respectively. It follows that

m =√

a2 + b2

a = m cos φ

b = m sin φ

a + jb = m(cos φ + j sin φ)

Euler’s formula tells us that cosφ + j sin φ = ejφ. Thus,

a + jb = mejφ

Now, what if φ is a function of time? Specifically, let us consider

mej(2πft+θ)

where t represents time, and m represents magnitude (thus, t and m are both non-negative).f and θ are constants, whose significance should become clearer soon. Recall that

mej(2πft+θ) = m cos(2πft + θ) + jm sin(2πft + θ)

c© 2010 Vaidya 244

Page 257: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

The vector representation for mej(2πft+θ) will consist of a vector of length m making an angleof 2πft + θ with the horizontal axis. The vector at time t = 0 is shown in Figure B.1(c),

assuming that θ = −π/4. Figure B.1(d) depicts the vector at time t = 14f

, when f is positive,

and Figure B.1(e) depicts the vector at time t = −14f

, when f is negative.

You should try this for other values of time t. It should be clear that the vectorrotates counter-clockwise with increasing time when f is positive, and clockwise when f isnegative. The vector rotates one full circle for each time interval of duration 1/|f |, thusrotating |f | times per second. We will refer to f as the frequency – thus, the frequency canalso be negative.

φ

(c)

m

π/4

(c)

(d) (e)

(a)

a+jb a+jb

m

π/4

m

a a

b b

π/4m

Figure B.1 Vector representation of complex numbers

Euler’s formula implies that j = ej π

2 , −j = ej 3π

2 , and

sin(2πft) =j

2e−j2πft − j

2ej2πft

c© 2010 Vaidya 245

Page 258: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

cos(2πft) can be represented similar to the sin function above. Specifically,

cos(2πft) =1

2e−j2πft +

1

2ej2πft

Then it follows that any signal that can be represented as a linear combination of sin andcos functions of time can also be represented as a linear combination of terms of the formej2πft. For instance, function

h(t) = sin(2πf0t + φ0) + cos(2πf1t + φ1)

can be represented as

h(t) =[

j

2ej(−2πf0t−φ0) − j

2ej(2πf0t+φ0)

]

+[

1

2ej(−2πf1t−φ1) +

1

2ej(2πf1t+φ1)

]

(B.1)

= H(−f0) ej2π(−f0)t + H(f0) ej2πf0t + H(−f1) ej2π(−f1)t + H(f1) ej2πf1t (B.2)

where H(−f0) = j2e−jφ0, H(f0) = − j

2ejφ0, H(−f1) = 1

2e−jφ1, and H(f1) = 1

2ejφ1. This is said

to be a frequency-domain representation of the signal. Observe that the H(f) coefficientsabove are complex numbers (in other cases, the coefficients may also be real numbers). Notethat frequency f in H(f) may be negative or non-negative. The coefficients H(f) above are“weights” that determine the contribution of frequency f to the function h(t).

While the above approach of representing a function of time as a discrete sum ofterms of the form H(f) ej2πft suffices for some signals, the methodology can be generalizedto obtain frequency-domain representation for a larger class of signals. This approach,namely Fourier Transform, is quite useful in digital signal processing. Fourier transform ofa signal is a way of representing the manner in which the signal “occupies” the frequencyspectrum. Specifically, if X(f) is the Fourier transform of a signal x(t), then x(t) can beobtained using the following inverse Fourier transform operation:

x(t) =∫ +∞

−∞X(f)ej2πft df (B.3)

f in X(f) denotes frequency, and t in x(t) denotes time. Thus, X(f) is the frequency-domainrepresentation of a signal, and x(t) is the time-domain representation of the same signal. Ingeneral, Fourier transform X(f) may be a complex number. f may be positive or negative.

Notice that the simple addition of the terms of the form H(f) ej2πft in Equation B.2 hasbeen replaced by an integral in Equation B.3.

c© 2010 Vaidya 246

Page 259: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

REFERENCES

[1] N. Abramson, “The ALOHA system - another alternative for computer communica-tion,” in 1970 Fall Joint Computing Conference Proceedings, pp. 281–285, 1970.

[2] S. V. Adve, Designing Memory Consistency Models for Shared-Memory Multiprocessors.PhD thesis, University of Wisconsin-Madison, December 1993.

[3] A. Chandra, V. Gummalla, and J. O. Limb, “Wireless medium access control protocols,”IEEE Communications Surveys, 2000.

[4] Y. Chen and J. L. Welch, Texas A&M University. Personal communication, October2005.

[5] T. Clausen and P. Jacquet, “Optimized Link State Routing Protocol (OLSR),” RFC3626, IETF, October 2003.

[6] R. Droms, “Dynamic host configuration protocol,” Tech. Rep. RFC 2131, IETF Net-work Working Group, March 1997.

[7] A. E. Gamal, J. Mammen, B. Prabhakar, and D. Shah, “Throughput-delay trade-off inwireless networks,” in INFOCOM, 2004.

[8] L. Georgiadis, M. Neely, and L. Tassiulas, “Resouce allocation and cross layer controlin wireless networks,” Foundations and Trends in Networking, vol. 1, 2006.

[9] P. Gupta and P. R. Kumar, “The capacity of wireless networks,” IEEE Transactionson Information Theory, vol. 46, pp. 388–404, March 2000.

[10] IEEE, “IEEE std. 802.11 - wireless LAN medium access control (MAC) and physicallayer (PHY) specifications,” 1999.

[11] D. Johnson and D. Maltz, “Dynamic Source Routing in Ad Hoc Wireless Networks,” inMobile Computing (Imielinski and Korth, eds.), vol. 353, Kluwer Academic Publishers,1996.

c© 2010 Vaidya 247

Page 260: ECE/CS 439 Wireless Networks University of Illinois at ...ECE/CS 439 Wireless Networks University of Illinois at Urbana-Champaign ... c 2010 Vaidya ii. ... c 2010 Vaidya v.disc.ece.illinois.edu/downloads/vaidya-wireless-classnotes.pdf ·

[12] P. Kyasanur and N. H. Vaidya, “Capacity of multi-channel wireless networks: Impactof number of channels and interfaces,” in ACM MobiCom, August-September 2005.

[13] M. Miller, W. List, and N. H. Vaidya, “A hybrid network implementation to extendinfrastructure reach,” tech. rep., Univ. of Illinois at Urbana-Champaign, January 2003.

[14] J. P. Monks, V. Bharghavan, and W. Hwu, “A power controlled multiple access protocolfor wireless packet networks,” in INFOCOM 2001, April 2001.

[15] S. Nesargi and R. Prakash, “MANETconf: Configuration of hosts in a mobile ad hocnetwork,” in INFOCOM, 2002.

[16] C. Perkins and E. Royer, “Ad-Hoc On-Demand Distance Vector Routing,” in Proceed-ings of the 2nd IEEE Workshop on Mobile Computing Systems and Applications, 1999.

[17] C. E. Perkins, E. M. Royer, and S. R. Das, “IP address autoconfiguration for ad hoc net-works,” July 2000. Internet Draft, IETF Working Group MANET (Work in Progress).

[18] C. E. Perkins and P. Bhagwat, “Highly dynamic destination-sequenced distance-vectorrouting for mobile computers,” in ACM SIGCOMM Symposium on Communication,Architectures and Protocols, 1994.

[19] J. G. Proakis and M. Salehi, Communication Systems Engineering. Prentice-Hall, 2002.

[20] C. Santivnez, R. Ramanathan, and I. Stavrakakis, “Making link-state routing scale forad hoc networks,” in ACM MobiHoc, 2001.

[21] F. A. Tobagi and L. Kleinrock, “Packet switching in radio channels: Part ii - the hiddenterminal problem in carrier sense multiple-access modes and the busy-tone solution,”IEEE Transactions on Communications, vol. COM-23, no. 12, pp. 1417–1433, 1975.

[22] D. Tse and P. Viswanath, Fundamentals of Wireless Communication. Cambridge Press,2005.

[23] N. H. Vaidya, “Weak duplicate address detection in mobile ad hoc networks,” in ACMSymposium on Mobile Ad Hoc Networking and Computing, 2002.

[24] X. Yang, Efficient Packet Scheduling in Wireless Multihop Networks. PhD thesis, ECEDepartment, University of Illinois at Urbana-Champaign, 2005 December.

[25] X. Yang and N. H. Vaidya, “Priority scheduling in wireless ad hoc networks,” in ACMMobiHoc, 2002.

[26] R. Yates, “A framework for uplink power control in cellular radio systems,” IEEE J.Sel. Areas Commun., September 1995.

c© 2010 Vaidya 248