MAC Sublayer
MAC Sublayer
MAC Sublayer
Pronaya Bhattacharya
THE MEDIUM ACCESS CONTROL SUBLAYER
T = 1/μC − λ
• In our example, if C is 100 Mbps, the mean frame length, 1/μ, is 10,000 bits, and
the frame arrival rate, λ, is 5000 frames/sec, then T = 200 μsec.
• Now let us divide the single channel into N independent subchannels, each with
8
capacity C /N bps. The mean input rate on each of the subchannels will now be
DYNAMIC CHANNEL ALLOCATION TECHNIQUES :
Many different dynamic allocation strategies have been developed. They
can be broadly classified as:
Contention resolution approaches(Random
Access/Contention based) - users transmit a packet when they
have data to send- if multiple users transmit at the same time a collision
occurs and the packets must be retransmitted according to some rule.
Perfectly scheduled approaches(Controlled
Access/Contention Free) - Users transmit contention free
according to a schedule that is dynamically formed based on which
users have data to send, e.g. polling, reservations. Various combinations
of these approaches also exist. beginning with a basic contention
resolution approach.
As we look at different approaches keep in mind the following two
performance criteria:
1. The delay at low load.
2. The throughput (channel efficiency) at high load.
Dynamic Channel Allocation in LANs and MANs-ASSUMPTIONS
1.Station Model.
• Independent stations for generating frames.
• Once a frame has been generated, the station is blocked until the frame
has been transmitted.
2.Single Channel Assumption. A single channel for all communication (send
and receive), and all stations are equivalent.
3.Collision Assumption. If the transmission of two frames overlap in time, a
collision occurs. All stations can detect collisions. A collided frame must be
retransmitted.
4.Time assumption.
(a) Continuous Time- Frame transmission can begin at any instant.
(b) Slotted Time-Frame Transmission begins at start of Slot. 0-Idle slot, 1-transmitting,>1-collision.
(b) No carrier sense. Stations cannot sense the channel before trying to use 10
it.
ALOHA Protocol
• ALOHA is developed in the 1970s at the University of Hawaii for
wireless LAN and can be used for any shared medium.
13
Pure ALOHA
The farthest
station
Station B
receives
the first
bit of the
frame at
time t= tp
Binary Exponential Back-Off Algorithm
12.16
Example 12.1 (continued)
12.17
Slotted ALOHA
• Time is divided into slots equal to a frame transmission time (Tfr)
• A station can transmit at the beginning of a slot only
• If a station misses the beginning of a slot, it has to wait until the beginning
of the next time slot.
• A central clock or station informs all stations about the start of a each slot
• VUNERALBLE TIME = Tfr
VUNERABLE TIME FOR PURE ALOHA
and SLOTTED ALOHA
• Vunerable time for PURE ALOHA: 2 * Tfr, where Tfr denotes the
average frame transmission time.
• Vunerable time for SLOTTED ALOHA: Tfr, where Tfr denotes the
average frame transmission time.
PROBLEM: An ALOHA network transmits 200-bit frames on a shared
channel of 200 kbps. What is the requirement to make this frame
collision-free?
ANS: Average frame transmission time Tfr is 200 bits/200 kbps or 1 ms.
Under all loads, S=GP0, where P0 is the probability that a frame does not
suffer a collision.
How to Compute G:
• If we let ns to be the number of stations and nfs to be the number
of frames a station can send per second then G = ns × nfs × Tfr.
• For Slotted ALOHA, as a frame can be sent in a beginning of a slot,
Throughput for PURE
• Vulnerable period:ALOHA
Interval that will be 2 * T two fr,
frame time long(2G) so -
• Probability of no other frame is generated
2 G during
the vulnerable period is:
P0 e
• Using S = GP0, we get 2 G
S Ge
• Maximum efficiency can be obtained by computing
maxima – at G=1/2, i.e S=(1/2)*e-2*(1/2) = S= (½)*e-1 =
1/2e =1/2*2.718= 1/5.346= 0.1839.
i.e S = 0.1839 at G =1/2.
max max
Throughput for Slotted
• Vulnerable period: Interval ALOHA
that will be T one frame time long(G) so,
fr,
FORMULAS FOR
• Probability of no collision: P0=e-G.
PURE ALOHA
• Probability of frame suffering a collision: 1-P0=1-e-G YOURSELF.
P = e-G.(1-e-G)k-1
Performance Comparison of
ALOHA
Slotted ALOHA can double the throughput
of pure ALOHA
• When two stations both begin transmitting at exactly the same time, how long will it
take them to realize that there has been a collision ?
The minimum time to detect the collision is the time it takes the signal to
propagate from one station to the other.
• How long could the transmitting station be sure it has seized the network ?
• It is worth noting that no MAC-sublayer protocol guarantees reliable delivery. Even
in the absence of collisions, the receiver may not have copied the frame correctly
due to various reasons (e.g., lack of buffer space or a missed interrupt).
Collision and abortion in CSMA/CD
Flow diagram for the CSMA/CD
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.
(i) Interframe space
(ii) Contention window
(iii) Acknowledgements
41
1.0 0.01-persistent CSMA
0.9 Non-persistent CSMA
0.8
0.7
0.1-persistent CSMA
0.6
0.5-persistent CSMA
0.5
S
0 1 2 3 4 5 6 7 8 9
G
CONTROLLED ACCESS
In controlled access, the stations consult one another
to find which station has the right to send. A station
cannot send unless it has been authorized by other
stations. We discuss three popular controlled-access
methods.
Reservation
Polling
Token Passing
Collision- Free Protocols during contention period
Almost collisions can be avoided in CSMA/CD, but they can still occur during the
contention period.
The collision during contention period adversely affects the system performance, this
happens when the cable is long and length of packet are short. This problem becomes
serious as fiber optics network come into use. Here we shall discuss some protocols that
resolve the collision during the contention period.
Bit-map Protocol
Binary Countdown
Limited Contention Protocols
The Adaptive Tree Walk Protocol
46
POLLING
Select and poll functions in polling access method
49
Logical ring and physical topology in Token-passing Access Method
Efficiency of Token Ring Protocol-
Ring Latency –
The time taken by a single bit to travel around the ring is known as ring latency.
RL= d/v+N*b
d-length of the ring
v- velocity of data in the ring
N-no.of stations in the ring
b-time taken by each station to hold the bit before transmitting it(bit-delay is in bits)
Cycle Time –
The time taken by the token to complete one revolution of the ring is known as cycle time.
Cycle time = Tp + (THT*N)
Where, THT - Token Holding Time (max. time a token frame can be held by a station)
Tp - Propagation delay(d/v)
51
THT = Tf + Ring latency
= Tf + Tp + N*b (In most cases, bit delay is 0)
THT = Tf
So, THT = Tf + Tp
where Tt = transmission delay
where Tf = transmission delay
Tp = propagation delay
Tp = propagation delay
54
CHANNELIZATION
5.62
Notable IEEE Standards
IEEE 802
formats LAN/MAN
Standards for LAN/MAN bridging and
IEEE 802.1 management and remote media access
control (MAC) bridging.
Standards for Logical Link Control (LLC)
IEEE 802.2
standards for connectivity.
Ethernet Standards for Carrier Sense
IEEE 802.3 Multiple Access with Collision Detection
(CSMA/CD).
IEEE 802.4 Standards for token passing bus access.
Standards for token ring access and for
IEEE 802.5 communications between LANs and
MANs
IEEE 802.11 Wireless LAN
IEEE 802.15.1 Bluetooth
IEEE 802.16 Wireless MAN-WIMAX
What is Ethernet?
Ethernet is a family of computer networking technologies for local
area networks (LANs) and metropolitan area networks (MANs). It was
commercially introduced in 1980 and first standardized in 1983 as IEEE
802.3,[1] and has since been refined to support higher bit rates and
longer link distances.
Over time, Ethernet has largely replaced competing wired LAN
technologies such as token ring, FDDI, and ARCNET
Figure 5.54: IEEE standard for LANs
5.65
SOME IMPORTANT CONCEPT REGARDING MAC ADDRESSES
Show how the address 47:20:1B:2E:08:EE is sent out on transmission line.
Solution
The address is sent left to right, byte by byte; for each byte, it is sent right to left, bit
by bit, as shown below:
Solution
a. Unicast(4A= 0100 1010)
b. Multicast(47=0100 0111)
c. Broadcast(FF= 1111 1111)
Ethernet frame
PREAMBLE:The first field of the 802.3 frame contains 7 bytes(56bits )of
alternating 0s and 1s that alerts the receiving system to coming frame and
enables it to synchronize its input timing.
START FRAME DELIMITER(SFD):The second field (1byte:10101011)signals
the beginning of the frame . The SFD warns the station that this is the last
chance for synchronization . The last 2 bits is11 and alerts the receive that the
next field is the destination address.
DESTINATION ADDRESS(DA):The DA field is 6bytes and contain the
physical address of the destination station to receive the packet
SOURCE ADDRESS : The SA field is also 6 bytes and contains the physical
address of the sender of the packet.
LENGTH/TYPE : This field is defined as a type field or length field.Theoriginal
Ethernet used this field as the type field to define the upper –layer protocol
using the MAC frame.
DATA : This field carries data encapsulated from the upper –layer protocols.It is
a minimum of 46 and a maximum of 1500 bytes.
CRC : The last filed contains error detection information,in this case a CRC-32.
Ethernet Cabling
The most common kinds of Ethernet cabling.
Ethernet Cabling (2)
Three kinds of Ethernet cabling.
(a) 10Base5, (b) 10Base2, (c) 10Base-T.
Ethernet Cabling (3)
Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented.
Ethernet Cabling (4)
(a) Four physical LANs organized into two VLANs, gray and
white, by two bridges. (b) The same 15 machines organized
into two VLANs by switches.
Token bus
network(802.4)
Token bus is a network implementing the token ring protocol over a
"virtual ring" on a coaxial cable.
A token is passed around the network nodes and only the node
possessing the token may transmit. If a node doesn't have anything to
send, the token is passed on to the next node on the virtual ring. Each
node must know the address of its neighbor in the ring, so a special
protocol is needed to notify the other nodes of connections to, and
disconnections from, the ring.
Token bus was standardized by IEEE standard 802.4. It is mainly used for
industrial applications. The main difference is that the endpoints of the
bus do not meet to form a physical ring.
Due to difficulties handling device failures and adding new stations to a
network, token bus gained a reputation for being unreliable and difficult
to upgrade.
In order to guarantee the packet delay and transmission in Token bus
protocol, a modified Token bus was proposed in Manufacturing
Automation Systems and flexible manufacturing system (FMS).
A means for carrying Internet Protocol over token bus was developed.
The IEEE 802.4 Working Group is disbanded and the standard has been
withdrawn by the IEEE.
Token Ring Network(IEEE 802.5)
• The Token Ring network was originally developed by IBM in the 1970s. It
is still in IBM's primary local-area network (LAN) technology. The related
IEEE 802.5 specification is almost identical to and completely compatible
with IBM's Token Ring network.
• Token Ring and IEEE 802.5 networks are basically compatible, although
the specifications differ in minor ways. IBM's Token Ring network specifies
a star, with all end stations attached to a device called a multi station
access unit (MSAU). In contrast, IEEE 802.5 does not specify a topology,
although virtually all IEEE 802.5 implementations are based on a star.
• Token Ring and IEEE 802.5 are two principal examples of token-passing
networks (FDDI is the other).
• Token-passing networks move a small frame, called a token, around the
network. Possession of the token grants the right to transmit.
• If a node receiving the token has no information to send, it passes the
token to the next end station. Each station can hold the token for a
maximum period of time
• If a station possessing the token does have information to transmit, it
seizes the token, alters 1 bit of the token (which turns the token into a
start-of-frame sequence), appends the information that it wants to
transmit, and sends this information to the next station on the ring.
• Therefore, collisions cannot occur in Token Ring networks. If early token
release is supported, a new token can be released when frame
transmission is complete.
SAS: Single Attachment Station
DAS: Dual Attachment Station