Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

IEEE 802.11 Wireless LAN and CSMA/CA: Collision Avoidance in Wireless Networks - Prof. Ala, Study notes of Computer Systems Networking and Telecommunications

An overview of ieee 802.11 wireless lan, focusing on csma/ca (carrier sense multiple access with collision avoidance) for collision avoidance in wireless networks. Topics include the structure of an ieee 802.11 wireless network, csma/ca protocol, and collision avoidance using request-to-send (rts) and clear-to-send (cts) packets.

Typology: Study notes

Pre 2010

Uploaded on 07/28/2009

koofers-user-w4i
koofers-user-w4i 🇺🇸

5

(1)

10 documents

1 / 27

Toggle sidebar

Related documents


Partial preview of the text

Download IEEE 802.11 Wireless LAN and CSMA/CA: Collision Avoidance in Wireless Networks - Prof. Ala and more Study notes Computer Systems Networking and Telecommunications in PDF only on Docsity! Data Link Protocols Link Layer Services Framing, Addressing, link access: encapsulate datagram into frame, adding header, trailer channel access if shared medium “MAC” addresses used in frame headers to identify source, dest different from IP address! Error Detection: errors caused by signal attenuation, noise. receiver detects presence of errors: signals sender for retransmission or drops frame Medium Access Control (MAC) Protocols MAC Protocols: a taxonomy Three broad classes: Channel Partitioning divide channel into smaller “pieces” (time slots, frequency, code) allocate piece to node for exclusive use Random Access channel not divided, allow collisions “recover” from collisions “Taking turns” Nodes take turns, but nodes with more to send can take longer turns Ethernet CSMA/CD algorithm 1. Adaptor receives datagram from net layer & creates frame 2. If adapter senses channel idle, it starts to transmit frame. If it senses channel busy, waits until channel idle and then transmits 3. If adapter transmits entire frame without detecting another transmission, the adapter is done with frame ! 4. If adapter detects another transmission while transmitting, aborts and sends jam signal 5. After aborting, adapter enters exponential backoff: after the mth collision, adapter chooses a K at random from {0,1,2,…,2m-1}. Adapter waits K·512 bit times and returns to Step 2 IEEE 802.11 Wireless LAN 802.11b 2.4-5 GHz unlicensed radio spectrum up to 11 Mbps direct sequence spread spectrum (DSSS) in physical layer all hosts use same chipping code widely deployed, using base stations 802.11a 5-6 GHz range up to 54 Mbps 802.11g 2.4-5 GHz range up to 54 Mbps All use CSMA/CA for multiple access All have base- station and ad-hoc network versions 802.11 LAN architecture wireless host communicates with base station base station = access point (AP) Basic Service Set (BSS) (aka “cell”) in infrastructure mode contains: wireless hosts access point (AP): base station ad hoc mode: hosts only BSS 1 BSS 2 Internet hub, switch or routerAP AP 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 [Chapter 8] will typically run DHCP to get IP address in AP’s subnet 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 A B C A’s signal strength space C’s signal strength IEEE 802.11 MAC Protocol: CSMA/CA 802.11 sender 1 if sense channel idle for DIFS then transmit entire frame (no CD) 2 if sense channel busy then start random backoff time timer counts down while channel idle transmit when timer expires if no ACK, increase random backoff interval, repeat 2 802.11 receiver - if frame received OK return ACK after SIFS (ACK needed due to hidden terminal problem) sender receiver DIFS data SIFS ACK frame control duration address 1 address 2 address 4 address 3 payload CRC 2 2 6 6 6 2 6 0 - 2312 4 seq control Type From AP Subtype To AP More frag WEP More data Power mgt Retry Rsvd Protocol version 2 2 4 1 1 1 1 1 11 1 802.11 frame: more duration of reserved transmission time (RTS/CTS) frame seq # (for reliable ARQ) frame type (RTS, CTS, ACK, data) Link Layer Addressing MAC Addresses and ARP 32-bit IP address: network-layer address used to get datagram to destination IP subnet MAC (or LAN or physical or Ethernet) address: used to get datagram from one interface to another physically-connected interface (same network) 48 bit MAC address (for most LANs) burned in the adapter ROM LAN Addresses and ARP Each adapter on LAN has unique LAN address Broadcast address = FF-FF-FF-FF-FF-FF = adapter 1A-2F-BB-76-09-AD 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 71-65-F7-2B-08-53 LAN (wired or wireless) LAN Address (more) MAC address allocation administered by IEEE manufacturer buys portion of MAC address space (to assure uniqueness) Analogy: (a) MAC address: like Social Security Number (b) IP address: like postal address MAC flat address ➜ portability can move LAN card from one LAN to another IP hierarchical address NOT portable depends on IP subnet to which node is attached ARP: Address Resolution Protocol Each IP node (Host, Router) on LAN has ARP table ARP Table: IP/MAC address mappings for some LAN nodes < IP address; MAC address; TTL> TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) Question: how to determine MAC address of B knowing B’s IP address? 1A-2F-BB-76-09-AD 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 71-65-F7-2B-08-53 LAN 237.196.7.23 237.196.7.78 237.196.7.14 237.196.7.88 Ethernet Frame Structure (more) Addresses: 6 bytes if adapter receives frame with matching destination address, or with broadcast address (eg ARP packet), it passes data in frame to net-layer protocol otherwise, adapter discards frame Type: indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk) CRC: checked at receiver, if error is detected, the frame is simply dropped Ethernet Hubs vs. Ethernet Switches An Ethernet switch is a packet switch for Ethernet frames Buffering of frames prevents collisions. Each port is isolated and builds its own collision domain An Ethernet Hub does not perform buffering: Collisions occur if two frames arrive at the same time. H ig h S p e e d B a ckp la n e CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD Output Buffers Input Buffers CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD CSMA/CD Hub Switch Self learning A switch has a switch table entry in switch table: (MAC Address, Interface, Time Stamp) stale entries in table dropped (TTL can be 60 min) switch learns which hosts can be reached through which interfaces when frame received, switch “learns” location of sender: incoming LAN segment records sender/location pair in switch table Filtering/Forwarding When switch receives a frame: index switch table using MAC dest address if entry found for destination then{ if dest on segment from which frame arrived then drop the frame else forward the frame on interface indicated } else flood forward on all but the interface on which the frame arrived Switch example Suppose C sends frame to D Switch receives frame from C notes in bridge table that C is on interface 1 because D is not in table, switch forwards frame into interfaces 2 and 3 frame received by D hub hub hub switch A B C D E F G H I address interface A B E G 1 1 2 3 1 2 3 Switch example Suppose D replies back with frame to C. Switch receives frame from from D notes in bridge table that D is on interface 2 because C is in table, switch forwards frame only to interface 1 frame received by C hub hub hub switch A B C D E F G H I address interface A B E G C 1 1 2 3 1 IEEE 802 Standards IEEE 802 is a family of standards for LANs, which defines an LLC and several MAC sublayers Ethernet Speed: 10Mbps -10 Gbps Standard: 802.3, Ethernet II (DIX) Most popular physical layers for Ethernet: 10Base5 Thick Ethernet: 10 Mbps coax cable 10Base2 Thin Ethernet: 10 Mbps coax cable 10Base-T 10 Mbps Twisted Pair 100Base-TX 100 Mbps over Category 5 twisted pair 100Base-FX 100 Mbps over Fiber Optics 1000Base-FX 1Gbps over Fiber Optics 10000Base-FX 1Gbps over Fiber Optics (for wide area links) Bus Topology Ethernet 10Base5 and 10Base2 Ethernets has a bus topology Starting with 10Base-T, stations are connected to a hub in a star configuration Star Topology Hub Ethernet and IEEE 802.3: Any Difference? There are two types of Ethernet frames in use, with subtle differences: “Ethernet” (Ethernet II, DIX) An industry standards from 1982 that is based on the first implementation of CSMA/CD by Xerox. Predominant version of CSMA/CD in the US. 802.3: IEEE’s version of CSMA/CD from 1985. Interoperates with 802.2 (LLC) as higher layer. Difference for our purposes: Ethernet and 802.3 use different methods to encapsulate an IP datagram. Ethernet II, DIX Encapsulation (RFC 894) 802.3 MAC destination address 6 source address 6 type 2 data 46-1500 CRC 4 0800 2 IP datagram 38-1492 0806 2 ARP request/reply 28 PAD 10 0835 2 RARP request/reply 28 PAD 10 Link Layer Error Control Parity Checking Single Bit Parity: Detect single bit errors Two Dimensional Bit Parity: Detect and correct single bit errors 0 0 Internet checksum Sender: treat segment contents as sequence of 16-bit integers checksum: addition (1’s complement sum) of segment contents sender puts checksum value into UDP checksum field Receiver: compute checksum of received segment check if computed checksum equals checksum field value: NO - error detected YES - no error detected. But maybe errors nonetheless? More later …. Goal: detect “errors” (e.g., flipped bits) in transmitted segment (note: used at transport layer only) Checksumming: Cyclic Redundancy Check view data bits, D, as a binary number choose r+1 bit pattern (generator), G goal: choose r CRC bits, R, such that <D,R> exactly divisible by G (modulo 2) receiver knows G, divides <D,R> by G. If non-zero remainder: error detected! can detect all burst errors less than r+1 bits widely used in practice (ATM, HDCL) CRC Example Want: D.2r XOR R = nG equivalently: D.2r = nG XOR R equivalently: if we divide D.2r by G, want remainder R R = remainder[ ]D .2r G
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved