Published on

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Draw on board
  • Draw 0 1 0 1 = LHLH
  • Draw 0 1 0 1 = LHLH
  • 0 1 0 1 = H LH HL LH HL
  • Application may get duplicates in the case of early timeouts
  • Xxx picture
  • Draw 0 1 0 1 = LHLH
  • ppt

    1. 1. Chapter 5 Link Layer and LANs <ul><li>A note on the use of these ppt slides: </li></ul><ul><li>We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: </li></ul><ul><li>If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) </li></ul><ul><li>If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material. </li></ul><ul><li>Thanks and enjoy! JFK/KWR </li></ul><ul><li>All material copyright 1996-2007 </li></ul><ul><li>J.F Kurose and K.W. Ross, All Rights Reserved </li></ul>Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesley, July 2007.
    2. 2. Chapter 5: The Data Link Layer <ul><li>Our goals: </li></ul><ul><li>understand principles behind data link layer services: </li></ul><ul><ul><li>error detection, correction </li></ul></ul><ul><ul><li>sharing a broadcast channel: multiple access </li></ul></ul><ul><ul><li>link layer addressing </li></ul></ul><ul><ul><li>reliable data transfer, flow control: done! </li></ul></ul><ul><li>instantiation and implementation of various link layer technologies </li></ul>
    3. 3. 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 and other data link layers </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 and MPLS </li></ul>
    4. 4. Link Layer: Introduction <ul><li>Some terminology: </li></ul><ul><li>hosts and routers are nodes </li></ul><ul><li>communication channels that connect adjacent nodes along communication path are links </li></ul><ul><ul><li>wired links </li></ul></ul><ul><ul><li>wireless links </li></ul></ul><ul><ul><li>LANs </li></ul></ul><ul><li>layer-2 packet is a frame , encapsulates datagram </li></ul>data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
    5. 5. Adaptors Communicating <ul><li>link and physical layers implemented in adaptor/NIC (Network Interface Card) </li></ul><ul><ul><li>RAM, DSP chips, host bus interface, and link interface </li></ul></ul><ul><ul><li>Ethernet card, PCMCIA card, 802.11 card </li></ul></ul><ul><li>sending side: </li></ul><ul><ul><li>encapsulates datagram in a frame </li></ul></ul><ul><ul><li>adds error checking bits, rdt, flow control, etc. </li></ul></ul><ul><li>receiving side </li></ul><ul><ul><li>looks for errors, rdt, flow control, etc </li></ul></ul><ul><ul><li>extracts datagram, passes to upper layer at receiving side </li></ul></ul><ul><li>datagram transferred by different link protocols over different links: </li></ul><ul><ul><li>e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link </li></ul></ul>sending node rcving node datagram adapter adapter link layer protocol frame frame
    6. 6. Protocol stack picture network link physical frame phys. link data link protocol adapter card application transport network link physical M M M M H t H t H n H t H n H l M H t H n H l
    7. 7. Host adaptor controller physical transmission cpu memory host bus (e.g., PCI) network adapter card host schematic application transport network link link physical
    8. 8. Link Layer Functions <ul><li>Flow Control </li></ul><ul><ul><li>pacing between adjacent sending and receiving nodes </li></ul></ul><ul><li>Reliable delivery between adjacent nodes </li></ul><ul><ul><li>we learned how to do this already (chapter 3)! </li></ul></ul><ul><ul><li>seldom used on low bit error link (i.e. fiber, twisted pair) </li></ul></ul><ul><ul><li>wireless links: high error rates </li></ul></ul><ul><ul><ul><li>Eschew end-to-end principle for performance </li></ul></ul></ul><ul><li>Security </li></ul><ul><li>Demux to upper protocol </li></ul><ul><li>Framing </li></ul><ul><ul><li>encapsulate datagram into frame, adding header, trailer </li></ul></ul>
    9. 9. Link Layer Functions (more) <ul><li>Error Detection </li></ul><ul><ul><li>errors caused by signal attenuation, noise. </li></ul></ul><ul><ul><li>receiver detects presence of errors: </li></ul></ul><ul><ul><ul><li>signals sender for retransmission or drops frame </li></ul></ul></ul><ul><li>Error Correction </li></ul><ul><ul><li>receiver identifies and corrects bit error(s) without resorting to retransmission </li></ul></ul><ul><li>Medium access and quality of service </li></ul><ul><ul><li>channel access if shared medium </li></ul></ul><ul><li>Addressing </li></ul><ul><ul><li>“ MAC” addresses used in frame headers to identify source, dest (different from IP address) </li></ul></ul>
    10. 10. Flow control <ul><li>Pacing between sender and receiver </li></ul><ul><li>Sender prevented from overrunning receiver </li></ul><ul><ul><li>Ready-To-Send, Clear-To-Send signalling </li></ul></ul>
    11. 11. Reliable delivery <ul><li>Reliability at the link layer </li></ul><ul><li>Handled in a similar manner to transport protocols </li></ul><ul><ul><li>ARQ, Stop-and-wait, Go-back-N, Selective Repeat </li></ul></ul><ul><li>When and why should this be used? </li></ul><ul><ul><li>Rarely done over twisted-pair or fiber optic links </li></ul></ul><ul><ul><li>Usually done over lossy links for performance improvement (versus correctness) </li></ul></ul>
    12. 12. Security <ul><li>Mainly for broadcast data-link layers </li></ul><ul><ul><li>Encrypt payload of higher layers </li></ul></ul><ul><ul><li>Hide IP source/destination from eavesdroppers </li></ul></ul><ul><ul><li>Important for wireless LANs especially </li></ul></ul><ul><ul><ul><li>Parking lot attacks with 802.11b </li></ul></ul></ul><ul><ul><ul><li>WEP, WPA </li></ul></ul></ul><ul><li>If time permits, security will be covered at the end of the course…. </li></ul>
    13. 13. Demux to upper protocol <ul><li>Protocol type specification interfaces to network layer </li></ul><ul><li>Data-link layer can support any number of network layers </li></ul><ul><ul><li>Type field in data-link header specifies network layer of packet </li></ul></ul><ul><ul><li>Each data-link layer defines its own protocol type numbering for network layer </li></ul></ul><ul><ul><li>IP is one of many network layers </li></ul></ul>
    14. 14. Demux to upper protocol <ul><li>http://www.cavebear.com/CaveBear/Ethernet/type.html </li></ul><ul><li>Some Ethernet protocol types </li></ul><ul><ul><li>0800 DOD Internet Protocol (IP) </li></ul></ul><ul><ul><li>0806 Address Resolution Protocol (ARP) </li></ul></ul><ul><ul><li>8037 IPX (Novell Netware) </li></ul></ul><ul><ul><li>80D5 IBM SNA Services </li></ul></ul><ul><ul><li>809B EtherTalk (AppleTalk over Ethernet) </li></ul></ul>
    15. 15. Framing <ul><li>Data encapsulation for transmission over physical link </li></ul><ul><li>Data embedded within a link-layer frame before transmission </li></ul><ul><li>Data-link header and/or trailer added </li></ul><ul><li>Physical addresses used in frame headers to identify source and destination (not IP) </li></ul>
    16. 16. Fixed length framing <ul><li>Length delimited </li></ul><ul><ul><li>Beginning of frame has length </li></ul></ul><ul><ul><li>Single corrupt length can cause problems </li></ul></ul><ul><ul><ul><li>Must have start of frame character to resynchronize </li></ul></ul></ul><ul><ul><ul><li>Resynchronization can fail if start of frame character is inside packets as well </li></ul></ul></ul>
    17. 17. Variable length framing <ul><li>Byte stuffing </li></ul><ul><ul><li>Special start of frame byte (e.g. 0xFF) </li></ul></ul><ul><ul><li>Special escape byte value (e.g. 0xFE) </li></ul></ul><ul><ul><li>Values actually in text are replaced (e.g. 0xFF by 0xFEFF and 0xFE by 0xFEFE) </li></ul></ul><ul><ul><li>Worst case – can double the size of frame </li></ul></ul><ul><li>Bit stuffing </li></ul><ul><ul><li>Special bit sequence (0x01111110) </li></ul></ul><ul><ul><li>0 bit stuffed after any 11111 sequence </li></ul></ul>
    18. 18. Clock-Based Framing <ul><li>Used by SONET </li></ul><ul><li>Fixed size frames (810 bytes) </li></ul><ul><li>Look for start of frame marker that appears every 810 bytes </li></ul><ul><li>Will eventually sync up </li></ul>
    19. 19. 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 and other data link layers </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>
    20. 20. Error detection/correction <ul><li>Errors caused by signal attenuation, noise. </li></ul><ul><li>Receiver detects presence of errors </li></ul><ul><li>Possible actions </li></ul><ul><ul><li>Signal sender for retransmission </li></ul></ul><ul><ul><li>Drops frame </li></ul></ul><ul><ul><li>Correct bit errors if possible and continue </li></ul></ul>
    21. 21. Error Detection <ul><li>EDC= Error Detection and Correction bits (redundancy) </li></ul><ul><li>D = Data protected by error checking, may include header fields </li></ul><ul><li>Error detection not 100% reliable! </li></ul><ul><ul><li>protocol may miss some errors, but rarely </li></ul></ul><ul><ul><li>larger EDC field yields better detection and correction </li></ul></ul>
    22. 22. Parity Checking Single Bit Parity: Detect single bit errors Two Dimensional Bit Parity : Detect and correct single bit errors 0 0
    23. 23. Cyclic Redundancy Check (CRC) <ul><li>Polynomial code </li></ul><ul><ul><li>Treat data bits as coefficients of n-bit polynomial </li></ul></ul><ul><ul><li>Choose r+1 bit generator polynomial G </li></ul></ul><ul><ul><ul><li>G well known – chosen in advance </li></ul></ul></ul><ul><ul><li>Add r bits to packet so that message is divisible by G </li></ul></ul><ul><ul><ul><li>At receiver, divide payload by generator polynomial </li></ul></ul></ul><ul><ul><ul><li>If result not zero, error detected </li></ul></ul></ul><ul><li>Better loss detection properties than checksums </li></ul><ul><ul><li>All single bit errors, all double bit errors, all odd-numbered errors, burst errors less than r </li></ul></ul><ul><li>Widely used in practice (802.11, WiFi, ATM, SCTP) </li></ul>
    24. 24. Cyclic Redundancy Check (CRC) <ul><li>Calculate code using modulo 2 division of data by generator polynomial </li></ul><ul><ul><li>Subtraction equivalent to XOR </li></ul></ul><ul><ul><li>Weak definition of magnitude </li></ul></ul><ul><ul><ul><li>X >= Y iff position of highest 1 bit of X is the same or greater than the highest 1 bit of Y </li></ul></ul></ul><ul><li>Record remainder “R” after division and attach “R” after data </li></ul><ul><li>Result divisible by generator polynomial </li></ul>
    25. 25. Cyclic Redundancy Check (CRC)
    26. 26. CRC example <ul><li>Data: </li></ul><ul><ul><li>101110 </li></ul></ul><ul><li>Generator Polynomial : </li></ul><ul><ul><li>x 3 + 1 (1001) </li></ul></ul><ul><li>Send : </li></ul><ul><li>101110011 </li></ul>
    27. 27. CRC example <ul><li>Data: </li></ul><ul><ul><li>10000 </li></ul></ul><ul><li>Generator Polynomial : </li></ul><ul><ul><li>x 2 + 1 (101) </li></ul></ul><ul><li>Send : </li></ul>101 1000000 G
    28. 28. CRC example <ul><li>Data: </li></ul><ul><ul><li>10000 </li></ul></ul><ul><li>Generator Polynomial : </li></ul><ul><ul><li>x 2 + 1 (101) </li></ul></ul><ul><li>Send : </li></ul><ul><li>1000001 </li></ul>101 1000000 101 010 000 100 101 010 000 100 101 01 101 D G R
    29. 29. Cyclic Redundancy Check (CRC) <ul><li>CRC-16 implementation </li></ul><ul><li>Shift register and XOR gates </li></ul>
    30. 30. CRC polynomials <ul><li>CRC-16 = x 16 + x 15 + x 2 + 1 (used in HDLC ) </li></ul><ul><li>CRC-CCITT = x 16 + x 12 + x 5 + 1 </li></ul><ul><li>CRC-32 = x 32 + x 26 + x 23 + x 22 + x 16 + x 12 + x 11 + x 10 + x 8 + x 7 + x 5 + x 4 + x 2 + x + 1 (used in Ethernet ) </li></ul>
    31. 31. Forward error correction <ul><li>FEC </li></ul><ul><ul><li>Use error correcting codes to repair losses </li></ul></ul><ul><ul><li>Add redundant information which allows receiver to correct bit errors </li></ul></ul><ul><ul><li>See information and coding theory work. </li></ul></ul>
    32. 32. 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 and other data link layers </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>
    33. 33. Multiple Access Links and Protocols <ul><li>Two types of “links”: </li></ul><ul><li>point-to-point </li></ul><ul><ul><li>PPP for dial-up access </li></ul></ul><ul><ul><li>point-to-point link between Ethernet switch and host </li></ul></ul><ul><li>broadcast (shared wire or medium) </li></ul><ul><ul><li>old-fashioned Ethernet </li></ul></ul><ul><ul><li>upstream HFC (cable) </li></ul></ul><ul><ul><li>802.11 wireless LAN </li></ul></ul>shared wire (e.g., cabled Ethernet) shared RF (e.g., 802.11 WiFi) shared RF (satellite) humans at a cocktail party (shared air, acoustical)
    34. 34. Multiple access problem <ul><li>Point-to-point link and switched media no problem </li></ul><ul><li>Broadcast links? </li></ul><ul><ul><li>Network arbitration </li></ul></ul><ul><ul><li>Give everyone a fixed time/freq slot? </li></ul></ul><ul><ul><ul><li>Ok for fixed bandwidth (e.g., voice) </li></ul></ul></ul><ul><ul><ul><li>What if traffic is bursty? </li></ul></ul></ul><ul><ul><li>Centralized arbiter </li></ul></ul><ul><ul><ul><li>Ex: cell phone base station </li></ul></ul></ul><ul><ul><ul><li>Single point of failure </li></ul></ul></ul><ul><ul><li>Distributed arbitration </li></ul></ul><ul><ul><ul><li>Aloha/Ethernet </li></ul></ul></ul><ul><ul><li>Humans use multiple access protocols all the time </li></ul></ul>
    35. 35. Multiple access protocols <ul><li>single shared communication channel </li></ul><ul><li>two or more simultaneous transmissions by nodes: interference </li></ul><ul><ul><li>only one node can send successfully at a time </li></ul></ul><ul><li>multiple access protocol: </li></ul><ul><ul><li>distributed algorithm that determines how stations share channel, i.e., determine when station can transmit </li></ul></ul><ul><ul><li>communication about channel sharing uses channel itself! </li></ul></ul><ul><ul><li>what to look for in multiple access protocols: </li></ul></ul><ul><ul><ul><li>synchronous or asynchronous </li></ul></ul></ul><ul><ul><ul><li>amount of information needed about other stations </li></ul></ul></ul><ul><ul><ul><li>robustness (e.g., to channel errors) </li></ul></ul></ul><ul><ul><ul><li>performance </li></ul></ul></ul>
    36. 36. Ideal Multiple Access Protocol <ul><li>Broadcast channel of rate R bps </li></ul><ul><li>1. Efficient: </li></ul><ul><ul><li>When one node wants to transmit, it can send at rate R. </li></ul></ul><ul><li>2. Fair: </li></ul><ul><ul><li>When M nodes want to transmit, each can send at average rate R/M </li></ul></ul><ul><li>3. Fully decentralized: </li></ul><ul><ul><li>no special node to coordinate transmissions </li></ul></ul><ul><ul><li>no synchronization of clocks, slots </li></ul></ul><ul><li>4. Simple </li></ul>
    37. 37. MAC Protocols: a taxonomy <ul><li>Three broad classes: </li></ul><ul><li>Channel Partitioning </li></ul><ul><ul><li>divide channel into smaller “pieces” (time slots, frequency, code) </li></ul></ul><ul><ul><li>allocate piece to node for exclusive use </li></ul></ul><ul><li>Random Access </li></ul><ul><ul><li>channel not divided, allow collisions </li></ul></ul><ul><ul><li>“ recover” from collisions </li></ul></ul><ul><li>“ Taking turns” </li></ul><ul><ul><li>tightly coordinate shared access to avoid collisions </li></ul></ul><ul><ul><li>Nodes take turns, but nodes with more to send can take longer turns </li></ul></ul>
    38. 38. Channel Partitioning MAC protocols: TDMA <ul><li>TDMA: time division multiple access </li></ul><ul><li>channel divided into N time slots, one per user </li></ul><ul><ul><li>access to channel in &quot;rounds&quot; </li></ul></ul><ul><ul><li>inefficient with low duty cycle users and at light load </li></ul></ul><ul><li>each station gets fixed length slot (length = pkt trans time) in each round </li></ul><ul><li>unused slots go idle </li></ul><ul><li>example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle </li></ul>1 3 4 1 3 4 6-slot frame
    39. 39. Channel Partitioning MAC protocols: FDMA <ul><li>FDMA: frequency division multiple access </li></ul><ul><li>channel spectrum divided into frequency bands </li></ul><ul><li>each station assigned fixed frequency band </li></ul><ul><li>unused transmission time in frequency bands go idle </li></ul><ul><li>example: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle </li></ul>frequency bands time FDM cable
    40. 40. Channel Partitioning MAC protocols <ul><li>CDMA (Code Division Multiple Access) </li></ul><ul><li>unique “code” assigned to each user; ie, code set partitioning </li></ul><ul><li>used mostly in wireless broadcast channels (cellular, satellite,etc) </li></ul><ul><li>each user has own “chipping” sequence (ie, code) to encode data </li></ul><ul><li>encoded signal = (original data) X (chipping sequence) </li></ul><ul><li>decoding: inner-product of encoded signal and chipping sequence </li></ul><ul><li>allows multiple users to “coexist” and transmit simultaneously with minimal interference (if codes are “orthogonal”) </li></ul>
    41. 41. Channel Partitioning MAC protocols <ul><li>CDMA Encode/Decode </li></ul>
    42. 42. Channel Partitioning MAC protocols <ul><li>CDMA: two sender interference </li></ul>
    43. 43. Random Access Protocols <ul><li>When node has packet to send </li></ul><ul><ul><li>transmit at full channel data rate R. </li></ul></ul><ul><ul><li>no a priori coordination among nodes </li></ul></ul><ul><li>two or more transmitting nodes ➜ “collision”, </li></ul><ul><li>To avoid deterministic collisions: randomize </li></ul><ul><ul><li>random access MAC protocol specifies: </li></ul></ul><ul><ul><ul><li>how to detect collisions </li></ul></ul></ul><ul><ul><ul><li>how to recover from collisions (e.g., via delayed retransmissions) </li></ul></ul></ul><ul><ul><ul><li>“ Asynchronous” TDMA </li></ul></ul></ul><ul><li>Examples of random access MAC protocols: </li></ul><ul><ul><li>slotted ALOHA </li></ul></ul><ul><ul><li>ALOHA </li></ul></ul><ul><ul><li>CSMA, CSMA/CD, CSMA/CA </li></ul></ul>
    44. 44. Slotted ALOHA <ul><li>Assumptions </li></ul><ul><li>all frames same size </li></ul><ul><li>time is divided into equal size slots, time to transmit 1 frame </li></ul><ul><li>nodes start to transmit frames only at beginning of slots </li></ul><ul><li>nodes are synchronized </li></ul><ul><li>if 2 or more nodes transmit in slot, all nodes detect collision </li></ul><ul><li>Operation </li></ul><ul><li>when node obtains fresh frame, it transmits in next slot </li></ul><ul><li>no collision, node can send new frame in next slot </li></ul><ul><li>if collision, node retransmits frame in each subsequent slot with prob. p until success </li></ul>
    45. 45. Slotted ALOHA <ul><li>Pros </li></ul><ul><li>single active node can continuously transmit at full rate of channel </li></ul><ul><li>highly decentralized: only slots in nodes need to be in sync </li></ul><ul><li>simple </li></ul><ul><li>Cons </li></ul><ul><li>collisions, wasting slots </li></ul><ul><li>idle slots </li></ul><ul><li>nodes may be able to detect collision in less than time to transmit packet </li></ul><ul><li>clock synchronization </li></ul>
    46. 46. Slotted Aloha efficiency <ul><li>Suppose N nodes with many frames to send, each transmit in slot with probability p </li></ul><ul><li>prob that node 1 has success in a slot = p(1-p) N-1 </li></ul><ul><li>prob that any node has a success = Np(1-p) N-1 </li></ul><ul><li>For max efficiency with N nodes, find p* that maximizes Np(1-p) N-1 </li></ul><ul><li>For many nodes, take limit of Np*(1-p*) N-1 as N goes to infinity, gives 1/e = .37 </li></ul>Efficiency is the long-run fraction of successful slots when there are many nodes, each with many frames to send At best: channel used for useful transmissions 37% of time!
    47. 47. Pure (unslotted) ALOHA <ul><li>unslotted Aloha: simpler, no synchronization </li></ul><ul><li>when frame arrives </li></ul><ul><ul><li>Send without awaiting for beginning of slot </li></ul></ul><ul><li>collision probability increases: </li></ul><ul><ul><li>frame sent at t 0 collides with other frames sent in [t 0 -1,t 0 +1] </li></ul></ul>
    48. 48. Pure Aloha efficiency <ul><li>P(success by given node) = P(node transmits) . </li></ul><ul><li>P(no other node transmits in [p 0 -1,p 0 ] . </li></ul><ul><li>P(no other node transmits in [p 0 ,p 0 +1] </li></ul><ul><li>= p . (1-p) (N-1) . (1-p) (N-1) </li></ul><ul><li>P(success by any of N nodes) = N p . (1-p) (N-1) . (1-p) (N-1) </li></ul><ul><li>… choosing optimum p as n -> infty ... = 1/(2e) = .18 </li></ul>S = throughput = “goodput” (success rate) G = offered load = Np 0.5 1.0 1.5 2.0 0.1 0.2 0.3 0.4 Pure Aloha Slotted Aloha protocol constrains effective channel throughput!
    49. 49. CSMA (Carrier Sense Multiple Access) <ul><li>Human analogy: don’t interrupt others! </li></ul><ul><ul><li>Listen before transmitting </li></ul></ul><ul><li>CSMA algorithm </li></ul><ul><ul><li>If channel sensed idle: transmit entire frame </li></ul></ul><ul><ul><li>If channel sensed busy, defer transmission </li></ul></ul><ul><ul><ul><li>Persistent CSMA: retry immediately with probability p when channel becomes idle </li></ul></ul></ul><ul><ul><ul><li>Non-persistent CSMA: retry after random interval </li></ul></ul></ul>
    50. 50. CSMA collisions collisions can still occur: propagation delay means two nodes may not hear each other’s transmission collision: entire packet transmission time wasted spatial layout of nodes note: role of distance & propagation delay in determining collision probability
    51. 51. CSMA/CD (Collision Detection) <ul><li>Human analogy: the polite conversationalist </li></ul><ul><li>CSMA/CD algorithm </li></ul><ul><ul><li>Carrier sensing, deferral as in CSMA </li></ul></ul><ul><ul><li>Attempt to detect collisions while sending </li></ul></ul><ul><ul><li>Abort colliding transmissions as soon as possible to reduce channel wastage </li></ul></ul><ul><li>Collision detection: </li></ul><ul><ul><li>Easy in wired LANs: measure signal strengths, compare transmitted, received signals </li></ul></ul><ul><ul><li>Collisions detected within short time </li></ul></ul>
    52. 52. CSMA/CD collision detection
    53. 53. CSMA/CD problems <ul><li>Can CSMA/CD work over wireless LANs? </li></ul><ul><ul><li>Collision detection difficult in wireless LANs: receiver shut off while transmitting </li></ul></ul><ul><ul><li>Hidden terminal problem </li></ul></ul>
    54. 54. Hidden Terminal effect <ul><li>A, C cannot hear each other </li></ul><ul><ul><li>obstacles, signal attenuation </li></ul></ul><ul><ul><li>Neither A nor C can tell if they collide at B </li></ul></ul>
    55. 55. CSMA/CA: CSMA w/ collision avoidance <ul><li>Use base CSMA </li></ul><ul><li>Add acknowledgements </li></ul><ul><ul><li>Receiver acknowledges receipt of data </li></ul></ul><ul><ul><li>Avoids hidden terminal problem </li></ul></ul><ul><li>Avoid collisions explicitly via channel reservation </li></ul><ul><ul><li>Sender sends “request-to-send” (RTS) messages </li></ul></ul><ul><ul><ul><li>Transmitted without reservation using CSMA with ACKs </li></ul></ul></ul><ul><ul><li>Receiver sends “clear-to-send” (CTS) messages </li></ul></ul><ul><ul><ul><li>Transmitted without reservation using CSMA with ACKs </li></ul></ul></ul><ul><ul><li>Sender sends data packet using reservation </li></ul></ul><ul><ul><ul><li>Explicitly indicates length of so others know how long to back off </li></ul></ul></ul><ul><li>Used in 802.11 wireless LAN networks </li></ul>
    56. 56. “Taking Turns” MAC protocols <ul><li>Recall, channel partitioning MAC protocols: </li></ul><ul><ul><li>share channel efficiently and fairly at high load </li></ul></ul><ul><ul><li>inefficient at low load: delay in channel access, 1/N bandwidth allocated even if only 1 active node! </li></ul></ul><ul><li>Random access MAC protocols </li></ul><ul><ul><li>efficient at low load: single node can fully utilize channel </li></ul></ul><ul><ul><li>high load: collision overhead </li></ul></ul><ul><li>“ taking turns” protocols </li></ul><ul><ul><li>look for best of both worlds! </li></ul></ul>
    57. 57. “Taking Turns” MAC protocols <ul><li>Polling: </li></ul><ul><li>master node “invites” slave nodes to transmit in turn </li></ul><ul><ul><li>RTS, CTS messages </li></ul></ul><ul><li>typically used with “dumb” slave devices </li></ul><ul><li>concerns: </li></ul><ul><ul><li>polling overhead </li></ul></ul><ul><ul><li>latency </li></ul></ul><ul><ul><li>single point of failure (master) </li></ul></ul>master slaves poll data data
    58. 58. “Taking Turns” MAC protocols <ul><li>Token passing: </li></ul><ul><li>control token passed from one node to next sequentially. </li></ul><ul><li>token message </li></ul><ul><li>concerns: </li></ul><ul><ul><li>token overhead </li></ul></ul><ul><ul><li>latency </li></ul></ul><ul><ul><li>single point of failure (token) </li></ul></ul>T data (nothing to send) T
    59. 59. Taking-turns protocols <ul><li>Distributed Polling: </li></ul><ul><li>time divided into slots </li></ul><ul><li>begins with N short reservation slots </li></ul><ul><ul><li>reservation slot time equal to channel end-end propagation delay </li></ul></ul><ul><ul><li>station with message to send posts reservation </li></ul></ul><ul><ul><li>reservation seen by all stations </li></ul></ul><ul><li>after reservation slots, message transmissions ordered by known priority </li></ul>
    60. 60. Summary of MAC protocols <ul><li>What do you do with a shared media? </li></ul><ul><ul><li>Channel Partitioning </li></ul></ul><ul><ul><ul><li>Time Division </li></ul></ul></ul><ul><ul><ul><li>Frequency Division </li></ul></ul></ul><ul><ul><ul><li>Code Division </li></ul></ul></ul><ul><ul><li>Random partitioning (dynamic), </li></ul></ul><ul><ul><ul><li>ALOHA, S-ALOHA, CSMA, CSMA/CD </li></ul></ul></ul><ul><ul><ul><li>carrier sensing: easy in some technologies (wire), hard in others (wireless) </li></ul></ul></ul><ul><ul><ul><li>CSMA/CD used in Ethernet </li></ul></ul></ul><ul><ul><ul><li>CSMA/CA used in 802.11 </li></ul></ul></ul><ul><ul><li>Taking Turns </li></ul></ul><ul><ul><ul><li>polling from a central site, token passing </li></ul></ul></ul><ul><ul><ul><li>Bluetooth, FDDI, IBM Token Ring </li></ul></ul></ul>
    61. 61. 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 and other data link layers </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>
    62. 62. MAC Addresses <ul><li>MAC/LAN/physical/Ethernet address: </li></ul><ul><ul><li>used to get frame from one interface to another physically-connected interface (same network) </li></ul></ul><ul><ul><li>Globally unique 48 bit address (for most LANs) burned in the adapter ROM </li></ul></ul><ul><ul><ul><li>ifconfig –a </li></ul></ul></ul><ul><ul><li>Administered by IEEE </li></ul></ul><ul><ul><ul><li>manufacturer buys portion of MAC address space to assure uniqueness </li></ul></ul></ul>
    63. 63. LAN Addresses Each adapter on LAN has unique LAN address Broadcast address = FF-FF-FF-FF-FF-FF = adapter 1A-2F-BB-76-09-AD 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 71-65-F7-2B-08-53 LAN (wired or wireless)
    64. 64. MAC vs IP addressing <ul><li>MAC address </li></ul><ul><ul><li>Flat (not hierarchical) </li></ul></ul><ul><ul><ul><li>Like Social Security Numbers </li></ul></ul></ul><ul><ul><ul><li>Does not change when machine is moved (portable) </li></ul></ul></ul><ul><li>IP addresses </li></ul><ul><ul><li>Hierarchically organized </li></ul></ul><ul><ul><ul><li>Like postal address </li></ul></ul></ul><ul><ul><ul><li>Depends on IP subnet that node is attached to </li></ul></ul></ul><ul><ul><ul><li>Must change when machine is moved (not portable) </li></ul></ul></ul><ul><li>Why have separate IP and hardware addresses? </li></ul><ul><ul><li>Assign adapters an IP address </li></ul></ul><ul><ul><ul><li>Hardware only works for IP (no IPX, DECNET) </li></ul></ul></ul><ul><ul><li>Use hardware address as network address </li></ul></ul><ul><ul><ul><li>No route aggregation </li></ul></ul></ul>
    65. 65. ARP: Address Resolution Protocol <ul><li>ARP </li></ul><ul><ul><li>Broadcast interest in B’s MAC address </li></ul></ul><ul><ul><li>B responds with its MAC address </li></ul></ul><ul><ul><li>Keep track of mappings in ARP table </li></ul></ul><ul><ul><ul><li>IP/MAC address mappings for LAN nodes </li></ul></ul></ul><ul><li>< IP address; MAC address; TTL> </li></ul><ul><ul><ul><li>TTL (Time To Live) </li></ul></ul></ul><ul><ul><ul><li>Soft state </li></ul></ul></ul>Question: how to determine MAC address of B given B’s IP address? 1A-2F-BB-76-09-AD 58-23-D7-FA-20-B0 0C-C4-11-6F-E3-98 71-65-F7-2B-08-53 LAN
    66. 66. ARP protocol: Same LAN (network) <ul><li>A knows B’s IP address and wants to send datagram to B, and B’s MAC address not in A’s ARP table. </li></ul><ul><li>A broadcasts ARP query packet, containing B's IP address </li></ul><ul><ul><li>Dest MAC address = FF-FF-FF-FF-FF-FF </li></ul></ul><ul><ul><li>all machines on LAN receive ARP query </li></ul></ul><ul><li>B receives ARP packet, replies to A with its (B's) MAC address </li></ul><ul><ul><li>frame sent to A’s MAC address (unicast) </li></ul></ul><ul><li>A caches (saves) IP-to-MAC address pair in its ARP table until information becomes old (times out) </li></ul><ul><ul><li>soft state: information that times out (goes away) unless refreshed </li></ul></ul><ul><li>ARP is “plug-and-play”: </li></ul><ul><ul><li>nodes create their ARP tables without intervention from net administrator </li></ul></ul><ul><ul><ul><li>arp –a </li></ul></ul></ul><ul><ul><ul><li>/proc/net/arp </li></ul></ul></ul>
    67. 67. Routing to another LAN <ul><li>walkthrough: send datagram from A to B via R </li></ul><ul><li>assume A knows B’s IP address </li></ul><ul><li>Two ARP tables in router R, one for each IP network (LAN) </li></ul><ul><li>In routing table at source Host, default route </li></ul><ul><li>A creates datagram with source A, destination B </li></ul>A R B
    68. 68. <ul><li>A checks route table to find B is not on its network </li></ul><ul><li>A uses ARP to get R’s MAC address (ARP for </li></ul><ul><li>A creates link-layer frame with R's MAC address as dest, frame contains A-to-B IP datagram </li></ul><ul><li>A’s adapter sends frame </li></ul><ul><li>R’s adapter receives frame </li></ul><ul><li>R removes IP datagram from Ethernet frame, sees its destined to B </li></ul><ul><li>R uses ARP to get B’s MAC address </li></ul><ul><li>R creates frame containing A-to-B IP datagram sends to B </li></ul>A R B
    69. 69. DHCP <ul><li>Q: How does host get an IP address on subnet? </li></ul><ul><li>hard-coded by system admin in a file </li></ul><ul><ul><li>Wintel: control-panel->network->configuration->tcp/ip->properties </li></ul></ul><ul><ul><li>UNIX: /etc/rc.config </li></ul></ul><ul><li>DHCP: D ynamic H ost C onfiguration P rotocol: dynamically get address from server </li></ul><ul><ul><li>“ plug-and-play” </li></ul></ul><ul><ul><li>Given a hardware address, give me the IP address </li></ul></ul><ul><ul><ul><li>Predecessors: RARP, BOOTP </li></ul></ul></ul><ul><ul><ul><li>Opposite of ARP (given IP address, give me MAC address) </li></ul></ul></ul>
    70. 70. DHCP: Dynamic Host Configuration Protocol <ul><li>Goal: allow host to dynamically obtain its IP address from network server when it joins network </li></ul><ul><ul><li>Allows reuse of addresses (only hold address while connected and “on”) </li></ul></ul><ul><ul><li>Support for mobile users who want to join network </li></ul></ul><ul><ul><li>Can renew its lease on address in use </li></ul></ul><ul><li>DHCP overview: </li></ul><ul><ul><li>host broadcasts “ DHCP discover ” msg </li></ul></ul><ul><ul><li>DHCP server responds with “ DHCP offer ” msg </li></ul></ul><ul><ul><li>host requests IP address: “ DHCP request ” msg </li></ul></ul><ul><ul><li>DHCP server sends address: “ DHCP ack ” msg </li></ul></ul>
    71. 71. DHCP client-server scenario DHCP server arriving DHCP client needs address in this ( network A B E
    72. 72. DHCP client-server scenario DHCP server: arriving client time DHCP offer src:, 67 dest:, 68 yiaddrr: transaction ID: 654 Lifetime: 3600 secs DHCP request src:, 68 dest::, 67 yiaddrr: transaction ID: 655 Lifetime: 3600 secs DHCP ACK src:, 67 dest:, 68 yiaddrr: transaction ID: 655 Lifetime: 3600 secs DHCP discover src :, 68 dest.:,67 yiaddr: transaction ID: 654
    73. 73. 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 and other data link layers </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>
    74. 74. Specific data-link layers <ul><li>Specific data-link layers </li></ul><ul><ul><li>Ethernet (802.3) </li></ul></ul><ul><ul><li>Token Ring (802.5) </li></ul></ul><ul><ul><li>WiFi (802.11) </li></ul></ul><ul><ul><li>Frame relay </li></ul></ul><ul><ul><li>Special link layers covered later (PPP, ATM) </li></ul></ul>
    75. 75. Ethernet's implementation of data-link layer <ul><li>Framing (special pre-amble within frame) </li></ul><ul><li>Physical addressing (6 byte hardware addresses) </li></ul><ul><li>Demux to upper protocol (type field in header) </li></ul><ul><li>Flow control (none) </li></ul><ul><li>Error detection and correction (CRC-32) </li></ul><ul><li>Reliable delivery (none) </li></ul><ul><li>Security (none) </li></ul><ul><li>Media access and quality of service (CSMA/CD with adaptive, randomized wait) </li></ul><ul><li>Digital to analog conversion (Manchester encoding) </li></ul>
    76. 76. Ethernet <ul><li>“ dominant” wired LAN technology: </li></ul><ul><ul><li>First practical local area network, built at Xerox PARC in 70’s </li></ul></ul><ul><ul><ul><li>first widely used LAN technology </li></ul></ul></ul><ul><ul><li>Simpler, cheaper than token LANs and ATM </li></ul></ul><ul><ul><ul><li>cheap: $3 for 100Mbs NIC </li></ul></ul></ul>Metcalfe’s Ethernet sketch
    77. 77. Ethernet topologies <ul><li>Flexible topologies </li></ul><ul><ul><li>Bus topology popular through mid 90s </li></ul></ul><ul><ul><ul><li>all nodes in same collision domain </li></ul></ul></ul><ul><ul><ul><li>requires the use of CSMA/CD </li></ul></ul></ul><ul><ul><li>Star topology today </li></ul></ul><ul><ul><ul><li>active switch in center </li></ul></ul></ul><ul><ul><ul><li>each “spoke” runs a (separate) Ethernet protocol (nodes do not collide with each other) </li></ul></ul></ul>switch bus: coaxial cable star
    78. 78. 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><ul><li>used to synchronize receiver, sender clock rates </li></ul></ul>
    79. 79. Ethernet Frame Structure (more) <ul><li>Addresses: 6 bytes </li></ul><ul><ul><li>Globally unique, allocated to manufacturers </li></ul></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 </li></ul><ul><ul><li>mostly IP but others include Novell IPX and AppleTalk </li></ul></ul><ul><li>Data – 46 to 1500 bytes </li></ul><ul><li>CRC: 4 bytes </li></ul><ul><ul><li>checked at receiver, if error is detected, frame is dropped </li></ul></ul><ul><ul><li>CRC-32 </li></ul></ul><ul><ul><ul><li>(x 32 +x 26 +x 23 +x 22 +x 16 +x 12 +x 11 +x 10 +x 8 +x 7 +x 5 +x 4 +x 2 +x+1) </li></ul></ul></ul>
    80. 80. 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>
    81. 81. Ethernet CSMA/CD algorithm <ul><li>1. Adaptor receives datagram from net layer & creates frame </li></ul><ul><li>2. Carrier sensing: 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. Collision detection: If adapter detects another transmission while transmitting, aborts and sends jam signal (make sure all adapters see collision: 48 bits) </li></ul><ul><li>5. Random access: After aborting, adapter enters exponential backoff before returning to Step 2 </li></ul><ul><ul><li>after m th collision, choose K randomly out of {0,1,2,…2 m -1}. Wait K *512 bit times </li></ul></ul><ul><ul><li>first collision: choose K from {0,1}; delay is K· 512 bit transmission times </li></ul></ul><ul><ul><li>after second collision: choose K from {0,1,2,3}… </li></ul></ul><ul><ul><li>after ten collisions, choose K from {0,1,2,3,4,…,1023} </li></ul></ul>
    82. 82. Exponential backoff calculation <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><ul><li>Deterministic delay after collision </li></ul></ul><ul><ul><ul><li>Collision will occur again in lockstep </li></ul></ul></ul><ul><ul><li>Random delay with fixed mean </li></ul></ul><ul><ul><ul><li>Few senders  needless waiting </li></ul></ul></ul><ul><ul><ul><li>Too many senders  too many collisions </li></ul></ul></ul><ul><ul><li>Exponentially increasing random delay </li></ul></ul><ul><ul><ul><li>Infer senders from # of collisions </li></ul></ul></ul><ul><ul><ul><li>More senders  increase wait time </li></ul></ul></ul>See/interact with Java applet on AWL Web site: highly recommended !
    83. 83. General Ethernet CSMA/CD Packet? Sense Carrier Discard Packet Send Detect Collision b=CalcBackoff(); wait(b); attempts++; No Yes attempts < 16 attempts == 16
    84. 84. Ethernet CSMA/CD and Packet Size <ul><li>What if two people sent really small packets </li></ul><ul><ul><li>How do you find collision? </li></ul></ul><ul><ul><li>Must have a minimum packet size </li></ul></ul><ul><li>Min packet length > 2x max prop delay </li></ul><ul><ul><li>If A, B are at opposite sides of link, and B starts one link prop delay after A </li></ul></ul>
    85. 85. Propagation delay & packet size <ul><li>Propagation delay determines min. packet size to prevent undetected collisions </li></ul><ul><li>Modern 10Mb Ethernet </li></ul><ul><ul><li>Segment length to support? </li></ul></ul><ul><ul><ul><li>500m maximum segment length </li></ul></ul></ul><ul><ul><ul><li>Can add repeaters up to a maximum 5 segments (2500m) </li></ul></ul></ul><ul><ul><li>Propagation delay for maximum segment </li></ul></ul><ul><ul><ul><li>c in cable = 60% * c in vacuum = 1.8 x 10^8 m/s </li></ul></ul></ul><ul><ul><ul><li>~ 12.5us one-way delay </li></ul></ul></ul><ul><ul><li>Add repeater and tranceiver delay </li></ul></ul><ul><ul><ul><li>To be safe IEEE specifies a 512 “bit-time” slot for Ethernet = 51.2us </li></ul></ul></ul><ul><ul><ul><li>512 bits = 64 bytes (minimum data payload = 46 bytes) </li></ul></ul></ul>
    86. 86. Minimum packet size <ul><li>What about scaling? 100Mbit, 1Gbit... </li></ul><ul><li>Make network smaller? </li></ul><ul><ul><li>Solution for 100BaseT </li></ul></ul><ul><li>Make min pkt size larger? </li></ul><ul><ul><li>512bits @ 1Gbps = 512ns </li></ul></ul><ul><ul><li>512ns * 1.8 * 10^8 = 92meters </li></ul></ul><ul><ul><li>Gigabit ethernet uses collision extension for small pkts </li></ul></ul>
    87. 87. Ethernet Problems <ul><li>Ethernet unstable at high loads </li></ul><ul><li>Peak throughput worse with </li></ul><ul><ul><li>More hosts – more collisions needed to identify single sender </li></ul></ul><ul><ul><li>Smaller packet sizes – more frequent arbitration </li></ul></ul><ul><ul><li>Longer links – collisions take longer to observe, more wasted bandwidth </li></ul></ul>
    88. 88. Token Rings <ul><li>Packets broadcast around ring </li></ul><ul><li>Token “right to send” rotates around ring </li></ul><ul><ul><li>Fair, real-time bandwidth allocation </li></ul></ul><ul><ul><ul><li>Every host holds token for limited time </li></ul></ul></ul><ul><ul><ul><li>Higher latency when only one sender </li></ul></ul></ul>
    89. 89. Token Passing: IEEE802.5 standard <ul><li>4 Mbps </li></ul><ul><li>max token holding time: 10 ms (limits frame length) </li></ul><ul><li>SD, ED mark start, end of packet </li></ul><ul><li>AC: access control byte: </li></ul><ul><ul><li>token bit: value 0 means token can be seized, value 1 means data follows FC </li></ul></ul><ul><ul><li>priority bits: priority of packet </li></ul></ul><ul><ul><li>reservation bits: station can write these bits to prevent stations with lower priority packet from seizing token after token becomes free </li></ul></ul>
    90. 90. Why Did Ethernet Win? <ul><li>Better failure modes </li></ul><ul><ul><li>Token rings – network unusable </li></ul></ul><ul><ul><li>Ethernet – node detached </li></ul></ul><ul><li>Good performance in common case </li></ul><ul><li>Volume  lower cost  higher volume …. </li></ul><ul><li>Adaptable </li></ul><ul><ul><li>To higher bandwidths (vs. FDDI) </li></ul></ul><ul><ul><li>To switching (vs. ATM) </li></ul></ul><ul><li>Completely distributed, easy to maintain/administer </li></ul><ul><li>Easy incremental deployment </li></ul><ul><li>Cheap cabling, etc </li></ul>
    91. 91. IEEE 802.11 Wireless LAN <ul><li>Untethered (often mobile) networking </li></ul><ul><li>IEEE 802.11 standard: </li></ul><ul><ul><li>Defines specific implementations of data-link functions </li></ul></ul><ul><ul><li>Framing, error detection, MAC, etc. </li></ul></ul><ul><ul><li>Unlicensed frequency spectrum: 900Mhz, 2.4Ghz </li></ul></ul>
    92. 92. IEEE 802.11 Ad-hoc mode <ul><li>Ad hoc network: stations can dynamically form network without AP </li></ul><ul><li>Applications: </li></ul><ul><ul><li>“ laptop” meeting in conference room, car </li></ul></ul><ul><ul><li>interconnection of “personal” devices </li></ul></ul><ul><ul><li>battlefield </li></ul></ul><ul><li>IETF MANET (Mobile Ad hoc Networks) working group </li></ul>
    93. 93. IEEE 802.11 Infrastructure mode <ul><li>Typically used with access point (base station) </li></ul><ul><li>Several communication methods supported </li></ul><ul><ul><li>CSMA (with explicit ACK to indicate collision) </li></ul></ul><ul><ul><li>CSMA/CA: reservations </li></ul></ul><ul><ul><li>Polling from AP </li></ul></ul>
    94. 94. IEEE 802.11 MAC Protocol: CSMA <ul><li>802.11 CSMA sender </li></ul><ul><li>- if sense channel idle for DIFS sec. </li></ul><ul><li>then transmit entire frame (no collision detection) </li></ul><ul><li>-if sense channel busy then backoff (random, exponential) </li></ul><ul><li>802.11 CSMA receiver </li></ul><ul><li>-if received OK </li></ul><ul><li>return ACK after SIFS </li></ul><ul><li>SIFS < DIFS allows acks to grab channel with higher priority </li></ul><ul><li>802.11 CSMA others </li></ul><ul><li>NAV : Network Allocation Vector </li></ul><ul><li>802.11 frame has transmission time field </li></ul><ul><li>others (hearing data) defer access for NAV time units </li></ul>
    95. 95. IEEE 802.11 MAC Protocol CSMA/CA <ul><li>Same as previous mode but with explicit channel reservation </li></ul><ul><ul><li>Send short reservation messages via CSMA to reserve channel </li></ul></ul><ul><ul><ul><li>Sender RTS (request to send), Receiver CTS (clear to send) </li></ul></ul></ul><ul><ul><ul><li>CTS notifies all hidden stations of sender's reservation </li></ul></ul></ul><ul><ul><ul><li>Short messages so that collision less likely and of short duration </li></ul></ul></ul><ul><ul><li>Send data unobstructed on reserved channel </li></ul></ul><ul><ul><ul><li>End result similar to CSMA/CD </li></ul></ul></ul>
    96. 96. 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 and other data link layers </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>
    97. 97. Link-layer devices <ul><li>Q: Why not just one big LAN? </li></ul><ul><li>limited aggregate bandwidth </li></ul><ul><li>limited length: electrical limitations </li></ul><ul><li>large “collision domain” (can collide with many stations) </li></ul><ul><li>access delay (eg 802.5 token passing delay) </li></ul>
    98. 98. Hubs <ul><li>Hubs are essentially physical-layer, multi-port repeaters: </li></ul><ul><ul><li>bits coming from one link go out all other links at the same rate </li></ul></ul><ul><ul><li>addresses electrical limitations </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><ul><li>all nodes connected to hub can collide with one another </li></ul></ul></ul>twisted pair hub
    99. 99. Hubs (more) <ul><li>Hubs do not isolate collision domains: node may collide with any node residing at any segment in LAN </li></ul><ul><li>Hub Advantages: </li></ul><ul><ul><li>simple, inexpensive device </li></ul></ul><ul><ul><li>extends maximum distance between node pairs </li></ul></ul>
    100. 100. Interconnecting with hubs <ul><li>Backbone hub interconnects LAN segments </li></ul><ul><li>But individual segment collision domains become one large collision domain </li></ul><ul><ul><li>Single collision domain results in no increase in max throughput </li></ul></ul><ul><ul><li>Simultaneous transfers between A to A’ and B to B’ collide </li></ul></ul><ul><ul><li>Multi-tier throughput same as single segment throughput </li></ul></ul><ul><li>Can’t interconnect 10BaseT & 100BaseT </li></ul>hub hub hub hub A A’ B B’
    101. 101. Switches <ul><li>Link Layer device </li></ul><ul><ul><li>Smarter than hubs </li></ul></ul><ul><ul><li>Actively stores and forwards Ethernet frames </li></ul></ul><ul><ul><li>Examines frame header and selectively forwards frame based on destination MAC address </li></ul></ul><ul><ul><li>Two-port switch known as a “bridge” </li></ul></ul><ul><ul><li>Switches known as “multi-port” bridges </li></ul></ul><ul><li>A switch isolates collision domains since it buffers frames </li></ul><ul><li>Uses CSMA/CD to access individual network segments to transmit frames </li></ul><ul><ul><li>Transparent to hosts </li></ul></ul><ul><ul><li>Plug-and-play, self-learning (do not need to be configured) </li></ul></ul>
    102. 102. Switches: multiple simultaneous transmissions <ul><li>Hosts have dedicated direct connection to switch </li></ul><ul><li>Ethernet protocol and frame used, but… </li></ul><ul><ul><li>No collisions </li></ul></ul><ul><ul><ul><li>Each link is its own collision domain </li></ul></ul></ul><ul><ul><li>Full duplex operation </li></ul></ul><ul><li>Switch buffers frames </li></ul><ul><li>Much greater aggregate bandwidth </li></ul><ul><ul><li>Data backplane of switches typically large to support simultaneous transfers amongst ports </li></ul></ul><ul><li>Switching: A-to-A’ and B-to-B’ simultaneously, no collisions </li></ul>switch A A’ B B’ C C’
    103. 103. Switches (more) <ul><li>Switch advantages: </li></ul><ul><ul><li>Isolates collision domains resulting in higher total max throughput </li></ul></ul><ul><ul><li>Can connect different type Ethernet since it is a store and forward device </li></ul></ul><ul><ul><li>Transparent: no need for any change to hosts LAN adapters </li></ul></ul>
    104. 104. Switch operation <ul><li>How do determine onto which LAN segment to forward frame? </li></ul><ul><ul><li>Looks like a routing problem... </li></ul></ul>1 2 3 hub hub hub switch
    105. 105. Self learning <ul><li>Approach </li></ul><ul><ul><li>Monitor traffic to build a cache ( switch table ) of which nodes are downstream of which ports </li></ul></ul><ul><ul><ul><li>(MAC Address, Interface, Time Stamp) </li></ul></ul></ul><ul><ul><ul><li>learns which hosts can be reached through which interfaces </li></ul></ul></ul><ul><ul><li>Selectively forward frames based on cache entries </li></ul></ul><ul><ul><li>Flood network for frames with unknown (MAC) destinations </li></ul></ul>
    106. 106. Switch algorithm <ul><li>When frame received: </li></ul><ul><li>1. record link associated with sending host </li></ul><ul><li>2. index switch table using MAC dest address </li></ul><ul><li>3. 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
    107. 107. 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 C 1
    108. 108. 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 A B C D E F G H I address interface A B E G C 1 1 2 3 1 1 2 3 switch D 2
    109. 109. 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
    110. 110. Switches and Spanning Trees <ul><li>for increased reliability, desirable to have redundant, alternate paths from source to destination </li></ul><ul><li>with multiple simultaneous paths, cycles result - bridges may multiply and forward frame forever </li></ul><ul><li>solution: organize switches in a spanning tree by disabling subset of interfaces </li></ul>switch switch Disabled
    111. 111. 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/bridges are link Layer devices </li></ul></ul><ul><li>routers maintain routing tables, implement routing algorithms </li></ul><ul><li>swtiches maintain filtering tables, implement filtering, learning and spanning tree algorithms </li></ul>
    112. 112. Routers vs. Switches <ul><li>Switches + and - </li></ul><ul><li>+ Switch operation is simpler requiring less processing bandwidth </li></ul><ul><li>- Topologies are restricted with switches: avoid cycles with spanning trees </li></ul><ul><li>- Switches do not offer protection from broadcast storms (endless broadcasting by a host will be forwarded by a switch) </li></ul>
    113. 113. Routers vs. Switches <ul><li>Routers + and - </li></ul><ul><li>+ arbitrary topologies can be supported, cycling is limited by TTL counters (and good routing protocols) </li></ul><ul><li>- require IP address configuration (not plug and play) </li></ul><ul><li>- require higher processing bandwidth </li></ul><ul><li>switches do well in small (few hundred hosts) while routers used in large networks (thousands of hosts) </li></ul>
    114. 114. Summary comparison
    115. 115. 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 and other data link layers </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>
    116. 116. Point to Point Data Link Control <ul><li>Point-to-point links </li></ul><ul><ul><li>One sender, one receiver, one link </li></ul></ul><ul><ul><li>Easier than shared broadcast links </li></ul></ul><ul><ul><ul><li>No media access control </li></ul></ul></ul><ul><ul><ul><li>No need for explicit MAC addressing (ie ARP) </li></ul></ul></ul><ul><li>Goal of Point-to-Point protocols </li></ul><ul><ul><li>Layer generic “higher-level” data-link layer functions on top of a variety of point-to-point links </li></ul></ul><ul><ul><ul><li>Dial-up phone line, DSL, ISDN etc. </li></ul></ul></ul><ul><ul><ul><li>Each different link does its own digital-analog conversion (ie provides bits) </li></ul></ul></ul><ul><ul><ul><li>Implement pseudo-link layer on top that implements common functions </li></ul></ul></ul><ul><ul><ul><ul><li>Framing, Demux to upper layer, etc. </li></ul></ul></ul></ul><ul><li>Examples </li></ul><ul><ul><li>PPP (point-to-point protocol) </li></ul></ul><ul><ul><li>HDLC: High level data link control (Data link used to be considered “high layer” in protocol stack!) </li></ul></ul>
    117. 117. PPP Design Requirements [RFC 1557] <ul><li>packet framing: encapsulation of network-layer datagram in data link frame </li></ul><ul><ul><li>carry network layer data of any network layer protocol (not just IP) at same time </li></ul></ul><ul><li>demultiplex upwards </li></ul><ul><li>bit transparency: must carry any bit pattern in the data field </li></ul><ul><li>error detection (no correction) </li></ul><ul><li>connection liveness: detect, signal link failure to network layer </li></ul><ul><li>network layer address negotiation: endpoint can learn/configure each other’s network address </li></ul>
    118. 118. PPP non-requirements <ul><li>no error correction/recovery </li></ul><ul><li>no flow control </li></ul><ul><li>out of order delivery OK </li></ul><ul><li>no need to support multipoint links (e.g., polling) </li></ul>Error recovery, flow control, data re-ordering all relegated to higher layers!
    119. 119. PPP Data Frame <ul><li>Flag: delimiter (framing) </li></ul><ul><li>Address: does nothing (only one option) </li></ul><ul><li>Control: does nothing; in the future possible multiple control fields </li></ul><ul><li>Protocol: upper layer protocol to which frame delivered (eg, PPP-LCP, IP, IPCP, etc) </li></ul>
    120. 120. PPP Data Frame <ul><li>info: upper layer data being carried </li></ul><ul><li>check: cyclic redundancy check for error detection </li></ul>
    121. 121. Byte Stuffing <ul><li>“ data transparency” requirement: data field must be allowed to include flag pattern <01111110> </li></ul><ul><ul><li>Q: is received <01111110> data or flag? </li></ul></ul><ul><li>Sender: </li></ul><ul><ul><li>adds (“stuffs”) extra < 01111101> byte before each <01111110> data byte </li></ul></ul><ul><ul><li>adds (“stuffs”) extra < 01111101> byte before each <01111101> data byte </li></ul></ul><ul><li>Receiver: </li></ul><ul><ul><li>01111101 byte followed by 01111110 byte: discard first byte, continue data reception </li></ul></ul><ul><ul><li>single 01111110: flag byte </li></ul></ul>
    122. 122. Byte Stuffing flag byte pattern in data to send flag byte pattern plus stuffed byte in transmitted data
    123. 123. PPP Data Control Protocol <ul><li>Before exchanging network-layer data, data link peers must </li></ul><ul><li>configure PPP link (max. frame length, authentication) </li></ul><ul><li>learn/configure network </li></ul><ul><li>layer information </li></ul><ul><ul><li>for IP: carry IP Control Protocol (IPCP) msgs (protocol field: 8021) to configure/learn IP address </li></ul></ul>
    124. 124. 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 and other data link layers </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 and MPLS </li></ul>
    125. 125. Virtualization of networks <ul><li>Virtualization of resources: a powerful abstraction in systems engineering: </li></ul><ul><li>computing examples: virtual memory, virtual devices </li></ul><ul><ul><li>Virtual machines: e.g., java </li></ul></ul><ul><ul><li>IBM VM os from 1960’s/70’s </li></ul></ul><ul><li>layering of abstractions: don’t sweat the details of the lower layer, only deal with lower layers abstractly </li></ul>
    126. 126. The Internet: virtualizing networks <ul><li>1974: multiple unconnected nets </li></ul><ul><ul><li>ARPAnet </li></ul></ul><ul><ul><li>data-over-cable networks </li></ul></ul><ul><ul><li>packet satellite network (Aloha) </li></ul></ul><ul><ul><li>packet radio network </li></ul></ul><ul><li>… differing in: </li></ul><ul><ul><li>addressing conventions </li></ul></ul><ul><ul><li>packet formats </li></ul></ul><ul><ul><li>error recovery </li></ul></ul><ul><ul><li>routing </li></ul></ul>ARPAnet satellite net &quot;A Protocol for Packet Network Intercommunication&quot;, V. Cerf, R. Kahn, IEEE Transactions on Communications, May, 1974, pp. 637-648.
    127. 127. The Internet: virtualizing networks <ul><li>Gateway: </li></ul><ul><li>“ embed internetwork packets in local packet format or extract them” </li></ul><ul><li>route (at internetwork level) to next gateway </li></ul>ARPAnet satellite net gateway <ul><li>Internetwork layer (IP): </li></ul><ul><li>addressing: internetwork appears as a single, uniform entity, despite underlying local network heterogeneity </li></ul><ul><li>network of networks </li></ul>
    128. 128. Cerf & Kahn’s Internetwork Architecture <ul><li>What is virtualized? </li></ul><ul><li>two layers of addressing: internetwork and local network </li></ul><ul><li>new layer (IP) makes everything homogeneous at internetwork layer </li></ul><ul><li>underlying local network technology </li></ul><ul><ul><li>cable </li></ul></ul><ul><ul><li>satellite </li></ul></ul><ul><ul><li>56K telephone modem </li></ul></ul><ul><ul><li>today: ATM, MPLS </li></ul></ul><ul><li>… “ invisible” at internetwork layer. Looks like a link layer technology to IP! </li></ul>
    129. 129. Virtual links and tunneling <ul><li>Many options of encapsulating or tunneling packets through a “virtual link” (VPN) </li></ul><ul><ul><li>Generic Routing Encapsulation (GRE) </li></ul></ul><ul><ul><ul><li>PPTP (Point-to-point Tunneling Protocol) </li></ul></ul></ul><ul><ul><ul><li>L2F (Layer 2 Forwarding) </li></ul></ul></ul><ul><ul><ul><li>L2TP (Layer 2 Tunneling Protocol) </li></ul></ul></ul><ul><li>Can also be done at network layer via IPsec </li></ul><ul><ul><li>Encrypt data at a layer below network layer </li></ul></ul><ul><ul><li>Works for IP packets </li></ul></ul>
    130. 130. Virtual links example <ul><li>Treat IP-to-IP session as a virtual LAN link </li></ul><ul><ul><li>IP_local = IP addr. of client at home assigned by ISP </li></ul></ul><ul><ul><li>IP_work = IP addr. of client for use in accessing work LAN </li></ul></ul><ul><ul><li>IP_file_serv = IP addr. of protected file server at work </li></ul></ul><ul><ul><ul><li>ACL to only allow access from work LAN </li></ul></ul></ul><ul><ul><li>IP_VPN_serv = IP addr. of VPN server at work </li></ul></ul><ul><ul><ul><li>Authenticates remote client via username/password </li></ul></ul></ul><ul><ul><ul><li>Assigns remote client an IP address on LAN (IP_work) </li></ul></ul></ul><ul><ul><ul><li>Responds to ARPs for IP_remote on behalf of client </li></ul></ul></ul><ul><ul><ul><li>Decapsulates and encapsulates packets to/from client </li></ul></ul></ul>IP Dst = IP_VPN_serv IP Src = IP_local IP Src = IP_work IP Src = IP_file_serv IP Src = IP_work IP Src = IP_file_serv VPN server terminates tunnel
    131. 131. ATM and MPLS <ul><li>ATM, MPLS separate networks in their own right </li></ul><ul><ul><li>different service models, addressing, routing from Internet </li></ul></ul><ul><li>viewed by Internet as logical link connecting IP routers </li></ul><ul><ul><li>just like dialup link is really part of separate network (telephone network) </li></ul></ul>
    132. 132. Multiprotocol label switching (MPLS) <ul><li>initial goal: speed up IP forwarding by using fixed length label (instead of IP address) to do forwarding </li></ul><ul><ul><li>borrowing ideas from Virtual Circuit (VC) approach </li></ul></ul><ul><ul><li>but IP datagram still keeps IP address! </li></ul></ul>Data-link header IP header remainder of payload MPLS header label Exp S TTL 20 3 1 5
    133. 133. MPLS capable routers <ul><li>a.k.a. label-switched router </li></ul><ul><li>forwards packets to outgoing interface based only on label value (don’t inspect IP address) </li></ul><ul><ul><li>MPLS forwarding table distinct from IP forwarding tables </li></ul></ul><ul><li>signaling protocol needed to set up forwarding </li></ul><ul><ul><li>RSVP-TE </li></ul></ul><ul><ul><li>forwarding possible along paths that IP alone would not allow (e.g., source-specific routing) !! </li></ul></ul><ul><ul><li>use MPLS for traffic engineering </li></ul></ul><ul><li>must co-exist with IP-only routers </li></ul>
    134. 134. MPLS forwarding tables R1 R2 D R3 R4 R5 0 1 0 0 A R6 in out out label label dest interface 10 A 0 12 D 0 1 0 8 A 1 in out out label label dest interface 6 - A 0 in out out label label dest interface 10 6 A 1 12 9 D 0 in out out label label dest interface 8 6 A 0
    135. 135. Chapter 5: Summary <ul><li>principles behind data link layer services: </li></ul><ul><ul><li>error detection, correction </li></ul></ul><ul><ul><li>sharing a broadcast channel: multiple access </li></ul></ul><ul><ul><li>link layer addressing </li></ul></ul><ul><li>instantiation and implementation of various link layer technologies </li></ul><ul><ul><li>Ethernet </li></ul></ul><ul><ul><li>switched LANS </li></ul></ul><ul><ul><li>PPP </li></ul></ul><ul><ul><li>virtualized networks as a link layer: ATM, MPLS </li></ul></ul>
    136. 136. Physical Layer <ul><li>Functions </li></ul><ul><ul><li>Digital to Analog conversion </li></ul></ul><ul><ul><li>Physical media characteristics </li></ul></ul>
    137. 137. Digital to analog conversion <ul><li>Bits sent as analog signals </li></ul><ul><ul><li>Photonic pulses of a given wavelength over optical fiber </li></ul></ul><ul><ul><li>Electronic signals of a given voltage </li></ul></ul>
    138. 138. Digital to analog conversion <ul><li>Will cover electronic transmission (optical transmission left for you to research) </li></ul><ul><li>Biggest issue </li></ul><ul><ul><li>When to sample voltage? </li></ul></ul><ul><ul><li>Detecting sequences involves clocking with the same clock </li></ul></ul><ul><ul><ul><li>How to synchronize sender and receiver clocks? </li></ul></ul></ul><ul><ul><li>Need easily detectible event at both ends </li></ul></ul><ul><ul><ul><li>Signal transitions help resync sender and receiver </li></ul></ul></ul><ul><ul><ul><li>Need frequent transitions to prevent clock skew </li></ul></ul></ul><ul><ul><li>http://www.mouse.demon.nl/ckp/telco/encode.htm </li></ul></ul>
    139. 139. NRZ-L <ul><li>Non-Return to Zero Level (NRZ-L) </li></ul><ul><ul><li>1=high signal, 0=lower signal </li></ul></ul><ul><ul><li>Long sequence of same bit causes difficulty </li></ul></ul><ul><ul><ul><li>DC bias hard to detect – low and high detected by difference from average voltage </li></ul></ul></ul><ul><ul><ul><li>Clock recovery difficult </li></ul></ul></ul><ul><ul><li>Used by Synchronous Optical Network (SONET) </li></ul></ul><ul><ul><ul><li>SONET XOR’s bit sequence to ensure frequent transitions </li></ul></ul></ul><ul><ul><li>Used in early magnetic tape storage </li></ul></ul>
    140. 140. NRZ-L
    141. 141. NRZ-M <ul><li>Non-Return to Zero Mark </li></ul><ul><ul><li>Less power to transmit versus NRZ </li></ul></ul><ul><ul><li>1=signal transition at start of bit, 0=no change </li></ul></ul><ul><ul><li>No problem with string of 1’s </li></ul></ul><ul><ul><li>NRZ-like problem with string of 0’s </li></ul></ul><ul><ul><li>Used in SDLC (Synchronous Data Link Control) </li></ul></ul><ul><ul><li>Used in modern magnetic tape storage </li></ul></ul>
    142. 142. Manchester (Bi-Phase-Level) coding <ul><li>Manchester </li></ul><ul><ul><li>0=low to high transition, 1=high to low transition </li></ul></ul><ul><ul><li>Transition for every bit simplifies clock recovery </li></ul></ul><ul><ul><li>Not very efficient </li></ul></ul><ul><ul><ul><li>Doubles the number of transitions </li></ul></ul></ul><ul><ul><ul><li>Circuitry must run twice as fast </li></ul></ul></ul><ul><ul><li>Used by Ethernet </li></ul></ul>
    143. 143. Manchester coding <ul><li>Encoding for 110100 </li></ul>Bit stream 1 1 0 1 0 0 Manchester encoding
    144. 144. Physical Layer <ul><li>Plethora of physical media </li></ul><ul><ul><li>Fiber, copper, air </li></ul></ul><ul><ul><li>Specifies the characteristics of transmission media </li></ul></ul><ul><ul><li>Too many to cover in detail, not the focus of the course </li></ul></ul><ul><ul><li>Many data-link layer protocols (i.e. Ethernet, Token-Ring, FDDI. ATM run across multiple physical layers) </li></ul></ul><ul><ul><li>Physical characteristics dictate suitability of data-link layer protocol and bandwidth limits </li></ul></ul>
    145. 145. Common Cabling <ul><li>Copper </li></ul><ul><ul><li>Twisted Pair </li></ul></ul><ul><ul><ul><li>Unshielded (UTP) </li></ul></ul></ul><ul><ul><ul><ul><li>CAT-1, CAT-2, CAT-3, CAT-4, CAT-5, CAT-5e </li></ul></ul></ul></ul><ul><ul><ul><li>Shielded (STP) </li></ul></ul></ul><ul><ul><li>Coaxial Cable </li></ul></ul><ul><li>Fiber </li></ul><ul><ul><li>Single-mode </li></ul></ul><ul><ul><li>Multi-mode </li></ul></ul>
    146. 146. Twisted Pair <ul><li>Most common LAN interconnection </li></ul><ul><li>Multiple pairs of twisted wires </li></ul><ul><li>Twisting to eliminate interference </li></ul><ul><ul><li>More twisting = Higher data rates, higher cost </li></ul></ul>
    147. 147. Twisted pair <ul><li>Standards specify twisting, resistance, and maximum cable length for use with particular data-link layer </li></ul><ul><li>5 categories </li></ul><ul><ul><li>Category 1 </li></ul></ul><ul><ul><ul><li>Voice only (telephone wire) </li></ul></ul></ul><ul><ul><li>Category 2 </li></ul></ul><ul><ul><ul><li>Data to 4Mbs (LocalTalk) </li></ul></ul></ul><ul><ul><li>Category 3 </li></ul></ul><ul><ul><ul><li>Data to 10Mbs (Ethernet) </li></ul></ul></ul><ul><ul><li>Category 4 </li></ul></ul><ul><ul><ul><li>Data to 20Mbs (16Mbs Token Ring) </li></ul></ul></ul><ul><ul><li>Category 5 (100 MHz) </li></ul></ul><ul><ul><ul><li>Data to 100Mbs (Fast Ethernet) </li></ul></ul></ul><ul><ul><li>Category 5e (350 MHz) </li></ul></ul><ul><ul><ul><li>Data to 1000Mbs (Gigabit Ethernet) </li></ul></ul></ul>
    148. 148. Twisted Pair <ul><li>Common connectors for Twisted Pair </li></ul><ul><ul><li>RJ11 (3 pairs) </li></ul></ul><ul><ul><ul><li>Phone connections </li></ul></ul></ul><ul><ul><li>RJ45 (4 pairs) </li></ul></ul><ul><ul><ul><li>Allows both data and phone connections </li></ul></ul></ul><ul><ul><ul><ul><li>(1,2) and (3,6) for data </li></ul></ul></ul></ul><ul><ul><ul><ul><li>(4,5) for voice </li></ul></ul></ul></ul><ul><ul><ul><ul><li>(7,8) unused </li></ul></ul></ul></ul><ul><ul><ul><li>Crossover cables for NIC-NIC, Hub-Hub connection (Data pairs swapped) </li></ul></ul></ul>
    149. 149. UTP <ul><li>Unshielded Twisted Pair </li></ul><ul><ul><li>Limited amount of protection from interference </li></ul></ul><ul><ul><li>Commonly used for voice and ethernet </li></ul></ul><ul><ul><ul><li>Voice: multipair 100-ohm UTP </li></ul></ul></ul>
    150. 150. STP <ul><li>Shielded Twisted Pair </li></ul><ul><ul><li>Not as common at UTP </li></ul></ul><ul><ul><li>UTP susceptible to radio and electrical interference </li></ul></ul><ul><ul><li>Extra shielding material added </li></ul></ul><ul><ul><li>Cables heavier, bulkier, and more costly </li></ul></ul><ul><ul><li>Often used in token ring topologies </li></ul></ul><ul><ul><ul><li>150 ohm STP two pair (IEEE 802.5 Token Ring) </li></ul></ul></ul>
    151. 151. Coaxial cable <ul><li>Two concentric copper conductors </li></ul><ul><ul><li>Bidirectional </li></ul></ul><ul><li>Separated by plastic insulation layer </li></ul><ul><ul><li>Support longer connectivity distances over UTP </li></ul></ul><ul><li>Used in CATV networks </li></ul><ul><ul><li>HFC networks (Hybrid Fiber/Coax) </li></ul></ul><ul><ul><ul><li>Fiber from cable headend to location near home </li></ul></ul></ul><ul><ul><ul><li>Coax to home </li></ul></ul></ul><ul><ul><li>FDM to support multiple data channels </li></ul></ul>
    152. 152. Fiber <ul><li>Transmit light pulses vs. electronic signals </li></ul><ul><ul><li>Immune to electromagnetic noise/interference </li></ul></ul><ul><ul><li>high-speed point-to-point transmission (e.g., 10’s-100’s Gps) </li></ul></ul><ul><ul><li>Low error rate </li></ul></ul><ul><li>Cabling </li></ul><ul><ul><li>Center core made of glass or plastic fiber </li></ul></ul><ul><ul><li>Plastic coating to cushion core </li></ul></ul><ul><ul><li>Kevlar fiber for strength </li></ul></ul><ul><ul><li>Teflon or PVC outer insulating jacket </li></ul></ul>
    153. 153. Fiber <ul><li>Single-mode fiber </li></ul><ul><ul><li>Smaller diameter (12.5 microns) </li></ul></ul><ul><ul><li>One mode only </li></ul></ul><ul><ul><li>Preserves signal better over longer distances </li></ul></ul><ul><ul><li>Typically used for SONET or SDH </li></ul></ul><ul><ul><li>Lasers used to signal </li></ul></ul><ul><li>Multi-mode fiber </li></ul><ul><ul><li>Larger diameter (62.5 microns) </li></ul></ul><ul><ul><li>Multiple modes </li></ul></ul><ul><ul><li>WDM and DWDM = (dense) wavelength division multiplexing </li></ul></ul><ul><li>Photodiodes at receivers </li></ul>
    154. 154. Physical-link lingo <ul><li>Specifies capacities over physical media </li></ul><ul><li>Electronic </li></ul><ul><ul><li>T1/DS1=1.54 Mbps </li></ul></ul><ul><ul><li>T3/DS3=45Mbps </li></ul></ul><ul><li>Optical (OC=optical carrier) </li></ul><ul><ul><li>OC1=52 Mbps </li></ul></ul><ul><ul><li>OC3/STM1=156 Mbps </li></ul></ul><ul><ul><li>OC12=622 Mbps </li></ul></ul><ul><ul><li>OC48=2488 Mbps </li></ul></ul><ul><ul><li>OC192=10 Gbps </li></ul></ul><ul><ul><li>OC768=40 Gbps </li></ul></ul>
    155. 155. Wireless <ul><li>Entire spectrum of transmission frequency ranges </li></ul><ul><ul><li>Radio </li></ul></ul><ul><ul><li>Infrared </li></ul></ul><ul><ul><li>Lasers </li></ul></ul><ul><ul><li>Cellular telephone </li></ul></ul><ul><ul><li>Microwave </li></ul></ul><ul><ul><li>Satellite </li></ul></ul><ul><ul><li>Acoustic (see ESE sensors) </li></ul></ul><ul><ul><li>Ultra-wide band </li></ul></ul><ul><li>propagation environment effects: </li></ul><ul><ul><li>reflection </li></ul></ul><ul><ul><li>obstruction by objects </li></ul></ul><ul><ul><li>interference </li></ul></ul><ul><li>http://www.ntia.doc.gov/osmhome/allochrt.html </li></ul>
    156. 157. What runs on them? Protocol Summary Protocol Cable Speed Topology Ethernet Twisted Pair, Coaxial, Fiber 10 Mbps Linear Bus, Star, Tree Fast Ethernet Twisted Pair, Fiber 100 Mbps Star LocalTalk Twisted Pair .23 Mbps Linear Bus or Star Token Ring Twisted Pair 4 Mbps - 16 Mbps Star-Wired Ring FDDI Fiber 100 Mbps Dual ring ATM Twisted Pair, Fiber 155-2488 Mbps Linear Bus, Star, Tree
    157. 158. Extra slides
    158. 159. ARQ <ul><li>Automatic Repeat Request (ARQ) </li></ul><ul><ul><li>Receiver sends acknowledgement (ACK) when it receives packet </li></ul></ul><ul><ul><li>Sender waits for ACK and timeouts if it does not arrive within some time period </li></ul></ul>
    159. 160. Stop and Wait Time Timeout Sender Receiver Packet ACK <ul><li>Simplest ARQ protocol </li></ul><ul><li>Send a packet, stop and wait until acknowledgement arrives </li></ul>
    160. 161. Recovering from Error ACK Timeout Packet Timeout Timeout Timeout Time Timeout Timeout ACK lost Packet lost Early timeout Packet ACK Packet Packet ACK Packet ACK Packet ACK
    161. 162. Stop and Wait Problems <ul><li>How to recognize a duplicate? </li></ul><ul><li>Performance </li></ul><ul><ul><li>Can only send one packet per round trip </li></ul></ul>
    162. 163. How to Recognize Resends? <ul><li>Use sequence numbers </li></ul><ul><ul><li>both packets and acks </li></ul></ul><ul><li>Sequence # in packet is finite -- how big should it be? </li></ul><ul><ul><li>For stop and wait? </li></ul></ul><ul><li>One bit – won’t send seq #1 until received ACK for seq #0 </li></ul>Pkt 0 Pkt 1 Pkt 0 ACK 0 ACK 1 ACK 0
    163. 164. How to Keep the Pipe Full? <ul><li>Send multiple packets without waiting for first to be acked </li></ul><ul><ul><li>Number of pkts in flight = window </li></ul></ul><ul><li>How large a window is needed </li></ul><ul><ul><li>Round trip delay * bandwidth = capacity of pipe </li></ul></ul><ul><li>Reliable, unordered delivery </li></ul><ul><ul><li>Several parallel stop & waits </li></ul></ul><ul><ul><li>Send new packet after each ack </li></ul></ul><ul><ul><li>Sender keeps list of unack’ed packets; resends after timeout </li></ul></ul><ul><ul><li>Receiver same as stop&wait </li></ul></ul>
    164. 165. Sliding Window <ul><li>Reliable, ordered delivery </li></ul><ul><li>Receiver has to hold onto a packet until all prior packets have arrived </li></ul><ul><li>Sender must prevent buffer overflow at receiver </li></ul><ul><li>Circular buffer at sender and receiver </li></ul><ul><ul><li>Packets in transit <= buffer size </li></ul></ul><ul><ul><li>Advance when sender and receiver agree packets at beginning have been received </li></ul></ul>
    165. 166. Sender/Receiver State … … Sent & Acked Sent Not Acked OK to Send Not Usable … … Max acceptable Receiver window Max ACK received Next seqnum Received & Acked Acceptable Packet Not Usable Sender window Next expected Receiver Sender
    166. 167. Window Sliding – Common Case <ul><li>On reception of new ACK (i.e. ACK for something that was not acked earlier </li></ul><ul><ul><li>Increase sequence of max ACK received </li></ul></ul><ul><ul><li>Send next packet </li></ul></ul><ul><li>On reception of new in-order data packet (next expected) </li></ul><ul><ul><li>Hand packet to application </li></ul></ul><ul><ul><li>Send cumulative ACK – acknowledges reception of all packets up to sequence number </li></ul></ul><ul><ul><li>Increase sequence of max acceptable packet </li></ul></ul>
    167. 168. Loss Recovery <ul><li>On reception of out-of-order packet </li></ul><ul><ul><li>Send nothing (wait for source to timeout) </li></ul></ul><ul><ul><li>Cumulative ACK (helps source identify loss) </li></ul></ul><ul><li>Timeout (Go Back N recovery) </li></ul><ul><ul><li>Set timer upon transmission of packet </li></ul></ul><ul><ul><li>Retransmit max ACK received sequence + 1 </li></ul></ul><ul><ul><li>Restart from max ACK received sequence + 1 </li></ul></ul><ul><li>Performance during loss recovery </li></ul><ul><ul><li>No longer have an entire window in transit </li></ul></ul><ul><ul><li>Can have much more clever loss recovery </li></ul></ul><ul><ul><ul><li>Covered in TCP lectures </li></ul></ul></ul>
    168. 169. Sequence Numbers <ul><li>How large do sequence numbers need to be? </li></ul><ul><ul><li>Must be able to detect wrap-around </li></ul></ul><ul><ul><li>Depends on sender/receiver window size </li></ul></ul><ul><li>E.g. </li></ul><ul><ul><li>Max seq = 7, send win=recv win=7 </li></ul></ul><ul><ul><li>If pkts 0..6 are sent succesfully and all acks lost </li></ul></ul><ul><ul><ul><li>Receiver expects 7,0..5, sender retransmits old 0..6 </li></ul></ul></ul><ul><li>Max sequence must be >= send window + recv window </li></ul>
    169. 170. Checksumming: Cyclic Redundancy Check <ul><li>view data bits, D , as a binary number </li></ul><ul><li>choose r+1 bit pattern (generator), G </li></ul><ul><li>goal: choose r CRC bits, R , such that </li></ul><ul><ul><li><D,R> exactly divisible by G (modulo 2) </li></ul></ul><ul><ul><li>receiver knows G, divides <D,R> by G. If non-zero remainder: error detected! </li></ul></ul><ul><ul><li>can detect all burst errors less than r+1 bits </li></ul></ul><ul><li>widely used in practice (ATM, HDCL) </li></ul>
    170. 171. RZ <ul><li>Return to Zero (RZ) </li></ul><ul><ul><li>1=pulse to high, dropping back to low </li></ul></ul><ul><ul><li>0=no transition </li></ul></ul>
    171. 172. NRZ-S <ul><li>Non-Return to Zero Space </li></ul><ul><ul><li>1=no change, 0=signal transition at start of bit </li></ul></ul><ul><ul><li>No problem with string of 0’s </li></ul></ul><ul><ul><li>NRZ-like problem with string of 1’s </li></ul></ul>
    172. 173. 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><ul><ul><li>More later </li></ul></ul>
    173. 174. Other coding schemes <ul><li>Bi-Phase-Mark, Bi-Phase-Space </li></ul><ul><ul><li>Level change at every bit period boundary </li></ul></ul><ul><ul><li>Mid-period transition determines bit </li></ul></ul><ul><ul><ul><li>Bi-Phase-M: 0=no change, 1=signal transition </li></ul></ul></ul><ul><ul><ul><li>Bi-Phase-S: 0=signal transition, 1=no change </li></ul></ul></ul>
    174. 175. Other coding schemes <ul><li>Differential Bi-Phase-Space, Differential Bi-Phase-Mark </li></ul><ul><ul><li>Level change at every mid-bit period boundary </li></ul></ul><ul><ul><li>Bit period boundary transition determines bit </li></ul></ul><ul><ul><ul><li>Diff-Bi-Phase-M: 0=signal transition, 1=no change </li></ul></ul></ul><ul><ul><ul><li>Diff-Bi-Phase-S: 0=no change, 1=signal transition </li></ul></ul></ul>
    175. 176. 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 (twisted pair) physical layer
    176. 177. 10BaseT and 100BaseT <ul><li>10/100 Mbps rate; latter called “fast ethernet” </li></ul><ul><ul><li>T stands for Twisted Pair </li></ul></ul><ul><li>Originally, half-duplex mode </li></ul><ul><ul><li>Bus topology popular through mid 90s (10Base2, co-ax) </li></ul></ul><ul><ul><li>Eventually, nodes connect to a hub: “star topology”; 100 m max distance between nodes and hub </li></ul></ul><ul><ul><li>Nodes at both ends of link can not transmit at same time </li></ul></ul><ul><ul><li>Nodes can not transmit and receive at same time </li></ul></ul><ul><li>Today, mostly full-duplex </li></ul><ul><ul><li>Nodes connect to switches </li></ul></ul><ul><ul><li>Simultaneous xmit and receive </li></ul></ul>twisted pair hub
    177. 178. 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>Full-Duplex at 1 Gbps for point-to-point links </li></ul><ul><ul><li>Nodes can transmit and receive at 1Gbps simultaneously </li></ul></ul><ul><li>10 Gbps now ! </li></ul>
    178. 179. Backbone Bridge
    179. 180. Interconnection Without Backbone <ul><li>Not recommended for two reasons: </li></ul><ul><ul><li>- single point of failure at Computer Science hub </li></ul></ul><ul><ul><li>- all traffic between EE and SE must path over CS segment </li></ul></ul>
    180. 181. CSMA/CD efficiency <ul><li>T prop = max prop delay 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 </li></ul><ul><ul><li>as t prop goes to 0 </li></ul></ul><ul><ul><li>as t trans goes to infinity </li></ul></ul><ul><li>better performance than ALOHA: and simple, cheap, decentralized ! </li></ul>
    181. 182. 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>
    182. 183. Institutional network hub hub hub switch to external network router IP subnet mail server web server
    183. 184. Ethernet: uses CSMA/CD <ul><li>if packet </li></ul><ul><li>then { </li></ul><ul><li>A: sense channel </li></ul><ul><ul><li>if idle </li></ul></ul><ul><ul><li>then { </li></ul></ul><ul><ul><li> transmit and monitor the channel; </li></ul></ul><ul><ul><ul><ul><li>if detect another transmission </li></ul></ul></ul></ul><ul><ul><ul><ul><li>then { </li></ul></ul></ul></ul><ul><ul><ul><ul><li>abort and send jam signal; </li></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>update # collisions; </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>delay as required by exponential backoff algorithm; </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>goto A </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li>} </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><li>else {done with the frame; set collisions to zero} </li></ul></ul></ul></ul><ul><ul><ul><li>} </li></ul></ul></ul><ul><ul><li>else {wait until ongoing transmission is over and goto A } </li></ul></ul><ul><li>} </li></ul>
    184. 185. 10Base2 Ethernet <ul><li>Sifting through the jargon (10Base2) </li></ul><ul><ul><li>10: 10Mbps; 2: under 200 meters max cable length </li></ul></ul><ul><ul><li>thin coaxial cable in a bus topology </li></ul></ul><ul><li>repeaters used to connect up to multiple segments </li></ul><ul><li>repeater repeats bits it hears on one interface to its other interfaces: physical layer device only! </li></ul>
    185. 186. ATM <ul><li>ATM </li></ul><ul><ul><li>Replace existing Internet protocols with a more “robust” architecture </li></ul></ul><ul><ul><li>Network architecture to support </li></ul></ul><ul><ul><ul><li>Multiple service classes and per-flow guarantees </li></ul></ul></ul><ul><ul><ul><li>Virtual circuits to support real-time applications </li></ul></ul></ul><ul><ul><ul><li>Explicit rate signaling and resource allocation </li></ul></ul></ul><ul><li>Covered as a data-link layer… </li></ul>
    186. 187. Internet vs. ATM <ul><li>Internet </li></ul><ul><ul><li>“ elastic” datagram service, no strict timing req. </li></ul></ul><ul><ul><li>Computer communication only </li></ul></ul><ul><ul><li>“ smart” end systems (computers) </li></ul></ul><ul><ul><ul><li>can adapt, perform control, error recovery </li></ul></ul></ul><ul><ul><ul><li>simple inside network, complexity at “edge” </li></ul></ul></ul><ul><ul><li>many link types </li></ul></ul><ul><ul><ul><li>different characteristics </li></ul></ul></ul><ul><ul><ul><li>uniform service difficult </li></ul></ul></ul><ul><li>ATM </li></ul><ul><ul><li>evolved from telephony, strict timing and reliability requirements </li></ul></ul><ul><ul><li>Computer and human communication </li></ul></ul><ul><ul><ul><li>need for guaranteed service </li></ul></ul></ul><ul><ul><li>“ dumb” end systems </li></ul></ul><ul><ul><ul><li>telephones </li></ul></ul></ul><ul><ul><ul><li>complexity inside network </li></ul></ul></ul>
    187. 188. Asynchronous Transfer Mode (ATM) <ul><li>1980s/1990’s standard for high-speed (155Mbps to 622 Mbps and higher) Broadband Integrated Service Digital Network architecture </li></ul><ul><li>Take strengths of IP, learn from its shortcomings </li></ul><ul><ul><li>Packet switching good </li></ul></ul><ul><ul><li>Packet switching without explicit network-level connections and reservations bad </li></ul></ul><ul><ul><li>Packet switching using large headers for small packets bad (voice) </li></ul></ul><ul><ul><li>Design new network to address emerging applications while allowing for efficient support for non-real-time data applications </li></ul></ul><ul><li>Goal: integrated, end-end transport of carry voice, video, data </li></ul><ul><ul><li>meeting timing/QoS requirements of voice, video (versus Internet best-effort model) </li></ul></ul><ul><ul><li>“ next generation” telephony: technical roots in telephone world </li></ul></ul><ul><ul><li>packet-switching (fixed length packets, called “cells”) using virtual circuits </li></ul></ul><ul><li>Covered now since it is used mostly as a data-link layer </li></ul>
    188. 189. ATM architecture <ul><li>adaptation layer: only at edge of ATM network </li></ul><ul><ul><li>data segmentation/reassembly </li></ul></ul><ul><ul><li>roughly analagous to Internet transport layer </li></ul></ul><ul><li>ATM layer: “network” layer </li></ul><ul><ul><li>cell switching, routing </li></ul></ul><ul><li>physical layer </li></ul>
    189. 190. ATM: network or link layer? <ul><li>Vision: end-to-end transport: “ATM from desktop to desktop” </li></ul><ul><ul><li>ATM is a network technology </li></ul></ul><ul><li>Reality: used to connect IP backbone routers </li></ul><ul><ul><li>“ IP over ATM” </li></ul></ul><ul><ul><li>ATM as switched link layer, connecting IP routers </li></ul></ul>ATM network IP network
    190. 191. ATM Adaptation Layer (AAL) <ul><li>ATM Adaptation Layer (AAL): “adapts” upper layers (IP or native ATM applications) to ATM layer below </li></ul><ul><li>AAL present only in end systems , not in switches </li></ul><ul><li>AAL layer segment (header/trailer fields, data) fragmented across multiple ATM cells </li></ul><ul><ul><li>analogy: TCP segment in many IP packets </li></ul></ul>
    191. 192. ATM Adaptation Layer (AAL) [more] <ul><li>Different versions of AAL layers, depending on ATM service class: </li></ul><ul><li>AAL1: for CBR (Constant Bit Rate) services, e.g. circuit emulation </li></ul><ul><li>AAL2: for VBR (Variable Bit Rate) services, e.g., MPEG video </li></ul><ul><li>AAL5: for data (eg, IP datagrams) </li></ul>AAL PDU ATM cell User data
    192. 193. ATM Layer <ul><li>Service: transport cells across ATM network </li></ul><ul><li>analogous to IP network layer </li></ul><ul><li>very different services than IP network layer </li></ul>Network Architecture Internet ATM ATM ATM ATM Service Model best effort CBR VBR ABR UBR Bandwidth none constant rate guaranteed rate guaranteed minimum none Loss no yes yes no no Order no yes yes yes yes Timing no yes yes no no Congestion feedback no (inferred via loss) no congestion no congestion yes no Guarantees ?
    193. 194. ATM Layer: Virtual Circuits <ul><li>VC transport: cells carried on VC from source to dest </li></ul><ul><ul><li>call setup, teardown for each call before data can flow </li></ul></ul><ul><ul><li>each packet carries VC identifier (not destination ID) </li></ul></ul><ul><ul><li>every switch on source-dest path maintain “state” for each passing connection </li></ul></ul><ul><ul><li>link,switch resources (bandwidth, buffers) may be allocated to VC: to get circuit-like perf. </li></ul></ul><ul><li>Permanent VCs (PVCs) </li></ul><ul><ul><li>long lasting connections </li></ul></ul><ul><ul><li>typically: “permanent” route between to IP routers </li></ul></ul><ul><li>Switched VCs (SVC): </li></ul><ul><ul><li>dynamically set up on per-call basis </li></ul></ul>
    194. 195. ATM VCs <ul><li>Advantages of ATM VC approach: </li></ul><ul><ul><li>QoS performance guarantee for connection mapped to VC (bandwidth, delay, delay jitter) </li></ul></ul><ul><li>Drawbacks of ATM VC approach: </li></ul><ul><ul><li>Inefficient support of datagram traffic </li></ul></ul><ul><ul><li>one PVC between each source/dest pair) does not scale (N*2 connections needed) </li></ul></ul><ul><ul><li>SVC introduces call setup latency, processing overhead for short lived connections </li></ul></ul>
    195. 196. ATM Layer: ATM cell <ul><li>5-byte ATM cell header </li></ul><ul><li>48-byte payload </li></ul><ul><ul><li>Why?: small payload -> short cell-creation delay for digitized voice </li></ul></ul><ul><ul><li>halfway between 32 and 64 (compromise!) </li></ul></ul>Cell header Cell format
    196. 197. ATM cell header <ul><li>VCI: virtual channel ID </li></ul><ul><ul><li>will change from link to link thru net </li></ul></ul><ul><li>PT: Payload type (e.g. RM cell versus data cell) </li></ul><ul><li>CLP: Cell Loss Priority bit </li></ul><ul><ul><li>CLP = 1 implies low priority cell, can be discarded if congestion </li></ul></ul><ul><li>HEC: Header Error Checksum </li></ul><ul><ul><li>cyclic redundancy check </li></ul></ul>
    197. 198. ATM Physical Layer (more) <ul><li>Two pieces (sublayers) of physical layer: </li></ul><ul><li>Transmission Convergence Sublayer (TCS): adapts ATM layer above to PMD sublayer below </li></ul><ul><li>Physical Medium Dependent: depends on physical medium being used </li></ul><ul><li>TCS Functions: </li></ul><ul><ul><li>Header checksum generation: 8 bits CRC </li></ul></ul><ul><ul><li>Cell delineation </li></ul></ul><ul><ul><li>With “unstructured” PMD sublayer, transmission of idle cells when no data cells to send </li></ul></ul>
    198. 199. ATM Physical Layer <ul><li>Physical Medium Dependent (PMD) sublayer </li></ul><ul><li>SONET/SDH : transmission frame structure (like a container carrying bits); </li></ul><ul><ul><li>bit synchronization; </li></ul></ul><ul><ul><li>bandwidth partitions (TDM); </li></ul></ul><ul><ul><li>several speeds: OC3 = 155.52 Mbps; OC12 = 622.08 Mbps; OC48 = 2.45 Gbps, OC192 = 9.6 Gbps </li></ul></ul><ul><li>TI/T3 : transmission frame structure (old telephone hierarchy): 1.5 Mbps/ 45 Mbps </li></ul><ul><li>unstructured : just cells (busy/idle) </li></ul>
    199. 200. IP-Over-ATM <ul><li>Classic IP only </li></ul><ul><li>3 “networks” (e.g., LAN segments) </li></ul><ul><li>MAC (802.3) and IP addresses </li></ul><ul><li>IP over ATM </li></ul><ul><li>replace “network” (e.g., LAN segment) with ATM network </li></ul><ul><li>ATM addresses, IP addresses </li></ul>ATM network Ethernet LANs Ethernet LANs
    200. 201. IP-Over-ATM AAL ATM phy phy Eth IP ATM phy ATM phy app transport IP AAL ATM phy app transport IP Eth phy
    201. 202. Datagram Journey in IP-over-ATM Network <ul><li>at Source Host: </li></ul><ul><ul><li>IP layer maps between IP, ATM dest address (using ARP) </li></ul></ul><ul><ul><li>passes datagram to AAL5 </li></ul></ul><ul><ul><li>AAL5 encapsulates data, segments cells, passes to ATM layer </li></ul></ul><ul><li>ATM network: moves cell along VC to destination </li></ul><ul><li>at Destination Host: </li></ul><ul><ul><li>AAL5 reassembles cells into original datagram </li></ul></ul><ul><ul><li>if CRC OK, datagram is passed to IP </li></ul></ul>
    202. 203. IP-Over-ATM <ul><li>Issues: </li></ul><ul><li>IP datagrams into ATM AAL5 PDUs </li></ul><ul><li>from IP addresses to ATM addresses </li></ul><ul><ul><li>just like IP addresses to 802.3 MAC addresses! </li></ul></ul>ATM network Ethernet LANs
    203. 204. ATM and “IP switching” <ul><li>ATM advantages </li></ul><ul><ul><li>Lookup of VCID = O(1), Lookup of IP routes O(log n) </li></ul></ul><ul><ul><li>One-time route lookup and circuit establishment, all subsequent traffic switched </li></ul></ul><ul><li>ATM disadvantages </li></ul><ul><ul><li>Complex signaling and routing for establishing communication </li></ul></ul><ul><ul><li>Difficulty in mapping IP traffic dynamically onto ATM circuits </li></ul></ul><ul><li>Goal </li></ul><ul><ul><li>Maintain IP infrastructure </li></ul></ul><ul><ul><li>Accelerate it with labels to support O(1) lookups a la ATM </li></ul></ul><ul><li>Solution </li></ul><ul><ul><li>Ipsilon and “IP switching” </li></ul></ul><ul><ul><li>http://pnewman.org/papers/infocom96.pdf </li></ul></ul>
    204. 205. IP over ATM versus IP switching IP network control IP routing ATM network control ATM label switching IP network control IP routing IP network control IP routing IP network control ATM label switching IP network control IP routing
    205. 206. ATM and “IP switching” <ul><li>In a nutshell </li></ul><ul><ul><li>Start with ATM switch </li></ul></ul><ul><ul><li>Rip out ATM signaling and routing </li></ul></ul><ul><ul><li>Add IP routing software </li></ul></ul><ul><ul><li>Add Flow classifier to map unknown flows to underlying ATM virtual circuit ID </li></ul></ul><ul><ul><li>Attach VCID and allow downstream nodes to do the same </li></ul></ul><ul><li>Operation </li></ul><ul><ul><li>Upon arrival of first packet in flow </li></ul></ul><ul><ul><ul><li>Record unknown incoming VCID </li></ul></ul></ul><ul><ul><ul><li>Lookup IP flow and map it to an outgoing virtual circuit ID (label) using IP routing software </li></ul></ul></ul><ul><ul><ul><li>Create incomingVCID to outgoingVCID table entry for subsequent packets </li></ul></ul></ul><ul><ul><li>Subsequent packets </li></ul></ul><ul><ul><ul><li>Switched in hardware using VCID after flow classified at edge </li></ul></ul></ul><ul><ul><ul><li>IP packet forwarding done as label index lookup O(1) versus IP route lookup O(log n) </li></ul></ul></ul>
    206. 207. ATM and “IP switching” <ul><li>Later generalized as MPLS (multi-protocol label switching) </li></ul><ul><ul><li>“ Layer 2 ½” </li></ul></ul><ul><ul><li>Not tied to ATM </li></ul></ul><ul><ul><li>Extensible to IPv6 </li></ul></ul><ul><ul><li>Half-way in between data-link addresses and IP addresses </li></ul></ul><ul><ul><ul><li>Labeling done within a cloud versus link-local (data-link addresses) and global (IP addresses) </li></ul></ul></ul><ul><ul><li>http://www.rfc-editor.org/rfc/rfc3031.txt </li></ul></ul><ul><li>Used as a tool for traffic engineering </li></ul><ul><ul><li>http://www.rfc-editor.org/rfc/rfc2702.txt </li></ul></ul>
    207. 208. X.25 and Frame Relay <ul><li>Like ATM: </li></ul><ul><li>wide area network technologies </li></ul><ul><li>virtual circuit oriented </li></ul><ul><li>origins in telephony world </li></ul><ul><li>Not really a link layer but.... </li></ul><ul><ul><li>Viewed as link layers by IP protocol </li></ul></ul><ul><ul><li>Used mostly to carry IP datagrams between IP routers </li></ul></ul><ul><li>Going the way of the dinosaurs.... </li></ul>
    208. 209. X.25 <ul><li>X.25 builds VC between source and destination for each user connection </li></ul><ul><li>Per-hop control along path </li></ul><ul><ul><li>error control (with retransmissions) on each hop using LAP-B </li></ul></ul><ul><ul><ul><li>variant of the HDLC protocol </li></ul></ul></ul><ul><ul><ul><li>developed when bit error rates over long-haul copper links were orders of magnitude higher </li></ul></ul></ul><ul><ul><li>per-hop flow control using credits </li></ul></ul><ul><ul><ul><li>congestion arising at intermediate node propagates to previous node on path </li></ul></ul></ul><ul><ul><ul><li>back to source via back pressure </li></ul></ul></ul>
    209. 210. IP versus X.25 <ul><li>X.25: reliable in-sequence end-end delivery from end-to-end </li></ul><ul><ul><li>“ intelligence in the network” </li></ul></ul><ul><ul><li>built for dumb terminals accessing mainframes </li></ul></ul><ul><li>IP: unreliable, out-of-sequence end-end delivery </li></ul><ul><ul><li>“ intelligence in the endpoints” </li></ul></ul><ul><li>2000 </li></ul><ul><ul><li>gigabit routers: limited processing possible </li></ul></ul><ul><ul><li>CPU capacity at end-hosts </li></ul></ul><ul><ul><li>IP wins </li></ul></ul>
    210. 211. Frame Relay <ul><li>Designed in late ‘80s, widely deployed in the ‘90s </li></ul><ul><ul><li>Second-generation X.25 </li></ul></ul><ul><li>Frame relay service: </li></ul><ul><ul><li>no error control </li></ul></ul><ul><ul><li>no flow control </li></ul></ul><ul><ul><li>End-to-end congestion control </li></ul></ul><ul><ul><li>Some QoS mechanisms </li></ul></ul>
    211. 212. Frame Relay (more) <ul><li>Designed to interconnect corporate customer LANs </li></ul><ul><ul><li>typically permanent VC’s: “ pipe ” carrying aggregate traffic between two routers </li></ul></ul><ul><ul><li>switched VC’s: as in ATM </li></ul></ul><ul><li>corporate customer leases FR service from public Frame Relay network (eg, Sprint, ATT) </li></ul>
    212. 213. Frame Relay (more) <ul><li>Flag bits, 01111110, delimit frame </li></ul><ul><li>address: </li></ul><ul><ul><li>10 bit VC ID field </li></ul></ul><ul><ul><li>3 congestion control bits </li></ul></ul><ul><ul><ul><li>FECN: forward explicit congestion notification (frame experienced congestion on path) </li></ul></ul></ul><ul><ul><ul><li>BECN: congestion on reverse path </li></ul></ul></ul><ul><ul><ul><li>DE: discard eligibility </li></ul></ul></ul><ul><ul><li>Precursor to IP DiffServ and ECN </li></ul></ul>address flags data CRC flags
    213. 214. Frame Relay -VC Rate Control <ul><li>Committed Information Rate (CIR) </li></ul><ul><ul><li>defined, “guaranteed” for each VC </li></ul></ul><ul><ul><li>negotiated at VC set up time </li></ul></ul><ul><ul><li>customer pays based on CIR </li></ul></ul><ul><li>DE bit: Discard Eligibility bit </li></ul><ul><ul><li>Edge FR switch measures traffic rate for each VC; marks DE bit </li></ul></ul><ul><ul><li>DE = 0: high priority, rate compliant frame; deliver at “all costs” </li></ul></ul><ul><ul><li>DE = 1: low priority, eligible for discard when congestion </li></ul></ul><ul><ul><li>Precursor to IP DiffServ </li></ul></ul><ul><ul><li>Can be used to support higher layer QoS mechanisms </li></ul></ul>
    214. 215. Coaxial cable <ul><li>Thick (10Base5) </li></ul><ul><ul><li>Large diameter 50-ohm cable </li></ul></ul><ul><ul><li>N connectors </li></ul></ul><ul><li>Thin (10Base2) cables </li></ul><ul><ul><li>Small diameter 50-ohm cable </li></ul></ul><ul><ul><li>BNC, RJ-58 connector </li></ul></ul><ul><li>Video cable </li></ul><ul><ul><li>75-ohm cable </li></ul></ul><ul><ul><li>BNC, RJ-59 connector </li></ul></ul><ul><ul><li>Not compatible with RJ-58 </li></ul></ul>
    215. 216. Fiber connectors <ul><li>ESCON </li></ul><ul><li>Duplex SC </li></ul><ul><li>ST </li></ul><ul><li>MT-RJ (multimode) </li></ul><ul><li>Duplex LC </li></ul>