The ALOHA Protocol uses a "free for all" approach where stations transmit whenever they have a frame ready. If the transmitting station does not receive an ACK within a specified time, it will resend the frame after a random wait. It will retry sending for a number of times before giving up. Slotted ALOHA improves performance over pure ALOHA by restricting transmissions to specific time slots. Carrier Sense Multiple Access (CSMA) reduces collisions by having stations sense the channel before transmitting. CSMA with Collision Detection (CSMA/CD) allows stations to detect collisions faster and abort transmissions, improving efficiency for networks with propagation delays close to the minimum frame size.
chaitra-1.pptx fake news detection using machine learning
MacProtocols2.ppt
1. The ALOHA Protocol
• “Free for all”: whenever station has a frame to send,
it does so.
– Station listens for maximum RTT for an ACK.
– If no ACK after a specified amount of time (how long?),
re-sends frame after waiting a random amount of time
(otherwise?)
– It continues to retry for a number of times and then gives
up. (What happens then?)
– Receivers check FCS and destination address to ACK.
• 0.18 the peak utilization with an average of 0.5 frame
attempted every frame time. (Wait a minute.)
2. Slotted Aloha Performance
How long does it take to send a frame?
1
1
:
k tries
exactly
it takes
y that
probabilit
The
k
G
G
e
e
k
p
one success k-1 failures
G
G
G
k
k
G
G
k
k
G
G
k
e
e
e
e
k
e
e
ke
k
kp
E
2
1
1
0
1
0
1
1
1
1
1
Expected
number of
transmissions
2
1
1
1
1
1
1
1
1
r
r
dr
d
r
dr
d
r
dr
d
kr
k
k
k
k
k
k
3. Carrier Sense Multiple Access
(CSMA)
• Stations sense the medium before
transmitting.
• This can reduce the vulnerable period.
4. CSMA
• 1-persistent
– If medium is idle, then transmit.
– If medium is not idle, then wait until it is and then transmit.
• p-persistent (for slotted channels only)
– If medium is idle, then transmit.
– If medium is not idle, then wait until it is idle
– Once idle then transmit with probability p. And wait for the next
slot with probability 1-p and repeat.
• Problem: when a collision occurs, it lasts for a long time,
the whole frame transmission time. We shall see that for
10Mbps Ethernet, the max frame time is 1.2ms, but the
max time to detect collision is 50microsec.
5. Carrier Sense Multiple Access
with Collision Detection
CSMA/CD
When transmitting, detect if a collision is occurring. If a
collision is occurring, abort as soon as possible and wait a
random amount of time before retrying.
After beginning transmission, how long until we know that we
have control of the channel? Twice the propagation delay.
6. CSMA/CD
After beginning transmission, how long until we know that we
have control of the channel? Twice the propagation delay.
Let T be the propagation delay.
At t=0, node 1 begins transmission.
Suppose that at t=T- node 2 begins to transmit.
At t=T, node 2 detects the collision.
At t=2T-, node 1 detects the collision.
Keeping propagation delay small can improve efficiency.
After a collision is detected, often a jamming signal is applied.
This slightly increases the contention interval.
7. CSMA/CD
What happens if the propagation is too long and frame too short?
Frame transmission time must be at least twice as long as the propagation delay.
10Mbps ethernet – one bit takes ?
Propagation sec/meter = ?
10base max length is 2500 meters (with repeaters).
So minimum frame size is ?
But the the repeaters add some time,
so roundtrip propagation delay < 50microsec.
So minimum frame = ?
What would be the minimum frame for 100Mbps, 1Gbps?
9. Ethernet
• <data rate><Signaling method><Max segment
length>
• 10Base5 10Base2 10Base-T 10Base-FP
• Medium Coaxial Coaxial UTP 850nm fiber
• SignalingBaseband Baseband Baseband Manchester
• ManchesterManchester Manchester On/Off
• TopologyBus Bus Star Star
• Nodes 100 30 - 33
10. Frame Layout
Preamble = 101010….10 for 56 bits – allows the PLL to synchronize
Start of Frame – 1 byte
DA - destination address – MAC address
SA - source address – MAC address
Length – 2 bytes
Data – so that total length is at least 64 bytes no more than 1500.
CRC 4 bytes.
Efficiency = (1500-26)/1500
11. Ethernet Address
MAC address
6 bytes = 7x1013 address
Each interface has its own address. There are no duplicate
address.
Types of destination address
• All bits are one then broadcast, all card on LAN read this packet.
This is used to learn about which other machines are on LAN,
DHCP and also can be used in a network attack (but not anymore).
• Unicast address.
• Multicast address. If the first bit is one, then the address corosponds
to a multicast group. All the members of the group read this packet.
12. CSMA/CD with Exponential Backoff
Time is divided into 51.2 micro sec slots.
If a collision occurs, then each host waits either 0 or 1 slot times before trying again.
If this fails, they wait either 0, 1, 2, or 3 slot times…..
However, the maximum slot times to wait is 1023.
And after 16 total tries, it gives up and signals upper layer.
Performance – with large frames, Ethernet get about 85% efficiency.
14. Switches
Fewer collisions No collisions
In the switch there can be much intelligence. The packets are
buffered and the packets only go to the correct card or set of
cards.
This stops packet sniffing.