120 likes | 240 Views
MAC continued. Ethernet (802.3). 1-persistent CSMA/CD + binary exponential backoff Carrier sense: station listens to channel first 1-persistent: If idle, station may initiate transmission
E N D
Ethernet (802.3) • 1-persistent CSMA/CD + binary exponential backoff • Carrier sense: station listens to channel first • 1-persistent: If idle, station may initiate transmission • Collision Detection: continuously monitor channel and if collision, abort transmission immediately, and wait for a random time • To determine the back-off time of a frame, use binary exponential backoff : • each time slot is 51.2 us • first collision, retransmission interval = random number between [0,1] • second collision, interval = random number between [0,3] • kth collision, interval = random number between [0, 2^k-1] • upper bound 1023 slots. • Give up after 16 tries
802.3 http://www.erg.abdn.ac.uk/users/gorry/course/lan-pages/csma-cd.html
Why binary exponential backoff • Why not pick a random number from a fixed interval? • Why a fixed small interval not good? • Why a fixed large interval not good?
Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3
Minimum Frame Size • Why a minimum frame size is needed? • How long does it take for a station to notice a collision? • The key is that you should be still transmitting when being aware of the collision, because if you finished before the collision, when the collision notifying signal comes, you might think it is for some other people’s frame.
Minimum Frame Size • So, if maximum delay is t, the minimum frame size is 2t * bit_rate. • 2t is about 50us. • So the minimum frame size of 10M Ethernet is 512 bits. • What if the speed goes up?
Ethernet Performance • Suppose there are k stations. Let p be the probability that a station has a frame to send when the channel is idle. Assume transmission is • independent across stations • independent for one station at different times Find the average number of collisions before a frame is sent. • Three steps: • The probability that one station got the chance to send is A=kp(1-p)k-1. • Maximized when p=1/k. So A is bounded from above by (1-1/k) k-1. • Each contention is independent, so average number of collision is bounded from below by 1/A, which is e when k is large. • P is the time to send a frame, each slot is2t, so channel efficiency is P/P+2et.
Switched Ethernet • Stations connect to a switch using dedicated lines. • Input frames are buffered. • So no collision!
Ethernet • Physical medium • thin cable/thick cable/twisted pair/fiber 10Base5 500 meters thick (cable) Ethernet 100 nodes/seg 10Base2 200 meters thin (cable) Ethernet 30 nodes/seg 10BaseT 100 meters twist pair 1024 nodes/seg 10BaseF 2000 meters fiber optics 1024 nodes/seg 10Base5/10Base2, cable connected to each machine 10BaseT -- connecting to a hub 10BaseF -- between building Connecting
Ethernet Fast Ethernet • Keep everything in Ethernet, make the clock faster than 100Mbps. • Cable • 100Base-T4 100m category 3 UTP, 4 lines. • 100Base-Tx 100m category 5 twisted pair • 100Base-Fx 2000m Fiber optic