Chapter 12: Media Access Control (MAC)

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

Acknowledgement (CSMA/CA)

A collision may still occur and data either destroyed or modified. An ACK and time-out timer are added to guarantee the receiver has received the frame.

Channelization

A multiple-access method in which the available bandwidth of a link is shared in time, frequency, or through code, among different stations. There are 3 channelization protocols: 1. Frequency-Division Multiple Access (FDMA) 2. Time-Division Multiple Access (TDMA) 3. Code-Division Multiple Access (CDMA) Also known as channel partition.

Interframe Space (IFS) (CSMA/CA)

A period of time the station waits after sensing an idle channel. The IFS allows for a distant station's transmission to reach the station. If the channel is still idle, station may send following other mechanisms. The IFS variable can prioritize stations or frame types. For instance, a station with a short IFS has a higher priority.

Contention Window (CSMA/CA)

A random number of time slots a device will wait once a station is ready to send. The station senses the channel after each time slot. If the channel is busy, it stops the timer and restarts it when the channel is sensed as idle. This gives priority to the station with the longest waiting time.

Reservation (Controlled Access)

A station needs to make a reservation before sending data. Time is divided into intervals. In each interval, a reservation frame precedes the data frames sent in that interval.

CSMA with Collision Avoidance (CSMA/CA)

Collisions are avoided through use of 3 mechanisms: 1. Interframe Space 2. Contention Window 3. ACK's Invented for wireless networks.

Binary Exponential Backoff

Formula for calculating backoff time (TB). For each retransmission, a multiplier R = (0 to 2^k) - 1 is randomly chosen. R is multiplied by Tp or Tfr (avg. frame transmission time) to find TB.

Minimum Frame Size (CSMA/CD)

Frame size must be restricted for CSMA/CD to work. A station stops monitoring the medium for collision detection once transmission is successful. Therefore, Tfr ≥ max(Tp).

Throughput (CSMA/CD)

Greater than Pure ALOHA or Slotted ALOHA. Smax depends on the persistence method (and p in the p-persistent approach). For the 1-persistent method: Smax ≈ 0.5 when G = 1 For the nonpersistent method: Smax ≤ .9 for G between 3 and 8

1-Persistent Method (CSMA)

If the station senses the line is idle, then it sends its frame. Highest chance of collision (i.e., two lines sense the line is idle).

Nonpersistent Method (CSMA)

If the station senses the line is idle, then it sends its frame. If it senses the line is busy, then it waits a random amount of time before sensing the line again. Reduces chance of collision (unlikely two stations will wait the same amount of time). However, this reduces network efficiency: the medium may remain idle when there may be stations with frames to send.

Collision During Handshaking Period

If, for instance, two CTS control frames collide, then the sender assumes there has been a collision if it has not received a CTS frame from the receiver. The backoff strategy is employed, and the sender tries again.

Multiple Access

More than one station may transmit at a time.

Orthogonal Sequence

Properties: 1. Each sequence is made of N elements, where N is the # of stations. 2. Allows scalar multiplication (each element multiplied by a single element). 3. If we multiply two equal sequences, element by element, and add the results, we get N, where N is the # of stations. 4. If we multiply two different sequences, element by element, and add the results, we get 0. 5. Adding two sequences means adding the corresponding elements.

Backoff Time

Random amount of time a station waits before resending a frame, TB. Normally depends on K (# of attempted unsuccessful transmissions). Kmax is usually chosen as 15.

Throughput (Slotted ALOHA)

S = G x e^(-G) Smax = .0368 when G = 1

Code-Division Multiple Access (CDMA)

One channel carries all transmissions simultaneously. Stations communicate in different codes only they can understand. Each station is assigned a code, which is a sequence of numbers called chips. These sequences are selected to be orthogonal sequences.

Time-Division Multiple Access (TDMA)

One channel is timeshared between different stations. Synchronization between stations is achieved through preamble bits at the beginning of each time slot and guard times to compensate for propagation delays. There is no multiplexer at the physical layer when using TDMA.

Polling (Controlled Access)

One device is designated as a primary station and the others are secondary stations. All data exchanges must be made through the primary station. If the primary station fails, the system goes down. Uses poll and select functions to prevent collisions.

Traditional Ethernet

One of the LAN protocols that used CSMA/CD is the traditional Ethernet with a data rate of 10 Mbps. The traditional ethernet was a broadcast LAN that used the 1-persistence method.

Sequence Generation

A Walsh table is used to generate chip sequences. The number of sequences in a Walsh table needs to be N = 2^m. We can build the next Walsh table from the previous (i.e., W_4 can be generated from W_2).

CSMA with Collision Detection (CSMA/CD)

Specifies how to handle collision (unlike CSMA). Station monitors medium after sending a frame to see if transmission is successful. If collision occurs, the frame is resent.

Slotted ALOHA

Stations are forced to send only at the beginning of a time slot of Tfr. Collision may still occur, but the vulnerable time is reduced to one-half, equal to Tfr. Invented to improve the efficiency of Pure ALOHA.

Controlled Access

Stations consult one another to find which station has the right to send. There are 3 methods: 1. Reservation 2. Polling 3. Token-Passing

Logical Ring (Token-Passing)

Stations do not have to be physically connected in a ring. However, 4 different physical topologies can be used: 1. Physical Ring 2. Dual Ring 3. Token Bus 4. Star Ring

Throughput (Pure ALOHA)

The average number of successfully transmitted frames: S = G x e^(-2G) where G is the average number of frames generated in a single Tfr Smax = 1/(2e) = 0.184 when G = 1/2

Frequency-Division Multiple Access (FDMA)

The bandwidth of the common channel is divided into bands (separated by guard bands). Each band is reserved for a specific station. Each station uses a bandpass filter to confine the transmitter frequencies and the frequencies are combined when they're sent to the common channel.

Vulnerable Time

The length of time in which there is a possibility of collision. Can occur if a frame is sent after t - Tfr or before t + Tfr, where t is the start time of a given frame's transmission.

Select (Polling)

The primary station sends a select frame (SEL) and awaits an ACK before sending data of its own.

Handshaking Period

The time when RTS or CTS control frames are in transition.

Vulnerable Time (Pure ALOHA )

The vulnerable time is equal to twice the time to send a frame: Vulnerable Time = 2 x Tfr

CSMA/CD vs. ALOHA

There are 3 difference. Unlike ALOHA, CSMA/CD: 1. Uses persistence methods. 2. Treats transmission and collision as continuous processes. 3. Sends a short jamming signal to ensure all other stations become aware of a collision.

Energy Level (CSMA/CD)

There are 3 possible energy levels in a channel: 1. Zero - The channel is idle. 2. Normal - A station is sending its frame. 3. Abnormal - A collision has occurred. The level of energy is twice the normal level

Random-Access/Contention

There is no scheduled time for a station to transmit. Transmission is random. No rules specify which station should send next; stations contend with one another to access the medium.

Pure ALOHA

Used for multiple access. Susceptible to collisions. Relies on ACK's from the receiver. If the ACK does not arrive before a time-out period ends, then the station resends the frame. To avoid collision between resent frames, each station waits a random amount of time (backoff time) after a time-out period ends. After a maximum # of retransmissions (Kmax) a station gives up and tries later. The original ALOHA protocol.

p-Persistent Method (CSMA)

Used if the channel has time slots with slot duration ≥ maximum Tp. If the line is idle, then: 1. With prob. of p, the station sends its frame. 2. With prob. q = 1 - p, the stations waits for the next time slot and checks the line again. 2.1. If line is idle, go to Step 1. 2.2. If line is busy, pretend collision occurred and use backoff procedure. Reduces collision and improves network efficiency.

Vulnerable Time (Slotted ALOHA)

Vulnerable time is equal to Tfr.

Vulnerable Time (CSMA)

Vulnerable time is the time needed for a signal to propagate from one end of the medium to the other, Tp.

Persistence Methods

What should a station do if a channel is idle/busy? There are 3 methods to handle the above scenario: 1. 1-Persistent 2. Nonpersistent 3. p-Persistent

Network Allocation Vector (NAV)

When a station sends an RTS, it includes the duration of time that it needs to occupy the channel. Stations affected by this transmission create a timer called a NAV to track how long to wait before these stations can sense the channel again. Before sensing the channel, a station checks its NAV to see if it has expired.

Poll (Polling)

When the primary station is ready to receive data, it polls each station one at a time. If a station has no data to send, it sends a NAK. Otherwise, the station sends data and the primary sends an ACK.

Frame Exchange Timeline (CSMA/CA)

1. Before sending a frame, the source station senses the medium by checking the energy level at the carrier frequency. 1.1. The channel uses a persistence strategy with backoff until the channel is idle. 1.2. After the channel is found to be idle, the station waits for a period of time called the DCF interframe space (DIFS); then the station sends a control frame called the request to send (RTS). 2. After receiving the RTS and waiting a period of time called the short interframe space (SIFS), the destination station sends a control frame, called the clear to send (CTS), to the source station to indicate the destination station is ready to receive data. 3. The source station sends data after waiting an amount of time equal to the SIFS. 4. The destination station, after waiting an amount of time equal to SIFS, sends an ACK (can't detect collision like in CSMA/CD).

Q: A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the throughput if the system (all stations together) produces: a. 1000 frames per second? b. 500 frames per second? c. 250 frames per second?

A: a. If the system creates 1000 frames per second, or 1 frame per millisecond, then G = 1000 x (200 / 200 x 10^3) = 1. In this case S = G × e(−2G) = 0.135 (13.5%). This means S = 1000 × 0.135 = 135 frames. Only 135 frames out of 1000 will probably survive. b. If the system creates 500 frames per second, or 1/2 frames per millisecond, then G = 1/2. In this case S = G × e^(−2G) = 0.184 (18.4%). This means S = 500 ×0.184 = 92 frames. Only 92 frames out of 500 will probably survive. Note that this is Smax (Pure ALOHA with G = 1/2). c. If the system creates 250 frames per second, or 1/4 frames per millisecond, then G = 1/4. In this case S = G × e(−2G) = 0.152 (15.2%). This means S = 250 × 0.152 = 38 frames. Only 38 frames out of 250 will probably survive.

Q: A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the requirement to make this frame collision-free?

A: Average frame transmission time Tfr = 200 bits/200 kbps = 1 ms The vulnerable time is 2 × 1 ms = 2 ms This means no station should send later than 1 ms before this station starts transmission and no station should start sending during the period (1 ms) that this station is sending.

Q: A network using CSMA/CD has a bandwidth 10 Mbps. If max Tp is 25.6 μs, what is the minimum frame size?

A: The minimum frame transmission time is T_fr = 2 x T_p = 51.2 μs. Therefore, minimum frame size must be 10 Mbps x 51.2 μs = 512 bits.

Q: A slotted ALOHA network transmits 200-bit frames using a shared channel with a 200-kbpsbandwidth. What is the throughput if the system (all stations together) produces: a. 1000 frames per second? b. 500 frames per second? c. 250 frames per second?

A: This situation is similar to the Flashcard 14 except that the network is using Slotted ALOHA instead of Pure ALOHA. The Tfr = 200/200 kbps or 1 ms. a. In this case G is 1. So S = G × e(−G) = 0.368 (36.8%). This means S = 1000 × 0.0368 = 368 frames. Only 368 out of 1000 frames will probably survive. Note that this Smax (Slotted ALOHA and G = 1). b. Here G is 1/2. In this case S = G × e(−G) = 0.303 (30.3%). This means S = 500 × 0.0303 = 151. Only 151 frames out of 500 will probably survive. c. Now G is 1/4. In this case S = G × e(−G) = 0.195 (19.5%). This means S = 250 × 0.195 = 49. Only 49 frames out of 250 will probably survive.

Collision

Access conflict caused by more than one station transmitting at the same time. Frames are either destroyed or modified.

Collision Avoidance/Resolution

Each station must follow a procedure that answers the following questions: o When can the station access the medium? o What can the station do if the medium is busy? o How can the station determine the success or failure of the transmission? o What can the station do if there is collision?

Carrier Sense Multiple Access (CSMA)

Each station must listen to the medium before sending. Collision is reduced, but still possible: a station may sense the medium as idle because the first bit sent by another station has not yet been received, due to propagation delay.

ALOHA

Earliest random access method. Designed for radio (wireless) LAN, but it can be used on any shared medium. Susceptible to collisions.

Time-Out Period (Pure ALOHA)

Equal to the max possible round-trip propagation delay: Time-Out Period = 2 x Tp where Tp is max propagation time.

Token-Passing

Stations in a network are organized in a logical ring. Each station has a predecessor and a successor. The current station is the one that is accessing the channel now. A special packet called a token is circulated that gives the right to access the channel. If a station has no data to send, it passes the token to its successor. Requires token management, such as limiting how long a station can possess a token, ensuring the token has not been lost or destroyed, etc.

Data Representation (DMCA)

The 0 bit is encoded as -1; the 1 bit is encoded as +1. When a station is idle, it sends no signal, which is interpreted as 0.


Kaugnay na mga set ng pag-aaral

SOCW 2140 FINAL EXAM REVIEW PART TWO

View Set

Behavior Skills Training for BTs

View Set

1.4 Given a scenario, analyze potential indicators associated with network attacks.

View Set

Survey of CJS chapter 10 handout

View Set

Radiobiology Mosby (Module 2 Biophysical Events and Cellular and Subcellular Effects of Radiation)

View Set