Top Banner
14-MAC Sub-layer Dr. John P. Abraham Professor UTPA
32

14-MAC Sub-layer

Jan 04, 2016

Download

Documents

Samuel Hanson

14-MAC Sub-layer. Dr. John P. Abraham Professor UTPA. A taxonomy of mechanisms for multi-access. For this you must refer to figure 14.1 on p.242. The data link layer. LLC Logical Link Control Refers upward to higher layers MAC Media Access Control refers downward to lower layers. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 14-MAC Sub-layer

14-MAC Sub-layer

Dr. John P. Abraham

Professor

UTPA

Page 2: 14-MAC Sub-layer

A taxonomy of mechanisms for multi-access

• For this you must refer to figure 14.1 on p.242

Page 3: 14-MAC Sub-layer

The data link layer

• LLC– Logical Link Control– Refers upward to higher layers

• MAC– Media Access Control– refers downward to lower layers

Page 4: 14-MAC Sub-layer

Media Access

• Determine how to get access when there is competition for the media.

• MAC (Medium Access Control) sub-layer takes care of this problem

• MAC is important in LANs where broadcast channels are used

• MAC is the lower part of the data link layer (next to physical layer)

• Mac sub-layer does not guarantee delivery

Page 5: 14-MAC Sub-layer

Static and Dynamic Channel AllocationStatic is discussed below:

• Channelization to refer to a mapping (between communication and a channel in the underlying transmission system).

• Traditional way to allow more than one person to use the medium is to use FDM

• In Frequency division multiplexing, the total bandwidth is divided among the total number of users, each pair is assigned to a unique frequency. This is known as 1-to-1 static.

• FDM works well when there is a small number of users

• When users grow a fast busy signal is issued

Page 6: 14-MAC Sub-layer

Dynamic Channel Allocation

• Need dynamic if the set of entities using the channels change frequently. Think of cellular phones. In dynamic a mapping can be established when a new station appears, or removed when it disappears.

• underlying assumptions of dynamic channel allocation– 1. Station Model– 2. Single Channel Assumption– 3. Collision Assumption– 4. Continuous time– 5. Slotted time

Page 7: 14-MAC Sub-layer

Station Model

• Consists of N independent STATIONS

• Each has programs that produce frames for transmission

• Frames are generated at intervals

• Once a frame is generated the station is locked until the frame is transmitted

Page 8: 14-MAC Sub-layer

Single Channel Assumption

• Only one channel is available for all communication

• All stations transmit on it and all stations receive on that channel

Page 9: 14-MAC Sub-layer

Collision Assumption

• If two frames are transmitted simultaneously, they overlap in time and resulting signal is garbled.

• All stations can detect collisions.

• A collided frame must be retransmitted.

Page 10: 14-MAC Sub-layer

Continuous time

• Frame transmission can start any time

• There is no master clock controlling transmission (as opposed to slotted time discussed next)

Page 11: 14-MAC Sub-layer

Slotted time

• Time is divided into discrete intervals (slots)

• Frame transmission begins at the start of a time slot

Page 12: 14-MAC Sub-layer

Channelization Protocols

• FDMA

• TDMA

• Code Division Multi-Access

• Already covered these

Page 13: 14-MAC Sub-layer

Controlled Access Protocols – Collision free

• Polling: A centralized controller cycles through all stations on the network and gives each an opportunity to transmit a packet, either uses round robin order or priority order

• .

Page 14: 14-MAC Sub-layer

Reservation – Collision freeOften used with satellite transmission, employs a two-step process. Each

transmission is planned in advanced. In the first step, each potential sender specifies whether they have a packet to send during the next round and the controller transmits a list of stations that will be transmitting. In the second step, stations transmit upon their turn.

• Bit-map protocol– A bit map with enough slots for all stations is passed

around– Each station wanting to send a frame and if the frame

is ready in the queue, inserts a 1 bit into its reserved slot in the bit map.

– Once station numbers of all who want to send is known they take turns in order.

Page 15: 14-MAC Sub-layer

Reservation – collision free. Binary count down

• Each station is given a binary address• If a station wants to transmit a frame it

broadcasts its address one bit at a time starting with the high order bit.

• Bits from each station are Ored together the station address starting with the resulting 0 or 1 bit as agreed upon is allowed to go on. If two or more has the same bit then go to the next bit and so on.

Page 16: 14-MAC Sub-layer

Token Passing – collision free

• Token bus– Each station knows the address of the station to its

left and right– The highest numbered station may send the first

frame– Then it passes permission to its immediate neighbor

by send a special frame called a token.– The first station passes the token to the highest

numbered one.• Token Ring

– Physical Ring– Token circulates

Page 17: 14-MAC Sub-layer

Random Access Protocols

• Many networks do not use collision free protocols, especially LANs (Token passing is an exception).

• Instead, a set of computers attached to a shared medium attempt o access the medium without coordination, like the old CB radio.

Page 18: 14-MAC Sub-layer

Random - Multiple Access Protocols

• ALOHA– PURE ALOHA– SLOTTED ALOHA

• CARRIER SENSE MULTIPLE ACCESS PROTOCOLS (CSMA)– Persistent and Nonpersistent CSMA– CSMA with collision detection

Page 19: 14-MAC Sub-layer

ALOHA• 1970 - Norman Abramson – Alohnet.

University of Hawaii

• One main transmitter with a large tower

• Smaller tower and transmitter, each can reach the central transmitter, but not each other.

• Used ground based radio broadcasting

• Two versions of Aloha– Pure– Slotted

Page 20: 14-MAC Sub-layer

Pure ALOHA

• Users may send whenever they have data to send• If collisions occur, collided data will be destroyed• Sender can determine if the data was destroyed by

listening to the channel (the sender can hear too).• If data was destroyed, re-send after waiting random

amount of time• Each station’s transmission is repeated by the central

station, which can be received by all.

Page 21: 14-MAC Sub-layer

Slotted ALOHA

• Divide time into discrete slots, each time slot is enough for one frame

• Users agree on slot boundaries

• A special station emits a signal at the start of each time slot to synchronize

Page 22: 14-MAC Sub-layer

Carrier Sense Multiple Access Protocols (CSMA)

• Listen for a transmission

• If the line is clear then transmit

• Implementations:– Persistent, Non Persistent and p-persistent– CSMA with collision detection

Page 23: 14-MAC Sub-layer

Persistent

• Listen, if busy wait until line is free

• Transmit a frame

• If collision occurred, wait for a random amount of time

• Transmission time delay between two sending computers will cause the second computer not to hear the transmission.

Page 24: 14-MAC Sub-layer

Non-Persistent

• Listen, if busy wait random amount of time and listen again until the line is free

• This approach is less greedy than the Persistent one

• This prevents two or more wanting to get on the line from doing so at the same time when the channel becomes free.

Page 25: 14-MAC Sub-layer

P-persistent CSMA

• Slotted channels.

• Listen, if free send at the beginning of the next slot

Page 26: 14-MAC Sub-layer

CSMA with Collision Detection (CSMA-CD)

• Abort transmission as soon as collision is detected

• Collision is detected by comparing received signal power to sent signal

• If collision is detected, stop transmission and wait for random amount of time

• CSMA/CD is used widely in LAN IEEE 802.3 is an example.

Page 27: 14-MAC Sub-layer

Binary Exponential Backoff

• After a collision occurs, a computer must wait, but how long? In Aloha randomization was used.

• In exponential backoff, the computer must wait twice the amount of time than the previous time. This is repeated if collision occur again.

Page 28: 14-MAC Sub-layer

CSMA-CA

• For wireless.• May not be able to hear computers outside

the range, while the other party can hear. This is known as the hidden station problem.

• Ready to send and clear to send are transmitted first before transmitting packet. The clear to send or the ready to send will be heard by all within range.

Page 29: 14-MAC Sub-layer

BRIDGES

• Connect multiple LANs

• Operate at the Data Link Layer– do not examine the network layer header– doe not care whether it is IP, IPX, or other

Page 30: 14-MAC Sub-layer

Purpose of a Bridge

– Connect dissimilar networks– Have different networks (different floors) and

connect them all together with a bridge– Isolate traffic– Length of cable limitations– Reliability - if one segment goes bad, others

work.– Security (not all traffic go through all cables)

Page 31: 14-MAC Sub-layer

VLANs

• Virtual LAN. Operates under layer 2, 802.1Q. Physically they could be anywhere, but virtually act like a LAN. Without a VLAN we have to physically run wires as requirements change.

• a group of hosts with a common set of requirements that communicate as if they were attached to the same LAN.

• 802.1Q header contains a 4-byte tag header containing a 2-byte tag protocol identifier (TPID) and a 2-byte tag control information (TCI). TCI contains Three-bit user priority, One-bit canonical format indicator (CFI), and Twelve-bit VLAN identifier (VID)-Uniquely identifies the VLAN to which the frame belongs

• There are Static (port based), Dynamic (VLAN management software using originating MAC address, etc.) and Protocol based VLANs (example ARP traffic).

Page 32: 14-MAC Sub-layer

Link-layer Addressing and ARP

• Link layer addressing is the MAC address• Sending device does not know MAC address of destination• ARP is used to resolve MAC address• Each host and router keeps an ARP table which includes TTL• More about ARP later