UC Regents Spring 2005 © UCBCS 152 L24: Networks2005-4-19John Lazzaro (www.cs.berkeley.edu/~lazzaro)CS 152 Computer Architecture and EngineeringLecture 24 – Networkswww-inst.eecs.berkeley.edu/~cs152/TAs: Ted Hong and David MarquardtUC Regents Spring 2005 © UCBCS 152 L24: NetworksLast Time: Making Mac MiniSize fixed by the “form factor” (physical size) of desktop DIMMS. Laptop DRAM is smaller, but too expensive for $499 price.UC Regents Spring 2005 © UCBCS 152 L24: NetworksWhy are networks different from buses?Serial: Data is sent “bit by bit” over one logical wire.USB, FireWire.Primary purpose is to connect devices to a computer.Network.Primary purpose is to connect computers to computers.UC Regents Spring 2005 © UCBCS 152 L24: NetworksToday: NetworksLink layers: Using physics to send bits from place to place.Routing: Inside the cloud.Internet: A network of networks.UC Regents Spring 2005 © UCBCS 152 L24: NetworksNetworking bottom-up: Link two endpointsQ1. How far away are the endpoints?Distance +mobility +bandwidth influences choice of medium.Japan-US undersea cable networkPhysical media: optical fiber (photonics)WiFi wireless from hotel bed to access point.Physical media: unlicensed radio spectrumUC Regents Spring 2005 © UCBCS 152 L24: NetworksQ2. Initial investment cost for the link.$1B USD. A ship lays cable on ocean floor.For expensive media, much of the “price” goes to pay off loans.The price of the WiFi laptop card + the base station.“Unlicensed radio” -- no fee to the FCCNetworking bottom-up: Link two endpointsUC Regents Spring 2005 © UCBCS 152 L24: NetworksQ3. How is the link imperfect?+++ A steady bitstream (“circuit”). No packets to lose.+++ Only one bit flips per 10,000,000,000,000 sent. --- Undersea failure is catastrophicSolution:Short packets spaced in time to escape the fade. If lost, doretransmits.--- Someone walks by and the network stops working - “fading”.Networking bottom-up: Link two endpointsUC Regents Spring 2005 © UCBCS 152 L24: NetworksQ4. How does link perform?BW: 640 Gb/s (CA-JP cable)Networking bottom-up: Link two endpointsIn general, risky to halve the round-trip time for one-way latency: paths are often different each direction.BW: In theory, 801.11b offers 11 Mb/s.Users are lucky to see 3-5 Mb/s in practice.Latency: If there is no fading, quite good. I’ve measured <2 ms RTT on a short hop.Latency:% ping irt1-ge1-1.tdc.noc.sony.co.jpPING irt1-ge1-1.tdc.noc.sony.co.jp (211.125.132.198): 56 data bytes64 bytes from 211.125.132.198: icmp_seq=0 ttl=242 time=114.571 ms round-trip.Compare: Light speed in vacuum, SFO-Tokyo, 63ms RT.UC Regents Spring 2005 © UCBCS 152 L24: Networks email WWW phone...SMTP HTTP RTP...TCP UDP…IP Ethernet Wi-Fi…CSMA async sonet... copper fiber radio...Diagram Credit: Steve DeeringProtocol ComplexityThere are dozens of “link networks” ...Link networksThe undersea cable, the hotel WiFi, and many others ... DSL, Ethernet, ...UC Regents Spring 2005 © UCBCS 152 L24: Networks email WWW phone...SMTP HTTP RTP...TCP UDP…IP Ethernet Wi-Fi…CSMA async sonet... copper fiber radio...Diagram Credit: Steve DeeringProtocol ComplexityApplicationsApp authors do not want to add support for N different network types.Web browsers do not know about link netsLink networksThe undersea cable, the hotel WiFi, and many others ... DSL, Ethernet, ...UC Regents Spring 2005 © UCBCS 152 L24: Networks email WWW phone...SMTP HTTP RTP...TCP UDP…IP Ethernet Wi-Fi…CSMA async sonet... copper fiber radio...Diagram Credit: Steve DeeringProtocol ComplexityThe Internet: A Network of NetworksInternet Protocol (IP):An abstraction for applications to target, and for link networks to support.Very simple, very successful.Link layer is not expected to be perfect.IP presentslink network errors/losses in an abstract way (not a link specific way).UC Regents Spring 2005 © UCBCS 152 L24: NetworksThe Internet interconnects “hosts” ...198.211.61.22 ??? A user-friendly form of the 32-bit unsigned value 3335732502, which is:198*2^24 + 211*2^16 + 61*2^8 + 22IP4 number for this computer: 198.211.61.22Every directly connected host has a unique IP number.Upper limit of 2^32 IP4 numbers (some are reserved for other purposes). Next-generation IP (IP6) limit: 2^128.UC Regents Spring 2005 © UCBCS 152 L24: NetworksInternet: Sends Packets Between Hosts 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|Version| IHL |Type of Service| Total Length |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Identification |Flags| Fragment Offset |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Time to Live | Protocol | Header Checksum |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Source Address |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| Destination Address |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+| |+ +| Payload data (size implied by Total Length header field) |+ +| |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+To: IP numberFrom: IP number Note: Could be a lie ...IHL field: # of words in header. The typical header (IHL = 5 words) is shown. Longer headers code add extra fields after the destination address.HeaderDataBitfield numbersIP4, IP6, etc ... How the destination should interpret the payload data.UC Regents Spring 2005 © UCBCS 152 L24: NetworksLink networks transport IP packetsIP Packet801.11b WiFi packetFor this “hop”, IP packet sent “inside” of a wireless 801.11b packet.IP PacketCable modem packetFor this “hop”, IP packet sent “inside” of a cable modem DOCSIS packet.ISO Layer Names:IP packet: “Layer 3”WiFi and Cable Modem packets: “Layer 2”Radio/cable waveforms: “Layer 1”UC Regents Spring 2005 © UCBCS 152 L24: Networks 0 1 2 3 0 1 2 3 4 5 6 7 8
View Full Document