Вы находитесь на странице: 1из 51

Multiple Access

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

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Frames in a pure ALOHA network

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Procedure for pure ALOHA protocol

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Example.1

The stations on a wireless ALOHA network are a


maximum of 600 km apart. If we assume that signals
propagate at 3 × 108 m/s, we find
Tp = (600 × 105 ) / (3 × 108 ) = 2 ms.
Now we can find the value of TB for different values of
K.

a. For K = 1, the range is {0, 1}. The station needs to|


generate a random number with a value of 0 or 1. This
means that TB is either 0 ms (0 × 2) or 2 ms (1 × 2),
based on the outcome of the random variable.

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Example 1 (continued)

b. For K = 2, the range is {0, 1, 2, 3}. This means that TB


can be 0, 2, 4, or 6 ms, based on the outcome of the
random variable.

c. For K = 3, the range is {0, 1, 2, 3, 4, 5, 6, 7}. This


means that TB can be 0, 2, 4, . . . , 14 ms, based on the
outcome of the random variable.

d. We need to mention that if K > 10, it is normally set to


10.

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
The throughput for pure ALOHA is
S = G × e −2G .
The maximum throughput
Smax = 0.184 when G= (1/2).

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Example .3
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−2 G or S = 0.135 (13.5 percent). This means
that the throughput is 1000 × 0.135 = 135 frames. Only
135 frames out of 1000 will probably survive.
Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill
2012
Example 3 (continued)
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 percent). 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 (1/4). In this case
S = G × e −2G or S = 0.152 (15.2 percent). This means
that the throughput is 250 × 0.152 = 38. Only 38
frames out of 250 will probably survive.
Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill
2012
The throughput for slotted ALOHA is
S = G × e−G .
The maximum throughput
Smax = 0.368 when G = 1.

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Example 4
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 millisecond. 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.
Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill
2012
Example 4 (continued)
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−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 millisecond. 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.

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Space/time model of the collision in CSMA

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Vulnerable time in CSMA

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Behavior of three persistence methods

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Flow diagram for three persistence methods

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Collision of the first bit in CSMA/CD

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Flow diagram for the CSMA/CD

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Flow diagram for CSMA/CA

Ref- Data Communications, Networking, 5th Edition, Behrouz, Forouzan, McGraw-Hill


2012
Medium Access Control
(MAC) Sublayer
● MAC sublayer functionality:
– Determines which node accesses the
medium next.
● When people refer to LANs:
– They often refer to its MAC
sublayer name, such as 10BaseT
Ethernet.

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.

– After first collision:


● choose K from {0,1}; delay is K x 512 bit transmission
times.
– After second collision:
● choose K from {0,1,2,3}…
– After ten or more collisions,
● choose K from {0,1,2,3,4,…,1023}

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

● Repeaters used to connect multiple segments


● A repeater repeats every bit it hears on one
interface to its other interfaces:
– physical layer device only!
37
10Base5
● Popularly called thick Ethernet.
● Uses thicker coaxial cable.
● 500m maximum distance.
● Was often used as backbone:
– Thickcables are inflexible and not
suitable to connect to a computer.

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

10Base-F fiber 2000m 1024 between buildings

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

Вам также может понравиться