Data Link Layer MAC New
Data Link Layer MAC New
Responsible framing
and MAC address
and Multiple Access 2
Control
MEDIA ACCESS CONTROL SUB LAYER
3
MAC LAYER
¢ Data link Layer Deals with transmitting bits from one end to
other end of a point-to-point Link
4
¢ It is the bottom part of DLL
MEDIUM SHEARING TECHNIQUE
5
RANDOM ACCESS TECHNIQUE: PURE
ALOHA
Pure ALOHA Protocol Description
The farthest
station
Station B
receives
the first
bit of the
frame at
time t=
tprop
7
RANDOM ACCESS TECHNIQUE: PURE
ALOHA
Procedure for ALOHA protocol
8
FRAMES IN A PURE ALOHA NETWORK
9
PURE ALOHA PROTOCOL
¢ If the frame transmission time is Tfr sec, then the vulnerable time
is = 2 Tfr sec.
¢ This means no station should send during the Tfr -sec before this
station starts transmission and no station should start sending
during the Tfr -sec period that the current station is sending. 10
PURE ALOHA PROTOCOL
• The throughput for pure ALOHA is S = G × e −2G .
• The maximum throughput Smax = 0.184 when G= (0.5).
Where
• Tfr= Average transmission time for a frame
• G= Average number of frames generated by the system
(all stations) during one frame transmission time(Tfr)
• Maximum throughput of pure aloha (Smax = 0.184 )
occurs at G=0.5 (which correspond to total arrival rate of
“one frame per vulnerable period”)
• Smax = 0.184 =>max pure aloha throughput =18% of
channel capacity
11
Note
12
SLOTTED ALOHA
¢ Pure ALOHA vulnerable time = 2 x Tfr because there is no rule that
defines when the station can send
13
SLOTTED ALOHA
• Throughput for slotted ALOHA is S = G × e−G .
• The maximum throughput Smax = 0.368 when G = 1(which
correspond to total arrival rate of “one frame per vulnerable
period”)
• Slotted ALOHA vulnerable time = Tfr
14
Note
15
Efficiency of Aloha
S = throughput =(success rate)
0.4
0.3
Slotted Aloha
0.2
0.1
Pure Aloha
16
CARRIER SENSE MULTIPLE ACCESS (CSMA)
¢ To improve performance, we should avoid transmissions that
are definite to cause collisions
¢ Collision can only happen when more than one station begin
transmitting within a short time (the propagation time
period) 17
CARRIER SENSE MULTIPLE ACCESS
(CSMA)
18
Carrier Sense Multiple Access (CSMA)
19
TYPES OF CSMA PROTOCOLS
1. Non-Persistent CSMA
2. 1-Persistent CSMA
3. p-Persistent CSMA
20
NONPERSISTENT CSMA
o A station with frames to be sent, should sense the medium
1. If medium is idle, transmit; otherwise, go to 2
2. If medium is busy, (back off) wait a random amount of time and
repeat 1
o Non-persistent Stations are deferential (respect others)
o Performance:
o Random delays reduces probability of collisions because two
stations with data to be transmitted will wait for different amount
of times.
o Bandwidth is wasted if waiting time (back off) is large because
medium will remain idle following end of transmission even if one
or more stations have frames to send
Random
Waiting times
Wasted time
21
1-PERSISTENT CSMA
n To avoid idle channel time, 1-persistent protocol used
n Station wishing to transmit listens to the medium:
1. If medium idle, transmit immediately;
2. If medium busy, continuously listen until medium becomes idle;
then transmit immediately with probability 1
§ Performance
§ 1-persistent stations are selfish
§ If two or more stations becomes ready at the same time, collision
guaranteed
22
P-PERSISTENT CSMA
n Time is divided to slots where each Time unit (slot) typically equals
maximum propagation delay
n Station wishing to transmit listens to the medium:
1. If medium idle,
§ transmit with probability (p), OR
§ wait one time unit (slot) with probability (1 – p), then repeat 1.
2. If medium busy, continuously listen until idle and repeat step 1
3. Performance
n Reduces the possibility of collisions like non persistent
n Reduces channel idle time like 1-persistent
23
FLOW DIAGRAM FOR THREE PERSISTENCE METHODS
24
CSMA/CD (COLLISION DETECTION)
of its own
signal, it means collision occurred
26
CSMA/CD PROTOCOL
28
Note: a = maximum propagation delay
What is x?
CSMA/CD
29
SIMPLIFIED ALGORITHM OF CSMA/CD
30
DOES SWITCHED NETWORK NEED CSMA/CD?
31
ETHERNET PROTOCOL
ETHERNET PROTOCOL
ETHERNET FRAME
•Ethernet operates in the data link layer and the physical layer.
•Ethernet supports data bandwidths from 10Mbps through 100Gbps.
Ethernet Encapsulation
•Ethernet standards define both the Layer 2 protocols and the Layer 1
technologies.
•The minimum Ethernet frame size is 64 bytes and the maximum is 1518
bytes.
Ethernet Frame Fields •Frame smaller than the minimum or greater than the maximum are dropped.
•Dropped frames are likely to be the result of collisions or other unwanted
signals and are therefore considered invalid.
ETHERNET PROTOCOL
ETHERNET FRAME (CONT.)
Addresses •Every frame that enters a switch is checked for new addresses.
•The frame is forwarded based on the CAM.
Filtering •Since the switch knows where to find a specific MAC address, it
can filter the frames to that port only.
The combination of
Layer 2 addresses Layer 3 addresses
MAC and IP
are used to move are used to move
facilitate the End-
the frame within the packets through
to-End
the local network remote networks.
communication.
Introduction to •ARP allows the source to request the MAC address of the destination.
•The request is based upon the layer 3 address of the destination
ARP (known by the source).
•Entries are removed from the device’s ARP table when its cache
Removing Entries timer expires.