Multiple Access Readings: Kurose & Ross, 5.3, 5.5
Multiple Access Multiple hosts sharing the same medium What are the new problems?
Shared Media Ethernet bus Radio channel Token ring network …
Multiple Access protocols Single shared broadcast channel Two or more simultaneous transmissions by nodes: interference Collision if node receives two or more signals at the same time Multiple Access Protocol Distributed algorithm that determines how nodes share channel, i.e., determine when node can transmit Communication about channel sharing must use channel itself! No out-of-band channel for coordination
Channel Partitioning Frequency Division Multiplexing Each node has a frequency band Time Division Multiplexing Each node has a series of fixed time slots What networks are these good for?
Computer Network Characteristics Transmission needs vary Between different nodes Over time Network is not fully utilized
Ideal Multiple Access Protocol Broadcast channel of rate R bps 1. When one node wants to transmit, it can send at rate R. 2. When M nodes want to transmit, each can send at average rate R/M 3. Fully decentralized: no special node to coordinate transmissions no synchronization of clocks, slots 4. Simple
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
Slotted ALOHA Assumptions all frames same size time is divided into equal size slots, time to transmit 1 frame nodes start to transmit frames only at beginning of slots nodes are synchronized if 2 or more nodes transmit in slot, all nodes detect collision
Slotted ALOHA Assumptions Operation all frames same size time is divided into equal size slots, time to transmit 1 frame nodes start to transmit frames only at beginning of slots nodes are synchronized if 2 or more nodes transmit in slot, all nodes detect collision
Slotted ALOHA Assumptions Operation all frames same size when node obtains fresh time is divided into equal frame, it transmits in next size slots, time to slot transmit 1 frame nodes start to transmit frames only at beginning of slots nodes are synchronized if 2 or more nodes transmit in slot, all nodes detect collision
Slotted ALOHA Assumptions Operation all frames same size when node obtains fresh time is divided into equal frame, it transmits in next size slots, time to slot transmit 1 frame no collision, node can send nodes start to transmit new frame in next slot frames only at beginning of slots nodes are synchronized if 2 or more nodes transmit in slot, all nodes detect collision
Slotted ALOHA Assumptions Operation all frames same size when node obtains fresh time is divided into equal frame, it transmits in next size slots, time to slot transmit 1 frame no collision, node can send nodes start to transmit new frame in next slot frames only at beginning if collision, node of slots retransmits frame in each nodes are synchronized subsequent slot with prob. if 2 or more nodes p until success transmit in slot, all nodes detect collision
Slotted ALOHA Pros Cons single active node can collisions, wasting slots continuously transmit at full idle slots rate of channel nodes may be able to highly decentralized: only detect collision in less slots in nodes need to be in than time to transmit sync packet simple clock synchronization
Slotted Aloha efficiency Efficiency is the long-run fraction of successful slots when there are many nodes, each with many frames to send Suppose N nodes with many frames to send, each transmits in slot with probability p prob that node 1 has success in a slot = p(1-p) N-1 prob that any node has a success = Np(1-p) N-1
Optimal choice of p For max efficiency with N nodes, find p* that maximizes Np(1-p) N-1 For many nodes, take limit of Np*(1-p*) N-1 as N goes to infinity, gives 1/e = .37 Efficiency is 37%, even with optimal p
Pure (unslotted) ALOHA unslotted Aloha: simpler, no synchronization when frame first arrives transmit immediately collision probability increases: frame sent at t 0 collides with other frames sent in [t 0 -1,t 0 +1]
Pure Aloha efficiency P(success by given node) = P(node transmits) . P(no other node transmits in [t 0 -1,t 0 ] . P(no other node transmits in [t 0 ,t 0 +1] = p . (1-p) N-1 . (1-p) N-1 = p . (1-p) 2(N-1) … choosing optimum p and then letting n -> ∞ ... Efficiency = 1/(2e) = .18 Even worse !
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!
CSMA collisions collisions can still occur: propagation delay means two nodes may not hear each other’s transmission collision: entire packet transmission time wasted note: role of distance & propagation delay in determining collision probability
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 while transmitting human analogy: the polite conversationalist
CSMA/CD collision detection
Ethernet dominant wired LAN technology: cheap $20 for 100Mbs! first widely used LAN technology Simpler, cheaper than token LANs and ATM Kept up with speed race: 10 Mbps – 10 Gbps Metcalfe’s Ethernet sketch
Ethernet Topologies
Ethernet Topologies Bus Topology: Shared All nodes connected to a wire
Ethernet Topologies Bus Topology: Shared All nodes connected to a wire Star Topology: All nodes connected to a central repeater
Ethernet Connectivity 10Base5 – ThickNet < 500m Controller Vampire Tap Bus Topology Transceiver
Ethernet Connectivity 10Base2 – ThinNet < 200m Controller Transceiver BNC T-Junction Bus Topology
Ethernet Connectivity 10BaseT < 100m Controller Star Topology
Ethernet Frame Structure Sending 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 (Manchester encoding)
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 in frame to net-layer protocol otherwise, adapter discards frame 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
Ethernet Specifications Coaxial Cable Up to 500m Taps > 2.5m apart Transceiver Idle detection Sends/Receives signal Repeater Joins multiple Ethernet segments < 5 repeaters between any two hosts < 1024 hosts
Ethernet MAC Algorithm Sender/Transmitter If line is idle (carrier sensed) Send immediately Send maximum of 1500B data (1527B total) Wait 9.6 µ s before sending again If line is busy (no carrier sense) Wait until line becomes idle Send immediately If collision detected Stop sending and jam signal Try again later
Ethernet MAC Algorithm Node A Node B
Ethernet MAC Algorithm Node A Node B Node A starts transmission at time 0
Ethernet MAC Algorithm Node A Node B At time almost T, node A’s message has almost arrived Node A starts transmission at time 0
Ethernet MAC Algorithm Node A Node B At time almost T, node A’s message has almost arrived Node A starts Node B starts transmission at time 0 transmission at time T
Ethernet MAC Algorithm Node A Node B At time almost T, node A’s message has almost arrived ⊗ Node A starts Node B starts transmission at time 0 transmission at time T
Ethernet MAC Algorithm Node A Node B At time almost T, node A’s message has almost arrived ⊗ Node A starts Node B starts transmission at time 0 transmission at time T How can we ensure that A knows about the collision?
Recommend
More recommend