UC Regents Fall 2006 © UCBCS 152 L21: Networks and Routers2006-11-9John Lazzaro (www.cs.berkeley.edu/~lazzaro)CS 152 Computer Architecture and EngineeringLecture 21 – Networks and Routerswww-inst.eecs.berkeley.edu/~cs152/TAs: Udam Saini and Jue Sun 1UC Regents Fall 2006 © UCBCS 152 L21: Networks and RoutersLast Time: NAND FlashIdea: Disk ReplacementPresents memory to the CPU as a set of pages.2048 Bytes 64 Bytes+(user data)(meta data)Page format:Chip “remembers” for 10 years.Note: NOR Flash is another flash product, for software code. NOR Flash read interface is just like SRAM.NAND Flash has better cost/bit than NOR.2UC Regents Fall 2006 © UCBCS 152 L21: Networks and RoutersLast Time: Making the Mac Mini G4Size fixed by the “form factor” (physical size) of desktop DIMMS. Laptop DRAM is smaller, but too expensive for $499 price.3UC Regents Fall 2006 © UCBCS 152 L21: Networks and RoutersWhy 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.4UC Regents Fall 2006 © UCBCS 152 L21: Networks and RoutersToday: NetworksLink layers: Using physics to send bits from place to place.Routing: Inside the cloud.Internet: A network of networks.5UC Regents Fall 2006 © UCBCS 152 L21: Networks and RoutersToday: Router DesignRouter architecture: What’s inside the box?Forwarding engine: How a router knows the “next hop” for a packet.Switch fabric: When buses are too slow ... replace it with a switch!6UC Regents Fall 2006 © UCBCS 152 L21: Networks and RoutersNetworking 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 spectrum7UC Regents Fall 2006 © UCBCS 152 L21: Networks and RoutersQ2. 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 endpoints8UC Regents Fall 2006 © UCBCS 152 L21: Networks and RoutersQ3. 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 endpoints9UC Regents Fall 2006 © UCBCS 152 L21: Networks and RoutersQ4. 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. 10UC Regents Fall 2006 © UCBCS 152 L21: Networks and Routers 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, ...11UC Regents Fall 2006 © UCBCS 152 L21: Networks and Routers 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, ...12UC Regents Fall 2006 © UCBCS 152 L21: Networks and Routers 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).13UC Regents Fall 2006 © UCBCS 152 L21: Networks and RoutersThe 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.14UC Regents Fall 2006 © UCBCS 152 L21: Networks and RoutersInternet: 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 numberNote: Could be a lie ...IHL field: #
View Full Document