CPSC 3600 - DAY 14 MARCH 13, 2017 ================================================================================ MEDIA ACCESS MECHANISMS ----------------------- MAC Protocols Control access to shared medium Two types of channel allocation: Static Dynamic Static channel allocation suffices when the set of communicating entities is known in advance and does not change; most networks require a form of dynamic channel allocation. For example: cellular telephone in a city. As users move, turn on/off their phones, the number of phones operating in a range of a cell tower varies. Channelization Protocols Employ and extend basic multiplexing techniques. May be static or dynamic Three basic types: FDMA - Frequency Division Multi-Access TDMA - Time Division Multi-Access CDMA - Code Division Multi-Access FDMA Central controller provides a dynamic channel assignment A station uses a reserved control channel to communicate with the controller. The station makes a request, the controller chooses a frequency that is currently unused and informs the station. The station uses the assigned carrier frequency for all comms. TDMA Each active station is assigned a sequence number from 1 to N Each station transmit in order 1,2,3,...,N TDMA offers dynamic allocation, where a station is assigned a time slot when the station first appears on the network. CDMA Allows multiple stations to transmit at the same time by encoding each transmission mathematically. Refers to the calculation of Code Division Multiplexing. Control Access Protocols Polling - centralized controller repeatedly polls stations and allows each to transmit one packet Reservation - stations submit a request for the next round of data transmission Token passing - stations circulate a token; each time it receives the token, a station transmits one packet. Polling A centralized controller is used. Each station is given an opportunity to transmit a packet, using: Round robin order - each station has an equal opportunity Priority order - some stations have more opportunity Reservation Often used with satellite systems. Each round of packet transmission is planned in advance. Stations inform a controller if they have data to send. Controller transmits a list of the stations that will be transmitting. Stations use the list to know when they should transmit. Token Passing Special packet known as a token passed among senders (as in ring topoligies) If a station has packets, it sends one packet each time token arrives. Random access protocols +-------------------+------------------------------------------------+ | Type | Description | +-------------------+------------------------------------------------+ | ALOHA | Historic protocol used in early radio network | | | in Hawaii; popular in textbooks and easy to | | | analyze, but it is not used in real networks | +-------------------+------------------------------------------------+ | CSMA/CD | Carrier Sense Multi-Access with Collision | | | Detection. The basis for original Ethernet | | | and most used random access protocol | +-------------------+------------------------------------------------+ | CSMA/CA | Carrier Sense Multi-Access with Collision | | | Avoidance. Basis of Wifi networks | +-------------------+------------------------------------------------+ ALOHA Used in early network in Hawaii (ALOHAnet) Single, powerful transmitter in a central geographic location surrounded by a set of stations. Each station had a transmitter capable of reaching the central transmitter, but not powerful enough to reach all the other stations. Two carrier frequencies: inbound and outbound When a station has a packet to send, it transmits the packet on inbound frequency. The central transmitter repeats the transmission on the outbound freq. which all stations receive. The sending station knows that the transmission is successful if it receives the copy of it's packet Interference is caused by two stations attempting to transmit silmultaneously. If inbound packets collide, each sender waits a random time and retransmits CSMA/CD Used in original Ethernet (1973) Provides access to shared medium Principle features to handle collisions: Carrier Sense: monitor the cable to detect whether another transmission was alreach in progress. Collision detection: if the signal on the cable differs from the signal that the station is sending. Uses binary exponential backoff: to avoid the second collison, each computer doubles the range from which a delay is chosen. ALGORITHM: When a packet is ready, perform CS (wait for access) Delay for the interpacket gap Set variable x to the standard backoff range, d Attempt to transmit the packet and perform CD while (collision occurred during transmision) { choose q to be a random delay between 0 and x delay q microseconds double x in case needed for next round attempt to transmit the packet and perform CD } CSMA/CA Alternative to CSMA/CD Used in wiereless networks (Wi-Fi) Needed because signals have limited distance, (delta) The hidden station problem: computer 1 cannot receive transmission when computers 2 and 3 communicate. Communicating pair exchanges Ready to Send (RTS) and Clear to Send (CTS) before transmitting packets. Any computer less than (delta) away will hear at least one of the RTS/ CTS messages