0% found this document useful (0 votes)
9 views10 pages

Unit II Part II

The document discusses the MAC sublayer of the OSI model, detailing its role in addressing and channel access control for network communication. It explains the concept of MAC addresses, their structure, and their function in identifying devices on a network, as well as comparing MAC and IP addressing. Additionally, it covers various access protocols like ALOHA, CSMA, CSMA/CD, and CSMA/CA, including their mechanisms for collision management and transmission efficiency.

Uploaded by

nishantteach
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views10 pages

Unit II Part II

The document discusses the MAC sublayer of the OSI model, detailing its role in addressing and channel access control for network communication. It explains the concept of MAC addresses, their structure, and their function in identifying devices on a network, as well as comparing MAC and IP addressing. Additionally, it covers various access protocols like ALOHA, CSMA, CSMA/CD, and CSMA/CA, including their mechanisms for collision management and transmission efficiency.

Uploaded by

nishantteach
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Downloaded from www.rgpvnotes.

in

Subject Notes: UNIT-II

MAC Sublayer
In the seven-layer OSI model of computer networking, media access control (MAC) data communication
protocol is a sublayer of the data link layer (layer 2). The MAC sublayer provides addressing and channel
access control mechanisms that make it possible for several terminals or network nodes to communicate
within a multiple access network that incorporates a shared medium, e.g. Ethernet. The hardware that
implements the MAC is referred to as a media access controller.

The MAC sublayer acts as an interface between the logical link control (LLC) sublayer and the network's
physical layer. The MAC layer emulates a full-duplex logical communication channel in a multi-point
network. This channel may provide unicast, multicast or broadcast communication service.

Fig.3.1 MAC Sub Layer


MAC Addressing (Media Access Control address)
In a local area network (LAN) or other network, the MAC (Media Access Control) address is your
computer's unique hardware number.
In a local area network (LAN) or other network, the MAC (Media Access Control) address is your
computer's unique hardware number. (On an Ethernet LAN, it's the same as your Ethernet address.) When
you're connected to the Internet from your computer (or host as the Internet protocol thinks of it), a
correspondence table relates your IP address to your computer's physical (MAC) address on the LAN.

What Is a MAC Address?


The MAC address is a unique value associated with a network adapter. MAC addresses are also known as
hardware addresses or physical addresses. They uniquely identify an adapter on a LAN.
MAC addresses are 12-digit hexadecimal numbers (48 bits in length). By convention, MAC addresses are
usually written in one of the following two formats:
MM:MM:MM:SS:SS:SS
MM-MM-MM-SS-SS-SS

Page no: 1 Get real-time updates from RGPV


Downloaded from www.rgpvnotes.in

The first half of a MAC address contains the ID number of the adapter manufacturer. These IDs are
regulated by an Internet standards body. The second half of a MAC address represents the serial number
assigned to the adapter by the manufacturer.
In the example, 00:A0:C9:14:C8:29 The prefix 00A0C9 indicates the manufacturer is Intel Corporation.

Why MAC Addresses?


Recall that TCP/IP and other mainstream networking architectures generally adopt the OSI model. In this
model, network functionality is subdivided into layers. MAC addresses function at the data link layer (layer
2 in the OSI model). They allow computers to uniquely identify themselves on a network at this relatively
low level.
MAC vs. IP Addressing
Whereas MAC addressing works at the data link layer, IP addressing functions at the network layer (layer
3). It's a slight oversimplification, but one can think of IP addressing as supporting the software
implementation and MAC addresses as supporting the hardware implementation of the network stack. The
MAC address generally remains fixed and follows the network device, but the IP address changes as the
network device moves from one network to another
IP networks maintain a mapping between the IP address of a device and its MAC address. This mapping is
known as the ARP cache or ARP table. ARP, the Address Resolution Protocol, supports the logic for
obtaining this mapping and keeping the cache up to date.
DHCP also usually relies on MAC addresses to manage the unique assignment of IP addresses to devices.

Link MAC Address: https://www.youtube.com/watch?v=W52Wt1LDweQ

Binary Exponential Back-off (BEB) Algorithm


In a variety of computer networks, binary exponential back off or truncated binary exponential back off
refers to an algorithm used to space out repeated retransmissions of the same block of data, often as part
of network congestion avoidance.
Examples are the retransmission of frames in carrier sense multiple access with collision avoidance
(CSMA/CA) and carrier sense multiple access with collision detection(CSMA/CD) networks, where this
algorithm is part of the channel access method used to send data on these networks. In Ethernet networks,
the algorithm is commonly used to schedule retransmissions after collisions. The retransmission is delayed
by an amount of time derived from the slot time and the number of attempts to retransmit.
After c collisions, a random number of slot times between 0 and 2c - 1 is chosen. For the first collision, each
sender will wait 0 or 1 slot times. After the second collision, the senders will wait anywhere from 0 to 3 slot
times (inclusive). After the third collision, the senders will wait anywhere from 0 to 7 slot times (inclusive),
and so forth. As the number of retransmission attempts increases, the number of possibilities for delay
increases exponentially.

Link: https://www.youtube.com/watch?v=WeGNeUHYv5g

Distributed Random Access Schemes/Contention Schemes: for Data Services (ALOHA and Slotted
ALOHA)
ALOHA: ALOHA is a system for coordinating and arbitrating access to a shared communication Networks
channel. The original system used for ground-based radio broadcasting, but the system has been
implemented in satellite communication systems.
A shared communication system like ALOHA requires a method of handling collisions that occur when two
or more systems attempt to transmit on the channel at the same time. In the ALOHA system, a node
transmits whenever data is available to send. If another node transmits at the same time, a collision
occurs, and the frames that were transmitted are lost. However, a node can listen to broadcasts on the
medium, even its own, and determine whether the frames were transmitted.

Page no: 2 Get real-time updates from RGPV


Downloaded from www.rgpvnotes.in

Aloha means "Hello". Aloha is a multiple access protocol at the datalink layer and proposes how multiple
terminals access the medium without interference or collision. A scientest developed a protocol that would
increase the capacity of aloha two-fold. The Slotted Aloha protocol involves dividing the time interval into
discrete slots and each slot interval corresponds to the time period of one frame. This method requires
synchronization between the sending nodes to prevent collisions.
There are two different versions
Types of ALOHA:
(i) Pure ALOHA
(ii) Slotted ALOHA

(i) Pure ALOHA


• In pure ALOHA, the stations transmit frames whenever they have data to send.
• When two or more stations transmit simultaneously, there is collision and the frames are destroyed.
• In pure ALOHA, whenever any station transmits a frame, it expects the acknowledgement from the
receiver.
• If acknowledgement is not received within specified time, the station assumes that the frame (or
acknowledgement) has been destroyed.
• If the frame is destroyed because of collision the station waits for a random amount of time and sends it
again. This waiting time must be random otherwise same frames will collide again and again.
• Therefore, pure ALOHA dictates that when time-out period passes, each station must wait for a random
amount of time before resending its frame. This randomness will help avoid more collisions.

Fig 3.2 Pure ALOHA


(ii) Slotted ALOHA
 Slotted ALOHA was invented to improve the efficiency of pure ALOHA as chances of collision in pure
ALOHA are very high.
 In slotted ALOHA, the time of the shared channel is divided into discrete intervals called slots.
 The stations can send a frame only at the beginning of the slot and only one frame is sent in each slot.
 In slotted ALOHA, if any station is not able to place the frame onto the channel at the beginning of the
slot i.e. it misses the time slot then the station has to wait until the beginning of the next time slot.

Page no: 3 Get real-time updates from RGPV


Downloaded from www.rgpvnotes.in

 In slotted ALOHA, there is still a possibility of collision if two stations try to send at the beginning of the
same time slot.
 Slotted ALOHA still has an edge over pure ALOHA as chances of collision are reduced to one-half.

Fig 3.3 Slotted ALOHA


Link ALOHA: https://www.youtube.com/watch?v=c39k2cIZU74
For Local-Area Networks (CSMA, CSMA/CD, CSMA/CA)
Carrier sense multiple access (CSMA) is a probabilistic media access control (MAC) protocol in which a
node verifies the absence of other traffic before transmitting on a shared transmission medium, such as an
electrical bus, or a band of the electromagnetic spectrum.
Carrier sense means that a 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. If a carrier is sensed, the station waits for
the transmission in progress to finish before initiating its own transmission. In other words, CSMA is based
on the principle "sense before transmit" or "listen before talk".
Multiple access means that multiple stations send and receive on the medium. Transmissions by one node
are generally received by all other stations connected to the medium.

CSMA protocol was developed to overcome the problem found in ALOHA i.e. to minimize the chances of
collision, so as to improve the performance. CSMA protocol is based on the principle of 'carrier sense'. The
station senses the carrier or channel before transmitting a frame. It means the station checks the state of
channel, whether it is idle or busy.
Even though devices attempt to sense whether the network is in use, there is a good chance that two
stations will attempt to access it at the same time. On large networks, the transmission time between one
end of the cable and another is enough that one station may access the cable even though another has
already just accessed it.

Page no: 4 Get real-time updates from RGPV


Downloaded from www.rgpvnotes.in

The chances of collision still exist because of propagation delay. The frame transmitted by one station
takes some time to reach other stations. In the meantime, other stations may sense the channel to be idle
and transmit their frames. This results in the collision.

Fig 3.4 CSMA


There Are Three Different Type of CSMA Protocols
(I) 1-persistent CSMA
(ii) Non- Persistent CSMA
(iii) p-persistent CSMA

(i) 1-persistent CSMA


• In this method, station that wants to transmit data continuously senses the channel to check whether the
channel is idle or busy.
• If the channel is busy, the station waits until it becomes idle.
• When the station detects an idle-channel, it immediately transmits the frame with probability 1. Hence it
is called 1-persistent CSMA.
• This method has the highest chance of collision because two or more stations may find channel to be idle
at the same time and transmit their frames.
• When the collision occurs, the stations wait a random amount of time and start allover again.

Drawback of I-persistent
The propagation delay time greatly affects this protocol. Let us suppose, just after the station 1 begins its
transmission, station 2 also became ready to send its data and senses the channel. If the station 1 signal
has not yet reached station 2, station 2 will sense the channel to be idle and will begin its transmission.
This will result in collision.
Even if propagation delay time is zero, collision will still occur. If two stations became .ready in the middle
of third station's transmission, both stations will wait until the transmission of first station ends and then
both will begin their transmission exactly simultaneously. This will also result in collision.

Fig 3.5 1-persistent CSMA


(ii) Non-persistent CSMA
• In this scheme, if a station wants to transmit a frame and it finds that the channel is busy (some other
station is transmitting) then it will wait for fixed interval oftime.

Page no: 5 Get real-time updates from RGPV


Downloaded from www.rgpvnotes.in

• After this time, it again checks the status of the channel and if the channel is.free it will transmit.
• A station that has a frame to send senses the channel.
• If the channel is idle, it sends immediately.
• If the channel is busy, it waits a random amount of time and then senses the channel again.
• In non-persistent CSMA the station does not continuously sense the channel for the purpose of capturing
it when it detects the end of previous transmission.

Advantage of non-persistent
• It reduces the chance of collision because the stations wait a random amount of time. It is unlikely that
two or more stations will wait for same amount of time and will retransmit at the same time.

Disadvantage of non-persistent
• It reduces the efficiency of network because the channel remains idle when there may be stations with
frames to send. This is due to the fact that the stations wait a random amount of time after the collision.

Fig 3.6 Non-persistent CSMA


(iii) p-persistent CSMA
• This method is used when channel has time slots such that the time slot duration is equal to or greater
than the maximum propagation delay time.
• Whenever a station becomes ready to send, it senses the channel.
• If channel is busy, station waits until next slot.
• If channel is idle, it transmits with a probability p.
• With the probability q=1-p, the station then waits for the beginning of the next time slot.
• If the next slot is also idle, it either transmits or waits again with probabilities p and q.
• This process is repeated till either frame has been transmitted or another station has begun transmitting.

• In case of the transmission by another station, the station acts as though a collision has occurred and it
waits a random amount of time and starts again.
Advantage of p-persistent
• It reduces the chance of collision and improves the efficiency of the network.

Page no: 6 Get real-time updates from RGPV


Downloaded from www.rgpvnotes.in

Fig 3.7 p-persistent CSMA


CSMA/CD - Carrier Sense Multiple Access / Collision Detection
To reduce the impact of collisions on the network performance, Ethernet uses an algorithm called CSMA
with Collision Detection (CSMA / CD): CSMA/CD is a protocol in which the station senses the carrier or
channel before transmitting frame just as in persistent and non-persistent CSMA. If the channel is busy,
the station waits. it listens at the same time on communication media to ensure that there is no collision
with a packet sent by another station. In a collision, the issuer immediately cancel the sending of the
package. This allows to limit the duration of collisions: we do not waste time to send a packet complete if
it detects a collision. After a collision, the transmitter waits again silence and again, he continued his hold
for a random number; but this time the random number is nearly double the previous one: it is this called
back-off (that is to say, the "decline") exponential. In fact, the window collision is simply doubled (unless
it has already reached a maximum). From a packet is transmitted successfully, the window will return to
its original size.

Again, this is what we do naturally in a meeting room if many people speak exactly the same time, they
are realizing account immediately (as they listen at the same time they speak), and they interrupt without
completing their sentence. After a while, one of them speaks again. If a new collision occurs, the two are
interrupted again and tend to wait a little longer before speaking again.

Fig 3.8 CSMA/CD


CSMA/CA - Carrier Sense Multiple Access/Collision Avoidance
CSMA/CA protocol is used in wireless networks because they cannot detect the collision so the only
solution is collision avoidance.
• CSMA/CA avoids the collisions using three basic techniques.

Page no: 7 Get real-time updates from RGPV


Downloaded from www.rgpvnotes.in

(i) Interframe space


(ii) Contention window
(iii) Acknowledgements

Fig 3.9 CSMA/CA

Comparision between all with an BAR Chart

Fig 3.10 Comparision between all with an BAR Chart


1. Interframe Space (IFS)
• Whenever the channel is found idle, the station does not transmit immediately. It waits for a period of
time called interframe space (IFS).
• When channel is sensed to be idle, it may be possible that same distant station may have already started
transmitting and the signal of that distant station has not yet reached other stations.
• Therefore the purpose of IFS time is to allow this transmitted signal to reach other stations.
• If after this IFS time, the channel is still idle, the station can send, but it still needs to wait a time equal to
contention time.
• IFS variable can also be used to define the priority of a station or a frame.
2. Contention Window
• Contention window is an amount of time divided into slots.
• A station that is ready to send chooses a random number of slots as its wait time.
• The number of slots in the window changes according to the binary exponential back-off strategy. It
means that it is set of one slot the first time and then doubles each time the station cannot detect an idle
channel after the IFS time.
• This is very similar to the p-persistent method except that a random outcome defines the number of slots
taken by the waiting station.
• In contention window the station needs to sense the channel after each time slot.

Page no: 8 Get real-time updates from RGPV


Downloaded from www.rgpvnotes.in

• If the station finds the channel busy, it does not restart the process. It just stops the timer & restarts it
when the channel is sensed as idle.
3. Acknowledgement
• Despite all the precautions, collisions may occur and destroy the data.
• The positive acknowledgment and the time-out timer can help guarantee that receiver has received the
frame.

Fig 3.11 Flow Chart of CSMA/CA

LINK: https://www.youtube.com/watch?v=74zlRH-bj2c

Hidden Node Problem


In the case of wireless network it is possible that A is sending a message to B, but C is out of its range and
hence while "listening" on the network it will find the network to be free and might try to send packets to
B at the same time as A. So, there will be a collision at B. The problem can be looked upon as if A and C are
hidden from each other. Hence it is called the "hidden node problem".
Exposed Node Problem
If C is transmitting a message to D and B wants to transmit a message to A, B will find the network to be
busy as B hears C trnasmitting. Even if B would have transmitted to A, it would not have been a problem at
A or D. CSMA/CD would not allow it to transmit message to A, while the two transmissions could have
gone in parallel.

Page no: 9 Get real-time updates from RGPV


Fig 3.12 Hidden and Exposed Node Problem
Collision Free Protocols: Basic Bit Map, BRAP, Binary Count Down
Collision Free Protocols
A collision-free protocol for transmitting frames between stations connected over a shared transmission
medium such as an IEEE 802.3 Ethernet LAN. A logical ring is formed and a token is circulated among the
connected stations part of the logical ring (not all connected stations are required to be part of the logical
ring). Transmitting from any one station, part of the logical ring, is permitted only while holding the
token, therefore preventing collisions. A collision-free protocol, over a standard Ethernet infrastructure,
becomes feasible, yet remains compatible with the standard collision protocol, thus improving
performances.
Basic Bit Map
1. Assume N stations are numbered from 1 to N.
2. There is a contention period of N slots (bits).
3. Each station has one slot time during the contention period, numbered 1 to N.
4. Station J sends a 1-bit reservation during Jth slot time if it wants to transmit a frame.
5. Every station sees all the 1-bit reservation transmitted during the contention period, so each
station knows which stations want to transmit.
6. After the contention period, each station that asserted its desire to transmit sends its frame in the
order of station number.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy