Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK...

90
Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub- layer DATALINK LAYER

Transcript of Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK...

Page 1: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Rizwan RehmanCentre for Computer Studies

Dibrugarh University

Media Access Sub-layer

DATALINK LAYER

Page 2: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

OSI

Application

Presentation

Session

Transport

Network

Data Link

Physical

Framing

Error control

Flow control

Transmission/reception of frames

MEDIA ACCESS sublayer

LOGICAL LINK sublayer

Page 3: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Single communication channel that is shared by all the machines on the network

Broadcast Networks

1 2 3 4 5

computer

cable

Packets Short messages sent by any machine are received by all others

Fields

Address

General Rule: Smaller, geographically localized networks

Quick Review…

Page 4: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Packets 1 2 3 4 5

ALL machines receive it, but one processes it

Also possible to address a packet to ALL machines (special code in the address field)

Mode of operation: Broadcasting

Also possible to address a packet to a SUBSET of machines(group number code in the address field)

Mode of operation: MulticastingQuick Review…

3

Page 5: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

BROADCAST NETWORKS AND THEIR PROTOCOLS

The Medium Access Sublayer

deals with

Page 6: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE STANDARD 802 FOR LANs

The Medium Access Sublayer

4.1 THE CHANNEL ALLOCATION PROBLEM

4.2 MULTIPLE ACCESS PROTOCOLS

DATALINK SWITCHING

VLANs

Page 7: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

The Channel Allocation Problem

Central theme How to allocate a single broadcast channel among competing users?

Static FDM /TDM (Frequency/Time Division

Multiplexing) FDM : Radio/TV broadcasts TDM : POTS (Plain Old Telephone System)

GSM uses both (Global System for Mobile Communications)

Wasteful of bandwidth

Dynamic Pure/ Slotted ALOHA Carrier Sense Multiple Access (CSMA)

Protocols Collision free protocols

Page 8: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Dynamic Channel Allocation Technologies

1. Pure ALOHA

2. Slotted ALOHA

3. CSMA

4. CSMA/CD (old ETHERNET)

5. Switching (Fast ETHERNET)

6. Token passing (Token Ring )

Page 9: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

ALOHA Protocols

Anyone may transmit whenever they want. (Continuous time model.)

Each radio detects collisions by listening to its own signal. A collision is detected when a sender doesn't receive the signal that it just sent.

After a collision, wait a random amount of time and transmit the same frame again. This technique is known as backoff.

Back in 1970, the University of Hawaii built a network out of radios that broadcast signals. Basic idea:

Page 10: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Pure ALOHA

Page 11: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

A Shared Medium Collision Domain

Page 12: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Slotted ALOHA

Time is divided into slots… can only transmit at start of slot

Vulnerable period halved => max. eff is doubled

Requires sync of clocks

Still poor at hi-loads

Page 13: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Carrier Sense, Multiple Access (CSMA)

We can improve the performance of our simple network greatly if we introduce carrier sensing (CS). With carrier sensing, each host listens to the data being transmitted over the cable. A host will only transmit its own frames

when it cannot hear any data being transmitted by other hosts.

When a frame finishes, an interframe gap of about 9.6sec is allowed to pass before another host starts transmitting its frame.

Communication Link

Page 14: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Carrier Sense Multiple Access (CSMA)

Improves performance when higher medium utilisation

When a node has data to transmit, the node first listens to the cable (using a transceiver) to see if a carrier (signal) is being transmitted by another node.

Page 15: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Persistent and Nonpersistent CSMA

Comparison of the channel utilization

versus load for various random

access protocols.

Page 16: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

CSMA with Collision Detection

CSMA/CD can be in one of three states: contention, transmission, or

idle.

Page 17: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Wireless LAN Protocols

Wireless LAN. (a) A transmitting.

(b) B transmitting.

Page 18: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Wireless LAN Protocols

The MACA protocol. (a)

A sending an RTS to B.

(B responding with a CTS to A.

Page 19: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.3: CSMA/CD Bus LAN

The 802.3 standard describes the operation of the MAC sub-layer in a bus LAN that uses carrier sense, multiple access with collision detection (CSMA/CD). Beside carrier sensing, collision detection

and the binary exponential back-off algorithm, the standard also describes the format of the frames and the type of encoding used for transmitting frames.

The minimum length of frames can be varied from network to network. This is important because, depending on the size of the network, the frames must be of a suitable minimum length.

The standard also makes some suggestions about the type of cabling that should be used for CSMA/CD bus LANs.

The CSMA/CD Bus LAN is also widely called Ethernet.

Page 20: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet MAC Sublayer Protocol

Frame formats. (a) DIX Ethernet,

(b) IEEE 802.3.

Page 21: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.3: MAC Addresses

Every network card in the world has a unique 46-bit serial number called a MAC address. The IEEE allocates these numbers to network card manufacturers who encode them into the firmware of their cards. The destination and source address fields

of the MAC frame have 48 bits set aside (the standard also allows for 16-bit addresses but these are rarely used).

The most significant bit is set to 0 to indicate an ordinary address and 1 to indicate a group address (this is for multicasting, which means that frames are sent to several hosts). If all 48 bits are set to 1 then frames are broadcast to all the hosts.

If the two most significant bits are both zero then the 46 least significant bits contain the MAC addresses of the source and destination hosts.

Page 22: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.3: Minimum Frame Length

When a host transmits a frame, there is a small chance that a collision will occur. The first host to detect a collision transmits a 48-bit jam sequence.

To ensure that any hosts involved with the collision realise that the jam sequence is associate with their frame, they must still be transmitting when the jam sequence arrives. This means that the frame must be of a minimum length.

The worse case scenario is if the two hosts are at far ends of the cable. If host A’s frame is just reaching host B when it begins transmitting, host B will detect the collision first and send a jam signal back to host A.

Page 23: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

CSMA/CD Minimum Ethernet Frame Size

To ensure that no node may completely receive a frame before the transmitting node has finished sending it, Ethernet defines a minimum frame size (i.e. no frame may have less than 46 bytes of payload).

The minimum frame size is related to the distance which the network spans, the type of media being used and the number of repeaters which the signal may have to pass through to reach the furthest part of the LAN.

Together these define a value known as the Ethernet Slot Time, corresponding to 512 bit times at 10 Mbps.

Page 24: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.3: Minimum Frame Length

The longest time between starting to transmit a frame and receiving the first bit of a jam sequence is twice the propagation delay from one end of the cable to the other.

This means that a frame must have enough bits to last twice the propagation delay.

The 802.3 CSMA/CD Bus LAN transmits data at the standard rate of r = 10Mbps.

The speed of signal propagation is about v = 2108m/s.

A BPacket starts attime 0

A BPacket at time tp-

A BCollision occurs

at time tp

Jam sequence

A BJam sequence getsback to A at 2tp

Jam sequence

(a)

(c)

(b)

(d)

Page 25: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.3: Minimum Frame Length

In order to calculate the minimum frame length, we must first work out the propagation delay from one end of the cable to the other.

Page 26: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.3: Minimum Frame Length

Propagation delay time: sec2102

102

400 68

V

dtprop

The round-trip propagation delay is, of course, twice this. Thus the round trip delay is

sec42 propt

With a data rate of MbpsR 10 each bit has

durationsec1.0

000,000,10

11 R

tb

Example #1: Cable = 400m, transm. speed = 10 Mbit/sec, propagation speed = 2*10**8 m/sec

Page 27: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.3: Minimum Frame Length

The number of bits we can fit into a round-trip propagation delay is

bitst

tn

b

pb 40

1.0

42

The minimum frame length is thus 40 bits (5 bytes).

A margin of error is usually added to this (often to make it a power of 2) so we might use 64 bits (8 bytes).

Example #1 – cont.

Page 28: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Two nodes are communicating using CSMA/CD protocol.

Speed transmission is 100 Mbits/sec and frame size is 1500 bytes. The propagation speed is 3*10**8 m/sec.

Calculate the distance between the nodes such that the

time to transmit the frame = time to recognize that the collision have occurred.

46

102.110100

81500

R

Lt frame

propframetripround ttT 2_

54

1062

102.1

2

frameprop

tt

V

dtprop

kmVtd prop 181018103106 385

EEE 802.3: Minimum Frame LengthExample # 2

Page 29: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.3: Minimum Frame Length

The standard frame length is at least 512 bits (64 bytes) long, which is much longer than our minimum requirement of 64 bits (8 bytes). We only have to start worrying when the

LAN reaches lengths of more than 2.5km.

802.3 CSMA/CD bus LANs longer than 500m are usually composed of multiple segments joined by in-line passive repeaters, which output on one cable the signals received on another cable. When we work out the minimum frame

length for these longer LANs, we also have to take the delays caused by the passive repeaters (about 2.5sec each) into account as well.

Page 30: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Shortest Ethernet Frame

64 bytes sent at 10Mbps 51.2sec 500m/segment, 4 repeaters between

nodes 2500m 25 sec propagation delay The frame should be longer enough for

sender to detect the collision(2x25 or about 50 sec )

Why specify a shortest frame of 64byte?

Node A

Node B

R1 R2 R3 R4

500m 25 sec propagation delay

Page 31: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.3: Non-Deterministic

The 802.3 CSMA/CD bus LAN is said to be a non-deterministic network. This means that no host is guaranteed to be able to send its frame within a reasonable time (just a good probability of doing so). When the network is busy, the number of

collisions rises dramatically and it may become very difficult for any hosts to transmit their frames.

A real-time computing application (such as an assembly line) will demand that data is transmitted within a specified time period. Since the 802.3 bus LAN cannot

guarantee this, its use for real-time applications may not only be undesirable but potentially dangerous in some situations.

Page 32: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Performance

Page 33: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Physical Layer standards

10Base5 10 Mbps, Baseband transmission, 500m

cable length10Base2 10 Mbps, Baseband transmission,

~200m cable length10Base-T 10 Mbps, Baseband transmission, UTP

cable100Base-TX 100 Mbps, Baseband transmission, UTP

cable

Page 34: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet 10Base-T & 100Base-TX

Wiring Unshielded Twisted Pair

(UTP)

Category 5 wiring is best Cat 3 and Cat 4 in

some older installations

Bundle of eight wires (only uses four)

Terminates in RJ-45 connector

Page 35: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

10Base-T & 100Base-TX hubs

UTP-based networks use hubs to interconnect NICs each UTP cable runs directly from a

NIC to a hub

Page 36: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

10Base-T & 100Base-TX hubs

Hubs have many ports, each of which has one incoming network cable

Hubs are usually located in computer rooms, or network distribution cupboards a patch panel (or patch bay) is used to

connect between hubs and the wall sockets throughout a building

Page 37: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

10Base-T & 100Base-TX wiring

Wiring 100 meters maximum distance hub-

to-station Can use multiple hubs (max 4) to

increase the distance between any two stations

100 m 100 m

200 m

Page 38: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

10Base-T to 100Base-TX

Upgrading from 10Base-T to 100Base-TX Need new hub

May have some 10 Mbps ports to handle 10Base-T NICs

May have autosensing 10/100 ports that handle either

Need new NICs Only for stations that need more speed

No need to rewire This would be expensive

Page 39: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Multiple Hubs in 10Base-T

Farthest stations in 10Base-T can be five segments (500 metres apart) 100 metres per segment

Separated by four hubs

100m

100m

100m

100m

100m

500m, 4 hubs

10Base-T hubs

Page 40: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Multiple Hubs in 100Base-TX Limit of Two Hubs in 100Base-TX

Must be within a few metres of each other

Maximum span ~200 metres Shorter distance span than 10Base-T

100m

100m

2 Co-locatedHubs

100Base-TXHubs

Page 41: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Latency and Congestion with hubs Ethernet is a shared media LAN

Only one station can transmit at a time

Even in multi-hub LANs Others must wait This causes delay

One Station Sends

All OtherStationsMust Wait

Page 42: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Fast Ethernet

The original fast Ethernet cabling.

Page 43: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Gigabit Ethernet

Gigabit Ethernet cabling.

Page 44: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.2: Logical Link Control

(a) Position of LLC. (b) Protocol formats.

Page 45: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Repeaters

Regenerate the signal Provide more flexibility in network

design Extend the distance over which a

signal may travel down a cable Example Ethernet HUB

Page 46: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Repeaters and Hubs

Connect together one or more Ethernet cable segments of any media type

If an Ethernet segment were allowed to exceed the maximum length or the maximum number of attached systems to the segment, the signal quality would deteriorate.

Page 47: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Repeaters and Hubs Used between a pair of segments

Provide signal amplification and regeneration to restore a good signal level before sending it from one cable segment to another

Page 48: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Bridge

Join two LAN segments (A,B), constructing a larger LAN

Filter traffic passing between the two LANs and may enforce a security policy separating different work groups located on each of the LANs.

Page 49: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Local Internetworking

A configuration with four LANs and two bridges.

Page 50: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Bridges Simplest and most frequently used

Transparent Bridge (meaning that the nodes using a bridge are unaware of its presence).

Bridge could forward all frames, but then it would behave rather like a repeater

Bridges are smarter than repeaters!

Page 51: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Bridges

A bridge stores the hardware addresses observed from frames received by each interface and uses this information to learn which frames need to be forwarded by the bridge.

Page 52: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Switch Modern LANs

Fundamentally similar to a bridge Supports a larger number of connected

LAN segments Richer management capability. Logically partition the traffic to travel only

over the network segments on the path between the source and the destination (reduces the wastage of bandwidth)

Page 53: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Switch Benefits

Improved security users are less able to tap-in into other

user's data Better management

control who receives what information (i.e. Virtual LANs)

limit the impact of network problems Full duplex

rather than half duplex required for shared access

Page 54: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Switched LAN

• Hub and Switched LAN– hub simulates a single shared medium– switch simulates a bridged LAN with one

computer per segment

Page 55: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Switches

Highly Scalable10Base-T switches Competitive with 100Base-TX

hubs in both cost and throughput

Increasingly used to desktops100Base-TX switches Higher performance (and

price)Gigabit Ethernet switches Very expensive

Page 56: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Switches No limit on number of

Ethernet switches between farthest stations So no distance

limit on size ofswitched networks

Page 57: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Switches

Ethernet Switches must be Arranged in a Hierarchy (or daisy chain) Only one possible path between any

two stations, switches

4

5 6

2 3

1

Path=4,5,2,1,3

Page 58: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Repeaters, Hubs, Bridges, Switches, Routers and Gateways

(a) Which device is in which layer.

(b) Frames, packets, and headers.

Page 59: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Repeaters, Hubs, Bridges, Switches, Routers and Gateways

(a) A hub. (b) A bridge. (c) a switch.

Page 60: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Repeater HUBs

Page 61: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Switches

Page 62: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Switches

Repeater HUBs

Page 63: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.
Page 64: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Ethernet Switches and Multicast Traffic

Multicast Traffic from F is delivered to all output interfaces (ports) which asks for it

Page 65: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Virtual LANs (VLANs)

Cisco Systems

Page 66: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Cisco Systems

Page 67: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Virtual LANs (VLANs)

Cisco Systems

Page 68: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Virtual LANs (VLANs)

Cisco Systems

Page 69: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Switches Versus Routers

Switches Fast Inexpensive No benefits of

alternative routing No hierarchical

addressing

Routers Slow Expensive Benefits of

alternative routing Hierarchical

addressing

“Switch where you can; route where you must”

Page 70: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Where Does Wireless RF Live?ISM Band: Industrial, Scientific, Medical

902-928 MHz

2400-2483.5 MHz

5725-5850 MHz

802.11/802.11b 802.11a

Bluetooth

Cordless Phones

Home RF

Baby Monitors

Microwave Ovens

Old Wireless

Page 71: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.11 – Wireless Ethernet

Two configurations:

Ad-hoc. No central control, no

connection to the outside world

Infrastructure. Uses fixed network

Access Point to connect to the

outside world

Page 72: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.11 – Wireless Ethernet

Uses CSMA/CA protocol. CSMA part is

the same as in 802.3 Ethernet

CA stands for Collision Avoidance and works as follows:

If the carrier is present for a specific time period, transmitter sends a frame

If no collision receiver send ack

Transmitter can also reserve the channel by sending Request to Send (RTS)

Page 73: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.11 – Wireless Ethernet

IEEE 802.11 does not implement

Collision Detection because it cannot

detect collisions at the receiver end

(hidden terminal problem)

To avoid collisions the frame contains

field indicating the length of transmission

Other stations defer transmission

Page 74: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

The 802.11 Protocol Stack

Page 75: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Where does 802.11 live in the OSI?

Telnet, FTP, Email, Web, etc.

IP, ICMP, IPX

TCP, UDP

Logical Link Control - 802.2(Interface to the upper layer protocols)

MAC

802.3, 802.5, 802.11

LAN: 10BaseT, 10Base2, 10BaseFL

WLAN: FHSS, DSSS, IR

Application

PresentationSession

Transport

Network

Data Link

Physical

Wireless lives at Layers 1 & 2 only!

Page 76: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

The 802.11 MAC Sublayer Protocol

(a) The hidden station problem.

(b) The exposed station problem.

Page 77: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

CSMA-CA + Acknowledgement

Carrier Sense Multiple Access with Collision Avoidance

• Device wanting to transmit senses the medium (Air)

• If medium is busy - defers

• If medium is free for certain period (DIFS) - transmits frame

How CSMA-CA works:

Latency can increase if “air” is very busy! Device has hard time finding “open air” to send frame!

* DIFS - Distributed Inter-Frame Space * (approx 128 µs)

Page 78: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

The 802.11 MAC Sublayer Protocol

The use of virtual channel sensing using CSMA/CA.

Page 79: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

The 802.11 Frame Structure

The 802.11 data frame.

Page 80: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Summary

IEEE 802.11b (WiFi) is a wireless LAN technology that is rapidly growing in popularity

Convenient, inexpensive, easy to use

Growing number of “hot spots” everywhere airports, hotels,

bookstores, Starbucks, etc

Estimates: 70% of WLANs are insecure!

Page 81: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

IEEE 802.5 and Token Ring

Page 82: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

FDDI Fiber Distributed Data Interface

– data rate 100Mbps, use as a backbone– With multi-mode fiber any given ring

segment can be up to 200 km in length. A total of 500 stations can be connected with a maximum separation of 2 km.

– two complete rings to overcome failures

Page 83: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

High Speed LANs

• FDDI: Fiber Distributed Data Interface• 100Mbps, distance up to 200km, 100

hosts mainly used as a backbone

Page 84: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

1000900800700600500400300200100

0

Mbps

FE

EthernetEthernet

Gigabit Ethernet(Switched)

ATM OC-12(Switched)

ATM OC-3(Switched)

Fast Ethernet(Switched)

FDDI(Switched)

Token Ring(Switched)

Ethernet(Switched)

Switched LAN Type

Bandwidth Scaling

Cisco Systems

Page 85: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Aloha Efficiency Frame Time- Amount of time needed to

transmit the standard fixed-length frame.

Let new frames be generated at S frame per frame time.

If S>1, the user are generating frames at very higher rate than channel can handle.

For reasonable throughput 0<S<1 Again consider there are k attempts of

transmission of previously collided frames . Let G be the Poisson mean for frames per time. Then at low load S=0 there will be few collisions. At high load G>S.

So on average S=GP 0 where P0 is probability that frame donot collide.

Page 86: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Slotted Aloha Now in case of slotted aloha each frame is

Transmitted at a particular time slot.

So the probability that there will be no other

Traffic during same time slot is e-G therefore

Now S=Ge-G

Page 87: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Persistent and Non Persistent CSMA

1-persistent : the station transmit with a probability of 1 whenever it finds the channel idle.

Non-persistent . P-persistent. CSMA/CD

Page 88: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Carrier Sense 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

Page 89: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

Carrier Sense Multiple Accesswith 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

Page 90: Rizwan Rehman Centre for Computer Studies Dibrugarh University Media Access Sub-layer DATALINK LAYER.

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