random multiple...
TRANSCRIPT
![Page 1: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/1.jpg)
1
5: DataLink Layer 5a-1
Random MultipleAccess-2
Computer Networking: ATop Down ApproachFeaturing the Internet,2nd edition.Jim Kurose, Keith RossAddison-Wesley, July2002.
A note on the use of these ppt slides:We’re making these slides freely available to all(faculty, students, readers).They’re in PowerPoint form so you can add, modify, and delete slides(including this one) and slide content to suit your needs. They obviouslyrepresent a lot of work on our part. In return for use, we only ask thefollowing: If you use these slides (e.g., in a class) in substantially unaltered form,that you mention their source (after all, we’d like people to use our book!) If you post any slides in substantially unaltered form on a www site, thatyou note that they are adapted from (or perhaps identical to) our slides, andnote our copyright of this material.
Thanks and enjoy! JFK/KWR
All material copyright 1996-2002J.F Kurose and K.W. Ross, All Rights Reserved
5: DataLink Layer 5a-2
MAC Protocols: a taxonomyThree broad classes:❒ Channel Partitioning
❍ divide channel into smaller “pieces” (time slots, frequency,code)
❍ allocate piece to node for exclusive use
❒ Random Access❍ channel not divided, allow collisions❍ “recover” from collisions
❒ “Taking turns”❍ tightly coordinate shared access to avoid collisions
![Page 2: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/2.jpg)
2
5: DataLink Layer 5a-3
Random Access Protocols
❒ When node has packet to send❍ transmit at full channel data rate R.❍ no a priori coordination among nodes
❒ two or more transmitting nodes -> “collision”,❒ random access MAC protocol specifies:
❍ how to detect collisions❍ how to recover from collisions (e.g., via delayed
retransmissions)❒ Examples of random access MAC protocols:
❍ slotted ALOHA❍ ALOHA❍ CSMA, CSMA/CD, CSMA/CA
5: DataLink Layer 5a-4
Slotted ALOHA
Assumptions❒ all frames same size❒ time is divided into equal
size slots, time totransmit 1 frame
❒ nodes start to transmitframes only at beginningof slots
❒ nodes are synchronized❒ if 2 or more nodes
transmit in slot, all nodesdetect collision
Operation❒ when node obtains fresh
frame, it transmits in nextslot
❒ no collision, node can sendnew frame in next slot
❒ if collision, node retransmitsframe in each subsequentslot with prob. p untilsuccess
![Page 3: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/3.jpg)
3
5: DataLink Layer 5a-5
Slotted ALOHA
Pros❒ single active node can
continuously transmit atfull rate of channel
❒ highly decentralized:only slots in nodes needto be in sync
❒ simple
Cons❒ collisions, wasting slots❒ idle slots❒ nodes may be able to
detect collision in lessthan time to transmitpacket
5: DataLink Layer 5a-6
Slotted Aloha efficiency
❒ Suppose N nodes with manyframes to send, eachtransmits in slot withprobability p
❒ prob that 1st node hassuccess in a slot = p(1-p)N-1
❒ prob that any node has asuccess = Np(1-p)N-1
❒ For max efficiency withN nodes, find p* thatmaximizesNp(1-p)N-1
❒ For many nodes, takelimit of Np*(1-p*)N-1 as Ngoes to infinity, gives1/e = .37
Efficiency is the long-runfraction of successful slotswhen there’s many nodes, eachwith many frames to send
At best: channelused for useful transmissions 37%of time!
![Page 4: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/4.jpg)
4
5: DataLink Layer 5a-7
Pure (unslotted) ALOHA❒ unslotted Aloha: simpler, no synchronization❒ when frame first arrives
❍ transmit immediately
❒ collision probability increases:❍ frame sent at t0 collides with other frames sent in [t0-1,t0+1]
5: DataLink Layer 5a-8
Pure Aloha efficiency
P(success by given node) = P(no node transmits invulnerable time)
= e-2G
Through put is=G*P_success=Ge-2G
G_max=0.5, and P_success=1/2e.
![Page 5: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/5.jpg)
5
5: DataLink Layer 5a-9
CSMA (Carrier Sense Multiple Access)
CSMA: listen before transmit:❒ If channel sensed idle: transmit entire frame❒ If channel sensed busy, defer transmission
❒ Human analogy: don’t interrupt others!
5: DataLink Layer 5a-10
CSMA collisions
collisions can still occur:propagation delay meanstwo nodes may not heareach other’s transmission
collision:entire packet transmissiontime wasted
spatial layout of nodes
note:role of distance & propagationdelay in determining collisionprobability
![Page 6: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/6.jpg)
6
5: DataLink Layer 5a-11
CSMA/CD (Collision Detection)CSMA/CD: carrier sensing, deferral as in CSMA
❍ collisions detected within short time❍ colliding transmissions aborted, reducing channel
wastage❒ collision detection:
❍ easy in wired LANs: measure signal strengths,compare transmitted, received signals
❍ difficult in wireless LANs: receiver shut off whiletransmitting
❒ human analogy: the polite conversationalist
5: DataLink Layer 5a-12
CSMA/CD collision detection
![Page 7: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/7.jpg)
7
5: DataLink Layer 5a-13
“Taking Turns” MAC protocols
channel partitioning MAC protocols:❍ share channel efficiently and fairly at high load❍ inefficient at low load: delay in channel access,
1/N bandwidth allocated even if only 1 activenode!
Random access MAC protocols❍ efficient at low load: single node can fully utilize
channel❍ high load: collision overhead
“taking turns” protocolslook for best of both worlds!
5: DataLink Layer 5a-14
“Taking Turns” MAC protocolsPolling:❒ master node “invites”
slave nodes totransmit in turn
❒ concerns:❍ polling overhead❍ latency❍ single point of failure
(master)
Token passing:❒ control token passed from
one node to next sequentially.❒ token message❒ concerns:
❍ token overhead❍ latency❍ single point of failure (token)
![Page 8: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/8.jpg)
8
5: DataLink Layer 5a-15
Ethernet“dominant” LAN technology:❒ cheap $20 for 100Mbs!❒ first widely used LAN technology❒ Simpler, cheaper than token LANs and ATM❒ Kept up with speed race: 10, 100, 1000 Mbps
Metcalfe’s Ethernetsketch
5: DataLink Layer 5a-16
Ethernet Frame StructureSending adapter encapsulates IP datagram (or other
network layer protocol packet) in Ethernet frame
Preamble:❒ 7 bytes with pattern 10101010 followed by one byte
with pattern 10101011❒ used to synchronize receiver, sender clock rates
![Page 9: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/9.jpg)
9
5: DataLink Layer 5a-17
Ethernet Frame Structure (more)
❒ Addresses: 6 bytes❍ if adapter receives frame with matching destination address,
or with broadcast address (eg ARP packet), it passes data inframe to net-layer protocol
❍ otherwise, adapter discards frame
❒ Type: indicates the higher layer protocol, mostly IPbut others may be supported such as Novell IPX andAppleTalk)
❒ CRC: checked at receiver, if error is detected, theframe is simply dropped
5: DataLink Layer 5a-18
Unreliable, connectionless service
❒ Connectionless: No handshaking between sendingand receiving adapter.
❒ Unreliable: receiving adapter doesn’t send acks ornacks to sending adapter❍ stream of datagrams passed to network layer can have gaps❍ gaps will be filled if app is using TCP❍ otherwise, app will see the gaps
![Page 10: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/10.jpg)
10
5: DataLink Layer 5a-19
Ethernet uses CSMA/CD
❒ No slots❒ adapter doesn’t transmit if
it senses that some otheradapter is transmitting, thatis, carrier sense
❒ transmitting adapter abortswhen it senses thatanother adapter istransmitting, that is,collision detection
❒ Before attempting aretransmission, adapterwaits a random time,that is, random access
5: DataLink Layer 5a-20
Ethernet CSMA/CD algorithm
1. Adaptor gets datagram fromand creates frame
2. If adapter senses channelidle, it starts to transmitframe. If it senses channelbusy, waits until channelidle and then transmits
3. If adapter transmits entireframe without detectinganother transmission, theadapter is done with frame !
4. If adapter detects anothertransmission whiletransmitting, aborts andsends jam signal
5. After aborting, adapterenters exponentialbackoff: after the mthcollision, adapter chooses aK at random from{0,1,2,…,2m-1}. Adapterwaits K*512 bit times andreturns to Step 2
![Page 11: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/11.jpg)
11
5: DataLink Layer 5a-21
Ethernet’s CSMA/CD (more)Jam Signal: make sure all other
transmitters are aware ofcollision; 48 bits;
Bit time: .1 microsec for 10Mbps Ethernet ;for K=1023, wait time isabout 50 msec
Exponential Backoff:❒ Goal: adapt retransmission
attempts to estimatedcurrent load❍ heavy load: random wait will
be longer❒ first collision: choose K from
{0,1}; delay is K x 512 bittransmission times
❒ after second collision:choose K from {0,1,2,3}…
❒ after ten collisions, choose Kfrom {0,1,2,3,4,…,1023}
See/interact with Javaapplet on AWL Web site:highly recommended !
5: DataLink Layer 5a-22
CSMA/CD efficiency
❒ Tprop = max prop between 2 nodes in LAN❒ ttrans = time to transmit max-size frame
❒ Efficiency goes to 1 as tprop goes to 0❒ Goes to 1 as ttrans goes to infinity❒ Much better than ALOHA, but still decentralized,
simple, and cheap
transproptt /51
1efficiency
+=
![Page 12: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/12.jpg)
12
5: DataLink Layer 5a-23
Ethernet Technologies: 10Base2❒ 10: 10Mbps; 2: under 200 meters max cable length❒ thin coaxial cable in a bus topology
❒ repeaters used to connect up to multiple segments❒ repeater repeats bits it hears on one interface to its
other interfaces: physical layer device only!❒ has become a legacy technology
5: DataLink Layer 5a-24
10BaseT and 100BaseT❒ 10/100 Mbps rate; latter called “fast ethernet”❒ T stands for Twisted Pair❒ Nodes connect to a hub: “star topology”; 100 m max
distance between nodes and hub
❒ Hubs are essentially physical-layer repeaters:❍ bits coming in one link go out all other links❍ no frame buffering❍ no CSMA/CD at hub: adapters detect collisions❍ provides net management functionality
hub
nodes
![Page 13: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/13.jpg)
13
5: DataLink Layer 5a-25
Manchester encoding
❒ Used in 10BaseT, 10Base2❒ Each bit has a transition❒ Allows clocks in sending and receiving nodes to
synchronize to each other❍ no need for a centralized, global clock among nodes!
❒ Hey, this is physical-layer stuff!
5: DataLink Layer 5a-26
Bridges❒ Link layer device
❍ stores and forwards Ethernet frames❍ examines frame header and selectively forwards frame
based on MAC dest address❍ when frame is to be forwarded on segment, uses CSMA/CD
to access segment❒ transparent
❍ hosts are unaware of presence of bridges❒ plug-and-play, self-learning
❍ bridges do not need to be configured
![Page 14: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/14.jpg)
14
5: DataLink Layer 5a-27
Bridges: traffic isolation❒ Bridge installation breaks LAN into LAN segments❒ bridges filter packets:
❍ same-LAN-segment frames not usually forwardedonto other LAN segments
❍ segments become separate collision domains
bridge collision domain
collision domain
= hub= host
LAN (IP network)
LAN segment LAN segment
5: DataLink Layer 5a-28
Self learning
❒ A bridge has a bridge table❒ entry in bridge table:
❍ (Node LAN Address, Bridge Interface, Time Stamp)❍ stale entries in table dropped (TTL can be 60 min)
❒ bridges learn which hosts can be reached through whichinterfaces❍ when frame received, bridge “learns” location of
sender: incoming LAN segment❍ records sender/location pair in bridge table
![Page 15: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/15.jpg)
15
5: DataLink Layer 5a-29
Filtering/ForwardingWhen bridge receives a frame:
index bridge table using MAC dest addressif entry found for destination
then{ if dest on segment from which frame arrived
then drop the frame else forward the frame on interface indicated } else flood
forward on all but the interface on which the frame arrived
5: DataLink Layer 5a-30
Bridges Spanning Tree❒ for increased reliability, desirable to have redundant,
alternative paths from source to dest❒ with multiple paths, cycles result - bridges may
multiply and forward frame forever❒ solution: organize bridges in a spanning tree by
disabling subset of interfaces
Disabled
![Page 16: Random Multiple Access-2web2.uwindsor.ca/courses/engineering/ktepe/compnets/MultipleAccess_08.pdf · that you mention their source (after all, we’d like people to use our book!)](https://reader034.vdocuments.us/reader034/viewer/2022042123/5e9e694814f5525afb4aec61/html5/thumbnails/16.jpg)
16
5: DataLink Layer 5a-31
Some bridge features❒ Isolates collision domains resulting in higher total
max throughput❒ limitless number of nodes and geographical coverage❒ Can connect different Ethernet types❒ Transparent (“plug-and-play”): no configuration
necessary
5: DataLink Layer 5a-32
Bridges vs. Routers❒ both store-and-forward devices
❍ routers: network layer devices (examine network layerheaders)
❍ bridges are link layer devices❒ routers maintain routing tables, implement routing
algorithms❒ bridges maintain bridge tables, implement filtering,
learning and spanning tree algorithms