800 likes | 917 Views
Computer Networking. Eliezer Dor ( eliezer dor@ gmail.com ). Teaching Assistant: Allon Wagner. Course Information. Lectures: Thursday 5 – 8 Dach 005 Recitation: Tuesday 16 – 17, 17 – 18 Dan David 001. Web site: http://www.cs.tau.ac.il/~allonwag/comnet2011B/index.html.
E N D
Computer Networking Eliezer Dor (eliezer dor@gmail.com) Teaching Assistant: Allon Wagner
Course Information Lectures: Thursday 5 – 8Dach 005 Recitation: Tuesday 16 – 17, 17 – 18 Dan David 001 Web site: http://www.cs.tau.ac.il/~allonwag/comnet2011B/index.html Main Book: • Kurose-Ross: A Top-down Approach to Computer Networking Additional Books: • Keshav : An Engineering Approach to Computer Networking • Tanenbaum : Computer Networks • Bertsekas and Gallager : Data Networks
Practical Information Homework assignment: Mandatory Both theoretical and programming Grades: Final Exam: 60% theory exercises: 20% Programming exercises: 20%
Chapter 1 Introduction
Motivation • 1st stage society: Agriculture, handicraft • 2nd stage society: Industrial, labor intensive • Today’s society: • automated industry with sophisticated logistics • information intensive: • business, knowledge, advertising, news, social interaction, recreation • Future society is likely to be even more information-dominated
The Purpose of the Network • serves network applications residing in hosts • applications at distinct hosts need to co-ordinate actions / co-operate • thus they need to communicate information to each other • network must deliver that information • to the right host • to the right application process / thread • network serves applications which serve users
Information • A representation of knowledge • Examples: • text, music, video, technical specifications • software, instructions, reports, alarms • Can be represented in two ways • analog (pictures / ideograms) • digital (bits) • the Digital Revolution • convert information as pictures to information as bits • networks move around bits instead of pictures
Challenges • make order in the jungle of applications • organize information into manageable units • keep track of info units sent/ moving/ received • take account of errors / misunderstandings etc. • move the bits through the network • find the destination host in the network jungle • using an efficient path • learn automatically the current network topology • make efficient use of link / router capacities • resolve competition for use of same resource • Cheaply, Securely, with Quality of Service,
This course’s Challenge • To discuss this complexity in an organized way, so that we • understand the issues / alternatives • can follow/design/troubleshoot processes • Need to divide the job into functional layers • Understand the interrelation between them • These problems are beyond a specific technology
Early communications systems • telegraph, telephone • first used direct point to point links • when number of users grew: • introduced switching points/ configurable circuits • each call had a dedicated circuit for its duration trunk group phone line Switched connection
Data Networks • set of interconnected nodes exchanging information • links are common usage • switching node must: • choose for each data unit a link bringing it closer to dest. • schedule their transmission on the common usage links (resolve the competition for the usage of the link)
Qwest backbone http://www.qwest.com/largebusiness/enterprisesolutions/networkMaps/preloader.swf
Networking Tasks – phone net. sol’n • Addressing- identify the end user • phone number 1-201-222-2673 = country code + region code + exchange + number • Routing – Find route from source to destination. • determined from phone number by static routing tables • Forwarding – how information is moved • circuit switching::a fixed circuit along path to destination • Information Units- How information is sent • voice samples; no addressing attached • samples sent continuously , 8000/sec • network must prepare source-dest. circuit in advance
Networking Tasks – Internet Solution Addressing - identify the end user • IP addresses 132.66.48.37, =network number || host # Routing- How to get from source to destination • routers learn automatically network topology • build routing tables / updated frequently Forwarding – how information is moved • packet switching: move packets 1 by 1 through routers. Information Units - How information is sent. • self-descriptive packet = data + header • header contains destination address
Telephone networks support a high end-to-end quality of service, but is expensive Internet supports no quality of service but is flexible and cheap Future networks will have to support a wide range of service qualities at a reasonable cost
1961: Kleinrock shows effectiveness of packet-switching 1964: Baran - packet-switching concept in military networks 1967: ARPAnet – by Advanced Research Projects Agency 1972: ARPAnet demonstrated publicly (15 nodes total) first transport. email, protocols 1970: ALOHAnet satellite network in Hawaii 1973: Metcalfe’s PhD thesis proposes Ethernet 1974: Cerf and Kahn - architecture for internetworking late70’s: proprietary architectures: DECnet, SNA, XNA 1982-5: TCP/IP, SMTP mail, DNS, FTP 1988: TCP congestion control 1991:ARPAnet commercialized: NSFnet , Internet 1989-93: WWW, browser, http, html, URL History LAN idea
Cerf and Kahn’s internetworking principles: • autonomy - no internal changes required to interconnect networks • best effort service model • stateless routers • decentralized control Defines today’s Internet architecture
Why do we need Protocols • Communication is between applications or other S/W entities • Its objective: enable cooperation on a common task • Need protocols to understand each other • Semantics: what I report/ want of you to do • Syntax/ format: how write/ read this info
Open/ Proprietary Protocols • Open protocol can be used by anyone • it is published by a standards organization or a public consortium • e.g. draft standard. standard • Proprietary protocol is owned by a company • may be used subject to company’s agreement
Why do we need Standards • Communication happens between entities • Hosts (personal computers, servers) • Routers • H/W entities produced by different vendors • S/W applications/ OS entities also • Need agreement to ensure correct, efficient and meaningful communication • this is called Interworking
Organizations that Issue Standards • IETF (Internet Engineering Task Force) • IEEE (Institute for Electrical and Electronic Engineers) • ITU (International Telecommunications Union) • ISO (International Organization for Standardization) • W3C (World Wide Web Consortium)
Why Layering • Communication is a very complex task • What we need is: communication btw applications at distant hosts • What is reasonably feasible in one piece is: the ability to transfer a series of bits over a link • We need to bridge between very sophisticated applications and very primitive physical layer • What is needed is to divide the task’s functionality into well chosen parts • each part should be reasonably ‘easy’ to do • they should work well together
How to do Layering • Define a conceptual Layering Model • means: what is the function of each layer • how they cooperate / use each other’s services • Set principles for proper usage of the model • Build protocols for each layer • protocol is between same layer entities @ distinct nodes • there may be several protocols in each layer providing different type service for the layer’s function • Define interfaces between layers • interface (here) is between distinct layer entities at same node (computing device)
Layering Principles Modularity • each layer works independently of the others • information exchange only according to Interfaces defined in the Model • analogous to the Object Oriented principle in S/W eng. • this means: • don’t change/peek into internal variables of other layers • modularity is bypassed very seldom • only when there is no other solution to a problem Transparency • layering should be invisible to user
Layering Benefits Layering enables: • discussion/understanding of the issues • enables clear visualizing of relationships btw. functions • it’s impossible to think about all layers @ once • efficient development of protocols • each layer has a different functional focus • no need to think other layers when designing it • easy replacement/maintenance of protocols • as long as modularity & interfaces are adhered to Layering is a good reference model for discussion
How do we Communicate? Hollywood, California Bob • Send a mail from Alice to Bob • Alice in Champaign, Bob in Hollywood • Example: • US Postal Service Champaign, Illinois Alice
What does Alice do? • Bob’s address (his mailbox) • Bob’s name – in case people share mailbox • Postage – have to pay! • Alice’s own name and address • in case Bob wants to return a message • In case the mail has to be returned. Alice 200 Cornfield Rd. Champaign, IL 61820 Bob 100 Santa Monica Blvd. Hollywood, CA 90028
What does Bob do? • Install a mailbox • Receive the mail • Get rid of envelope • Read the message Alice 200 Cornfield Rd. Champaign, IL 61820 Bob 100 Santa Monica Blvd. Hollywood, CA 90028
LayersPeer entities Champaign Hollywood Usergive parcel to P.O pick up parcel at P.O Post office (P.O)counter handlingput parcel in mailbox Ground transfer: on truck to airportfrom airport to dest. P.O Airport transfer: loading on airplane take off the airplane Airplane routing from source to destination each layer implements a service • via its own internal-layer actions • relying on services provided by layer below • Qn: Find scenarios justifying adding extra layers to the mail model. • Name the layers and specify their place in model
What Layers are Necessary? msg Application Application: I received your msg … I want you to do … NETWORK how to make sense? Host B Router Host A how to get it to B ? 1011001… Receiver Transmitter: Physical Layer
What Layers are Necessary? msg Application Application: I received your msg … I want you to do … NETWORK how to make sense? Host B Router Host A Frame Frame Link Layer Link L. how to get it to B ? 1011001… 1011001… Receiver Transmitter: Physical Layer
What Layers are Necessary? msg Application Application: I received your msg … I want you to do … too many pieces!! too many details !! NETWORK Net L. Net Layer Host B Router Host A … packet packet Frame Frame Link Layer Link L. 1011001… 1011001… 1011001… Receiver Transmitter: Physical Layer
What Layers are Necessary? msg Application Application: I received your msg … I want you to do … Transport Transport NETWORK Net L. Net Layer Net Layer Host B Router Host A … Frame Frame packet packet Link Layer Link L. 1011001… 1011001… 1011001… Receiver Transmitter: Physical Layer THE FIVE LAYER MODEL
Application Layer L5 • Tasks: • write messages serving needs of application • proper type of semantics (meaning, information) • appropriate syntax/format, so that semantics is understood • keep track of the interaction process / state machine • Focus: on needs of a specific application type • Data unit: Message • Peer: the Application Layer at destination host • Uses: the Transport Layer • Used by: the application itself • Run by: the application
Transport Layer L4 • Main Tasks: • prepare data for transfer • fragment data into proper size segments / reassemble at dest. • add header which enables delivery to the correct appl. process • optional: error- /flow- /congestion-control • Data Unit: Segment • Focus: on control of End-to-End data transfer • Peer: the Transport Layer at destination host • Uses: the Network Layer • Used by: the Application Layer • Run by: the OS of the host
Network Layer L3 • Main Tasks: • learn network topology in real time • prepare routing tables for fast usage in forwarding data • network layer (WAN) addressing • forward data from source to destination • Data Unit: Datagram / “packet” • Focus: on network and data fowarding • Peers: the Network Layer along the whole path • Uses: the Link Layer • Used by: the Transport Layer • Run by: the OS of the host, the router S/W
Link Layer L2 • Main Tasks: • insert delimiters so start/end of frame can be known • physical layer may transfer an endless stream of bits • this is part of the task of the Link header and Link trailer • in LAN, access control/ link layer addressing • Data Unit: Frame • Focus: data transfer over a link • Peer: Link Layer at the other end of the link • Uses: the Physical Layer • Used by: the Network Layer • Run by: the NIC (Network interface card, כרטיס רשת)
Physical Layer L1 • Main Tasks: • transmit signals that encode bits 1 and 0 • receive such signals and decode bits from them • synchronize the bit rate clocks of the peer nodes • Data Unit: Bit • Focus: bit transfer over a link • Peer: the Physical Layer @ other end of the link • Uses: the raw media: cable/ space • Used by: the Link Layer • Run by: transmitter/ receiver /wave propagation
Protocols • A protocol is a set of rules and formats that govern the communication between communicating peers • set of valid message formats - syntax • meaning of each message - semantics • Necessary for any function that requires cooperation between peers
Protocols • A protocol provides a service • For example: the post office “registered” protocol for reliable parcel transfer service • Peer entities use a protocol to provide a service to a higher-level peer entity • for example, truck drivers use a protocol to present post offices with the abstraction of an unreliable parcel transfer service • In the layering model: • each layer gives service to next higher layer
ISO OSI reference model • Reference model • formally defines what is meant by a layer, a service etc. • Service architecture • describes the services provided by each layer and the service access point • Protocol architecture • set of protocols that implement the service architecture • compliant service architectures may still use non-compliant protocol architectures
The seven/five Layers Application Application Presentation Presentation Session Session Transport Transport Network Network Network Data Link Data Link Data Link Physical Physical Physical There are only 5 (!!) in most architectures Application Transport Intermediate system End system End system
The seven Layers - protocol stack data Application Application AH data Presentation Presentation PH data Session Session SH data Transport Transport Network Network NH data Data Link Data Link Physical Physical TH data Network Data Link DH+data+DT Physical bits • Session and presentation layers are not so important, and are often ignored
Postal network • Application: people using the postal system • Session and presentation: chief clerk sends some priority mail, and some by regular mail ; translator translates letters going abroad. • Transport layer: mail clerk sends a message, retransmits if not acked • Network layer: postal system computes a route and forwards the letters • Datalink layer: letters loaded on planes, trains, trucks • Physical layer: the driver/pilot carrying letters in sack
Internet protocol stack application transport network link physical • application: supporting network applications • ftp, smtp, http • transport: host-host data transfer • tcp, udp • network: routing of datagrams from source to destination • ip, routing protocols • link: data transfer between neighboring network elements • ppp, ethernet, WiFi, token ring • physical: bits “on the wire” Network access
Encapsulation network link physical message segment packet frame Tl 1011……… Tl’ Tl Tl’ M M Ht Ht M M Hn Hn Hn Hn Ht Ht Ht Ht M M M M Hl’ Hl’ Hl Hl Hn Hn Hn Hn Ht Ht Ht Ht M M M M source host application transport network link physical datagram/ M – message Ht – transport header Hn – network header Hl – link header Tl – link trailer destination host application transport network link physical router
Service & protocol at layer k to layer k+1 Service received by layer k from layer k-1