DOC PREVIEW
Berkeley COMPSCI 162 - Lecture 22 Networking II

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CS162Operating Systems andSystems ProgrammingLecture 22Networking IINovember 16, 2005Prof. John Kubiatowiczhttp://inst.eecs.berkeley.edu/~cs162Lec 22.211/14/05Kubiatowicz CS162 ©UCB Fall 2005Review: Networking• Network: physical connection that allows two computers to communicate– Packet: sequence of bits carried over the network• Broadcast Network: Shared Communication Medium– Transmitted packets sent to all receivers– Arbitration: act of negotiating use of shared medium» Ethernet: Carrier Sense, Multiple Access, Collision Detect• Point-to-point network: a network in which every physical wire is connected to only two computers– Switch: a bridge that transforms a shared-bus (broadcast) configuration into a point-to-point network.• Internet Protocol (IP): unreliable packet service– Used to route messages across globe– 32-bit destination addresses• Routing: the process of forwarding packets hop-by-hop through routers to reach their destination– Internet has networks of many different scales» LANs, Autonomous Systems (AS), etc.– Different algorithms run at different scales» Border Gateway Protocol (BGP) at large scales» Variants of Distance Vector (DV) protocols at short scalesLec 22.311/14/05Kubiatowicz CS162 ©UCB Fall 2005Review: Hierarchical Networking (The Internet)• How can we build a network with millions of hosts?– Hierarchy! Not every host connected to every other one– Use a network of Routers to connect subnets togethersubnet1subnet2RouterOthersubnetsRouterRouterTranscontinentalLinksubnet3OthersubnetsLec 22.411/14/05Kubiatowicz CS162 ©UCB Fall 2005Review: Network Protocols• Protocol: Agreement between two parties as to how information is to be transmitted– Example: system calls are the protocol between the operating system and application– Networking examples: many levels» Physical level: mechanical and electrical network (e.g. how are 0 and 1 represented)» Link level: packet formats/error control (for instance, the CSMA/CD protocol) » Network level: network routing, addressing» Transport Level: reliable message delivery • Protocols on today’s Internet:EthernetATMPacket radioIPUDP TCPRPCNFSWWWe-mailsshPhysical/LinkNetworkTransportLec 22.511/14/05Kubiatowicz CS162 ©UCB Fall 2005Goals for Today• Networking– Reliable Messaging» TCP windowing and congestion avoidance– Two-phase commitNote: Some slides and/or pictures in the following areadapted from slides ©2005 Silberschatz, Galvin, and Gagne Lec 22.611/14/05Kubiatowicz CS162 ©UCB Fall 2005Network Layering• Layering: building complex services from simpler ones– Each layer provides services needed for higher layers by utilizing services provided by lower layers• Our goal in the following is to show how to construct a secure, ordered, arbitrary-sized message service routed to anywhere:SecureInsecureSynchronousAsynchronousRouted anywhereOnly on local area netProcess-to-processMachine-to-machineReliableUnreliableOrderedUnordered (sometimes)Arbitrary SizeLimited SizeAbstraction: MessagesPhysical Reality: PacketsLec 22.711/14/05Kubiatowicz CS162 ©UCB Fall 2005Basic Networking Limitations• The physical/link layer is pretty limited– Packets of limited size » Maximum Transfer Unit (MTU): often 200-1500 bytes – Packets can get lost or garbled– Hardware routing limited to physical link or switch– Physical routers crash/links get damaged» Famous Baltimore tunnel fire (July 2001): cut Internet half• Datagram: an independent, self-contained network message whose arrival, arrival time, and content are not guaranteed• Need resilient routing algorithms to send messages on wide area– Multi-hop routing mechanisms– Redundant links/Ability to route around failed links• Handling Arbitrary Sized Messages:– Must deal with limited physical packet size – Split big message into smaller ones (called fragments)» Must be reassembled at destination» May happen on demand if packet routed through areas of reduced MTU (e.g. TCP)– Checksum computed on each fragment or whole messageLec 22.811/14/05Kubiatowicz CS162 ©UCB Fall 2005Performance Considerations• Before continuing, need some performance metrics– Overhead: CPU time to put packet on wire– Throughput: Maximum number of bytes per second» Depends on “wire speed”, but also limited by slowest router (routing delay) or by congestion at routers– Latency: time until first bit of packet arrives at receiver» Raw transfer time + overhead at each routing hop• Contributions to Latency– Wire latency: depends on speed of light on wire » about 1.5 ns/foot– Router latency: depends on internals of router» Could be < 1 ms (for a good router)» Question: can router handle full wire throughput?Router RouterLR1LR2LW1LW2Lw3Lec 22.911/14/05Kubiatowicz CS162 ©UCB Fall 2005Sample Computations• E.g.: Ethernet within Soda– Latency: speed of light in wire is 1.5ns/foot, which implies latency in building < 1 μs (if no routers in path)– Throughput: 10-1000Mb/s– Throughput delay: packet doesn’t arrive until all bits » So: 4KB/100Mb/s = 0.3 milliseconds (same order as disk!)• E.g.: ATM within Soda – Latency (same as above, assuming no routing)– Throughput: 155Mb/s– Throughput delay: 4KB/155Mb/s = 200μ• E.g.: ATM cross-country – Latency (assuming no routing): » 3000miles * 5000ft/mile ⇒ 15 milliseconds– How many bits could be in transit at same time?» 15ms * 155Mb/s = 290KB– In fact, Berkeley→MIT Latency ~ 90ms» Implies 1.7MB in flight if routers have wire-speed throughput• Requirements for good performance: – Local area: minimize overhead/improve bandwidth– Wide area: keep pipeline full!Lec 22.1011/14/05Kubiatowicz CS162 ©UCB Fall 2005IP Packet Format• Internet Protocol (IP): Sends packets to arbitrary destination in network– Deliver messages unreliably (“best effort”) from one machine in Internet to another– Since intermediate links may have limited size, must be able to fragment/reassemble packets on demand– Includes 256 different “sub-protocols” built on top of IP» Examples: ICMP(1), TCP(6), UDP (17), IPSEC(50,51)• IP Packet Format:16-bit identificationToS413-bit frag offTotal length(16-bits)protocolTTL 16-bit header checksum32-bit source IP address32-bit destination IP addressIHLflagsoptions (if any)Data0151631IP Ver4IP HeaderLengthSize of datagram(header+data)Flags &Fragmentationto split large messagesTime toLive (hops)Type oftransportprotocolIP


View Full Document

Berkeley COMPSCI 162 - Lecture 22 Networking II

Documents in this Course
Lecture 1

Lecture 1

12 pages

Nachos

Nachos

41 pages

Security

Security

39 pages

Load more
Download Lecture 22 Networking II
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 22 Networking II and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 22 Networking II 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?