1 / 64

Networking Overview

Networking Overview. Introduction. a human protocol and a computer network protocol:. TCP connection response. Get http://www.awl.com/kurose-ross. Got the time?. 2:00. <file>. time. What’s a protocol?. Hi. TCP connection req. Hi. Q: Other human protocols?. end systems (hosts):

Télécharger la présentation

Networking Overview

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. Networking Overview Introduction

  2. Introduction Introduction

  3. a human protocol and a computer network protocol: TCP connection response Get http://www.awl.com/kurose-ross Got the time? 2:00 <file> time What’s a protocol? Hi TCP connection req Hi Q: Other human protocols? Introduction

  4. end systems (hosts): run application programs e.g. Web, email at “edge of network” client/server model client host requests, receives service from always-on server e.g. Web browser/server; email client/server peer-peer model: minimal (or no) use of dedicated servers e.g. Gnutella, KaZaA The network edge: Introduction

  5. mesh of interconnected routers the fundamental question: how is data transferred through net? circuit switching: dedicated circuit per call (telephone call) packet-switching: data sent thru net in discrete “chunks” (internet) The Network Core Introduction

  6. each end-end data stream divided into packets user A, B packets share network resources each packet uses full link bandwidth resources used as needed Bandwidth division into “pieces” Dedicated allocation Resource reservation Network Core: Packet Switching resource contention: • aggregate resource demand can exceed amount available • congestion: packets queue, wait for link use • store and forward: packets move one hop at a time • transmit over link • wait turn at next link Introduction

  7. 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 physical: bits “on the wire” application transport network link physical Internet protocol stack Introduction

  8. network link physical application transport network link physical application transport network link physical application transport network link physical application transport network link physical data data Layering: physical communication Introduction

  9. Application Layer Introduction

  10. Process: program running within a host. within same host, two processes communicate using interprocess communication (defined by OS) processes running in different hosts communicate with an application-layer protocol user agent: interfaces with user “above” and network “below”. implements user interface & application-level protocol Web: browser E-mail: mail reader streaming audio/video: media player Network applications: some jargon Introduction

  11. Application: communicating, distributed processes e.g., e-mail, Web, P2P file sharing, instant messaging running in end systems (hosts) exchange messages to implement application Application-layer protocols one “piece” of an app define messages exchanged by apps and actions taken use communication services provided by lower layer protocols (TCP, UDP) For example, SMTP application transport network data link physical application transport network data link physical application transport network data link physical Applications and application-layer protocols Introduction

  12. Typical network app has two pieces: client and server request reply application transport network data link physical application transport network data link physical Client-server paradigm(“usual” approach) Client: • initiates contact with server (“speaks first”) • typically requests service from server, • Web: client implemented in browser; e-mail: in mail reader Server: • provides requested service to client • e.g., Web server sends requested Web page, mail server delivers e-mail Hosts: both clients and servers Introduction

  13. For a process to receive messages, it must have an identifier Every host has a unique 32-bit IP address Q: does the IP address of the host on which the process runs suffice for identifying the process? A: No, many processes can be running on same host Identifier includes both the IP address and port numbers associated with the process on the host. “Well-known” port number examples: HTTP server: 80 Mail server: 25 More on this later Addressing processes: Introduction

  14. TCP service: connection-oriented: setup required between client and server processes reliable transport between sending and receiving process flow control:sender won’t overwhelm receiver congestion control: throttle sender when network overloaded full duplex:simultaneous 2-way communication does not provide: timing, minimum bandwidth guarantees UDP service: unreliable data transfer between sending and receiving process does not provide: connection setup, reliability, flow control, congestion control, timing, or bandwidth guarantee Q: Why is there a UDP? Internet transport protocols services Introduction

  15. HTTP: HyperText Transfer Protocol Web’s application layer protocol client/server model client: browser that requests, receives, “displays” Web objects server: Web server sends objects in response to requests HTTP 1.0: RFC 1945 HTTP 1.1: RFC 2068 (backward compatible) HTTP overview HTTP request PC running Navigator HTTP response HTTP request Server running Apache Web server HTTP response Mac running Explorer Introduction

  16. client server usual http request msg usual http response + Set-cookie: 1678 Cookie file Cookie file Cookie file amazon: 1678 ebay: 8734 amazon: 1678 ebay: 8734 ebay: 8734 cookie- specific action usual http request msg cookie: 1678 usual http request msg cookie: 1678 usual http response msg usual http response msg cookie- spectific action Cookies: keeping “state” server creates ID 1678 for user entry in backend database access access one week later: Introduction

  17. What cookies can bring: authorization shopping carts recommendations user session state (Web e-mail) Cookies (continued) aside Cookies and privacy: • cookies permit sites to learn a lot about you • you may supply name and e-mail to sites • search engines use redirection & cookies to learn yet more • advertising companies obtain info across sites Introduction

  18. SMTP: delivery/storage to receiver’s server Mail access protocol: retrieval from server POP: Post Office Protocol [RFC 1939] authorization (agent <-->server) and download IMAP: Internet Mail Access Protocol [RFC 1730] more features (more complex) manipulation of stored msgs on server HTTP: Hotmail , Yahoo! Mail, etc. user agent user agent sender’s mail server SMTP Mail access protocols SMTP access protocol receiver’s mail server Introduction

  19. Sample SMTP interaction S: 220 hamburger.edu C: HELO ca.gov S: 250 Hello ca.gov, pleased to meet you C: MAIL FROM: <arnold@ca.gov> S: 250 arnold@ca.gov... Sender ok C: RCPT TO: <mstamp1@earthlink.net> S: 250 mstamp1@earthlink.net ... Recipient ok C: DATA S: 354 Enter mail, end with "." on a line by itself C: It is my pleasure to inform you that C: you are terminated C: . S: 250 Message accepted for delivery C: QUIT S: 221 hamburger.edu closing connection Introduction

  20. People: many identifiers: SSN, name, passport # Internet hosts, routers: IP address (32 bit) - used for addressing datagrams “name”, e.g., gaia.cs.umass.edu - used by humans Q: map between IP addresses and name ? Domain Name System: distributed database implemented in hierarchy of many name servers application-layer protocol host, routers, name servers to communicate to resolvenames (address/name translation) note: core Internet function, implemented as application-layer protocol complexity at network’s “edge” DNS: Domain Name System Introduction

  21. contacted by local name server that can not resolve name root name server: contacts authoritative name server if name mapping not known gets mapping returns mapping to local name server a NSI Herndon, VA c PSInet Herndon, VA d U Maryland College Park, MD g DISA Vienna, VA h ARL Aberdeen, MD j NSI (TBD) Herndon, VA k RIPE London i NORDUnet Stockholm m WIDE Tokyo e NASA Mt View, CA f Internet Software C. Palo Alto, CA b USC-ISI Marina del Rey, CA l ICANN Marina del Rey, CA DNS: Root name servers 13 root name servers worldwide Introduction

  22. Example Alice runs P2P client application on her notebook computer Intermittently connects to Internet; gets new IP address for each connection Asks for “Hey Jude” Application displays other peers that have copy of Hey Jude. Alice chooses one of the peers, Bob. File is copied from Bob’s PC to Alice’s notebook: HTTP While Alice downloads, other users uploading from Alice. Alice’s peer is both a Web client and a transient Web server. All peers are servers = highly scalable! P2P file sharing Introduction

  23. Bob centralized directory server 1 peers 1 3 1 2 1 Alice P2P: centralized directory original “Napster” design 1) when peer connects, it informs central server: • IP address • content 2) Alice queries for “Hey Jude” 3) Alice requests file from Bob Introduction

  24. P2P: decentralized directory Each peer is either a group leader or assigned to a group leader. • Group leader tracks the content in all its children. • Peer queries group leader; group leader may query other group leaders. • KaZaA uses this idea Introduction

  25. Gnutella no hierarchy use bootstrap node to learn about others join message Send query to neighbors Neighbors forward query If queried peer has object, it sends message back to querying peer join P2P: Query flooding Gnutella network visualization: http://www.ececs.uc.edu/~mjovanov/Research/gnutella.html Introduction

  26. Transport Layer Introduction

  27. reliable, in-order delivery (TCP) congestion control flow control connection setup unreliable, unordered delivery: UDP no-frills extension of “best-effort” IP services not available: delay guarantees bandwidth guarantees application transport network data link physical application transport network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical logical end-end transport Internet transport-layer protocols Introduction

  28. full duplex data bi-directional data flow in same connection MSS: maximum segment size connection-oriented handshaking (exchange of control msgs) init’s sender, receiver state before data exchange flow control sender will not overwhelm receiver congestion control network will not be overwhelmed (fairness) point-to-point one sender, one receiver reliable, in-order byte steam no “message boundaries” pipelined TCP congestion and flow control set window size send & receive buffers TCP: OverviewRFCs: 793, 1122, 1323, 2018, 2581 Introduction

  29. Server must maintain state… SYNACK Get http://www.awl.com/kurose-ross <file> time TCP 3-way handshake SYN Introduction

  30. Network Layer Introduction

  31. transport packet from sending to receiving hosts network layer protocols in everyhost and router three important functions: path determination: route taken by packets from source to dest. routing algorithms forwarding: move packets from router’s input to appropriate router output call setup: some network architectures require router call setup along path before data flows network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical application transport network data link physical application transport network data link physical Network layer functions Introduction

  32. no call setup at network layer routers: no state about end-to-end connections no network-level concept of “connection” packets forwarded using destination host address Packets in same “transmission” may take different paths best effort application transport network data link physical application transport network data link physical Datagram networks: the Internet model 1. Send data 2. Receive data Introduction

  33. aggregate routers into regions, “autonomous systems” (AS) routers in same AS run same routing protocol “intra-AS” routing protocol routers in different AS can run different intra-AS routing protocol special routers in AS run intra-AS routing protocol with all other routers in AS also responsible for routing to destinations outside AS run inter-AS routing protocol with other gateway routers gateway routers Hierarchical Routing Introduction

  34. c b b a c C.b B.a A.a A.c Intra-AS and Inter-AS routing • Gateway routers • perform inter-AS routing amongst themselves • perform intra-AS routers with other routers in their AS b a a C B d A network layer inter-AS, intra-AS routing in gateway A.c link layer physical layer Introduction

  35. Host, router network layer functions: • ICMP protocol • error reporting • router “signaling” • IP protocol • addressing conventions • datagram format • packet handling conventions • Routing protocols • path selection • RIP, OSPF, BGP forwarding table The Internet Network layer Transport layer: TCP, UDP Network layer Link layer physical layer Introduction

  36. IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link router’s typically have multiple interfaces host may have multiple interfaces IP addresses associated with each interface 223.1.1.2 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 IP Addressing: introduction 223.1.1.1 223.1.2.9 223.1.1.4 223.1.1.3 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1 Introduction

  37. E A B 223.1.1.1 223.1.2.1 223.1.1.2 223.1.2.9 223.1.1.4 223.1.2.2 223.1.1.3 223.1.3.27 Dest. Net. next router Nhops 223.1.1 1 223.1.3.2 223.1.3.1 223.1.2 223.1.1.4 2 223.1.3 223.1.1.4 2 Getting a datagram from source to dest. forwarding table in A misc fields data 223.1.1.1 223.1.2.2 Starting at A, dest. E: • look up network address of E in forwarding table • E on different network • A, E not directly attached • routing table: next hop router to E is 223.1.1.4 • link layer sends datagram to router 223.1.1.4 inside link-layer frame • datagram arrives at 223.1.1.4 • continued….. Introduction

  38. Dest. Net router Nhops interface E B A 223.1.1 - 1 223.1.1.4 223.1.2 - 1 223.1.2.9 223.1.3 - 1 223.1.3.27 223.1.1.1 223.1.2.1 223.1.1.2 223.1.2.9 223.1.1.4 223.1.2.2 223.1.1.3 223.1.3.27 223.1.3.2 223.1.3.1 Getting a datagram from source to dest. forwarding table in router misc fields data 223.1.1.1 223.1.2.2 Arriving at 223.1.1.4, destined for 223.1.2.2 • look up network address of E in router’s forwarding table • E on same network as router’s interface 223.1.2.9 • router, E directly attached • link layer sends datagram to 223.1.2.2 inside link-layer frame via interface 223.1.2.9 • datagram arrives at 223.1.2.2 Introduction

  39. network links have MTU (max.transfer size) - largest possible link-level frame. different link types, different MTUs large IP datagram divided (“fragmented”) within net one datagram becomes several datagrams “reassembled” only at final destination IP header bits used to identify, order related fragments IP Fragmentation & Reassembly fragmentation: in: one large datagram out: 3 smaller datagrams reassembly Introduction

  40. length =1500 length =1500 length =4000 length =1040 ID =x ID =x ID =x ID =x fragflag =1 fragflag =1 fragflag =0 fragflag =0 offset =1480 offset =2960 offset =0 offset =0 One large datagram becomes several smaller datagrams IP Fragmentation and Reassembly Example • 4000 byte datagram • MTU = 1500 bytes Introduction

  41. used by hosts, routers, gateways to communication network-level information error reporting: unreachable host, network, port, protocol echo request/reply (used by ping) network-layer “above” IP: ICMP msgs carried in IP datagrams ICMP message: type, code plus first 8 bytes of IP datagram causing error ICMP: Internet Control Message Protocol TypeCodedescription 0 0 echo reply (ping) 3 0 dest. network unreachable 3 1 dest host unreachable 3 2 dest protocol unreachable 3 3 dest port unreachable 3 6 dest network unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 10 0 router discovery 11 0 TTL expired 12 0 bad IP header Introduction

  42. DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 DHCP client-server scenario arriving client DHCP server: 223.1.2.5 DHCP offer src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 Lifetime: 3600 secs DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs time DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs Introduction

  43. NAT: Network Address Translation rest of Internet local network (e.g., home network) 10.0.0/24 10.0.0.1 10.0.0.4 10.0.0.2 138.76.29.7 10.0.0.3 Datagrams with source or destination in this network have 10.0.0/24 address for source, destination (as usual) All datagrams leaving local network have same single source NAT IP address: 138.76.29.7, different source port numbers Introduction

  44. Intra-AS Routing • Also known as Interior Gateway Protocols (IGP) • Most common Intra-AS routing protocols: • RIP: Routing Information Protocol • OSPF: Open Shortest Path First • IGRP: Interior Gateway Routing Protocol (Cisco proprietary) Introduction

  45. Inter-AS routing in the Internet: BGP Introduction

  46. Why different Intra- and Inter-AS routing ? Policy: • Inter-AS: admin wants control over how its traffic routed, who routes through its net. • Intra-AS: single admin, so no policy decisions needed Scale: • Hierarchical routing saves table size, reduced update traffic Performance: • Intra-AS: can focus on performance • Inter-AS: policy may dominate over performance Introduction

  47. Link Layer Introduction

  48. Some terminology: hosts and routers are nodes (bridges and switches too) communication channels that connect adjacent nodes along communication path are links wired links wireless links LANs 2-PDU is a frame,encapsulates datagram “link” Link Layer: Introduction data-link layer has responsibility of transferring datagram from one node to adjacent node over a link Introduction

  49. link layer implemented in “adaptor” (aka NIC) Ethernet card, PCMCI card, 802.11 card sending side: encapsulates datagram in a frame adds error checking bits, rdt, flow control, etc. receiving side looks for errors, rdt, flow control, etc extracts datagram, passes to rcving node adapter is semi-autonomous link & physical layers frame frame Adaptors Communicating datagram rcving node link layer protocol sending node adapter adapter Introduction

  50. Multiple Access protocols • single shared broadcast channel • two or more simultaneous transmissions by nodes: interference • only one node can send successfully at a time multiple access protocol • distributed algorithm that determines how nodes share channel, i.e., determine when node can transmit • communication about channel sharing must use channel itself (in-band signalling) Introduction

More Related