Medium Access Control - Hutt Systems · Medium Access Control (MAC) ! Layer 2 addressing (MAC...

Post on 06-Aug-2020

7 views 0 download

transcript

Medium Access Control

CSCI345 Chapter 4

Michael Hutt New York Institute of Technology

The Data Link Layer

Logical Link Control (LLC)

l  IEEE 802.2 Standard

l  RFC 1042

l  Provides three service options l  Unreliable datagram service l  Acknowledged datagram service l  Reliable connection-oriented service

Medium Access Control (MAC) l  Layer 2 addressing (MAC address or physical

address)

l  Channel access control mechanisms for multiaccess channels

l  Determines who goes next on a multiaccess channel

Multiple Access Protocols l  Pure Aloha

l  Transmit whenever data is available to be sent l  Does not listen before transmitting l  Listen to find out if frame was destroyed (collision)

l  Slotted Aloha l  Forces all workstations to agree on time slots l  Can’t start sending in the middle of a time slot l  Improves throughput to 2x of pure Aloha

Multiple Access Protocols… l  Persistent Carrier Sense Multiple Access

l  First listen to see if anyone else is transmitting l  If collision detected wait random amount of time and start

over l  Propagation delay can have on performance

l  Nonpersistent CSMA l  Listen first, if no one is sending, begin sending l  If channel is busy, wait a random period before listening

again l  Better channel utilization, but longer delay

Multiple Access Protocols… l  CSMA with Collision Detect

l  CSMA/CD l  Terminate transmission immediately upon detecting a

collision l  Basis for Ethernet l  Need to transmit for 2T, where T is the propagation delay

between the 2 farthest workstations l  Transmitting stations must constantly monitor the channel

(receive) for collisions - inherently half-duplex

Wireless LAN Protocols l  Can’t use CSMA since we need to detect interference at the

receiver l  Can’t reliably detect all transmissions due to range of radios l  Multiple Access with Collision Avoidance (MACA)

l  Force a short transmission from the receiver so stations around the receiver avoid transmitting

l  A sends RTS frame to B. B replies with CTS l  Stations close to A hear the RTS l  Stations close to B hear the CTS l  MACAW (MACA for Wireless)

l  Added CSMA for transmitters, and ACKs

Ethernet

•  Ethernet Cabling •  Manchester Encoding •  The Ethernet MAC Sublayer Protocol •  The Binary Exponential Backoff Algorithm •  Ethernet Performance •  Switched Ethernet •  Data Link Layer Switching •  Virtual LANs

Ethernet Cabling

Manchester Encoding

Ethernet MAC Sublayer Protocol

Ethernet MAC Sublayer Protocol… l  Ethernet II (DIX)

l  Used for IP

l  802.3 (Raw) - no type field

l  802.3 with 802.2

l  802.3 with 802.2 SNAP l  Used for IP, Appletalk, CDP and other proprietary protocols

Ethernet MAC Sublayer Protocol…

Binary Exponential Backoff Algorithm

l  After n collisions wait somewhere between 0 and 2^n-1 time slots

l  Time slot = 51.2µsec (time it takes to transmit 512 bits)

l  After 16 collisions failure is reported to higher layers

Ethernet Performance

Bus Topology

Bridging

Spanning-Tree Protocol

Bridges

l  Store and forward l  Buffers the frame and checks the CRC, then

forwards to destination port

l  Cut Through l  DA MAC address appears first. Forward frame

immediately to destination port. No CRC check.

Bridges…

Layer 2 Switch

Switched Ethernet

l  Multiport bridge

l  Each port is in its own collision domain

l  Ports can now operate full duplex

l  Switch disables collision detection in full duplex mode

Network Devices

l  Repeaters - L1 l  Hubs - L1 l  Bridges/Layer 2 Switches – L2 l  Routers/Layer 3 Switches - L3/L4 l  Gateways - L4/L7

Network Devices…

Hub

Bridge Layer 2 Switch

Layer 2 Switch

Router

Firewall

Internet

172.16.1.0/24

192.168.1.16/28 192.168.1.17

192.168.1.18

192.168.1.19

172.16.1.1

172.16.1.2

e0

e1

80:ee:73:12:34:56

00:00:0C:12:34:56

00:00:0C:AB:CD:EF

00:00:0C:1A:2B:3C

64:76:BA:12:34:56

Virtual LANs

802.1Q

802.1Q…

Wireless LANs

l  IEEE 802.11 Standard l  802.11a - 5 GHz, 54 Mbps (Net Bit Rate) l  802.11b - 2.4 GHz, 11 Mbps l  802.11g - 2.4 GHz, 54 Mbps l  802.11n - 5 GHz and/or 2.4 GHz, 600 Mbps

The 802.11 Protocol Stack

The 802.11 MAC Sublayer Protocol

a)  the hidden station problem b)  the exposed station problem

The 802.11 MAC Sublayer Protocol…

The 802.11 Frame Structure

Wi-Fi Security

l  WEP - no longer secure

l  WPA (TKIP) l  8/27/09 “Computer scientists in Japan say they've

developed a way to break the WPA encryption system used in wireless routers in about one minute. “

l  WPA2 (AES)

Ad Hoc Networks

l  Firechat l  opengarden.com/firechat