You are on page 1of 40

The Medium Access Control

Sub Layer

Wired LAN Protocols


Wired LAN Protocols
 IEEE 802.3 - CSMA/CD (Ethernet)

 IEEE 802.4 – Token Bus

 IEEE 802.5 – Token Ring

 Differ in MAC Sub Layer but compatible at Data

Link Layer

Lt Col Ajay Gangwar


Ethernet – IEEE 802.3
• Ethernet Cabling
• Manchester Encoding
• Ethernet MAC Sublayer Protocol
• Binary Exponential Backoff Algorithm
• Switched Ethernet
• Fast Ethernet
• Gigabit Ethernet
• IEEE 802.2 - Logical Link Control

Lt Col Ajay Gangwar


Ethernet Cabling
NAME CABLE SEGMENTS NODES/SEG

Lt Col Ajay Gangwar


Ethernet Cabling

10Base5 10Base2 10Base-T

Lt Col Ajay Gangwar


10 Base-T Cable
 Replaces individual transceivers with intelligent
components called HUBS
 Use of Twisted Pair Cables to connect all cmptrs
 Data is first sent to hubs & then transmitted to
destination.

Lt Col Ajay Gangwar


10 Base-T Cable
 Advantages
 Maintenance is easy
 Flexibility in design
 Disadvantages
 Cable cannot be more than 100 meters
 Bigger HUBS & connecting cables are expensive

Lt Col Ajay Gangwar


Repeaters
 Each version of 802.3 has a max segment
length.
 To increase length segments, connect through
repeaters.
 Repeaters are layer one devices.
 Repeater receives, amplifies and re-tx signals in
both directions.
 However
 No two hosts more than 2.5 km apart.
 Max 4 repeaters between two hosts.

Lt Col Ajay Gangwar


Advantages – IEEE 802.3
 Most widely used, large installation base and

huge experience

 Simple protocol

 Stations installed on the fly

 Delay at low load is practically zero.

Lt Col Ajay Gangwar


Disadvantages – IEEE 802.3
 Collision detection circuitry in transreceiver is analog.
 Non deterministic - a stn may have to wait for an
arbitrarily long time to send a frame. Thus, inappropriate
for real time traffic.
 At high load presence of collisions becomes a major
problem .
 No facility for assigning priority.

Lt Col Ajay Gangwar


802.3 MAC Sub Layer Protocol
Bytes 7 1 6 6 2 0-1500 0-46 4

S Destination Source Check-


Preamble O Length Data Pad
Address Address sum
F

 Preamble of 7 bytes each with bit pattern 10101010 –


manchester encoding of this pattern produces 10 MHz
square wave
 1 byte Start of Frame delimiter – for compatibility with
802.4 & 802.5
 6 byte source and destination addresses.
 Length indicates number of bytes in data field.
 Pad field ensures min frame size is 64 bytes (less
Preamble) – More on this later.
 Checksum field – 32 bit CRC
Lt Col Ajay Gangwar
802.3 MAC Sub Layer Protocol
 Question : Why is the min frame size 64 Bytes?
 To make it easier to distinguish valid frames from
stray bits and pieces of frames appearing on the
cable (due to truncation of current frames by nodes
on detecting collisions)
 To prevent station from completing the transmission
of a short frame before feedback of any possible
collision has chance to reach it.
 Question : What will be the effect of improving
NW speeds on frame length and cable length? –
Think it over!

Lt Col Ajay Gangwar


Binary Exponential Backoff Algorithm

 Ethernet uses CSMA/CD protocol

 Nodes are required to wait for random time for


retransmission after collision.

 Need to have the randomization interval grow


exponentially as more and more consecutive
collisions take place. Why?

Lt Col Ajay Gangwar


Binary Exponential Backoff Algorithm
 After collision, time divided into discrete time
slots equal to worst case RTT.
 After first collision, each stn waits 0 or 1 slot
times before trying again.
 After second collision, each stn waits for 0,1,2 or
3 slot times before trying again.
 After i collisions, a random number between 0
and 2i –1 is chosen.

Lt Col Ajay Gangwar


Binary Exponential Backoff Algorithm
 After 10 collisions, randomization interval frozen
at 1023.
 Nodes give up after 16 collisions.
 The algorithm ensures
 low delay when few nodes collide.
 collision is resolved in a reasonable interval when
many nodes collide.
 Question : Why do you think the randomization
interval is frozen after 10 collisions?

Lt Col Ajay Gangwar


Switched Ethernet
 Addresses the problem of increased load which would otherwise
saturate plain Ethernet

 Solution is introduction of a switch containing a high speed


backplane and number of cards with one to eight connectors
 Each connector has a 10Base-T connection to a single host
 Card construction – two types
 All ports wired together to form an on-card LAN.
 Each port on the card is buffered.

Lt Col Ajay Gangwar


Self Study Topics…
 Fast Ethernet – 100 Mbps
 Gigabit Ethernet – 1000 Mbps or 1Gbps

Lt Col Ajay Gangwar


IEEE 802.2 - Logical Link Layer
 We have seen 802.3 frame formats. There are no fields
for seq number or acks.
 So where is the mechanism for:
 Reliable comn
 Interface of NW Layer with different 802.x protocols
 The solution lies in the LLC which forms upper half of Data Link
Layer.
 Runs on top of the 802 protocols.
 Hides the differences of various 802 networks.
 Provides a single format and interface to the NW layer.
 NW layer passes packet to LLC.
 LLC sublayer adds LLC header containing seq and ack nos.

Lt Col Ajay Gangwar


IEEE 802.2 - Logical Link Layer
 Resulting structure inserted into a 802.X payload and transmitted.
 Reverse process takes place at reciever.
 LLC provides 3 options
 Unreliable datagram service.
 Ack datagram service.
 Reliable connection oriented service.
 Based on the HDLC protocol.

Lt Col Ajay Gangwar


The MAC Sub Layer

Wireless LAN Protocols


Wireless Protocols
 IEEE 802.11 – Runs at speed of 1 Mbps or 2 Mbps
 IEEE 802.11a – Wider freq band and runs at a speed of
54 Mbps
 IEEE 802.11b – Same freq band as IEEE 802.11 but
uses different modulation technique. Runs at a speed
of 11 Mbps
 IEEE 802.11g – Another variation
 IEEE 802.15 - Bluetooth
 IEEE 802.16 - WiMAX

Lt Col Ajay Gangwar


Wireless Protocols - General

 Two modes:
 Basis Service Set
(BSS)
 BSS with base stn.
Base stn is also called
an Access Point (AP)
Lt Col Ajay Gangwar
Wireless LAN protocols
 CSMA cannot be used directly! Why?

Because the range of a single radio may not cover the


entire system.

Lt Col Ajay Gangwar


Wireless LAN protocols

The hidden station problem. The exposed station problem.

Lt Col Ajay Gangwar


The Essence of Problem

 In CSMA, a stn senses for carrier in its vicinity.

 Here, stn should know whether there is activity


in the vicinity of the receiver.

Lt Col Ajay Gangwar


Solution – MACA Protocol

Multiple Access with Collision Avoidance (MACA) protocol.


(a) A sending an Request To Send to B.
(b) B responding with a Clear To Send to A.
Lt Col Ajay Gangwar
MACA Protocol

What happens when B and C sent a RTS to A at


the same time?
Lt Col Ajay Gangwar
IEEE 802.11 Wireless LAN

We shall cover:
 The 802.11 Protocol Stack

 The 802.11 Physical Layer

 The 802.11 MAC Sublayer Protocol

 The 802.11 Frame Structure

 Services - OTW

Lt Col Ajay Gangwar


IEEE 802.11 Protocol Stack

Lt Col Ajay Gangwar


IEEE 802.11 Physical Layer
 Five transmission techniques permitted which
differ in achievable speeds and technology used.
 Infrared – Similar to TV remote control
 FHSS – Frequency hopping Spread Spectrum
 DSSS – Direct Sequence Spread Spectrum
 OFDM – Orthogonal Frequency Division
Multiplexing.
 HR-DSSS – High Rate DSSS.

Lt Col Ajay Gangwar


802.11 MAC Sub Layer Protocol
Wireless protocols suffer from ‘The hidden station problem’
and ‘The exposed station problem’.
To overcome this, 802.11 supports two modes of
operation:
DCF – Distributed Coordinated Function.
PCF – Point Coordination Function.

Lt Col Ajay Gangwar


802.11 MAC Sub Layer Protocol

 DCF – Distributed Coordination Function


 does not use any kind of central control
 PCF – Point Coordination Function
 uses base station to control all activity in the cell

Lt Col Ajay Gangwar


Distributed Coordination Function
 DCF uses CSMA/CA protocol which has two
modes.
 First mode is simple CSMA with binary backoff
algorithm
 Other mode uses MACA for Wireless (MACAW)
with virtual channel sensing. We shall see an
example.

Lt Col Ajay Gangwar


Virtual Channel Sensing - CSMA/CA
timer
request to send

clear to send

network allocation vector

C can hear A (RTS) and D can hear B (CTS)

Lt Col Ajay Gangwar


802.11 MAC Sub Layer Protocol
 wireless environments very noisy!
 probability of frame to be transmitted successfully
inversely proportional to the frame length
 damaged frames have to be retransmitted
 So, what is the solution?

Lt Col Ajay Gangwar


802.11 MAC Sub Layer Protocol
Solution:
 each long frame fragmented into smaller pieces,
with fragments having their own Checksum
 the fragments are acknowledged using Stop-
and-Wait protocol
 i.e. fragment k+1 is not transmitted till ack for
fragment k is received.
 Once a channel has been acquired using RTS &
CTS, multiple fragments can be sent in a row.
 Sequence of fragments is called a Fragment
Burst.

Lt Col Ajay Gangwar


802.11 MAC Sub Layer Protocol
 A fragment burst.

 only damaged fragments retransmitted -throughput increased


 NAV keeps the other station quiet only until the next ACK
 How to transmit whole frame without interference? (Point
Coordination Function – Polling/ Beacon Frame)

Lt Col Ajay Gangwar


802.11 MAC Sub Layer Protocol

Inter Frame Spacing in 802.11 to allow DCF and


PCF to coexist in one cell.

Lt Col Ajay Gangwar


The 802.11 Frame Structure

Version
Duration – how long frame & its ack will occupy
Type – Data, control or management
Subtype – RTS or CTS
channel. Aids in NAV mechanism
To/From DS - frame is going or coming from intercell distr sys. Address – MAC addresses. Why four?
MF- more fragments to follow
Seq – to number fragments. 12 bits for frame id
Retry- retxn of earlier frame
Pwr - to put rxr to sleep/ wake it and 4 bits for fragment id.
More – tx has addl frames for rx
Data
W – frame encrypted using WEP
O – process sequence of frames in order Checksum

Lt Col Ajay Gangwar


Any questions please?

You might also like