Computer Networking g Lecture 7-ethernet Dejian Ye Software school Fudan University
1 Computer Networking Lecture 7 - Ethernet Dejian Ye Software School Fudan University
Problem: Sharing a Wire Learned how to connect hosts But what if we want more hosts? Switches Wires for everybody! Expensive! How can we share a wire? 早早?早 2
2 Problem: Sharing a Wire … But what if we want more hosts? Expensive! How can we share a wire? Switches Wires for everybody! Learned how to connect hosts
Listen and talk yak yak Natural scheme- listen before you talk >Works well in practice 3
3 3 Listen and Talk Natural scheme – listen before you talk… »Works well in practice yak yak…
Listen and talk yada yada. Natural scheme- listen before you talk >Works well in practice
4 4 Listen and Talk Natural scheme – listen before you talk… »Works well in practice yada yada…
Listen and talk yak yak Natural scheme listen before you talk >Works well in practice But sometimes this breaks down )Why How do we fix/prevent this? 5
5 5 Listen and Talk Natural scheme – listen before you talk… »Works well in practice But sometimes this breaks down »Why? How do we fix/prevent this? yada yada… yak yak…
Problem: Who is this packet for? Need to put an address on the packet What should it look like? How do you determine your own address? How do you know what address you want to send it to?
6 6 Problem: Who is this packet for? Need to put an address on the packet What should it look like? How do you determine your own address? How do you know what address you want to send it to?
Outline Aloha Ethernet mac Collisions Ethernet frames
7 7 Outline Aloha Ethernet MAC Collisions Ethernet Frames
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 and Aloha 》 CSMA and CSMa/cD
8 8 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 and ALOHA »CSMA and CSMA/CD
Aloha- Basic Technique First random MAc developed >For radio-based communication in Hawaii (1970) Basic idea: >When you are ready, transmit Receivers send ack for data >Detect collisions by timing out for ACK >Recover from collision by trying after random delay Too short> large number of collisions Too long> underutilization
9 9 Aloha – Basic Technique First random MAC developed »For radio-based communication in Hawaii (1970) Basic idea: »When you are ready, transmit »Receivers send ACK for data »Detect collisions by timing out for ACK »Recover from collision by trying after random delay – Too short → large number of collisions – Too long → underutilization
Slotted aloha Time is divided into equal size slots > Equal to packet transmission time Node (w packet transmits at beginning of next slot If collision; retransmit pkt in future slots with probability p, until successful node11 1 node 2 2[2 node3③ C E C S E C E 10
10 10 Slotted Aloha Time is divided into equal size slots »Equal to packet transmission time Node (w/ packet) transmits at beginning of next slot If collision: retransmit pkt in future slots with probability p, until successful Success (S), Collision (C), Empty (E) slots