Presentation is loading. Please wait.

Presentation is loading. Please wait.

January 22, 2002CE80N -- Lecture #61 CE80N Introduction to Networks & The Internet Dr. Chane L. Fullmer UCSC Winter 2002.

Similar presentations


Presentation on theme: "January 22, 2002CE80N -- Lecture #61 CE80N Introduction to Networks & The Internet Dr. Chane L. Fullmer UCSC Winter 2002."— Presentation transcript:

1 January 22, 2002CE80N -- Lecture #61 CE80N Introduction to Networks & The Internet Dr. Chane L. Fullmer UCSC Winter 2002

2 January 22, 2002CE80N -- Lecture #62 Reading Chapter 15 – –IP: Software To Create A Virtual Network

3 January 22, 2002CE80N -- Lecture #63 Communication Protocol A common language computers use to exchange messages. –Specifying exact format and meaning of each message –Sending and receiving

4 January 22, 2002CE80N -- Lecture #64 What’s a protocol? human protocols: “what’s the time?” “I have a question” Introductions … specific msgs sent … specific actions taken when msgs received, or other events network protocols: machines rather than humans all communication activity in Internet governed by protocols

5 January 22, 2002CE80N -- Lecture #65 What’s a protocol? Q: Other human protocol? Hi Got the time? 2:00 TCP connection req. TCP connection reply. Get time Human ProtocolComputer Protocol

6 January 22, 2002CE80N -- Lecture #66 Protocol “Layers” Networks are complex! many “pieces”: –hosts –routers –links of various media –applications –protocols –hardware, software Question: Is there any hope of organizing structure of network? Or at least our discussion of networks?

7 January 22, 2002CE80N -- Lecture #67 Organization of air travel a series of steps Arrival at airport baggage (check) gates (load) runway takeoff airplane routing Departure from airport baggage (claim) gates (unload) runway landing airplane routing

8 January 22, 2002CE80N -- Lecture #68 Organization of air travel : a different view Layers: each layer implements a service –via its own internal-layer actions –relying on services provided by layer below Airport arrival baggage (check) gates (load) runway takeoff airplane routing Airport departure baggage (claim) gates (unload) runway landing airplane routing

9 January 22, 2002CE80N -- Lecture #69 Layered air travel: services Airport-to-Airport delivery of person+bags baggage-claim-to-baggage-claim delivery people transfer: loading gate to arrival gate runway-to-runway delivery of plane airplane routing from source to destination

10 January 22, Distributed implementation of layer functionality Arrival baggage (check) gates (load) runway takeoff airplane routing Departing airport Departure baggage (claim) gates (unload) runway landing airplane routing arriving airport airplane routing intermediate air traffic sites airplane routing

11 January 22, Distributed implementation of layer functionality gates (load) runway takeoff airplane routing Departing gates (unload) runway landing airplane routing arriving intermediate air traffic sites

12 January 22, 2002CE80N -- Lecture #612 Layering Model Purpose is to divide and conquer complex software and hardware needed to implement services Partition services and functions needed in system into layers Each layer of service is provided by peer protocol entities Extensibility (new protocols and services easily added) Communication can be point-to-point or multipoint Layer-N Protocol Entity Layer-N Protocol Entity Layer-(N - 1) Protocol Entity Layer-(N - 1) Protocol Entity (virtual communication) Layer N packets interface NODE A NODE B protocol

13 January 22, 2002CE80N -- Lecture #613 Why layering? Dealing with complex systems: explicit structure allows identification, relationship of complex system’s pieces –layered reference model for discussion modularization eases maintenance, updating of system –change of implementation of layer’s service transparent to rest of system –e.g., change in gate procedure doesn’t affect rest of system Is layering considered harmful?

14 January 22, 2002CE80N -- Lecture #614 Internet protocol stack 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

15 January 22, 2002CE80N -- Lecture #615 Layering: logical communication application transport network link physical application transport network link physical application transport network link physical application transport network link physical network link physical Each layer: distributed “entities” implement layer functions at each node entities perform actions, exchange messages with peers

16 January 22, 2002CE80N -- Lecture #616 Layering: logical communication application transport network link physical application transport network link physical application transport network link physical application transport network link physical network link physical data E.g.: transport take data from application add addressing, reliability check info to form “datagram” send datagram to peer wait for peer to ack receipt analogy: post office data transport ack

17 January 22, 2002CE80N -- Lecture #617 Layering: physical communication application transport network link physical application transport network link physical application transport network link physical application transport network link physical network link physical data

18 January 22, 2002CE80N -- Lecture #618 Protocol layering and data Each layer takes data from above adds header information to create new data unit passes new data unit to layer below application transport network link physical application transport network link physical source destination M M M M H t H t H n H t H n H l M M M M H t H t H n H t H n H l message segment datagram frame

19 January 22, 2002CE80N -- Lecture #619 PHYSICAL Open Systems Interconnect (OSI) Stack LINK End-user services (mail, file transfer) Formatting, encryption, compression of data Setup and management of end-to-end dialogue End-to-end delivery of messages to processes End-to-end transmission of packets in net Transmission of packets over a link Transmission of bit over physical media Web access TCP IP PPP, CSMA/CD SONET NETWORK TRANSPORT SESSION PRESENTATION APPLICATION Proposed by the International Standards Organization Specifies the functions at each layer, not the protocols that implement them

20 January 22, 2002CE80N -- Lecture #620 Open Systems Interconnect Source: Link 2 Semiconductor

21 January 22, 2002CE80N -- Lecture #621 Description of OSI layers –Application layer: The application layer provides services to a calling computer program. An application layer might take care of all the downloads involved in transferring a web page (that is, the text, graphics, and other files) to a browser (the client program or application). –Presentation layer: Takes care of any data format translations that might be needed to take the particular bits representing, for example, a number in the client computer and convert them to a "universal" number representation recognized by the communications system. –Session layer: This layer is responsible for controlling exchange of information, for example by having the client and server take turns transmitting data.

22 January 22, 2002CE80N -- Lecture #622 OSI Layers (continued) — Transport layer: The transport layer is responsible for getting messages from one computer to another. Network layer: The network layer is responsible for getting data across a communications network from one host computer to another. Data Link layer: The data link layer (often abbreviated to "link" layer or DLL) gets data from one network node (e.g. a computer or router) to another. Physical layer: The physical layer is the set of specifications that describe the actual medium of transmission. For example, a physical layer specification might include the type of connectors and wire to be used in a cable linking two machines, as well as the function of each wire and voltage levels that specify a "1" or "0", allowed rate of transmission, and so on.

23 January 22, 2002CE80N -- Lecture #623 Basic Functionality: Internet Protocol (IP) IP defines computer communication details. –Specifying how packets are formed –Specifying how routers forward each packet IP Forwarding Computers connecting to the Internet must follow the IP rules.

24 January 22, 2002CE80N -- Lecture #624 IP Software On Every Machine Computer hardware does not understand IP. –Connecting a computer to the Internet does not mean it can use the Internet Computers need IP software before using the Internet. –Windows –Unix –Mac OS

25 January 22, 2002CE80N -- Lecture #625 Internet Packets Are Called Datagrams IP Datagrams are packets that follow the IP specifications. –Traveling across the Internet independent of sender

26 January 22, 2002CE80N -- Lecture #626 The Illusion Of A Giant Network Any computer can send IP datagrams to any other computer providing they have IP software installed (Universal Service) The Internet operates like a virtual network.

27 The Virtual Network Figure 15.1 The view of the Internet that IP software provides. Users and application programs treat the Internet like a single large network that allow arbitrary numbers of computers to communicate.

28 January 22, 2002CE80N -- Lecture #628 The Reality Of Internal Structure The Internet contains a complex physical structure users never see –Interconnecting networks with routers

29 Internet Internal Structure Figure 15.2 A small example of the physical structure that remains hidden inside the Internet. Each computer attaches to a single network; routers interconnect the networks.

30 January 22, 2002CE80N -- Lecture #630 Datagrams Travel In Packets IP datagram defines a standard for all Internet packets. Routers: –Encloses the data before sending out the packet “Data Encapsulation”

31 January 22, 2002CE80N -- Lecture #631 IP datagram format ver length 32 bits data (variable length, typically a TCP or UDP segment) 16-bit identifier Internet checksum time to live 32 bit source IP address IP protocol version number header length (bytes) max number remaining hops (decremented at each router) for fragmentation/ reassembly total datagram length (bytes) upper layer protocol to deliver payload to head. len type of service “type” of data flgs fragment offset upper layer 32 bit destination IP address Options (if any) E.g. timestamp, record route taken, specify list of routers to visit.

32 January 22, 2002CE80N -- Lecture #632 Every Computer Is Assigned A Unique Address Each computer attached to the Internet must be assigned a unique address. –One computer must know the address of another before it can communicate

33 January 22, 2002CE80N -- Lecture #633 Internet Addresses The unique number assigned to a computer is its Internet (IP) address. Each computer (including routers) need to have an IP address.

34 January 22, 2002CE80N -- Lecture #634 An Odd IP Address Syntax Computer stores IP address in four binary units called bytes. “one twenty-eight dot one fourteen dot one dot zero”

35 January 22, 2002CE80N -- Lecture #635 IP Addresses Are Not Random IP addresses are not random. Computers on the same network have the same prefix.

36 January 22, 2002CE80N -- Lecture #636 IP Addressing: introduction 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 interface, not host, router =

37 January 22, 2002CE80N -- Lecture #637 IP Addressing IP address: –network part (high order bits) –host part (low order bits) What’s a network ? ( from IP address perspective) –device interfaces with same network part of IP address –can physically reach each other without intervening router network consisting of 3 IP networks (for IP addresses starting with 223, first 24 bits are network address) LAN

38 January 22, 2002CE80N -- Lecture #638 IP Addressing How to find the networks? Detach each interface from router, host create “islands of isolated networks Interconnected system consisting of six networks

39 January 22, 2002CE80N -- Lecture #639 IP Addresses 0 network host 10 network host 110 networkhost 1110 multicast address A B C D class to to to to bits given notion of “network”, let’s re-examine IP addresses: “class-full” addressing:

40 January 22, 2002CE80N -- Lecture #640 IP addressing: CIDR Classful addressing: –inefficient use of address space, address space exhaustion –e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network CIDR: Classless InterDomain Routing –network portion of address of arbitrary length –address format: a.b.c.d/x, where x is # bits in network portion of address network part host part /23

41 January 22, 2002CE80N -- Lecture #641 IP addresses: how to get one? Q: How does host get IP address? hard-coded by system admin in a file –Wintel: control-panel->network->config->tcp/ip->properties (reboot) –UNIX: /etc/rc.config DHCP: Dynamic Host Configuration Protocol: –dynamically get address: “plug-and-play” –host broadcasts “DHCP discover” msg –DHCP server responds with “DHCP offer” msg –host requests IP address: “DHCP request” msg –DHCP server sends address: “DHCP ack” msg

42 January 22, 2002CE80N -- Lecture #642 IP addresses: how to get one? Network (network portion): get allocated portion of ISP’s address space: ISP's block /20 Organization /23 Organization /23 Organization /23... ….. …. …. Organization /23

43 January 22, 2002CE80N -- Lecture #643 IP addressing: the last word... Q: How does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers –allocates addresses –manages DNS –assigns domain names, resolves disputes

44 January 22, 2002CE80N -- Lecture #644 Hierarchical addressing: route aggregation “Send me anything with addresses beginning /20” / / /23 Fly-By-Night-ISP Organization 0 Organization 7 Internet Organization 1 ISPs-R-Us “Send me anything with addresses beginning /16” /23 Organization Hierarchical addressing allows efficient advertisement of routing information:

45 January 22, 2002CE80N -- Lecture #645 Hierarchical addressing: more specific routes ISPs-R-Us has a more specific route to Organization 1 “Send me anything with addresses beginning /20” / / /23 Fly-By-Night-ISP Organization 0 Organization 7 Internet Organization 1 ISPs-R-Us “Send me anything with addresses beginning /16 or /23” /23 Organization

46 January 22, 2002CE80N -- Lecture #646 A Trip Through The Internet A router must choose between two paths that both lead to the destination. –Choosing the shortest path

47 January 22, 2002CE80N -- Lecture #647 Getting a datagram from source to dest. IP datagram: A B E misc fields source IP addr dest IP addr data datagram remains unchanged, as it travels source to destination addr fields of interest here Dest. Net. next router Nhops routing table in A

48 January 22, 2002CE80N -- Lecture #648 Getting a datagram from source to dest A B E Starting at A, given IP datagram addressed to B: look up net. address of B find B is on same net. as A link layer will send datagram directly to B inside link-layer frame –B and A are directly connected Dest. Net. next router Nhops misc fields data

49 January 22, 2002CE80N -- Lecture #649 Getting a datagram from source to dest A B E Dest. Net. next router Nhops Starting at A, dest. E: look up network address of E E on different network –A, E not directly attached routing table: next hop router to E is link layer sends datagram to router inside link- layer frame datagram arrives at continued….. misc fields data

50 January 22, 2002CE80N -- Lecture #650 Getting a datagram from source to dest A B E Arriving at , destined for look up network address of E E on same network as router’s interface –router, E directly attached link layer sends datagram to inside link-layer frame via interface datagram arrives at !!! (hooray!) misc fields data network router Nhops interface Dest. next

51 January 22, 2002CE80N -- Lecture #651 Routing Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links –link cost: delay, $ cost, or congestion level Goal: determine “good” path (sequence of routers) thru network from source to dest. Routing protocol A E D CB F “good” path: –typically means minimum cost path –other def’s possible

52 January 22, 2002CE80N -- Lecture #652 Animation of Routing Algorithms Dijkstra’s algorithm: a.html u.ac.jp/~ikeda/suuri/dijkstra/DijkstraApp.shtml?demo3 Distance Vector algorithm: mannheim.de/veranstaltungen/animation/routing/ripdv mrp/

53 January 22, 2002CE80N -- Lecture #653 Routing Algorithm classification Routing Algorithm classification Global or decentralized information? Global: all routers have complete topology, link cost info “link state” algorithms Decentralized: router knows physically- connected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors “distance vector” algorithms Static or dynamic? Static: routes change slowly over time Dynamic: routes change more quickly –periodic update –in response to link cost changes

54 January 22, 2002CE80N -- Lecture #654 A Link-State Routing Algorithm Dijkstra’s algorithm net topology, link costs known to all nodes –accomplished via “link state broadcast” –all nodes have same info computes least cost paths from one node (‘source”) to all other nodes –gives routing table for that node iterative: after k iterations, know least cost path to k dest.’s Notation: c(i,j): link cost from node i to j. cost infinite if not direct neighbors D(v): current value of cost of path from source to dest. V p(v): predecessor node along path from source to v, that is next v N: set of nodes whose least cost path definitively known

55 January 22, 2002CE80N -- Lecture #655 Dijkstra’s Algorithm 1 Initialization: 2 N = {A} 3 for all nodes v 4 if v adjacent to A 5 then D(v) = c(A,v) 6 else D(v) = infty 7 8 Loop 9 find w not in N such that D(w) is a minimum 10 add w to N 11 update D(v) for all v adjacent to w and not in N: 12 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N

56 January 22, 2002CE80N -- Lecture #656 Dijkstra’s algorithm: example Step start N A AD ADE ADEB ADEBC ADEBCF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity 4,E A E D CB F

57 January 22, 2002CE80N -- Lecture #657 Dijkstra’s algorithm, discussion Algorithm complexity: n nodes each iteration: need to check all nodes, w, not in N n*(n+1)/2 comparisons: O(n**2) more efficient implementations possible: O(nlogn) Oscillations possible: e.g., link cost = amount of carried traffic A D C B 1 1+e e 0 e A D C B 2+e e 1 A D C B 0 2+e 1+e A D C B 2+e 0 e 0 1+e 1 initially … recompute routing … recompute

58 January 22, 2002CE80N -- Lecture #658 Distance Vector Routing Algorithm iterative: continues until no nodes exchange info. self-terminating: no “signal” to stop asynchronous: nodes need not exchange info/iterate in lock step! distributed: each node communicates only with directly-attached neighbors Distance Table data structure each node has its own row for each possible destination column for each directly- attached neighbor to node example: in node X, for dest. Y via neighbor Z: D (Y,Z) X distance from X to Y, via Z as next hop c(X,Z) + min {D (Y,w)} Z w = =

59 January 22, 2002CE80N -- Lecture #659 Distance Table: example A E D CB D () A B C D A1764A1764 B D5542D5542 E cost to destination via destination D (C,D) E c(E,D) + min {D (C,w)} D w = = 2+2 = 4 D (A,D) E c(E,D) + min {D (A,w)} D w = = 2+3 = 5 D (A,B) E c(E,B) + min {D (A,w)} B w = = 8+6 = 14 loop!

60 January 22, 2002CE80N -- Lecture #660 Distance table gives routing table D () A B C D A1764A1764 B D5542D5542 E cost to destination via destination ABCD ABCD A,1 D,5 D,4 Outgoing link to use, cost destination Distance table Routing table

61 January 22, 2002CE80N -- Lecture #661 Distance Vector Routing: overview Iterative, asynchronous: Each local iteration caused by: –local link cost change –message from neighbor: its least cost path change from neighbor Distributed: each node notifies neighbors only when its least cost path to any destination changes –neighbors then notify their neighbors if necessary wait for (change in local link cost of msg from neighbor) recompute distance table if least cost path to any dest has changed, notify neighbors Each node:

62 January 22, 2002CE80N -- Lecture #662 Distance Vector Algorithm: 1 Initialization: 2 for all adjacent nodes v: 3 D (*,v) = infty /* the * operator means "for all rows" */ 4 D (v,v) = c(X,v) 5 for all destinations, y 6 send min D (y,w) to each neighbor /* w over all X's neighbors */ X X X w At all nodes, X:

63 CE80N -- Lecture #663 Distance Vector Algorithm (cont.): 8 loop 9 wait (until I see a link cost change to neighbor V 10 or until I receive update from neighbor V) if (c(X,V) changes by d) 13 /* change cost to all dest's via neighbor v by d */ 14 /* note: d could be positive or negative */ 15 for all destinations y: D X (y,V) = D X (y,V) + d else if (update received from V wrt destination Y) 18 /* shortest path from V to some Y has changed */ 19 /* V has sent a new value for its min w D V (Y,w) */ 20 /* call this received new value is "newval" */ 21 for the single destination y: D X (Y,V) = c(X,V) + newval if we have a new min w D X (Y,w)for any destination Y 24 send new value of min w D X (Y,w) to all neighbors forever

64 January 22, 2002CE80N -- Lecture #664 Comparison of LS and DV algorithms Message complexity LS: with n nodes, E links, O (nE) msgs sent each DV: exchange between neighbors only –convergence time varies Speed of Convergence LS: O(n 2 ) algorithm requires O(nE) msgs –may have oscillations DV: convergence time varies –may be routing loops –count-to-infinity problem Robustness: what happens if router malfunctions? LS: –node can advertise incorrect link cost –each node computes only its own table DV: –DV node can advertise incorrect path cost –each node’s table used by others error propagate thru network

65 January 22, 2002CE80N -- Lecture #665 ICMP: Internet Control Message Protocol 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 Type Code description 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

66 January 22, 2002CE80N -- Lecture #666 Summary Protocols and protocol stack –Internet stack, OSI stack IP addressing IP forwarding Routing –Link State –Distance Vector

67 January 22, 2002CE80N -- Lecture #667 Glossary Protocol – The rules two or more computers must follow to exchange messages Internet Protocol –(IP) Specification for the format of packets computers use when communicating across the Internet IP Datagram –A packet of data sent across the Internet

68 January 22, 2002CE80N -- Lecture #668 Glossary Virtual Network – Appearance of a single, seamless network system Internet Address –(IP Address) An unique number assigned to a computer attached to the Internet


Download ppt "January 22, 2002CE80N -- Lecture #61 CE80N Introduction to Networks & The Internet Dr. Chane L. Fullmer UCSC Winter 2002."

Similar presentations


Ads by Google