media access control

Upload: ashiqul-haque-tamim

Post on 06-Apr-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/3/2019 Media Access Control

    1/19

    Medium Access Control

  • 8/3/2019 Media Access Control

    2/19

    The Media Access Control (MAC) data

    communication protocol sub-layer, also known

    as the Medium Access Control, is a sublayer of

    the Data link layer specified in the seven-layerOSI model(layer 2). It provides addressing and

    channel access control mechanisms that make it

    possible for several terminals or network nodes

    to communicate within a multi-point network,typically a local area network(LAN) or

    metropolitan area network(MAN).

  • 8/3/2019 Media Access Control

    3/19

  • 8/3/2019 Media Access Control

    4/19

    Some Multiple Access Protocols

    CSMA/CD

    Token passing

    Wireless LAN Protocols

  • 8/3/2019 Media Access Control

    5/19

    Random Access MAC Protocols

    Non-Carrier-Sense protocols: doesnt listen to

    the channel before transmitting

    ALOHA

    Carrier-Sense protocols: senses the channel

    before transmitting

    CSMA (Carrier Sense Multiple Access): does not

    detect collision.

    CSMA/CD (Ethernet): A node listens before/while

    transmitting to determine whether a collision happens.

  • 8/3/2019 Media Access Control

    6/19

    ALOHA(Additive Link Off Hawaiian Access)

    Radio-based communication network

    Developed in 1970s at the Univ of Hawaii

    Basic idea: transmit when a node has data to be

    sent.

    Receiver sends ACK for data

    Detect collisions by timing out for ACK

    Recover from collision by trying afterrandom delay

    Too short: large number of collisions

    Too long: underutilization

  • 8/3/2019 Media Access Control

    7/19

    Ethernet MAC

    If line is idle (no carrier sensed) send packet

    immediately

    If line is busy (carrier sensed) wait until idle and

    transmit packet immediately

    If collision detected

    Stop sending and jam signal

    Jam signal: make sure all other transmitters areaware of collision

    Wait a random time (Exponential backoff), and try

    again

  • 8/3/2019 Media Access Control

    8/19

    Ethernet Performance

    Ethernets work best under light loads

    Utilization over 30% is considered heavy

    Peak throughput worse with

    More hosts

    More collisions needed to identify single sender

    Smaller packet sizes

    More frequent arbitration

    Longer links

    Collisions take longer to observe, more wasted

    bandwidth

  • 8/3/2019 Media Access Control

    9/19

    Ethernet MAC Protocol

    Collision detection can take as long as 2 .X

  • 8/3/2019 Media Access Control

    10/19

    CarrierSense Multiple Access (CSMA)

    Listen to medium and wait until it is free

    (no one else is talking)

    Wait a random backoff time

    Advantage: Simple to implement

    Disadvantage: Cannot recover from a collision

  • 8/3/2019 Media Access Control

    11/19

    Wireless Interference

    Two transmitting stations interfere with each

    other at the receiver

    Receiver gets garbage

    A B

    C

  • 8/3/2019 Media Access Control

    12/19

    CarrierSense Multiple Access

    with Collision Detection (CSMA-CD)

    Procedure

    Listen to medium and wait until it is free

    Start talking, but listen to see if someone else starts talking too

    If collision, stop; start talking after a random backoff time

    Used for hub-based Ethernet

    Advantage: More efficient than basic CSMA

    Disadvantage: Requires ability to detect collisions

    More difficult in wireless scenario

  • 8/3/2019 Media Access Control

    13/19

    Collision Detection in Wireless

    No fate sharing of the link High loss rates

    Variable channel conditions

    Radios are not full duplex Cannot simultaneously transmit and receive

    Transmit signal is stronger than received signal

  • 8/3/2019 Media Access Control

    14/19

    CarrierSense Multiple Access

    with Collision Avoidance (CSMA-CA)

    Similar to CSMA but controlframes are

    exchanged instead of data packets

    RTS: request to send CTS: clear to send

    DATA: actual packet

    ACK: acknowledgement

  • 8/3/2019 Media Access Control

    15/19

    CarrierSense Multiple Access

    with Collision Avoidance (CSMA-CA)

    Small control frames lessen the cost of collisions

    (when data is large)

    RTS + CTS provide virtual carrier sense

    protects against hidden terminal

    A B

  • 8/3/2019 Media Access Control

    16/19

    MAC Address The IEEE 802.3 Ethernet and 802.5 Token Ring protocols

    specify that the MAC sub-layer must supply a 48-bit (6 byte)

    address. The MAC address is most frequently represented as

    12 hexadecimal digits. The MAC address uniquely identifies a

    specific network device and MAC addresses must be unique

    on a given LAN (a network of computing devices in a singlesubnet of IP addresses). The first 12-bit portion of the MAC

    address identifies the framework of the network device, the

    last 12-bit portion identifies the unique id of the device itself.

    When looking at a hexadecimal representation of the MAC

    address, the first six hexadecimal digits identify the vendorand the last six hexadecimal digits identify the specific

    network interface card.

  • 8/3/2019 Media Access Control

    17/19

  • 8/3/2019 Media Access Control

    18/19

    MAC Address As Displayed by

    Vendor/Manufacturer

    Command Used

    to display MAC

    00:00:0C:12:B1:CF Cisco, Unix/SUN, Linux ifconfig -a

    00000C-12B1CF ProCurve Switches show bridge

    00-00-0C-12-B1-CF Microsoft ipconfig /all

  • 8/3/2019 Media Access Control

    19/19

    Thank YOU