Documente Academic
Documente Profesional
Documente Cultură
In random access or contention methods, no station is superior to another station and none is assigned
the control over another. No station permits, or does not permit, another station to send. At each
instance, a station that has data to send uses a procedure defined by the protocol to make a decision on
whether or not to send.
ALOHA
Carrier Sense Multiple Access
Carrier Sense Multiple Access with Collision Detection
Carrier Sense Multiple Access with Collision Avoidance
ALOHA
ALOHA
Aloha is a packet-switching system. The time interval required to transmit one packet is called a slot.
When transmissions from two or more users overlap, they destroy each other, whether it is
complete overlap or partial overlap – collision takes place.
The maximum interval over which two packets can overlap and destroy each other is called the
vulnerable period.
The mode of random access in which users can transmit at anytime is called pure Aloha. In this case,
the vulnerable period is two slot times.
A version in which users are restricted to transmit only from the instant corresponding to the slot
boundary is referred to as slotted Aloha. The alignment of transmission to coincide with the slot
boundary means that packets can only experience complete overlap, so the vulnerable period is
only one slot time.
Frames in Pure ALOHA
5
ALOHA – vulnerable time
Procedure for pure ALOHA protocol
Backoff time
Solution
Average frame transmission time :
Tfr is 200 bits/200 kbps or 1 ms. The vulnerable time is 2 × 1 ms = 2 ms.
This means no station should send later than 1 ms before this station
starts transmission and no station should start sending during the one 1-
ms period that this station is sending.
Throughput versus offered traffic for ALOHA systems.
The throughput for pure ALOHA is
S = G × e −2G .
The maximum throughput
Smax = 0.184 when G= (1/2).
WHERE,
G is the average number of frames generated by the system during one frame transmission time.
ie., if one-half a frame is generated during one frame transmission time, then 18.4 percent of these frames reach their
destination successfully.
EXAMPLE
A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is
the throughput if the system (all stations together) produces
a. 1000 frames per second b. 500 frames per second
c. 250 frames per second.
SOLUTION
The frame transmission time is 200/200 kbps or 1 ms.
a. If the system creates 1000 frames per second, this is 1 frame per millisecond. The load is 1.
In this case S=G×e−2G or S=0.135(13.5%)
This means that the throughput is 1000 × 0.135 = 135 frames. Only 135 frames out of 1000 will
probably survive.
b. If the system creates 500 frames per second, this is (1/2) frame per millisecond. The load is (1/2).
In this case ,
S = G × e −2G or S = 0.184 (18.4%).
This means that the throughput is 500 × 0.184 = 92 and that only 92 frames out of 500 will probably
survive.
Note that this is the maximum throughput case, percentagewise.
c. If the system creates 250 frames per second, this is (1/4) frame per millisecond.
The load is G=(1/4).
In this case ,
S = G × e −2G or S = 0.152 (15.2 %).
This means that the throughput is 250 × 0.152 = 38. Only 38 frames out of 250 will probably survive.
Slotted ALOHA
• Divide time into slots of Tfr seconds and force the station to send only at the beginning of the time slot.
• If a station misses the beginning of the time slot, it must wait for the next slot, for it to send its frame.
VULNERABLE PERIOD OF SLOTTED ALOHA
Throughput of slotted Aloha
A slotted ALOHA network transmits 200-bit frames on a shared channel of 200 kbps.
What is the throughput if the system (all stations together) produces a. 1000 frames per
second b. 500 frames per second c. 250 frames per second.
Solution:
The frame transmission time is 200/200 kbps or 1 ms.
a.
If the system creates 1000 frames per second, this is 1 frame per millisec. The load is 1. In this
case S = G× e −G or S = 0.368 (36.8 percent). This means that the throughput is 1000 × 0.0368
= 368 frames. Only 386 frames out of 1000 will probably survive.
EXAMPLE- SOLUTION
b. If the system creates 500 frames per second, this is (1/2) frame per millisec.
The load is (1/2). In this case S = G × e −G or S = 0.303 (30.3 percent).
This means that the throughput is 500 × 0.0303 = 151.
Only 151 frames out of 500 will probably survive.
c. If the system creates 250 frames per second, this is (1/4) frame per millisec. The
load is (1/4). In this case S = G × e −G or S = 0.195 (19.5 percent).
This means that the throughput is 250 × 0.195 = 49.
Only 49 frames out of 250 will probably survive
Carrier Sense Multiple Access
• CSMA protocol was developed to overcome the problem found in ALOHA i.e. to minimize the
chances of collision.
• 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.
• 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 I-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 starts all over again.
Non Persistent CSMA
• 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.
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.
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=l-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.
CSMA/CD
• Station monitors the medium after it sends a frame to see if the transmission was successful.
• If there is a collision, the frame is retransmitted.
• As soon as a collision is detected, the stations abort the transmission of the subsequent bits/frames and
retransmit after a certain backoff time.
• A small jamming signal is sent over the channel, to intimate all stations that a collision just took place.
• The minimum frame transmission time must be atleast two times maximum propagation time. Ie.,
Tfr=2xTp
Flowchart for CSMA/CD
Example
A network using CSMA/CD has a bandwidth of 10 Mbps. If the maximum propagation
time (including the delays in the devices and ignoring the time needed to send a jamming
signal, is 25.6 μs, what is the minimum size of the frame?
Solution
The frame transmission time is Tfr = 2 × Tp = 51.2 μs.
This means, in the worst case, a station needs to transmit for a period of 51.2 μs to detect the
collision.
The minimum size of the frame is 10 Mbps × 51.2 μs = 512 bits or 64 bytes.
This is actually the minimum size of the frame for Standard Ethernet.
Energy levels of the channel
A station that has a frame to transmit, or is sending a frame, needs to monitor the energy level to
determine if the channel is idle, busy or in collision mode.
CSMA/CA
• Carrier Sense Multiple Access with Collision Avoidance
• Used frequently in wireless networks.
Frame Exchange Time Line
• Since there is no mechanism for collision detection, the sender assumes there has been a collision if it
has not received a CTS frame from the receiver.
• The backoff strategy is employed, and the sender tries again.
Hint: Suppose at time t = 0 bits, A begins transmitting a frame. In the worst case, A transmits a minimum-sized frame of 512 +
64 bit times. So A would finish transmitting the frame at t =512 + 64 bit times. Thus, the answer is no, if B’s signal reaches A
before bit time t =512 + 64 bits. In the worst case, when does B’s signal reach A?
Answer:
At t = 0 , A transmits. At t = 576 , A would finish transmitting. In the worst case, B begins transmitting at time t=315, which is the
time right before the first bit of A’s frame arrives at B. At time t=315+316=631, B 's first bit arrives at A . Because 631 > 576, A
finishes transmitting before it detects that B has transmitted. So A incorrectly thinks that its frame was successfully transmitted
without a collision.
In a csma/cd lan of 2 km running at 100 megabits per second, what would be the minimum
frame size to hear all collisions?"
1. Reservation
2. Polling
3. Token passing
Reservation
• A station needs to make a reservation before sending data.
• Time is divided into intervals.
• In each interval, a reservation frame precedes the data frames in that interval.
• If there are N station in the system, there are exactly N reservation minislots in the reservation frame.
• Each minislot belongs to a station.
• When a station needs to send a data frame, it makes a reservation in its own minislot.
• The stations that made reservations can send their data frames after the reservation frame.
Polling
• Polling works with topologies in which one device is designated as a primary station, and
the other devices are secondary devices.
• All data exchanges must be made through the primary device.
• This device controls the link and the secondary devices follow the instructions.
1 1 1 2 or 6 2 or 6 4 1 1
SD AC Destination Source FS
FC
FC Address Information FCS
FCS ED
Address
Starting
J K 0 J K 0 0 0 J, K non-data symbols (line code)
delimiter
ENDING DELIMITER
ED field contains an E bit – indicates that a station interface has detected an error such as a line code violation or
FCS error.
I bit indicates the last frame in a sequence of frames exchanged between two stations. J K 1 J K 1 I E
FRAME STATUS (FS)
Allows the receiving station to convey transfer status information to the sending station through A and C bits that are
repeated in the field.
A=1 indicates that the destination address was recognized by the receiving station.
C=1 bit indicates the frame was copied onto the receiving station’s buffer.
A=1 and C=1 indicates, the frame was received by the intended destination station.
A C xx A C x x
00 01 02 03 04 05 06 07
ARI FCI 0 0 ARI FCI 0 0
00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
Source and Destination Address
Destination Address
Source Address
Data :::
• Token Ring networks use a sophisticated priority system that permits certain user-designated, high-
priority stations to use the network more frequently.
• Token Ring frames have two fields that control priority: the priority field and the reservation field.
• Only stations with a priority equal to or higher than the priority value contained in a token can seize that
token.
• After the token is seized and changed to an information frame, only stations with a priority value higher
than that of the transmitting station can reserve the token for the next pass around the network.
• When the next token is generated, it includes the higher priority of the reserving station.
• Stations that raise a token's priority level must reinstate the previous priority after their transmission is
complete.
Token Ring - Priority
PPP T M RRR
• Initially the reservation bits are set to 000.
• When a node wants to transmit a priority n frame, it must wait until it can capture a token whose
priority is less than or equal to n.
• Furthermore, when a data frame goes by, a station can try to reserve the next token by writing the
priority of the frame it wants to send into the frame's Reservation bits.
• However, if a higher priority has already been reserved there, the station cannot make a
reservation.
• When the current frame is finished, the next token is generated at the priority that has been
reserved.
EXAMPLE
Three stations A, B, C. Token is by A, A has one PDU addressed to B to transmit. Enter the occurring
steps beginning with the arrival of the token at the station A until all stations have sent all their data
and a new free token is generated.
Solution
Token Release
– Early release
• After transmitting packet
– Delayed release
• After removing packet when it returns to the sender
• Let, A Priority Access is ‘1’(Lowest)
B, D 2;
C, E 3 (highest)
• Assume, ‘A’ has already seized the ring and transmitted the data frames.
So, Token is BUSY.
D
2 C3
E
3
B2
A1
1. Station B receives the frame. It has data to send. So, it places its priority of 2 in
the reservation field and sends the frame to C.
2. Station C also determines the ring is BUSY . It also has data to send. It places ‘3’
in the reservation field, displacing ‘2’ that was already inserted by ‘B’.
3. Station C then passes the frame to ‘D’
4. Station D cannot place its priority of ‘2’ since a higher priority value(‘3’) is
already present in the reservation field, that was inserted by ‘C’. D
2 C3
5. Therefore it passes the frame to ‘E’.
6. ‘E’ checks for the priority field. Finding a value of ‘3’,it does nothing since its
E
own priority value is equal to the value present in the frame. 3
7. Eventually, ‘A’ is going get back the frame it sent.
8. It frees the ring by clearing the token and passing it to ‘B’. B2
9. ‘B’ , though receives the token, is not allowed to send because the token has a A1
reservation value of ‘3’ which is higher than its own priority value.
10. So, it just passes on the token to ‘C’.
11. ‘C’, is now allowed to send. Therefore it places its data and transmits the frame to ‘D’.
12. Also, the reservation bits are now reset.
13. So, now, ‘D’ is allowed to places its priority value=2 and pass on the frame to ‘E’.
14. ‘E’ displaces the priority value of ‘2’ by its own priority of ‘3’ and passes the frame on to ‘A’.
15. ‘A’ and ‘B’ forego their priority allocation since their values are less than the existing value(2).
16. C’ receives its transmission back. Therefore it frees the ring and forwards the token to station ‘D’.
D
2 C3
E
3
B2
A1
TIME CONVERSIONS
• The length of a ring LAN, measured in bits, gives the total number of bits which can be in
transmission on the ring at a time
Note: Frame size is not limited to the “length” of the ring since entire frame may not appear on
the ring at one time.
• Bit length = (length / propagation speed) . rate + No. of stations · bit delay at repeater
IEEE 802.5 Token Ring
Let, speed of ring, R = 4 Mbps,
No.of stations, M = 20
Distance b/w stations = 100 meters, and b = 2.5 bits
• Topology: Ring
• Type of Fiber: multimode or single mode
• Distance: 200 kms
• No. of stations: up to 500 stations.
• Data is encoded using a 4B/5B encoder.
• Line Encoding : NRZ-I
• Local clock is 125MHz.
• Data Rate : 100 Mbps.
• Modulation : ASK{ or Intensity Modulation}
• Wavelength: 1300 nm
• Dual rings (primary and secondary) –transmit in opposite directions
• Normally, second ring is idle and used for redundancy for automatic repair
(self-healing).
• Maximum Frame Size : 4500bytes= 36000 bits.
FDDI frame structure
8 1 1 2 or 6 2 or 6 4 1 1
Preamble
7/27/19
FDDI frame structure
• Frame begins with 16 or more idle control bits that generate a square wave signal – serves to synchronize
the receiver.
• FC bit is used to indicate the presence of a token also provides information about the type of the frame.
• To indicate the Token; has bit format 10000000 or 11000000
• FDDI MAC protocol can handle two types of traffic:
• Synchronous: has a tight transfer delay requirement such as voice or video.
• Asynchronous : has a greater delay tolerance as in other types of data traffic.
FDDI
• FDDI uses a timed token protocol which determines how long a station can transmit
• Each station has timers to measure the time elapsed since a token was last received
• TTRT: Target Token Rotation Time
• Value of TTRT is negotiated during initialization (default is 8 ms)
• Set to the maximum desired rotation time
FDDI TIMERS
• Each station has two timers: TRT (Token Rotation Time) and THT (Token Holding Time)
• TRT -Time elapsed since the station last received a token.
• When a station receives a token, it calculates THT(Token Holding Time) given by :
THT=TTRT-TRT
• If TRT < TTRT, then token is “early”, asynchronous traffic can be transmitted
• If TRT > TTRT then token is “late”, asynchronous traffic cannot be transmitted.
• Controls the time that a station may transmit asynchronous traffic.
• Percentage of the TTRT that is allocated for synchronous traffic at station i.
FDDI TIMERS
• If THT<0, then the station is allowed to transmit only its synchronous traffic and must then
release the token.
If,
No of stations=500, latency =10 bits.
Maximum length of ring =200km
ring latency =?
500x10+100Mbpsx(200km)/
(2x10^8m/s)
=105000bits.