CT1303 LAN
Rehab AlFallaj
LAN MAC PROTOCOLS
Protocol:
Set of rules that governs data communications.
Represent agreements between sender and receiver.
Defines what is communicated, how it is communicated, and when it is
communicated.
Without a protocol, two devices may be connected but NOT communicating.
Key elements of protocol are:
Syntax
Semantics
timing
LAN MAC PROTOCOLS
Syntax:
Refers to the structure or format of the
data, the order in which they are presented.
Semantics:
Refers to the meaning of each section of bits.
How is a particular pattern to be interpreted.
Timing:
When data should be sent.
How fast they can be sent
LAN MAC PROTOCOLS
Fixed assignment protocols:
Frequency division multiple access.
Time division multiple access.
Wavelength division multiple access.
Code division multiple access.
Dynamic MAC protocols:
Round robin protocols:
Contention protocols
Reservation protocols
LAN MAC PROTOCOLS:
FIXED ASSIGNMENT PROTOCOLS
each node is allocated a
predetermined fixed amount of the channel resources :
Frequency-division Multiple Access (FDM)
Time-division Multiple access (TDMA)
Wavelength-division Multiple Access (WDMA)
Code-division multiple Access (CDMA)
LAN MAC PROTOCOLS:
FREQUENCY-DIVISION MULTIPLE ACCESS
The available bandwidth is divided into sub-channels.
Multiple channel access is then achieved by allocating communicating nodes with different carrier frequencies of the
spectrum.
The bandwidth of each node’s carrier is constrained within certain limits such that no interference, or overlap, occurs
between different nodes.
LAN MAC PROTOCOLS:
FREQUENCY-DIVISION MULTIPLE ACCESS
C = n. w
C: bandwidth of channel Hz
w.: bandwidth of each sub-channels Hz
n: number of connected nodes to the channel.
Example:
Channel with 48 kHz bandwidth, its
frequency 60 kHz- 108 kHz. If each node needs 4 kHz. Then 48÷4= 12 sub-
channels needed. Therefore; 12 devices or nodes can use the channel at the
same time.
LAN MAC PROTOCOLS:
FDMA
LAN MAC PROTOCOLS:
FDMA
LAN MAC PROTOCOLS:
TIME-DIVISION MULTIPLE ACCESS
In TDMA, a radio spectrum is divided into time slots. These time slots are
allocated for each user to transmit and receive information.
The number of time slots is called a
frame. Information is transferred and
received in form of frame. A frame is
consists a preamble, an information
message and trial bits.
LAN MAC PROTOCOLS:
TDMA
LAN MAC PROTOCOLS:
TDMA
LAN MAC PROTOCOLS
LAN MAC PROTOCOLS:
WAVELENGTH-DIVISION MULTIPLE ACCESS
Mostly used in fiber optics because fiber optics have a very wide frequency
bandwidth.
The available bandwidth is divided into sub-channels.
It achieved by allocating communicating nodes with different wavelength of
signals.
each node’s carrier is constrained within certain limits of wavelength such that
no interference, or overlap, occurs
between different nodes.
LAN MAC PROTOCOLS:
WAVELENGTH-DIVISION MULTIPLE
ACCESS
LAN MAC PROTOCOLS:
CODE-DIVISION MULTIPLE ACCESS
all users transmit information
simultaneously by using the same carrier frequency.
Each user has its own CodeWord,
which is orthogonal to other users. To
detect the message, the receiver should know the codeword used by the
transmitter.
many users share the same frequency.
LAN MAC PROTOCOLS: CDMA:
Frequency Hopping spread spectrum (FHSS)
Direct Sequence Spread Spectrum (DSSS)
LAN MAC PROTOCOLS: CDMA
In CDMA unlike FDMA and TDMA the
number of users is not limited. It has a soft capacity. But due to large number of users its performance degrades.
In CDMA, each user operates independently
with no knowledge of the other users.
LAN MAC PROTOCOLS:
CDMA
FIXED ASSIGNMENT PROTOCOLS
Advantages:
Effective usage of the channel
Channel Multiple access with no overlaps, collisions.
Effective if the channel capabilities is great;
frequency bandwidth, wavelength, transmit rate.
Disadvantages:
In computer networks, channel resources may not be used at the optimal level.
DYNAMIC MAC PROTOCOL
No fixed assignment for transmission media or any network resources .. It allows transmission when needed.
Round Robin Protocols
Contention Protocols
Reservation Protocols
DYNAMIC MAC PROTOCOL:
ROUND ROBIN PROTOCOLS
Round Robin Protocol:
an arrangement of choosing all elements in a group equally in some rational order.
Token pass
Polling.
Token pass protocol:
Ring Topology; IMB, FDDI.
A signal called a token is passed between nodes that authorizes the node to communicate
Token is needed to allow transmission of data.
DYNAMIC MAC PROTOCOL:
TOKEN PASS PROTOCOL
DYNAMIC MAC PROTOCOL:
TOKEN PASS PROTOCOL
DYNAMIC MAC PROTOCOL:
TOKEN PASS PROTOCOL
Advantages:
Allow transmission only when needed.
Limited delay time; where maximum delay time is not more than time needed to pass the token over network.
D: n T+ t
D: maximum delay time
n: number of nodes in Ring network.
T: time needed to transmit data.
t: total time needed to pass the token.
DYNAMIC MAC PROTOCOL:
TOKEN PASS PROTOCOL
Disadvantages:
Losing the token resulting in disabling all network.
If token doesn’t work, network will stop.
t time needed to pass the token is wasted and not being used to transmit data.
t time increase if network is large and token needed to transmit to farther places.
Ring topology disadvantage applies as this protocol applies with ring topology.
DYNAMIC MAC PROTOCOL:
POLLING PROTOCOL
Polling Protocol:
used usually with tree topology.
Used in networks with mainframe. Or one central station control the network.
Works with topologies in which one device is designated as a primary station and the other devices are secondary.
All data exchange must be made through the primary device.
The primary device controls the link,
secondary devices follow its instructions.
DYNAMIC MAC PROTOCOL:
POLLING PROTOCOL
Primary station asks all secondary devices if they have data be to sent.
Secondary devices reply with data or NAK if not.
Primary receive the data and determine
where to send it to other secondary devices or keep it for it self.
Primary device asks the secondary devices again if they have data to be sent …
DYNAMIC MAC PROTOCOL:
POLLING PROTOCOL
Advantages:
Limited delay time; complete circle polling time.
transmission is guaranteed with full transmission media bandwidth and resources.
Disadvantages:
Time to poll data from each secondary
device is wasted when it has not data to be sent.
If more secondary devices are connected, then wasted polling time increased.
Polling protocol stopped if primary device stopped or disabled.
DYNAMIC MAC PROTOCOL:
POLLING PROTOCOL
DYNAMIC MAC PROTOCOL:
POLLING PROTOCOL
Polling protocols:
Roll-call Polling:
Primary device asks (polls) all secondary devices in one polling cycle.
Hub-polling :
Primary device start to poll first secondary
device, and after it completes sending its data it pass the polling to the next secondary device ..
etc
Save more time where secondary devices usually close to each other more than primary device, so save polling time.
DYNAMIC MAC PROTOCOL:
POLLING PROTOCOL
Binary Tree polling:
Divide the network to two sections, polls the first section, if there is ACK, re-divide the section into two sections and polls again. Until secondary
device is allocated.
This type is preferred if number of nodes are huge with low traffic.
In case of high traffic in network, previous type are preferred more.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Contention protocol:
Used to best utilize the channel.
Used effectively when nodes send data discontinuous; computer network.
Sometimes is called: Multiple Access
Nodes are connected to channel via two transmission media; one to send data and one to receive data.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
data is send in form of packets or data frame.
Packet, data frame consists of sender address, destination address, data, data used to control media.
Devices compete to transmit its data, therefore:
Collision may occur.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Pure Aloha Multiple Access
Slotted Aloha Multiple Access
Carrier Sense Multiple Access (CSMA)
Carrier Sense Multiple Access/ Collision Detection (CSMA/CD)
Carrier Sense Multiple Access/ Collision Avoidance (CSMA/CA)
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Pure Aloha Multiple Access:
Used in wireless LAN.
First used in Haway uni, in ALOHA.
Best used when traffic is low.
Node transmits data frame, then wait to receive it.
If it receives it as transmit , the transmission is OK.
If the received frame is different, then collision is occur, and node needed to re- transmit the data frame again after a
random delay time .
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Advantages:
Simple to implement.
Transmission only when needed.
Disadvantages:
Unlimited delay if number of connected nodes are huge; lots of collisions.
No effective utilizing to channel due to collisions.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Slotted Aloha Multiple Access:
Similar to Pure Aloha, but;
Time is divided into slots.
Node send data in starting of time slot not any time.
Node receives data frame when the next time slot, if data frame is exactly same as the data packet being sent, transmission is OK, otherwise; collision may occur, re-
transmit packet again after a random delay time.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Advantages:
Decrease collisions.
Collision may occur only at starting of time slot not at any time as Pure Aloha Multiple Access.
better in utilizing channel than Pure Aloha Multiple Access.
Simple to implement.
Disadvantages:
Collisions still may occur .
Unlimited delay if number of connected nodes are huge; lots of collisions.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Carrier Sense Multiple Access (CSMA):
A protocol in which a node verifies the
absence of other traffic before transmitting on a shared transmission medium.
Transmitter uses feedback from a receiver to determine whether another transmission is in progress before initiating a
transmission. That is, it tries to detect the presence of a carrier wave from another station before attempting to transmit.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Carrier sense, if busy wait for a random period.
When carrier is idle, encapsulate data into a packets, then send it through the
transmission channel.
Reads what in channel.
Check integrity of packet, if packet sent
similar to received, transmission successes.
Otherwise, collision occurs, wait for random period then repeat the transmission again.
Less collisions occur than ALOHA, due to
carrier sense before transmitting data
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Better use of CSMA achieved with better carrier sense.
Carrier sense may be difficult when network channel is long.
CSMA is not effective with long network channel .
Slotted CSMA: dividing time to slots,
sense only when starting time of the
slot.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Non CSMA persistent:
In this protocol, before sending the data, the station senses the channel and if the channel is idle it starts transmitting the
data. But if the channel is busy, the station does not continuously sense it but instead of that it waits for random amount of time and repeats the algorithm.
Persistent CSMA
When the sender (station) is ready to
transmit data, it checks if the transmission medium is busy. If so, it then senses the medium continually until it becomes idle, and then it transmits the message (packet).
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
P-persistent CSMA:
When the sender is ready to send data, it checks continually if the medium is busy. If the medium becomes idle, the sender
transmits a frame with a probability p. If the station chooses not to transmit (the
probability of this event is 1-p), the sender waits until the next available time slot and transmits again with the same probability p.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Advantages:
Less collisions probabilities compared to ALOHA.
Transmission on demand only.
Disadvantages:
Unknown delay when more nodes are connected.
Collisions still occur.
Network with heavy traffic may not benefit with CSMA.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Carrier Sense Multiple Access\collision Detection (CSMA\CD):
It uses a carrier sensing scheme in which a
transmitting data station detects other signals while transmitting a frame, and stops
transmitting that frame, transmits a jam signal, and then waits for a random time interval before trying to resend the frame.
When collision detection: it sends Jamming Signal to tell other stations that collision has occurred.
CSMA/CD is used to improve CSMA
performance by terminating transmission
as soon as a collision is detected
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Main procedure:
Is my frame ready for transmission? If yes, it goes on to the next point.
Is medium idle? If not, wait until it becomes ready
Start transmitting.
Did a collision occur? If so, go to collision detected procedure.
Reset retransmission counters and end frame transmission.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Collision detected procedure:
Continue transmission (with a jam signal instead of frame header/data/CRC) until
minimum packet time is reached to ensure that all receivers detect the collision.
Increment retransmission counter.
Was the maximum number of transmission attempts reached? If so, abort transmission.
Calculate and wait random back off period based on number of collisions.
Re-enter main procedure at stage 1.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL
Advantages:
Less collision occurred compared to CSMA.
Transmission on demand.
Disadvantages:
Unknown delay when more nodes are connected.
Wasted time exits due to collisions, but better performance and wasted time compare to CSMA.
Used mostly in IEEE LANs, and called
Ethernet Protocol; developed by Xerox.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL CSMA\CA
Carrier Sense Multiple Access\Collision Avoidance CSMA\CA
Each station will sense the channel and inform all the rest station in the network that it will start transmitting data over the channel.
In this protocol the collision may occur
between Request To Send RTS frames or Confirm to Send CTS frames. Collisions don’t occur between data frames.
DYNAMIC MAC PROTOCOL:
CONTENTION PROTOCOL CSMA\CA
Advantages:
Collisions do NOT occur between data frames.
Transmission on demand only.
Channel utilization is efficient when request and confirm to send done successfully.
Used mostly and better for Wireless networks.
Disadvantages:
Unlimited waste of time (waiting) if nodes connected are large.
Used in Wireless LANs and Apple Talk for
apple devices.
CONTENTION PROTOCOL ADVANTAGES AND
DISADVANTAGES:
Contention protocol advantages and disadvantages:
Advantages:
Transmission on demand.
Better used for discontinuous transmission of signal and data (computer networks in general)
Better used in networks with light traffic.
Disadvantages:
Large number of connected nodes results in not utilizing the channel effectively.
Wasted time (waiting)
Sensing channels becomes difficult in large and long network channels
DYNAMIC MAC PROTOCOL:
RESERVATION PROTOCOLS:
To better channel utilizing and eliminate attenuation may occur in network
channels due to collisions;
Distributed Queue Dual Bus (DQDB):
This protocol is intended to be used on a dual-bus configuration (unidirectional) fiber optic networks.
Two buses , each one in one direction, and each node is connected to the two buses.
Centralized unit for each bus to control transmission.
DYNAMIC MAC PROTOCOL:
RESERVATION PROTOCOLS:
DQDB
DYNAMIC MAC PROTOCOL:
RESERVATION PROTOCOLS:
DQDB
Each centralized unit will send empty frames to the channel, which can be used by connected nodes to transmit data.
Each frame has 2 flags; one to identify whether the frame is empty and ready for used or has been reserved by another node.
The other flag identifies if there is a
Reservation request of frames on the other channel (bus).
This protocol needed 2 counters in each
connected node, that determine the number previous reservations for each channel, the counters will be incremented each time a frame with reservation flag on passes the connected node.
DYNAMIC MAC PROTOCOL:
RESERVATION PROTOCOLS:
DQDB
When a node wants to send data to another node:
Chooses which channel will be used.
Turn on the reservation flag on a frame on the other channel.
The node will then use one of the empty frames with its data.
This protocol is used in Ring networks,
LAN and MAN networks.
DYNAMIC MAC PROTOCOL:
RESERVATION PROTOCOLS:
DQDB
Advantages:
Transmission guaranteed.
Limit delay time.
Channel utilization %100
Disadvantages:
Number of software needed for each
connected node to control and determine the location of the node in the network.
The need for cartelized unit to control frames.
If the cartelized unit stopped, the protocol is stopped.