Docsity

Medium Access Control - Local Area Network - Lecture Slides, Slides of Network security

Partial preview of the text

Download Medium Access Control - Local Area Network - Lecture Slides and more Slides Network security in PDF only on Docsity!

Medium Access Control

4- 1

MAC Is Need for Multi-Access Channel

  • A multi-access channel (e.g., a copper wire, the air)

is a channel on which multiple stations can send their data. (Widely used in LAN such as Ethernet because of amortized low cost)

  • Different than a point-to-point link where only one station can send its data. (Widely used in WAN such as T3 for connecting two remote cities)
  • MAC is used to avoid multiple data transmission at

the same time (collision) on a multi-access channel.

  • If multiple data packets collide with each other, their data will be garbled and become useless. 4- 2

MAC’s Performance Metrics

  • Network goodput
    • Packet retransmission, corruptions, and system overhead make goodput less than throughput
  • Mean delay
    • Will you need to wait a long time before getting a turn to send a packet? Is there a bound?
  • Stability
    • Will goodput decreases as the offered user load increase?
  • Fairness
    • Will roughly every one get the same throughput?
  • Priority or Quality-of-Service
    • Can I get more BW and shorter delays than others if I am willing to pay more? (^) 4- 4

FDM and TDM Result in Longer Delay

and Lower Throughput

  • Static partition of frequency or time may

result in unused frequency or idle period

when user data is dynamic and bursty.

  • “Queuing theory” also tells us it is better to

have one queue serving M customers than N

queues each serving M/N customers.

  • Because in the N-queue case, the customer waiting time will be N times that in the one queue case. 4- 5

Polling Results in High Delay and

BW Overhead

  • A station needs to play the role of the master asking each slaves if he/she has data to send.
  • Problems:
    • Need to know the number of slaves and who they are
    • What if the master dies?
    • If the propagation delay is long and data transmission time is short, network utilization is low.
    • A slave who just missed his/her turn needs to wait a long time
    • Polling and slave’s reply messages waste bandwidth

4- 7

Reservation Supports Priority and QoS

But Needs a Master

  • Time is divided into the reservation and data transmission interval.
  • During the reservation interval, time is further divided into slots, each for a slave. (can also be shared)
  • If a slave wants to send its data, it indicates its intent by marking its assigned slot. (or contending for a slot)
  • The master then makes a schedule for these slaves and announce the schedule to all slaves.
  • Problems:
    • What if the master dies?
    • Need to know how many slaves for maintaining reasonable number of slots (^) Docsity.com4- 8

Distributed MACs Cannot Guarantee

Priority, Delay Bound, or QoS

  • Because each station makes its decisions solely based on its local knowledge (may not reflect the true global condition of the network), decisions made may not be the best.
  • Because there is no coordinator (like a policeman) to regulate packet transmissions, priority, delay bound, or QoS cannot be guaranteed.
  • Fortunately, all of the above problems go away when the network bandwidth is large. - If a packet can be immediately sent anytime, why would we need a QoS guarantee? - Upgrading 10 Mbps to 1000 Mbps is not hard. (^) 4- 10

Pure ALOHA

  • Users transmit their data to a base station whenever they have data to send.
  • Feedback from the base station indicates whether a transmitted packet is destroyed because of collision.
  • If the packet is destroyed, the user waits a random amount of time and sends it again.
  • Frames may partially overlap. 4- 11

The Vulnerable Period of Pure ALOHA

2 * Frame periods

4- 13

Slotted ALOHA’s Vulnerable Period is

½ of that of Pure ALOHA

time

Send

attempt

Vulnerable

period

1 frame period 4- 14

Carrier Sense Multiple Access (CSMA)

  • A station senses the carrier to see if there is a ongoing packet transmission. - If no, then it can send its packet immediately. - If yes, - then it waits until the current transmission is finished, and then send its packet immediately (1-persistent) 802.3 Ethernet - or it waits a random time to retry the attempt. (nonpersistent) 802.11 Wireless LAN - or when the channel becomes idle, it sends its packet with a probability p or defers to the next slot with a probability 1-p (p persistent, only applicable for slotted channel) - However, collision can still occur! - Due to signal propagation delay of the link - The vulnerable period is the one-way signal propagation delay of the link. 4- 16

Performance of Various CSMA Schemes

What we care is here. Low delay, but high collision rate

High delay, but low collision rate

Normally, we will keep an Ethernet’s load < 50%.

4- 17

Ethernet Uses Binary Exponential Backoff

When a Collision Is Detected

  • A congestion widow (cw) is dynamically changed to reflect the current network congestion level. - Initially, cw = 1. - After n’th consecutive collision, cw is set to 2 ^ n. - Maximum allowed value is 1024. - The amount of random time that a station must wait after n’th collision is a random variable between [0, cw] * slot_time. - If a transmission is successful, cw is immediately reset to 1.
  • This scheme provides low delay and high throughput with different numbers of active stations. 4- 19

CSMA/CA for Wireless LAN

  • Wireless radio cannot detect collision.
    • The power of the transmitted packet is too strong than that of the received packet.
    • Therefore, the goal is to avoid collisions (CA).
  • A wireless LAN is composed of multiple radios,

each having a fixed signal range.

  • Base station mode
  • Ad hoc mode

4- 20