Networks Lecture 22

Wireless Networks

Wireless networks are increasingly common for local area networks (LANs). They are usually constructed by deploying access points. Access points have two main purposes:

  1. connect the hosts in the wireless network to the outside world, by acting as a bridge between the wireless network and a larger wired network (usually connected to the public internet)
  2. mediating communication among wireless hosts.

This kind of wireless network is said to be operating in infrastrucure mode. Each wireless host is associated with a particular access point. It is possible for a host to be within the range of multiple access points; however, any host will be associated with at most one of them.

Ad-hoc Wireless Networks

An alternative organization for wireless networks is ad-hoc. In an ad-hoc wireless network, the hosts communicate with each other directly, without being associated with an access point. In an adhoc network, it is often the case that two hosts may be too far from each other to communicate directly, in which case their messages must be forwarded by intermediate nodes if they want to communicate. Routing in ad-hoc wireless networks is an active research area.

802.11

802.11, a.k.a. "WiFi", is the most common wireless LAN technology.

Each 802.11 access point periodically transmit beacon frames which announce the availability of the access point. 802.11 hosts find the access point with the strongest signal and then use the 802.11 association protocol to associate with the access point. The host can then do DHCP discovery to find its IP address, DNS server, and gateway, just as in a wired LAN (like ethernet).

CSMA

The multiple access protocol used by 802.11 is CSMA/CA: Carrier Sense Multiple Access with Collision Avoidance. Like ethernet, 802.11 senders do carrier sensing before transmitting. However, unlike ethernet, senders do not do collision detection: once a sender starts transmitting a frame, the frame will be transmitted in its entirety.

There are two reasons why collision detection is not feasible in wireless networks:

  1. Signals attenuate to a greater extent than in wired networks. For this reasons, transmitted signals are much stronger than received signals.

  2. The hidden terminal problem. Two senders A and B may be out of range of each other, but in range of a third node C. So, A and B may transmit simultaneously, their frames colliding (and being garbled) at node C.

An interesting consequence of the hidden terminal problem is that it is possible for two nodes to be associated with the same access point, but be unable to communicate with each other. Access points do not relay frames between associated hosts.

Because collision detection is not performed, senders have no direct way of knowing that their transmission was received correctly. Therefore, 802.11 uses link-layer acknowledgments:

Sender waits for a short time (DIFS - Distributed Inter-Frame Spacing), and assuming that the medium is still idle, transmits its frame. If received correctly, the receiver waits another short period of time (SIFS - Short Inter-Frame Spacing) and then sends an acknowledgment.

If frames from different senders collide, and the receiver receives a garbled data, then the receiver will not send an acknowledgment and the senders will have to retransmit. In the following example, assume that Sender 1 and Sender 2 are too far from each other to detect each other's transmissions:

In this example, senders 1 and 2 transmit at the same time, resulting in a garbled frame at the receiver. Both transmissions will thus timeout before being acknowledged, and they will prepare to retransmit. This is done by entering an exponential backoff phase, much like ethernet. In the example, sender 1 chooses a short backoff time and sender 2 chooses a longer backoff. Sender 1 is thus able to send its entire frame before sender 2 starts transmitting again.

Collision Avoidance

The probability of a collision increases with longer frames (since 802.11 senders do not perform collision detection.) Collision avoidance provides a way to reserve the medium so that the sender of a large frame will not be interrupted.

The station that wants to send a long frame first sends an RTS (Request To Send) message to the access point, requesting exclusive access for a specified period of time. The access point can then send a CTS (Clear To Send) message to the station. Because all stations associated with the access point can hear the access point's transmissions, they are all guaranteed to hear the CTS, and will refrain from transmitting during the period specified by the CTS.