Multiple Access Protocol: Ms. Jabeen Sultana Department of CS CCIS, Majmaah University
Multiple Access Protocol: Ms. Jabeen Sultana Department of CS CCIS, Majmaah University
Multiple Access Protocol: Ms. Jabeen Sultana Department of CS CCIS, Majmaah University
Protocol
Week 5
Ms. Jabeen Sultana
Department of CS
CCIS, Majmaah University
Data link layer divided into two functionality-oriented sublayers
Medium Access Control :
Medium access control (MAC) is important when a shared medium is used to
communicate between stations
MAC layer is important in LANs
WANs typically use point-to-point links
• What is a MAC Address?
• Whether you work in a wired network office or a wireless one, One thing is
common for both environments: It takes both network software and hardware
(cables, routers, etc.) to transfer data from your computer to another—or from a
computer thousands of miles away to yours.
• And in the end, to get the data you want right to YOU, it comes down to addresses.
So not surprisingly, along with an IP address (which is networks software), there's
also a hardware address (MAC). Typically it is tied to a key connection device in
your computer called the network interface card, or NIC. The NIC is essentially a
computer circuit card that makes it possible for your computer to connect to a
network.
• NIC: An NIC turns data into an electrical signal that can be transmitted over the
network.
• All devices on the same network subnet have different MAC addresses.
• A MAC address is given to a network adapter when it is manufactured. It is
hardwired or hard-coded onto your computer's network interface card
(NIC) and is unique to it.
• Something called the ARP (Address Resolution Protocol) translates an IP
address into a MAC address. The ARP is like a passport that takes data
from an IP address through an actual piece of computer hardware.
• Once again, that's hardware and software working together, IP addresses
and MAC addresses working together.
• A MAC address, or Media Access Control address, is a 48- or 64-bit address
associated with a network adapter.
MAC addresses are expressed in hexadecimal notation in the following
format: 01-23-45-67-89-AB, in the case of a 48-bit address.
• Or 01-23-45-67-89-AB-CD-EF, in the case of a 64-bit address. Colons (:) are
sometimes used instead of dashes (-)
Taxonomy of multiple-access protocols
23
Medium Access Control (MAC)
Protocols
● How does a workstation get its data
onto the LAN medium?
– MAC protocol is the software that
allows workstations to “take turns” at
transmitting data.
● Two basic categories:
– 1. Contention-based protocols
– 2. Round robin protocols
24
Contention-Based Protocols
- CSMA/CD
● Most common example is Carrier
Sense Multiple Access with Collision
Detection (CSMA/CD):
– All workstations listen (sense) to the
medium.
– If no one is transmitting, a workstation
can transmit.
– If someone else is transmitting, the
workstation “backs off” and waits.
25
Two Packets Experiencing Collision
26
Contention-Based Protocols -
CSMA/CD cont…
● If two workstations transmit at the same
time:
– a collision occurs.
● When transmitting workstations hear the
collision:
– They stop transmitting immediately.
– Each workstation waits for a random amount of
time (Exponential backoff) and tries again.
– Hopefully, workstations do not try to transmit
again at the exact same time.
● CSMA/CD is a non-deterministic protocol. 27
Round Robin Protocol
● Each workstation takes turn in transmitting:
– The turn is passed around the network from
workstation to workstation.
● Most common example is token ring LAN:
– A software token is passed from workstation to
workstation.
– Token ring is an example of a deterministic
protocol.
● Token ring more complex than CSMA/CD.
– What happens if token is lost? Duplicated?
Hogged?
● Token ring LANs are losing the battle with
CSMA/CD LANs.
28
Ethernet
• Most popular CSMA/CD protocol:
• Standardized as IEEE 802.3.
• What if a computer transmits a very long
message?
– It keeps the line busy for very long time, while
all other computers in the LAN must wait for
the long message to end
• All “messages” must therefore be “small”, to
allow other computers to access the line:
– For Ethernet, the maximum size of the payload
is 1,500 bytes.
29
Ethernet
cont…
• What is the expected performance?
– When only one computer needs to transmit: it
can immediately access the line.
– When many computers want to access the
medium frequently (high traffic):
• Average waiting time is high.
• There is high probability of “collision”.
– For every collision, transmission must start
again.
• Conclusion: expected delay depends on
the traffic on the LAN!
30
Ethernet Frame Structure
Sending adapter encapsulates IP datagram (or
other network layer protocol packet) in an
Ethernet frame:
Preamble:
● 7 bytes with pattern 10101010 followed by one
byte with pattern 10101011
● Used to synchronize receiver, sender clock
rates.
31
Ethernet Frame Structure
cont…
● Addresses: 6 bytes, frame is received by all
adapters on a LAN and dropped if address does
not match.
● Type: indicates the higher layer protocol (mostly
IP but others may be supported such as Novell
IPX and AppleTalk)
● CRC: checked at receiver, if error is detected,
the frame is simply dropped.
32
Ethernet: Based on
CSMA/CD
A: sense channel, if idle
then {
transmit and monitor the channel;
If detect another transmission
then {
abort and send jam signal;
update # collisions;
delay as required by exponential backoff algorithm;
goto A
}
else {done with the frame; set collisions to zero}
}
else {wait until ongoing transmission is over and goto A}
33
Ethernet’s CSMA/CD
cont…
Jam Signal: make sure all other transmitters are
aware of collision; 48 bits.
Exponential Backoff Goal: Adapt retransmission
attempts to estimated current load:
● Heavy load: random wait will be longer.
34
Ethernet Versions
● 10Base2
● 10Base5
● 10BaseT
● 10BaseF
● 100BaseT (Fast Ethernet)
● 1000BaseT (Gbit Ethernet)
35
10Base2
● Commonly called thin Ethernet.
● Operates at 10Mbps and maximum
distance of 200m.
● Uses thin coaxial cable in bus
topology.
● Connectors used are BNC T-
junctions.
36
10Base2 Baseband
cont…
● 10: 10Mbps; 2: 200 meters max cable length
38
10BaseT
● 10Base2 and 10Base5 were completely
abandoned since about 10 years back.
● 10BaseT became popular:
– T stands for Twisted Pair.
– Uses Cat3 or Cat5.
– Reduces cost, increases reliability.
● Deviates substantially from 10Base2 and
10Base5 topology:
– It is now a star topology.
– Nodes are connected to a hub.
39
10BaseT
cont…
40
10BaseT
cont…
● Hub-based Ethernet is more reliable than
a Coaxial-Cable based Ethernet.
● Max distance from node to Hub is 100
meters.
41
10Mbps Ethernet
Name Cable Max. Nodes adv.
segm.
10Base5 thick 500m 100 for backbones
coax
10Base2 thin 200m 30 cheapest
coax
10Base-T TP 100m 1024 easy maintenance
42
Cabling Options for a
Building
Thin Ethernet
Twisted pairs
43
Fast Ethernet (100BaseT)
● The challenge faced in creating high-speed
networks:
– High frequency signals do not propagate well
in many mediums.
● Manchester encoding used in 10Mbps
Ethernets is not very efficient:
– 100BaseT uses NRZI encoding.
– Transfers at a faster rate without
substantially increasing the signalling speed.
44
Gbit Ethernet
● Versions for twisted pair and fiber
exist.
● 1000BaseT requires Cat5 cables.
● Network cable restricted to 100m
only.
● Uses 5-level pulse amplitude
modulation (PAM).
● Now 10 Gbit Ethernet are becoming
available.
45
1Gbit NIC from Intel
46
Wired Ethernet
● Originally, Ethernet operated at 10
Mbps.
● Then 100 Mbps was introduced.
– Most NICs sold today are 10/100 Mbps.
● More recently, 1000 Mbps (1 Gbps)
Ethernet has been introduced.
● 10 Gbps Ethernet is now being installed
in high-end applications.
47
Small Company/ Engg. College
48
Small Office Home Office (SOHO)
49
Assignment 3a
1.Write Procedure /Algorithm of ALOHA PROTOCOL, CSMA/CD and CSMA.
2.A ALOHA and 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. 100 frames per second b. 1500 frames per second
c. 200 frames per second , WHICH ALGORITHM IS BETTER
Lab Based
3.Implement ALOHA PROTOCOL/CSMA/CD or CSMA in OPENT/NS3
Simulator
References
Data Communications, Networking, 5th Edition, Behrouz, Forouzan,
McGraw-Hill, 2012