130 likes | 268 Views
Link-layer. EE122 Discussion 10/14/2011. MAC Addresses. Link-layer deals with MAC addresses 48-bit addresses, flat name space E.g., 88-9F-FA-F9-74-75 Use ipconfig (Windows) or ifconfig (Linux). Address Resolution Protocol.
E N D
Link-layer EE122 Discussion 10/14/2011
MAC Addresses • Link-layer deals with MAC addresses • 48-bit addresses, flat name space • E.g., 88-9F-FA-F9-74-75 • Use ipconfig(Windows)orifconfig (Linux)
Address Resolution Protocol • “I want to reach IP address a.b.c.d. What is the MAC address of the corresponding machine?” • Broadcast • Response from appropriate machine • Cache mappings • …default, use the gateway router
Question 1 • Use subnet mask; not in same network • ARP: <MACA, Bcast> - “Who has 10.1.1.7?” • ARP Response: <MACR, MACA> - “I do” • A <MACA, MACR, 10.1.1.4, 198.56.7.99> • ARP: <MACR, Bcast> - “Who is 198.56.7.99?” • ARP Response: <MACB, MACR> - “I do” • R <MACR, MACB, 10.1.1.4, 198.56.7.99>
Multiple Access • “How can multiple hosts share a medium?” • Channel Partitioning • Access to channel in fixed slots (TDMA/FDMA) • Easy to implement and reason about
Random Access • Carrier Sense Multiple Access (CSMA/CD) • Listen and transmit only if free • If collisions detected, abort transmission • Why would there be collisions?? • Resend after a probabilistic wait
Limitations of length • Collision is detected after twice the propagation delay • Keep transmitting in that interval • Frame needs to be big enough!
Efficiency of CSMA/CD • Time wasted in collisions • Proportional to distance d • Time spend transmitting a packet • Packet length p divided by bandwidth b • Rough estimate for efficiency (k some constant) = (p/b) / ((p/b) + kd)
Binary Exponential Back-off • Hold on for a while after you detect collision • Introduce some randomness • After each collision, choose K randomly from {0, …, 2m-1} • m is the #collisions since last successful transmission • Wait for K * 512 bit times before trying again
Question 3 • p is low lower probability of collisions CSMA/CD is good • p is high high probability of collisions channel partitioning is better
Question 4 • Host must send data at least for twice propagation delay • Propagation Delay = (d/2*108) • Min size of frame ≥ 2 * (d/2*108) * 1Gbps • …d ≤ 100m
Question 5 • Transmission delay for one bit in 10Mbps link is 0.1us • Ethernet’s back off is K * 512 bit times where K Ɛ {0, 23-1} • Expected back-off = (1/8) = 179.2µs
Question 6 • Efficiency of CSMA/CD is (p/b) / ((p/b) + kd) • As link speed increases, the efficiency goes down – (c)