Access Control Update in Networking
Access Control Update in Networking
In computer networking,
• Point to Point link is a dedicated link that exists between the two stations.
• The entire capacity of the link is used for transmission between the two connected stations only.
• Depending upon the Type Of Channel, the data flow takes place between the stations.
Example-
2. Broadcast Link-
Example-
Access Control-
Access Control is a mechanism that controls the access of stations to the transmission link.
• Multiple stations place their data packets on the link and starts transmitting simultaneously.
• Such a situation gives rise to a collision among the data packets.
• Collision of data packets causes the data to get corrupt.
Example-
• They prevent the collision or deal with it and ensures smooth flow of traffic on the network.
• They are implemented at the data link layer of the OSI reference model.
• Time of the link is divided into fixed size intervals called as time slots or time slices.
• Time slots are allocated to the stations in Round Robin manner.
• Each station transmit its data during the time slot allocated to it.
• In case, station does not have any data to send, its time slot goes waste.
Example-
Size Of Time Slots-
The size of each time slot is kept such that each station gets sufficient time for the following
tasks-
Thus,
where-
• Tt = Transmission delay
• Tp = Propagation delay
NOTE-
• We have assumed that all the stations want to send the packets of same size.
• This keeps Tt constant for all the stations.
• We have considered the worst case when both the stations are present at the two extreme ends.
• This ensures Tp will be maximum and all the stations will get sufficient time to propagate their
data.
Efficiency-
Important Formulas-
Disadvantage-
• If any station does not have the data to send during its time slot, then its time slot goes waste.
• This reduces the efficiency.
• This time slot could have been allotted to some other station willing to send data.
PRACTICE PROBLEM BASED ON TIME DIVISION MULTIPLEXING (TDM)-
Problem-
If transmission delay and propagation delay of a packet in Time Division Multiplexing is 1 msec
each at 4 Mbps bandwidth, then-
Solution-
Given-
Part-01:
a = 1 msec / 1 msec
a=1
Calculating Efficiency-
Efficiency (η)
= 1 / (1+a)
= 1 / (1 + 1)
=1/2
= 0.5
= 50%
Part-02:
We know-
Thus,
Effective Bandwidth
= 0.5 x 4 Mbps
= 2 Mbps
Part-03:
We know-
2 Mbps = N x 2 Kbps
N = 1000
Polling-
• A polling is conducted in which all the stations willing to send data participates.
• The polling algorithm chooses one of the stations to send the data.
• The chosen station sends the data to the destination.
• After the chosen station has sent the data, the cycle repeats.
Example-
Here-
Efficiency-
Efficiency (η) = Useful Time / Total Time
Thus,
Advantages-
Disadvantages-
CSMA / CD-
CSMA / CD stands for Carrier Sense Multiple Access / Collision Detection.
Carrier Sense Multiple Access ensures fewer collisions as the station is required to first sense the
medium (for idle or busy) before transmitting data. If it is idle then it sends data, otherwise it
waits till the channel becomes idle. However there is still chance of collision in CSMA due to
propagation delay. For example, if station A wants to send data, it will first sense the medium. If
it finds the channel idle, it will start sending data. However, by the time the first bit of data is
transmitted (delayed due to propagation delay) from station A, if station B requests to send data
and senses the medium it will also find it idle and will also send data. This will result in collision
of data from station A and B.
How?
• Each station can sense the carrier only at its point of contact with the carrier.
• It is not possible for any station to sense the entire carrier.
• Thus, there is a huge possibility that a station might sense the carrier free even when it is actually
not.
Example-
• If station A senses the carrier at its point of contact, then it will find the carrier free.
• But the carrier is actually not free because station D is already transmitting its data.
• If station A starts transmitting its data now, then it might lead to a collision with the data
transmitted by station D.
In CSMA / CD,
Meaning-
• Each station must transmit the data packet of size whose transmission delay is at least twice its
propagation delay.
• If the size of data packet is smaller, then collision detection would not be possible.
We know-
L / B >= 2 x D / V
Thus,
L >= 2 x B x D / V
Understanding the Condition To Detect Collision With Example
• Let us consider the scenario at time 10:59:59:59 when the packet is about to reach the
station D.
• At this time, station D senses the carrier.
• It finds the carrier free and starts transmitting its data packet.
• Now, as soon as station D starts transmitting its data packet, a collision occurs with the data
packet of station A at time 11:00 am.
• After collision occurs, the collided signal starts travelling in the backward direction.
• The collided signal takes 1 hour to reach the station A after the collision has occurred.
• For station A to detect the collided signal, it must be still transmitting the data.
• So, transmission delay of station A must be >= 1 hour + 1 hour >= 2 hours to detect the
collision.
• That is why, for detecting the collision, condition is Tt >= 2Tp.
Case-01:
Case-02:
• After the collision, the transmitting station waits for some random amount of time called as back
off time.
• After back off time, it tries transmitting the data packet again.
• If again the collision occurs, then station again waits for some random back off time and then
tries again.
• The station keeps trying until the back off time reaches its limit.
• After the limit is reached, station aborts the transmission.
• Back off time is calculated using Back Off Algorithm.
CSMA / CD Flowchart-
Thus,
Thus,
Efficiency-
Thus,
Thus,
Here,
• c is a variable.
• This is because number of collisions that might occur before a successful transmission are
variable.
Important Notes-
Note-01:
Important Formulas-
Token Passing
Time Conversions-
In token passing,
Conversion Chart
Token Passing Terminology-
1. Token
2. Ring Latency
3. Cycle Time
1. Token-
2. Ring Latency-
Time taken by a bit to complete one revolution of the ring is called as ring latency.
Let us derive the expression for ring latency.
If-
(Bit delay is the time for which a station holds the bit before transmitting to the other side)
Then-
Notes-
Time taken by the token to complete one revolution of the ring is called as cycle time.
If-
(Token Holding Time is the time for which a station holds the token before transmitting to the
other side)
Then-
Token Passing-
• All the stations are logically connected to each other in the form of a ring.
• The access of stations to the transmission link is governed by a token.
• A station is allowed to transmit a data packet if and only if it possess the token otherwise not.
• Each station passes the token to its neighboring station either clockwise or anti-clockwise.
Assumptions-
Efficiency-
In one cycle,
• Useful time = Sum of transmission delay of N stations since each station sends 1 data packet = N
x Tt
• Total Time = Cycle time = Tp + N x THT
Thus,
In this strategy,
• Station keeps holding the token until the last bit of the data packet transmitted by it takes the
complete revolution of the ring and comes back to it.
Working-
The following diagram illustrates these steps for station-1. Same procedure is repeated at every
station.
Token Holding Time-
We know,
In this strategy,
• Station releases the token immediately after putting its data packet to be transmitted on the ring.
Working-
Step-01: At Station-1:
Station-1
Station-2
• Receives packet-1
• Transmits packet-1
• Acquires the token
• Transmits packet-2
• Releases the token
Step-03: At Station-3:
Station-3
• Receives packet-1
• Transmits packet-1
• Receives packet-2
• Transmits packet-2
• Acquires the token
• Transmits packet-3
• Releases the token
Step-04: At Station-4:
Station-4
• Receives packet-1
• Transmits packet-1
• Receives packet-2
• Transmits packet-2
• Receives packet-3
• Transmits packet-3
• Acquires the token
• Transmits packet-4
• Releases the token
Step-05: At Station-1:
• Receives packet-1
• Discards packet-1 (as its journey is completed)
• Receives packet-2
• Transmits packet-2
• Receives packet-3
• Transmits packet-3
• Receives packet-4
• Transmits packet-4
• Acquires the token
• Transmits packet-1 (new)
• Releases the token
In this manner, the cycle continues.
Efficiency-
There exists only one data packet on the ring at There exists more than one data packet on the
any given instance. ring at any given instance.
It has low efficiency as compared to ETR. It has high efficiency as compared to DTR.
Important Notes-
Note-01:
In token passing,
• It is the responsibility of each transmitting station to remove its own data packet from the ring.
Note-02:
• If the strategy used is not mentioned, then consider Early Token Retransmission strategy.
Problem-11:
Find the efficiency of the ring where data rate of the link is 4 Mbps, number of stations are 20,
separated by 100 meters and bit delay in each station is 2.5 bits. Assume early token reinsertion
with packet size of 1000 bits and transmission speed is 2 x 108 m/sec.
Solution-
Given-
= 20 x 100 meters
= 2000 meters
= 2 km
= 250 μsec
= 2 km / (2 x 108 m/sec)
= 10-5 sec
= 10 μsec
Bit delay
= 25 bits
= 0.625 μsec
Ring latency
= 22.5 μsec
Calculating value of ‘a’-
= Ring latency / Tt
= 0.09
Calculating Efficiency-
Efficiency(η)
= 1 / (1 + a/N)
= 1 / (1 + 0.09 / 20)
= 1 / 1.0045
= 0.9955
= 99.55%
Problem-14:
A fibre optic token ring used as a MAN is 200 km long and runs at 100 Mbps. After sending a
frame, a station drains the frame from the ring before regenerating the token. The signal
propagation speed in the fibre is 200,000 km/sec and maximum frame size is 1 KB. What is the
maximum efficiency at N=1?
Solution-
Given-
• Distance = 200 km
• Bandwidth = 100 Mbps
• Propagation speed = 200,000 km/sec = 2 x 108 m/sec
• Frame size = 1 KB
• Number of stations = 1
• Strategy used is Delayed Token Reinsertion
Transmission delay
= 1 KB / 100 Mbps
= 81.92 μsec
Propagation delay
= Distance / Speed
= 10-3 sec
= 1 msec
= Tp / Tt
= 1 msec / 81.92 μsec
= 0.0122 x 103
= 12.2
Calculating Efficiency-
Efficiency(η)
= 1 / [1 + a x (1+ 1/N)]
= 1 / [1 + 12.2 x (1+1)]
= 1 / 25.4
= 0.0394
= 3.94%
• The reason behind this much less efficiency is that the distance is too large here.
• Ethernet and Token Ring are meant for LANs.
• If used for MANs or WANs, the efficiency will fall drastically.
Problem-15:
At a propagation speed of 200 m/μsec, what is the effective length added to a ring by a bit delay
at each repeater or station for-
A. 1 Mbps line
B. 40 Mbps line
Solution-
Part-01:
= 1 bit / 1 Mbps
= 1 μsec
= 200 m
Part-02:
= 1 bit / 40 Mbps
= 0.025 μsec
=5m
Problem-16:
Consider a 10 Mbps token ring LAN with a ring latency of 400 μs. A host that needs to transmit
seizes the toke. Then it sends a frame of 1000 bytes, removes the frame after it has circulated all
around the ring and finally releases the token. This process is repeated for every frame.
Assuming that only a single host wishes to transmit, the effective data rate is _____ .
A. 1 Mbps
B. 2 Mbps
C. 5 Mbps
D. 6 Mbps
Solution-
Given-
• Bandwidth = 10 Mbps
• Ring latency = 400 μsec
• Frame size = 1000 bytes
• Number of stations = 1
• Strategy used is Delayed Toke Reinsertion
Transmission delay
= 800 μsec
= Ring latency / Tt
= 0.5
Calculating Efficiency-
Efficiency(η)
= 1 / [1 + a x (1+ 1/N)]
= 1 / [1 + 0.5 x (1+1)]
=1/2
= 0.50
= 50%
= Throughput
= Efficiency(η) x Bandwidth
= 0.5 x 10 Mbps
= 5 Mbps