1 / 41

CSE 30264 Computer Networks

CSE 30264 Computer Networks. Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 6 – January 28, 2010. Today’s Lecture. Project 1 Description / Overview Physical Layer Shared Access Chapter 2.6-2.9. Application. Transport. Network.

maille
Download Presentation

CSE 30264 Computer Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSE 30264Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 6 – January 28, 2010

  2. Today’s Lecture • Project 1 • Description / Overview • Physical Layer • Shared Access • Chapter 2.6-2.9 Application Transport Network Data Physical CSE 30264

  3. Project 1 • TCP Client / Server • Pre-built client for testing your server • Remote server for testing your client • Will have debug features to help you out • May use C or C++ • Premise • Build a single-threaded TCP file client / server • Client connects to a specific server IP / portrequesting a specific file • Server responds with the length and binary data CSE 30264

  4. Project 1 Length of file name C S filefetch 129.74.153.157 9000 horns.mp3 connect LF File Name 0x0009 horns.mp3 Length of binary data Working in binary 0x00001001 LBD Binary Data Binary Data 129.74.153.157, 9000 CSE 30264

  5. Project 1 • Important aspects • Working with binary values • Request file name length  16 bit value (0-65535) • Response file name • File length  32 bit value • Will need to monitor speed / status • Update with information as data comes in • Will need to record time / data received • TCP keeps it in order for us CSE 30264

  6. Project 1 • Sanity checking • Make sure that you use network byte order • htons, htonl on the numbers • Check to make sure that any numbers are believable • Can write with multiple calls • Write the size • Write the file name • TCP does the work for us figuring out how to split (or combine) it for us CSE 30264

  7. Project 1 • Fixed server • Connect to 129.74.153.157, port 9000, TCP • Example client • Test your own server • Connect to the same machine • Open up two terminals or ssh sessions • IP address = 127.0.0.1  localhost • Anything in the 127.* range works CSE 30264

  8. Project 1 • Two code directories • Client • Server • Other notes • Create a makefile • Tutorial on web for how to create a makefile • Stop by during office hours • Two weeks • Do not save it until the last minute CSE 30264

  9. Port Sharing – Project 1 • Cannot share same port to listen to • Pick a random big number • 10,000 + X • 16896 -> Striegel • Phone number, room number, etc. • When in doubt, check ps–A –f on the machine you log in to CSE 30264

  10. Shared Access Networks Outline Bus (Ethernet) Token ring (IBM, FDDI, RPR) Wireless (802.11, WiMAX) CS 30264

  11. Shared Access Networks • Challenges • How do I let multiple devices sharethe same communication medium? • Control / logic • When is it my turn? • How long can I talk? • Physical • Capacitance, resistance, inductance • Signal propagation – latency • Signal vs. noise – SNR • Directionality – half vs. full duplex CSE 30264

  12. Ethernet Overview • History • Developed by Xerox PARC in mid-1970s • Roots in Aloha packet-radio network • Standardized by Xerox, DEC, and Intel in 1978 • Evolved into the 802.3 standard • Robert Metcalfe – embraced KISS Metcalfe’s Law Value of a network isproportional to the squareof the number of users CS 30264

  13. CSMA / CD • CSMA/CD • Carrier Sense • Multiple Access • Collision Detection • Frame Format HDLC anyone? CSMA / CD style networks Max utilization* ~= 60% CSE 30264

  14. Ethernet (cont) • Addresses • Unique • 48-bit unicast address assigned to each adapter • Assigned in blocks to vendors • Example: • 8:0:e4:b1:2 • Broadcast: all 1s (multicast  first bit is a 1) Why is dest address first? CS 30264

  15. Ethernet (cont) • Variations • Ethernet – 10 Mb/s • Fast Ethernet – 100 Mb/s • Usually what people call Ethernet now • Gigabit Ethernet – 1000 Mb/s  1 Gb/s • Gig E • 10 Gigabit Ethernet • 10 Gig • Interconnection • Bus  connected by hubs (old school) • Star  connected by switches (everything today) CSE 30264

  16. Variations • How do they differ? • Maximum cable length • Less means faster • Star only vs. bus • Gap between packets • IFS – Inter-Frame Spacing • Less means faster • Minimum / maximum packet size • 64 / 1514 bytes (1500 byte payload) • Jumbo frames (8192 bytes) CSE 30264

  17. Ethernet Bridge CS 30264

  18. Transmit Algorithm • If line is idle (CS) • Send immediately • Upper bound message size of 1500 bytes • Must wait 9.6us between back-to-back frames • IFS • If line is busy… • Wait until idle and transmit immediately • Called 1-persistent (special case of p-persistent) MAC – Media Access Control  Layer 2 CS 30264

  19. Algorithm (cont) • If collision (CD) • Jam for 32 bits, then stop transmitting frame • Minimum frame is 64 bytes (header + 46 bytes of data) • Delay and try again • 1st time: 0 or 51.2us • 2nd time: 0, 51.2, 102.4, or 153.6us • nth time: k x 51.2us, for randomly selected k=0..2n - 1 • Give up after several tries (usually 16) • Exponential backoff CS 30264

  20. Collisions CS 30264

  21. Token Ring Overview • Examples • IEEE 802.5 (based on earlier IBM Token Ring) • Fiber Distributed Data Interface (FDDI) • IEEE 802.17 (Resilient Packet Ring or RPR) CS 30264

  22. Token Ring (cont) • Idea • Frames flow in one direction: upstream to downstream • Special bit pattern (token) rotates around ring • Must capture token before transmitting • Release token after done transmitting • Immediate release • Delayed release • Remove your frame when it comes back around • Stations get round-robin service • Frame Format CS 30264

  23. Timed Token Algorithm • Token Holding Time (THT) • Upper limit on how long a station can hold the token • Token Rotation Time (TRT) • How long it takes the token to traverse the ring • TRT <= ActiveNodesxTHT + RingLatency CS 30264

  24. Token Maintenance • Lost Token • No token when initializing ring • Bit error corrupts token pattern • Node holding token crashes • Monitoring for a Valid Token • Should periodically see valid transmission (frame or token) • Timer: NumStations * THT + RingLatency • Set timer and send claim frame if it fires CS 30264

  25. FDDI • Runs on fiber • Consists of dual ring CS 30264

  26. Resilient Packet Ring (802.17) • Focus on resiliency, bandwidth efficiency, QoS • 2 counter-rotating optical fiber rings • Both rings used simultaneously (bandwidth) • Receiver removes RPR frame (bandwidth) • No tokens! Instead: buffer insertion • 3 classes supported (QoS): • class A: low latency, low jitter • class B: predictable latency and jitter • class C: best-effort • Uses wrapping and steering (resiliency) • wrapping: similar to FDDI • steering: inform other nodes of failure, can use opposite direction CS 30264

  27. Which one? • Unclear • Ethernet dominates in the LAN • Local Area Network • FDDI / SONET / etc. • Dominate in the MAN • Metro Area Network • Why not Ethernet everywhere? • Broadcast scope CSE 30264

  28. Wireless • Unique set of challenges vs. wired • BER++ • Implicitly a broadcast • Omni antenna • Directed antenna • Heavy environmental effects • No real “shielding” • Faraday cage • Frequency up • More power • Inanimate objects bad CSE 30264

  29. Wireless • Bluetooth: • 10m, 2.1Mbps (shared), peripheral devices to computer • Wi-Fi 802.11: • 100m, 54Mbps (shared), computer to base stations • WiMAX 802.16: • 10km, 70Mbps (shared), link buildings and towers • 3G Cellular: • Tens of km, 384+ Kbps (not shared), cell phone to tower CS 30264

  30. Modes of Communication Ad hoc Managed CS 30264

  31. Bluetooth (802.15.1) • 2.45GHz band, range of 10m • Version 2.0: 2.1Mbps, low power consumption • Piconet: master-slave CS 30264

  32. Wi-Fi • IEEE 802.11: 2.4 GHz band, 1 Mb/s • IEEE 802.11b: 2.4GHz band, 11Mb/s • IEEE 802.11a: 5GHz band, 54Mb/s • IEEE 802.11g: 2.4GHz band, 54Mb/s • IEEE 802.11n: Dual band (2.4, 5), 270 Mb/s Block Ack MIMO CS 30264

  33. Spread Spectrum • Idea • Spread signal over wider frequency band than required • Originally designed to thwart jamming • Frequency Hopping • Transmit over random sequence of frequencies • Sender and receiver share… • Pseudorandom number generator • Seed • 802.11 uses 79 x 1MHz-wide frequency bands CS 30264

  34. Spread Spectrum (cont) • Direct Sequence • For each bit, send XOR of that bit and n random bits • Random sequence known to both sender and receiver • Called n-bit chipping code • 802.11 defines an 11-bit chipping code CS 30264

  35. Collisions Avoidance • Similar to Ethernet • Problem: hidden and exposed nodes CS 30264

  36. MACA • Multiple Access with Collision Avoidance • Sender transmits RequestToSend (RTS) frame • Receiver replies with ClearToSend (CTS) frame • Neighbors… • see CTS: keep quiet • see RTS but not CTS: ok to transmit • Receiver sends ACK when has frame • neighbors silent until see ACK • Collisions • no collision detection • known when CTS not received • exponential backoff In general, bad, bad, bad CS 30264

  37. Supporting Mobility • Case 1: ad hoc networking • Case 2: access points (AP) • Tethered • Each mobile node associates with an AP CS 30264

  38. Mobility (cont) • Scanning (selecting an AP) • Node sends Probe frame • All AP’s w/in reach reply with ProbeResponse frame • Node selects one AP; sends it AssociateRequest frame • AP replies with AssociationResponse frame • New AP informs old AP via tethered network • When • Active: when join or move • Passive: AP periodically sends Beacon frame CS 30264

  39. 802.11 • Up to 2312 bytes of data • 32-bit CRC • 4 addresses, usage depends on mode: • Addr1 is target, Addr2 is source • Addr1 is ultimate target, Addr2: immediate sender, Addr3 is intermediate target, Addr4: original source CS 30264

  40. WiMAX • Worldwide Interoperability for Microwave Access • Standardized by WiMAX Forum, IEEE 802.16 • Typical distance: 1-6miles, up to 30miles • “subscriber stations” (e.g., antenna on roof) • Up to 70Mbps • Time Division Duplexing (TDD) • Frequency Division Duplexing (FDD) CS 30264

  41. Cell Phone Technologies • Uses base stations, area served called “cell” • 1G: analog • 2G, 2.5G (e.g., GSM): digital • GPRS: General Packet Radio Service (typically 30-70Kbps) • 3G: • UMTS (Universal Mobile Telecommunications System) CS 30264

More Related