Chapter 5 Link Layer and LANs Part B Computer Networking: A Top Down Approach  4 th  edition.  Jim Kurose, Keith Ross Addi...
Link Layer <ul><li>5.1 Introduction and services </li></ul><ul><li>5.2 Error detection and correction  </li></ul><ul><li>5...
Ethernet <ul><li>“ dominant” wired LAN technology:  </li></ul><ul><li>cheap $20 for 100Mbs! </li></ul><ul><li>first widely...
Ethernet <ul><li>“ dominant” wired LAN technology:  </li></ul><ul><li>cheap $20 for 100Mbs! </li></ul><ul><li>first widely...
Star topology <ul><li>bus topology popular through mid 90s </li></ul><ul><ul><li>all nodes in same collision domain (can c...
Ethernet Frame Structure <ul><li>Sending adapter encapsulates IP datagram (or other network layer protocol packet) in  Eth...
Ethernet Frame Structure (more) <ul><li>Addresses:  6 bytes </li></ul><ul><ul><li>if adapter receives frame with matching ...
Unreliable, connectionless service <ul><li>Connectionless:  No handshaking between sending and receiving adapter.  </li></...
Ethernet uses CSMA/CD <ul><li>No slots </li></ul><ul><li>adapter doesn’t transmit if it senses that some other adapter is ...
Ethernet CSMA/CD algorithm <ul><li>1. Adaptor receives datagram from net layer & creates frame </li></ul><ul><li>2. If ada...
Ethernet’s CSMA/CD (more) <ul><li>Jam Signal:  make sure all other transmitters are aware of collision; 48 bits </li></ul>...
Collision Detection <ul><li>On baseband bus, collision produces much higher signal voltage than signal </li></ul><ul><li>C...
Algorithm (cont) <ul><li>If collision… </li></ul><ul><ul><li>jam for 32 bits, then stop transmitting frame </li></ul></ul>...
Binary Exponential Backoff <ul><li>Attempt  to transmit repeatedly  if  repeated collisions </li></ul><ul><li>First  10 at...
Ethernet MAC Sublayer Protocol (2)
CSMA/CD efficiency <ul><li>T prop  = max prop between 2 nodes in LAN </li></ul><ul><li>t trans  = time to transmit max-siz...
Ethernet Performance <ul><li>Efficiency of Ethernet at 10 Mbps with 512-bit slot times. </li></ul>
802.3 Ethernet Standards: Link & Physical Layers <ul><li>many  different Ethernet standards </li></ul><ul><ul><li>common M...
Manchester encoding <ul><li>used in 10BaseT </li></ul><ul><li>each bit has a transition </li></ul><ul><li>allows clocks in...
Ethernet Cabling <ul><li>The most common kinds of Ethernet cabling.  </li></ul>
Ethernet Cabling (2) <ul><li>Three kinds of Ethernet cabling.  </li></ul><ul><li>(a)  10Base5,  (b)  10Base2,  (c)  10Base...
Ethernet Cabling (3) <ul><li>Cable topologies.  (a)  Linear,  (b)  Spine,  (c ) Tree,  (d)  Segmented. </li></ul>
10BaseT and 100BaseT <ul><li>10/100 Mbps rate; latter called “fast ethernet” </li></ul><ul><li>T  stands for Twisted Pair ...
100Mbps Fast Ethernet <ul><li>Use  IEEE 802.3 MAC protocol and frame format </li></ul><ul><li>100BASE-X use physical mediu...
Fast Ethernet <ul><li>The original fast Ethernet cabling. </li></ul>
Gbit Ethernet <ul><li>uses standard Ethernet frame format </li></ul><ul><li>allows for point-to-point links and shared bro...
Gigabit Ethernet <ul><li>Gigabit Ethernet cabling. </li></ul>
Wireless Link Characteristics <ul><li>Differences from wired link …. </li></ul><ul><ul><li>decreased signal strength:  rad...
Wireless network characteristics <ul><li>Multiple wireless senders and receivers create additional problems (beyond multip...
IEEE 802.11 Wireless LAN <ul><li>802.11b </li></ul><ul><ul><li>2.4-5 GHz unlicensed radio spectrum </li></ul></ul><ul><ul>...
Figure  3-12 ISM bands
802.11 LAN architecture <ul><li>wireless host communicates with base station </li></ul><ul><ul><li>base station = access p...
802.11: Channels, association <ul><li>802.11b: 2.4GHz-2.485GHz spectrum divided into 11 channels at different frequencies ...
IEEE 802.11: multiple access <ul><li>avoid collisions: 2 +  nodes transmitting at same time </li></ul><ul><li>802.11: CSMA...
IEEE 802.11 MAC Protocol: CSMA/CA <ul><li>802.11 sender </li></ul><ul><li>1  if sense channel idle  for  DIFS   then   </l...
Avoiding collisions (more) <ul><li>idea:   allow sender to “reserve” channel rather than random access of data frames: avo...
Collision Avoidance: RTS-CTS exchange AP A B time defer RTS(A) RTS(B) RTS(A) CTS(A) CTS(A) DATA (A) ACK(A) ACK(A) reservat...
Manchester encoding <ul><li>Used in 10BaseT </li></ul><ul><li>Each bit has a transition </li></ul><ul><li>Allows clocks in...
Link Layer <ul><li>5.1 Introduction and services </li></ul><ul><li>5.2 Error detection and correction  </li></ul><ul><li>5...
Hubs <ul><li>Hubs are essentially physical-layer repeaters: </li></ul><ul><ul><li>bits coming from one link go out all oth...
Interconnecting with hubs <ul><li>Backbone hub interconnects LAN segments </li></ul><ul><li>Extends max distance between n...
Inter - Networking <ul><li>Hubs </li></ul><ul><li>Bridges </li></ul><ul><li>Switches </li></ul><ul><li>Routers </li></ul>
Learning Bridges  <ul><li>Do not forward when unnecessary </li></ul><ul><li>Maintain forwarding table </li></ul><ul><li>  ...
Spanning Tree Algorithm  <ul><li>Problem: loops </li></ul><ul><li>Bridges run a distributed spanning tree algorithm   </li...
Algorithm Overview  <ul><li>Each bridge has unique id (e.g., B1, B2, B3) </li></ul><ul><li>Select bridge with smallest id ...
Algorithm Details <ul><li>Bridges exchange configuration messages </li></ul><ul><ul><li>id for bridge sending the message ...
Algorithm Detail (cont) <ul><li>When learn not root, stop generating config messages </li></ul><ul><ul><li>in steady state...
Broadcast and Multicast <ul><li>Forward all broadcast/multicast frames </li></ul><ul><ul><li>current practice </li></ul></...
Limitations of Bridges <ul><li>Do not scale </li></ul><ul><ul><li>spanning tree algorithm does not scale </li></ul></ul><u...
Switch <ul><li>link-layer device: smarter than hubs, take  active  role </li></ul><ul><ul><li>store, forward Ethernet fram...
Switch:  allows  multiple  simultaneous transmissions <ul><li>hosts have dedicated, direct connection to switch </li></ul>...
Switch Table <ul><li>Q:  how does switch know that A’ reachable via interface 4, B’ reachable via interface 5? </li></ul><...
Switch: self-learning <ul><li>switch   learns  which hosts can be reached through which interfaces </li></ul><ul><ul><li>w...
Forwarding <ul><li>How do determine onto which LAN segment to forward frame? </li></ul><ul><li>Looks like a routing proble...
Self learning <ul><li>A switch has a  switch table </li></ul><ul><li>entry in switch table:  </li></ul><ul><ul><li>(MAC Ad...
Self-learning, forwarding: example <ul><li>frame destination unknown: </li></ul>A A’ B B’ C C’ 1 2 3 4 5 6 Switch table  (...
Filtering/Forwarding <ul><li>When switch receives a frame: </li></ul><ul><li>index switch table using MAC dest address </l...
Switch example <ul><li>Suppose C sends frame to D </li></ul><ul><li>Switch receives frame from from C </li></ul><ul><ul><l...
Switch example <ul><li>Suppose D replies back with frame to C.  </li></ul><ul><li>Switch receives frame from from D </li><...
Switch: traffic isolation <ul><li>switch installation breaks subnet into LAN segments </li></ul><ul><li>switch  filters  p...
Switches: dedicated access <ul><li>Switch with many interfaces </li></ul><ul><li>Hosts have direct connection to switch </...
More on Switches <ul><li>cut-through switching:  frame forwarded from input to output port without first collecting entire...
Institutional network hub hub hub switch to external network router IP subnet mail server web server
Switches vs. Routers <ul><li>both store-and-forward devices </li></ul><ul><ul><li>routers: network layer devices (examine ...
Summary comparison
IEEE 802 Standards The 802 working groups.  The important ones are marked with *.  The ones marked with    are hibernatin...
Upcoming SlideShare
Loading in...5
×

Chapter 5B

465

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
465
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Chapter 5B

  1. 1. Chapter 5 Link Layer and LANs Part B Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
  2. 2. Link Layer <ul><li>5.1 Introduction and services </li></ul><ul><li>5.2 Error detection and correction </li></ul><ul><li>5.3Multiple access protocols </li></ul><ul><li>5.4 Link-Layer Addressing </li></ul><ul><li>5.5 Ethernet </li></ul><ul><li>5.6 Hubs and switches </li></ul><ul><li>5.7 PPP </li></ul><ul><li>5.8 Link Virtualization: ATM </li></ul>
  3. 3. Ethernet <ul><li>“ dominant” wired LAN technology: </li></ul><ul><li>cheap $20 for 100Mbs! </li></ul><ul><li>first widely used LAN technology </li></ul><ul><li>Simpler, cheaper than token LANs and ATM </li></ul><ul><li>Kept up with speed race: 10 Mbps – 10 Gbps </li></ul>Metcalfe’s Ethernet sketch
  4. 4. Ethernet <ul><li>“ dominant” wired LAN technology: </li></ul><ul><li>cheap $20 for 100Mbs! </li></ul><ul><li>first widely used LAN technology </li></ul><ul><li>Simpler, cheaper than token LANs and ATM </li></ul><ul><li>Kept up with speed race: 10 Mbps – 10 Gbps </li></ul>
  5. 5. Star topology <ul><li>bus topology popular through mid 90s </li></ul><ul><ul><li>all nodes in same collision domain (can collide with each other) </li></ul></ul><ul><li>today: star topology prevails </li></ul><ul><ul><li>active switch in center </li></ul></ul><ul><ul><li>each “spoke” runs a (separate) Ethernet protocol (nodes do not collide with each other) </li></ul></ul>switch bus: coaxial cable star
  6. 6. Ethernet Frame Structure <ul><li>Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame </li></ul><ul><li>Preamble: </li></ul><ul><li>7 bytes with pattern 10101010 followed by one byte with pattern 10101011 </li></ul><ul><li>used to synchronize receiver, sender clock rates </li></ul>
  7. 7. Ethernet Frame Structure (more) <ul><li>Addresses: 6 bytes </li></ul><ul><ul><li>if adapter receives frame with matching destination address, or with broadcast address (eg ARP packet), it passes data in frame to net-layer protocol </li></ul></ul><ul><ul><li>otherwise, adapter discards frame </li></ul></ul><ul><li>Type: indicates the higher layer protocol (mostly IP but others may be supported such as Novell IPX and AppleTalk) </li></ul><ul><li>CRC: checked at receiver, if error is detected, the frame is simply dropped </li></ul>
  8. 8. Unreliable, connectionless service <ul><li>Connectionless: No handshaking between sending and receiving adapter. </li></ul><ul><li>Unreliable: receiving adapter doesn’t send acks or nacks to sending adapter </li></ul><ul><ul><li>stream of datagrams passed to network layer can have gaps </li></ul></ul><ul><ul><li>gaps will be filled if app is using TCP </li></ul></ul><ul><ul><li>otherwise, app will see the gaps </li></ul></ul>
  9. 9. Ethernet uses CSMA/CD <ul><li>No slots </li></ul><ul><li>adapter doesn’t transmit if it senses that some other adapter is transmitting, that is, carrier sense </li></ul><ul><li>transmitting adapter aborts when it senses that another adapter is transmitting, that is, collision detection </li></ul><ul><li>Before attempting a retransmission, adapter waits a random time, that is, random access </li></ul>
  10. 10. Ethernet CSMA/CD algorithm <ul><li>1. Adaptor receives datagram from net layer & creates frame </li></ul><ul><li>2. If adapter senses channel idle, it starts to transmit frame. If it senses channel busy, waits until channel idle and then transmits </li></ul><ul><li>3. If adapter transmits entire frame without detecting another transmission, the adapter is done with frame ! </li></ul><ul><li>4. If adapter detects another transmission while transmitting, aborts and sends jam signal </li></ul><ul><li>5. After aborting, adapter enters exponential backoff : after the mth collision, adapter chooses a K at random from {0,1,2,…,2 m -1}. Adapter waits K · 512 bit times and returns to Step 2 </li></ul>
  11. 11. Ethernet’s CSMA/CD (more) <ul><li>Jam Signal: make sure all other transmitters are aware of collision; 48 bits </li></ul><ul><li>Bit time: .1 microsec for 10 Mbps Ethernet ; for K=1023, wait time is about 50 msec </li></ul><ul><li>Exponential Backoff: </li></ul><ul><li>Goal : adapt retransmission attempts to estimated current load </li></ul><ul><ul><li>heavy load: random wait will be longer </li></ul></ul><ul><li>first collision: choose K from {0,1}; delay is K · 512 bit transmission times </li></ul><ul><li>after second collision: choose K from {0,1,2,3}… </li></ul><ul><li>after ten collisions, choose K from {0,1,2,3,4,…,1023} </li></ul>See/interact with Java applet on AWL Web site: highly recommended !
  12. 12. Collision Detection <ul><li>On baseband bus, collision produces much higher signal voltage than signal </li></ul><ul><li>Collision detected if cable signal greater than single station signal </li></ul><ul><li>Signal attenuated over distance </li></ul><ul><li>Limit distance to 500m (10Base5) or 200m (10Base2) </li></ul><ul><li>For twisted pair (star-topology) activity on more than one port is collision </li></ul><ul><li>Special collision presence signal </li></ul>
  13. 13. Algorithm (cont) <ul><li>If collision… </li></ul><ul><ul><li>jam for 32 bits, then stop transmitting frame </li></ul></ul><ul><ul><li>minimum frame is 64 bytes (header + 46 bytes of data) </li></ul></ul><ul><ul><li>delay and try again </li></ul></ul><ul><ul><ul><li>1st time: 0 or 51.2us </li></ul></ul></ul><ul><ul><ul><li>2nd time: 0, 51.2, or 102.4us </li></ul></ul></ul><ul><ul><ul><li>3rd time51.2, 102.4, or 153.6us </li></ul></ul></ul><ul><ul><ul><li>nth time: k x 51.2us, for randomly selected k =0..2 n - 1 </li></ul></ul></ul><ul><ul><ul><li>give up after several tries (usually 16) </li></ul></ul></ul><ul><ul><ul><li>exponential backoff </li></ul></ul></ul>
  14. 14. Binary Exponential Backoff <ul><li>Attempt to transmit repeatedly if repeated collisions </li></ul><ul><li>First 10 attempts, mean value of random delay doubled </li></ul><ul><li>Value then remains same for 6 further attempts </li></ul><ul><li>After 16 unsuccessful attempts, station gives up and reports error </li></ul><ul><li>As congestion increases, stations back off by larger amounts to reduce the probability of collision. </li></ul><ul><li>1-persistent algorithm with binary exponential backoff efficient over wide range of loads </li></ul><ul><ul><li>Low loads, 1-persistence guarantees station can seize channel once idle </li></ul></ul><ul><ul><li>High loads, at least as stable as other techniques </li></ul></ul><ul><li>Backoff algorithm gives last-in, first-out effect </li></ul><ul><li>Stations with few collisions transmit first </li></ul>
  15. 15. Ethernet MAC Sublayer Protocol (2)
  16. 16. CSMA/CD efficiency <ul><li>T prop = max prop between 2 nodes in LAN </li></ul><ul><li>t trans = time to transmit max-size frame </li></ul><ul><li>Efficiency goes to 1 as t prop goes to 0 </li></ul><ul><li>Goes to 1 as t trans goes to infinity </li></ul><ul><li>Much better than ALOHA, but still decentralized, simple, and cheap </li></ul>
  17. 17. Ethernet Performance <ul><li>Efficiency of Ethernet at 10 Mbps with 512-bit slot times. </li></ul>
  18. 18. 802.3 Ethernet Standards: Link & Physical Layers <ul><li>many different Ethernet standards </li></ul><ul><ul><li>common MAC protocol and frame format </li></ul></ul><ul><ul><li>different speeds: 2 Mbps, 10 Mbps, 100 Mbps, 1Gbps, 10G bps </li></ul></ul><ul><ul><li>different physical layer media: fiber, cable </li></ul></ul>MAC protocol and frame format 100BASE-TX 100BASE-T4 100BASE-FX 100BASE-T2 100BASE-SX 100BASE-BX application transport network link physical fiber physical layer copper (twister pair) physical layer
  19. 19. Manchester encoding <ul><li>used in 10BaseT </li></ul><ul><li>each bit has a transition </li></ul><ul><li>allows clocks in sending and receiving nodes to synchronize to each other </li></ul><ul><ul><li>no need for a centralized, global clock among nodes! </li></ul></ul><ul><li>Hey, this is physical-layer stuff! </li></ul>
  20. 20. Ethernet Cabling <ul><li>The most common kinds of Ethernet cabling. </li></ul>
  21. 21. Ethernet Cabling (2) <ul><li>Three kinds of Ethernet cabling. </li></ul><ul><li>(a) 10Base5, (b) 10Base2, (c) 10Base-T. </li></ul>
  22. 22. Ethernet Cabling (3) <ul><li>Cable topologies. (a) Linear, (b) Spine, (c ) Tree, (d) Segmented. </li></ul>
  23. 23. 10BaseT and 100BaseT <ul><li>10/100 Mbps rate; latter called “fast ethernet” </li></ul><ul><li>T stands for Twisted Pair </li></ul><ul><li>Nodes connect to a hub: “star topology”; 100 m max distance between nodes and hub </li></ul>twisted pair hub
  24. 24. 100Mbps Fast Ethernet <ul><li>Use IEEE 802.3 MAC protocol and frame format </li></ul><ul><li>100BASE-X use physical medium specifications from FDDI </li></ul><ul><ul><li>Two physical links between nodes </li></ul></ul><ul><ul><ul><li>Transmission and reception </li></ul></ul></ul><ul><ul><li>100BASE-TX use s STP or Cat . 5 UTP </li></ul></ul><ul><ul><ul><li>May require new cable </li></ul></ul></ul><ul><ul><li>100BASE-FX uses optical fiber </li></ul></ul><ul><ul><li>100BASE-T4 can use Cat . 3, voice-grade UTP </li></ul></ul><ul><ul><ul><li>Uses four twisted-pair lines between nodes </li></ul></ul></ul><ul><ul><ul><li>Data transmission uses three pairs in one direction at a time </li></ul></ul></ul><ul><li>Star -wire topology </li></ul><ul><ul><li>Similar to 10BASE-T </li></ul></ul>
  25. 25. Fast Ethernet <ul><li>The original fast Ethernet cabling. </li></ul>
  26. 26. Gbit Ethernet <ul><li>uses standard Ethernet frame format </li></ul><ul><li>allows for point-to-point links and shared broadcast channels </li></ul><ul><li>in shared mode, CSMA/CD is used; short distances between nodes required for efficiency </li></ul><ul><li>uses hubs, called here “Buffered Distributors” </li></ul><ul><li>Full-Duplex at 1 Gbps for point-to-point links </li></ul><ul><li>10 Gbps now ! </li></ul>
  27. 27. Gigabit Ethernet <ul><li>Gigabit Ethernet cabling. </li></ul>
  28. 28. Wireless Link Characteristics <ul><li>Differences from wired link …. </li></ul><ul><ul><li>decreased signal strength: radio signal attenuates as it propagates through matter (path loss) </li></ul></ul><ul><ul><li>interference from other sources: standardized wireless network frequencies (e.g., 2.4 GHz) shared by other devices (e.g., phone); devices (motors) interfere as well </li></ul></ul><ul><ul><li>multipath propagation: radio signal reflects off objects ground, arriving ad destination at slightly different times </li></ul></ul><ul><li>… . make communication across (even a point to point) wireless link much more “difficult” </li></ul>
  29. 29. Wireless network characteristics <ul><li>Multiple wireless senders and receivers create additional problems (beyond multiple access): </li></ul><ul><li>Hidden terminal problem </li></ul><ul><li>B, A hear each other </li></ul><ul><li>B, C hear each other </li></ul><ul><li>A, C can not hear each other </li></ul><ul><li>means A, C unaware of their interference at B </li></ul><ul><li>Signal fading: </li></ul><ul><li>B, A hear each other </li></ul><ul><li>B, C hear each other </li></ul><ul><li>A, C can not hear each other interferring at B </li></ul>A B C A B C A’s signal strength space C’s signal strength
  30. 30. IEEE 802.11 Wireless LAN <ul><li>802.11b </li></ul><ul><ul><li>2.4-5 GHz unlicensed radio spectrum </li></ul></ul><ul><ul><li>up to 11 Mbps </li></ul></ul><ul><ul><li>direct sequence spread spectrum (DSSS) in physical layer </li></ul></ul><ul><ul><ul><li>all hosts use same chipping code </li></ul></ul></ul><ul><ul><li>widely deployed, using base stations </li></ul></ul><ul><li>802.11a </li></ul><ul><ul><li>5-6 GHz range </li></ul></ul><ul><ul><li>up to 54 Mbps </li></ul></ul><ul><li>802.11g </li></ul><ul><ul><li>2.4-5 GHz range </li></ul></ul><ul><ul><li>up to 54 Mbps </li></ul></ul><ul><li>All use CSMA/CA for multiple access </li></ul><ul><li>All have base-station and ad-hoc network versions </li></ul>
  31. 31. Figure 3-12 ISM bands
  32. 32. 802.11 LAN architecture <ul><li>wireless host communicates with base station </li></ul><ul><ul><li>base station = access point (AP) </li></ul></ul><ul><li>Basic Service Set (BSS) (aka “cell”) in infrastructure mode contains: </li></ul><ul><ul><li>wireless hosts </li></ul></ul><ul><ul><li>access point (AP): base station </li></ul></ul><ul><ul><li>ad hoc mode: hosts only </li></ul></ul>BSS 1 BSS 2 hub, switch or router Internet AP AP
  33. 33. 802.11: Channels, association <ul><li>802.11b: 2.4GHz-2.485GHz spectrum divided into 11 channels at different frequencies </li></ul><ul><ul><li>AP admin chooses frequency for AP </li></ul></ul><ul><ul><li>interference possible: channel can be same as that chosen by neighboring AP! </li></ul></ul><ul><li>host: must associate with an AP </li></ul><ul><ul><li>scans channels, listening for beacon frames containing AP’s name (SSID) and MAC address </li></ul></ul><ul><ul><li>selects AP to associate with </li></ul></ul><ul><ul><li>may perform authentication [Chapter 8] </li></ul></ul><ul><ul><li>will typically run DHCP to get IP address in AP’s subnet </li></ul></ul>
  34. 34. IEEE 802.11: multiple access <ul><li>avoid collisions: 2 + nodes transmitting at same time </li></ul><ul><li>802.11: CSMA - sense before transmitting </li></ul><ul><ul><li>don’t collide with ongoing transmission by other node </li></ul></ul><ul><li>802.11: no collision detection! </li></ul><ul><ul><li>difficult to receive (sense collisions) when transmitting due to weak received signals (fading) </li></ul></ul><ul><ul><li>can’t sense all collisions in any case: hidden terminal, fading </li></ul></ul><ul><ul><li>goal: avoid collisions: CSMA/C(ollision)A(voidance) </li></ul></ul>A B C A B C A’s signal strength space C’s signal strength
  35. 35. IEEE 802.11 MAC Protocol: CSMA/CA <ul><li>802.11 sender </li></ul><ul><li>1 if sense channel idle for DIFS then </li></ul><ul><ul><li>transmit entire frame (no CD) </li></ul></ul><ul><li>2 if sense channel busy then </li></ul><ul><ul><li>start random backoff time </li></ul></ul><ul><ul><li>timer counts down while channel idle </li></ul></ul><ul><ul><li>transmit when timer expires </li></ul></ul><ul><ul><li>if no ACK, increase random backoff interval, repeat 2 </li></ul></ul><ul><li>802.11 receiver </li></ul><ul><li>- if frame received OK </li></ul><ul><li>return ACK after SIFS (ACK needed due to hidden terminal problem) </li></ul>sender receiver DIFS data SIFS ACK
  36. 36. Avoiding collisions (more) <ul><li>idea: allow sender to “reserve” channel rather than random access of data frames: avoid collisions of long data frames </li></ul><ul><li>sender first transmits small request-to-send (RTS) packets to BS using CSMA </li></ul><ul><ul><li>RTSs may still collide with each other (but they’re short) </li></ul></ul><ul><li>BS broadcasts clear-to-send CTS in response to RTS </li></ul><ul><li>RTS heard by all nodes </li></ul><ul><ul><li>sender transmits data frame </li></ul></ul><ul><ul><li>other stations defer transmissions </li></ul></ul>Avoid data frame collisions completely using small reservation packets!
  37. 37. Collision Avoidance: RTS-CTS exchange AP A B time defer RTS(A) RTS(B) RTS(A) CTS(A) CTS(A) DATA (A) ACK(A) ACK(A) reservation collision
  38. 38. Manchester encoding <ul><li>Used in 10BaseT </li></ul><ul><li>Each bit has a transition </li></ul><ul><li>Allows clocks in sending and receiving nodes to synchronize to each other </li></ul><ul><ul><li>no need for a centralized, global clock among nodes! </li></ul></ul><ul><li>Hey, this is physical-layer stuff! </li></ul>
  39. 39. Link Layer <ul><li>5.1 Introduction and services </li></ul><ul><li>5.2 Error detection and correction </li></ul><ul><li>5.3Multiple access protocols </li></ul><ul><li>5.4 Link-Layer Addressing </li></ul><ul><li>5.5 Ethernet </li></ul><ul><li>5.6 Interconnections: Hubs and switches </li></ul><ul><li>5.7 PPP </li></ul><ul><li>5.8 Link Virtualization: ATM </li></ul>
  40. 40. Hubs <ul><li>Hubs are essentially physical-layer repeaters: </li></ul><ul><ul><li>bits coming from one link go out all other links </li></ul></ul><ul><ul><li>at the same rate </li></ul></ul><ul><ul><li>no frame buffering </li></ul></ul><ul><ul><li>no CSMA/CD at hub: adapters detect collisions </li></ul></ul><ul><ul><li>provides net management functionality </li></ul></ul>twisted pair hub
  41. 41. Interconnecting with hubs <ul><li>Backbone hub interconnects LAN segments </li></ul><ul><li>Extends max distance between nodes </li></ul><ul><li>But individual segment collision domains become one large collision domain </li></ul><ul><li>Can’t interconnect 10BaseT & 100BaseT </li></ul>hub hub hub hub
  42. 42. Inter - Networking <ul><li>Hubs </li></ul><ul><li>Bridges </li></ul><ul><li>Switches </li></ul><ul><li>Routers </li></ul>
  43. 43. Learning Bridges <ul><li>Do not forward when unnecessary </li></ul><ul><li>Maintain forwarding table </li></ul><ul><li> Host Port </li></ul><ul><li> A 1 </li></ul><ul><li> B 1 </li></ul><ul><li> C 1 </li></ul><ul><li> X 2 </li></ul><ul><li> Y 2 </li></ul><ul><li> Z 2 </li></ul><ul><li>Learn table entries based on source address </li></ul><ul><li>Table is an optimization; need not be complete </li></ul><ul><li>Always forward broadcast frames </li></ul>
  44. 44. Spanning Tree Algorithm <ul><li>Problem: loops </li></ul><ul><li>Bridges run a distributed spanning tree algorithm </li></ul><ul><ul><li>select which bridges actively forward </li></ul></ul><ul><ul><li>developed by Radia Perlman </li></ul></ul><ul><ul><li>now IEEE 802.1 specification </li></ul></ul>
  45. 45. Algorithm Overview <ul><li>Each bridge has unique id (e.g., B1, B2, B3) </li></ul><ul><li>Select bridge with smallest id as root </li></ul><ul><li>Select bridge on each LAN closest to root as designated bridge (use id to break ties) </li></ul><ul><li>Each bridge forwards frames over each LAN for which it is the designated bridge </li></ul>
  46. 46. Algorithm Details <ul><li>Bridges exchange configuration messages </li></ul><ul><ul><li>id for bridge sending the message </li></ul></ul><ul><ul><li>id for what the sending bridge believes to be root bridge </li></ul></ul><ul><ul><li>distance (hops) from sending bridge to root bridge </li></ul></ul><ul><li>Each bridge records current best configuration message for each port </li></ul><ul><li>Initially, each bridge believes it is the root </li></ul>
  47. 47. Algorithm Detail (cont) <ul><li>When learn not root, stop generating config messages </li></ul><ul><ul><li>in steady state, only root generates configuration messages </li></ul></ul><ul><li>When learn not designated bridge, stop forwarding config messages </li></ul><ul><ul><li>in steady state, only designated bridges forward config messages </li></ul></ul><ul><li>Root continues to periodically send config messages </li></ul><ul><li>If any bridge does not receive config message after a period of time, it starts generating config messages claiming to be the root </li></ul>
  48. 48. Broadcast and Multicast <ul><li>Forward all broadcast/multicast frames </li></ul><ul><ul><li>current practice </li></ul></ul><ul><li>Learn when no group members downstream </li></ul><ul><li>Accomplished by having each member of group G send a frame to bridge multicast address with G in source field </li></ul>
  49. 49. Limitations of Bridges <ul><li>Do not scale </li></ul><ul><ul><li>spanning tree algorithm does not scale </li></ul></ul><ul><ul><li>broadcast does not scale </li></ul></ul><ul><li>Do not accommodate heterogeneity </li></ul><ul><li>Caution: beware of transparency </li></ul>
  50. 50. Switch <ul><li>link-layer device: smarter than hubs, take active role </li></ul><ul><ul><li>store, forward Ethernet frames </li></ul></ul><ul><ul><li>examine incoming frame’s MAC address, selectively forward frame to one-or-more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment </li></ul></ul><ul><li>transparent </li></ul><ul><ul><li>hosts are unaware of presence of switches </li></ul></ul><ul><li>plug-and-play, self-learning </li></ul><ul><ul><li>switches do not need to be configured </li></ul></ul>
  51. 51. Switch: allows multiple simultaneous transmissions <ul><li>hosts have dedicated, direct connection to switch </li></ul><ul><li>switches buffer packets </li></ul><ul><li>Ethernet protocol used on each incoming link, but no collisions; full duplex </li></ul><ul><ul><li>each link is its own collision domain </li></ul></ul><ul><li>switching: A-to-A’ and B-to-B’ simultaneously, without collisions </li></ul><ul><ul><li>not possible with dumb hub </li></ul></ul>A A’ B B’ C C’ switch with six interfaces ( 1,2,3,4,5,6 ) 1 2 3 4 5 6
  52. 52. Switch Table <ul><li>Q: how does switch know that A’ reachable via interface 4, B’ reachable via interface 5? </li></ul><ul><li>A: each switch has a switch table, each entry: </li></ul><ul><ul><li>(MAC address of host, interface to reach host, time stamp) </li></ul></ul><ul><li>looks like a routing table! </li></ul><ul><li>Q: how are entries created, maintained in switch table? </li></ul><ul><ul><li>something like a routing protocol? </li></ul></ul>A A’ B B’ C C’ switch with six interfaces ( 1,2,3,4,5,6 ) 1 2 3 4 5 6
  53. 53. Switch: self-learning <ul><li>switch learns which hosts can be reached through which interfaces </li></ul><ul><ul><li>when frame received, switch “learns” location of sender: incoming LAN segment </li></ul></ul><ul><ul><li>records sender/location pair in switch table </li></ul></ul>A A’ B B’ C C’ 1 2 3 4 5 6 Switch table (initially empty) A A’ Source: A Dest: A’ MAC addr interface TTL A 1 60
  54. 54. Forwarding <ul><li>How do determine onto which LAN segment to forward frame? </li></ul><ul><li>Looks like a routing problem... </li></ul>1 2 3 hub hub hub switch
  55. 55. Self learning <ul><li>A switch has a switch table </li></ul><ul><li>entry in switch table: </li></ul><ul><ul><li>(MAC Address, Interface, Time Stamp) </li></ul></ul><ul><ul><li>stale entries in table dropped (TTL can be 60 min) </li></ul></ul><ul><li>switch learns which hosts can be reached through which interfaces </li></ul><ul><ul><li>when frame received, switch “learns” location of sender: incoming LAN segment </li></ul></ul><ul><ul><li>records sender/location pair in switch table </li></ul></ul>
  56. 56. Self-learning, forwarding: example <ul><li>frame destination unknown: </li></ul>A A’ B B’ C C’ 1 2 3 4 5 6 Switch table (initially empty) flood <ul><li>destination A location known: </li></ul>selective send A A’ Source: A Dest: A’ MAC addr interface TTL A 1 60 A A’ A A’ A A’ A A’ A A’ A’ A A’ 4 60
  57. 57. Filtering/Forwarding <ul><li>When switch receives a frame: </li></ul><ul><li>index switch table using MAC dest address </li></ul><ul><li>if entry found for destination then{ </li></ul><ul><li>if dest on segment from which frame arrived then drop the frame </li></ul><ul><li>else forward the frame on interface indicated </li></ul><ul><li>} </li></ul><ul><li>else flood </li></ul>forward on all but the interface on which the frame arrived
  58. 58. Switch example <ul><li>Suppose C sends frame to D </li></ul><ul><li>Switch receives frame from from C </li></ul><ul><ul><li>notes in bridge table that C is on interface 1 </li></ul></ul><ul><ul><li>because D is not in table, switch forwards frame into interfaces 2 and 3 </li></ul></ul><ul><li>frame received by D </li></ul>hub hub hub switch A B C D E F G H I address interface A B E G 1 1 2 3 1 2 3
  59. 59. Switch example <ul><li>Suppose D replies back with frame to C. </li></ul><ul><li>Switch receives frame from from D </li></ul><ul><ul><li>notes in bridge table that D is on interface 2 </li></ul></ul><ul><ul><li>because C is in table, switch forwards frame only to interface 1 </li></ul></ul><ul><li>frame received by C </li></ul>hub hub hub switch A B C D E F G H I address interface A B E G C 1 1 2 3 1
  60. 60. Switch: traffic isolation <ul><li>switch installation breaks subnet into LAN segments </li></ul><ul><li>switch filters packets: </li></ul><ul><ul><li>same-LAN-segment frames not usually forwarded onto other LAN segments </li></ul></ul><ul><ul><li>segments become separate collision domains </li></ul></ul>collision domain collision domain collision domain hub hub hub switch
  61. 61. Switches: dedicated access <ul><li>Switch with many interfaces </li></ul><ul><li>Hosts have direct connection to switch </li></ul><ul><li>No collisions; full duplex </li></ul><ul><li>Switching: A-to-A’ and B-to-B’ simultaneously, no collisions </li></ul>switch A A’ B B’ C C’
  62. 62. More on Switches <ul><li>cut-through switching: frame forwarded from input to output port without first collecting entire frame </li></ul><ul><ul><li>slight reduction in latency </li></ul></ul><ul><li>combinations of shared/dedicated, 10/100/1000 Mbps interfaces </li></ul>
  63. 63. Institutional network hub hub hub switch to external network router IP subnet mail server web server
  64. 64. Switches vs. Routers <ul><li>both store-and-forward devices </li></ul><ul><ul><li>routers: network layer devices (examine network layer headers) </li></ul></ul><ul><ul><li>switches are link layer devices </li></ul></ul><ul><li>routers maintain routing tables, implement routing algorithms </li></ul><ul><li>switches maintain switch tables, implement filtering, learning algorithms </li></ul>
  65. 65. Summary comparison
  66. 66. IEEE 802 Standards The 802 working groups. The important ones are marked with *. The ones marked with  are hibernating. The one marked with † gave up.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×