Document Details

StylishSpessartine

Uploaded by StylishSpessartine

جامعة العلوم والتقانة

Tags

Wi-Fi wireless networks mobile communications technology

Full Transcript

University of Science & Technology Faculty of Computer Science & Information Technology Department of information for communication and technology Mobile communications & wireless technology_ it 709 4year/sem 7 Tawffeeg Mohammed Tawfeeg Wi-Fi Wir...

University of Science & Technology Faculty of Computer Science & Information Technology Department of information for communication and technology Mobile communications & wireless technology_ it 709 4year/sem 7 Tawffeeg Mohammed Tawfeeg Wi-Fi Wireless LANs 2 Outline  Wireless LAN  802.11 L A N architecture  802.11: Channels, association  802.11: passive/active scanning  Wireless concepts Wi-Fi Jungle The 802.11 MAC Protocol Dealing with Hidden Terminals Employ Collision-avoidance techniques. 802.11 frame: addressing 3 What is a Wireless LAN A wireless local area network(LAN) is a flexible data communications system implemented as an extension to, or as an alternative for, a wired LAN. – Using radio frequency (RF) technology, wireless LANs transmit and receive data over the air, minimizing the need for wired connections. Thus, combining data connectivity with user mobility. 4 Benefits of Wireless LAN Productivity, convenience, and cost advantages – Installation speed and simplicity. – Installation flexibility. – Reduced cost-of-ownership. – Mobility. – Scalability. 5 Disadvantage of Wireless LAN Cost – Wireless network cards cost 4 times more than wired network cards. – The access points are more expensive than hubs and wires. Signal Bleed Over – Access points pick up the signals of adjacent access points or overpower their signal. 6 Disadvantage of Wireless LAN Environmental Conditions – Susceptible to weather and solar activity. – Constrained by buildings, trees, terrain. Less Capacity – Slower bandwidth. – Limit to how much data a carrier wave can transmit without lost packets impacting performance. 7 Wireless Standard 802.11b 802.11 2.4-5 GHz unlicensed a  5-6 GHz range  up to 54 Mbps spectrum up to 11 Mbps 802.11g  2.4-5 GHz range direct sequence spread  up to 54 Mbps spectrum (DSSS) in physical 802.11n: multiple layer antennae – all hosts use same  2.4-5 GHz range chipping code  up to 200 Mbps  all use CSMA/CA for multiple access  all have base-station and ad-hoc network versions 8 802.11 LAN architecture  wireless host communicates with base Internet station  base station = access point (AP) hub, switch  Basic Service Set (BSS) (aka or router “cell”) in infrastructure mode contains:  wireless hosts BSS 1  access point (AP): base station  ad hoc mode: hosts only BSS 2 9 802.11: Channels, association 802.11b: 2.4GHz-2.485GHz spectrum divided into 11 channels at different frequencies – AP admin chooses frequency for AP – interference possible: channel can be same as that chosen by neighboring AP! host: must associate with an AP – scans channels, listening for beacon frames containing AP’s name (SSID) and MAC address – selects AP to associate with – may perform authentication – will typically run DHCP to get IP address in AP’s subnet 10 802.11: passive/active scanning BBS 1 BBS 2 BBS 1 BBS 2 1 1 1 2 2 AP 2 AP 1 AP 2 AP 1 2 3 3 4 H1 H1 passive scanning: active scanning: (1) beacon frames sent from APs (1) Probe Request frame broadcast (2) association Request frame sent: H1 from H1 to (2) Probe Response frames sent selected AP from APs (3) association Response frame sent (3) Association Request frame from sent: selected AP to H1 H1 to selected AP (4) Association Response frame sent 11 from selected AP to H1 Wi-Fi Jungle A Wi-Fi jungle is any physical location where a wireless station receives a sufficiently strong signal from two or more APs. Suppose there are five APs in the Wi-Fi jungle. To gain Internet access, your wireless station needs to join exactly one of the subnets and hence needs to associate with exactly one of the APs. Associating means the wireless station creates a virtual wire between itself and the AP. 12 Wi-Fi Jungle But how does your wireless station associate with a particular AP? And more fundamentally, how does your wireless station know which APs, if any, are out there in the jungle? The 802.11 standard requires that an AP periodically send beacon frames, each of which includes the AP’s SSID and MAC address. Your wireless station, knowing that APs are sending out beacon frames, scans the 11 channels, seeking beacon frames from any APs that may be out there. Having the available APs from the beacon frames, you (or your wireless host) select one of the APs for association. 13 Wi-Fi Jungle How to Select the AP? The 802.11 standard does not specify an algorithm for selecting which of the available APs to associate with; that algorithm is left up to the designers of the 802.11 firmware and software in your wireless host. Typically, the host chooses the AP whose beacon frame is received with the highest signal strength. While high signal strength is good, signal strength is not the only AP characteristic that will determine the performance a host receives. In particular, it’s possible that the selected AP may have a strong signal, but may be overloaded with other affiliated hosts (that will need to share the wireless bandwidth at that AP), while an unloaded AP is not selected due to a slightly weaker signal. 14 The 802.11 MAC Protocol Once a wireless station is associated with an AP, it can start sending and receiving data frames to and from the access point. But because multiple stations may want to transmit data frames at the same time over the same channel, a multiple access protocol is needed to coordinate the transmissions. Here, a station is either a wireless station or an AP. 802.11 MAC protocol is CSMA/CA. The “CSMA” in CSMA/CA stands for “carrier sense multiple access,” meaning that each station senses the channel before transmitting, and refrains from transmitting when the channel is sensed busy, and CA stands for "Collision Avoidance". 15 The 802.11 MAC Protocol First, instead of using collision detection, 802.11 use collision-avoidance techniques. Second, because of the relatively high bit error rates of wireless channels, 802.11 (unlike Ethernet) use a link-layer acknowledgment/retransmission (ARQ) scheme. Why the 802.11 MAC protocol does not implement collision detection? The 802.11 MAC protocol does not implement collision detection. There are two important reasons for this: 1- The ability to detect collisions requires the adapter to be able to transmit and listen at the same time. Because the strength of the received signal is typically very small compared to the strength of the transmitted signal at the 802.11 adapter, it is costly to build hardware that can detect a collision. 2- More importantly, even if the adapter could transmit and listen at the same time (and abort transmission when it senses a busy channel), the adapter would still not be able to detect all collisions, due to the hidden terminal problem and fading. 16 The 802.11 MAC Protocol (particularly long frames) when collisions happen can significantly degrade a multiple access protocol’s performance. In order to reduce the likelihood of collisions, 802.11 17 IEEE 802.11: multiple access avoid collisions: 2+ nodes transmitting at same time 802.11: CSMA - sense before transmitting – don’t collide with ongoing transmission by other node 802.11: no collision detection! – difficult to receive (sense collisions) when transmitting due to weak received signals (fading) – can’t sense all collisions in any case: hidden terminal, fading – goal: avoid collisions: CSMA/C(ollision)A(voidance) A B C C A’s signal C’s signal B strength A strength space 18 University of Science & Technology Faculty of Computer Science & Information Technology Department of information for communication and technology Mobile communications & wireless technology_ it 709 4year/sem 7 Tawffeeg Mohammed Tawfeeg Part 2 :dealing with heading terminal , CSMA/CA and frame addressing 20 Dealing with Hidden Terminals The 802.11 MAC protocol also includes a scheme that helps avoid collisions even in the presence of hidden terminals. From figure in the next slide, let’s now consider why hidden terminals can be problematic. Suppose Station H1 is transmitting a frame and halfway through H1’s transmission, Station H2 wants to send a frame to the AP. H2, not hearing the transmission from H1, will first wait a DIFS interval and then transmit the frame, resulting in a collision. The channel will therefore be wasted during the entire period of H1’s transmission as well as during H2’s transmission. 21 Dealing with Hidden Terminals 22 Dealing with Hidden Terminals In order to avoid this problem, the IEEE 802.11 protocol allows a station to use a short Request to Send (RTS) control frame and a short Clear to Send (CTS) control frame to reserve access to the channel. 1- When a sender wants to send a DATA frame, it can first send an RTS frame to the AP, indicating the total time required to transmit the DATA frame and the acknowledgment (ACK) frame. 2- When the AP receives the RTS frame, it responds by broadcasting a CTS frame. This CTS frame serves two purposes: It gives the sender explicit permission to send and also instructs the other stations not to send for the reserved duration. 23 Collision Avoidance: RTS-CTS exchange A B AP reservation collision DATA (A) defer time 24 Employ Collision-avoidance techniques. When a station in a wireless LAN sends a frame, the frame may not reach the destination station for a variety of reasons, how to deal with this? To deal with this the 802.11 MAC protocol uses link-layer acknowledgments. when the destination station receives a frame, it waits a short period of time known as the Short Inter-frame Spacing (SIFS) and then sends back an acknowledgment frame. If the transmitting station does not receive an acknowledgment within a given amount of time, it assumes that an error has occurred and retransmits the frame, using the CSMA/CA protocol to access the channel. 25 Employ Collision-avoidance techniques. If an acknowledgment is not received after some fixed number of retransmissions, the transmitting station gives up and discards the frame. 26 How the 802.11 CSMA/CA Protocol Reduce Collisions? (That is Collision A voidance) Suppose that a station (wireless station or an AP) has a frame to transmit. 1. If initially the station senses the channel idle, it transmits its frame after a short period of time known as the Distributed Inter-frame Space (DIFS). 2. Otherwise, the station chooses a random back off value and counts down this value when the channel is sensed idle. While the channel is sensed busy, the counter value remains frozen. 27 How the 802.11 CSMA/CA Protocol Reduce Collisions? (That is Collision A voidance) 3. When the counter reaches zero (note that this can only occur while the channel is sensed idle), the station transmits the entire frame and then waits for an acknowledgment. 4. If an acknowledgment is received, the transmitting station knows that its frame has been correctly received at the destination station. If the station has another frame to send, it begins the CSMA/CA protocol at step 2. If the acknowledgment isn’t received, the transmitting station reenters the back off phase in step 2, with the random value chosen larger. 28 IEEE 802.11 MAC Protocol: CSMA/CA 802.11 sender 1 if sense channel idle for DIFS then sender receiver transmit entire frame (no CD) 2 if sense channel busy then DIFS start random backoff time timer counts down while channel idle data transmit when timer expires if no ACK, increase random backoff interval, repeat 2 SIFS 802.11 receiver ACK - if frame received OK return ACK after SIFS (ACK needed due to hidden terminal problem) 29 802.11 frame: addressing 2 2 6 6 6 2 6 0 - 2312 4 frame seq address address address address payload CRC control duration control 4 1 2 3 Address 4: used only Address 1: MAC in ad hoc mode address of wireless Address 3: MAC host or AP to receive address of router this frame interface to which AP Address 2: MAC is attachedFields address of wireless Address host or AP transmitting Perhaps the most striking difference in the this frame 802.11 frame is that it has four address fields, each of which can hold a 6-byte MAC address. 30 802.11 frame: addressing Address Fields Don’t a source MAC field and destination MAC field suffice, as they do for Ethernet? Three address fields are needed for internetworking purposes— specifically, for moving the network-layer datagram from a wireless station through an AP to a router interface. The fourth address field is used when APs forward frames to each other in ad hoc mode. 31 Consider now moving a datagram from the router interface R1 to the wireless Station H1. The router, which knows the IP address of H1 (from the destination address of the datagram), uses ARP to determine the MAC address of H1, just as in an ordinary Ethernet LAN. After obtaining H1’s MAC address, router interface R1 encapsulates the datagram within an Ethernet frame. The source address field of this frame contains R1’s MAC address, and the destination address field contains H1’s MAC address. When the Ethernet frame arrives at the AP, the AP converts the 802.3 Ethernet frame to an 802.11 frame before transmitting the frame into the wireless channel. The AP fills in address 1 and address 2 with H1’s MAC address and its own MAC address, respectively, as described above. For address 3, the AP inserts the MAC address of R1. In this manner, H1 can determine (from address 3) the MAC address of the router interface that sent the datagram into the subnet. 32 Now what happens when the wireless station H1 responds by moving a datagram from H1 to R1. H1 creates an 802.11 frame, filling the fields for address 1 and address 2 with the AP’s MAC address and H1’s MAC address, respectively, as described above. For address 3, H1 inserts R1’s MAC address. When the AP receives the 802.11 frame, it converts the frame to an Ethernet frame. The source address field for this frame is H1’s MAC address, and the destination address field is R1’s MAC address. Thus, address 3 allows the AP to determine the appropriate destination MAC address when constructing the Ethernet frame. In summary, address 3 plays a crucial role for internetworking the BSS with a wired LAN. 33 802.11 frame: addressing Payload and CRC Fields Payload and CRC Fields At the heart of the frame is the payload, which typically consists of an IP datagram or an ARP packet. Although the field is permitted to be as long as 2,312 bytes, it is typically fewer than 1,500 bytes, holding an IP datagram or an ARP packet. As with an Ethernet frame, an 802.11 frame includes a 32-bit cyclic redundancy check (CRC) so that the receiver can detect bit errors in the received frame. 34 802.11 frame: addressing Sequence Number and Duration Fields Recall that in 802.11, whenever a station correctly receives a frame from another station, it sends back an acknowledgment. Because acknowledgments can get lost, the sending station may send multiple copies of a given frame. To distinguish between a newly transmitted frame and the retransmission of a previous frame, the sequence number field in the 802.11 frame is used. Recall that the 802.11 protocol allows a transmitting station to reserve the channel for a period of time that includes the time to transmit its data frame and the time to transmit an acknowledgment. This duration value is included in the frame’s duration field (both for data frames and for the RTS and CTS frames). 35 802.11 frame: addressing Type, subtype, to, from and WEP fields As shown in Figure above there are frame control field includes many subfields. We’ll say just a few words about some of the more important subfields: The type and subtype fields are used to distinguish the association, RTS, CTS, ACK, and data frames. The to and from fields are used to define the meanings of the different address fields. (These meanings change depending on whether ad hoc or infrastructure modes are used and, in the case of infrastructure mode, whether a wireless station or an AP is sending the frame.) Finally the WEP field indicates whether encryption is being used or not. 36 Thanks for attention These slides are adapted from Computer Networking: A Top Down Approach Jim Kurose, Keith Ross Addison-Wesley March 2012 37

Use Quizgecko on...
Browser
Browser