93
Network Layer 4-1 Chapter 4: network layer chapter goals: understand principles behind network layer services: network layer service models forwarding versus routing how a router works routing (path selection) broadcast, multicast instantiation, implementation in the Internet

network layer ppt

  • Upload
    prachi

  • View
    226

  • Download
    6

Embed Size (px)

DESCRIPTION

computer network

Citation preview

  • Network Layer4-*Chapter 4: network layerchapter goals: understand principles behind network layer services:network layer service modelsforwarding versus routinghow a router worksrouting (path selection)broadcast, multicastinstantiation, implementation in the Internet

    Network Layer

  • Network Layer4-*4.1 introduction4.2 virtual circuit and datagram networks4.3 whats inside a router4.4 IP: Internet Protocoldatagram formatIPv4 addressingICMPIPv64.5 routing algorithmslink statedistance vectorhierarchical routing4.6 broadcast and multicast routing

    Chapter 4: outline

    Network Layer

  • Network Layer4-*Network layerTaskRoutingAddressingCongestion control

    Network Layer

  • Network Layer4-*Network layertransport segment from sending to receiving host on sending side encapsulates segments into datagramson receiving side, delivers segments to transport layernetwork layer protocols in every host, routerrouter examines header fields in all IP datagrams passing through it

    Network Layer

  • Network Layer4-*Two key network-layer functionsforwarding: move packets from routers input to appropriate router outputrouting: determine route taken by packets from source to dest. routing algorithms

    analogy:routing: process of planning trip from source to destforwarding: process of getting through single interchange

    Network Layer

  • Network Layer4-*Interplay between routing and forwarding

    Network Layer

  • Network Layer4-*4.1 introduction4.2 virtual circuit and datagram networks4.3 whats inside a router4.4 IP: Internet Protocoldatagram formatIPv4 addressingICMPIPv64.5 routing algorithmslink statedistance vectorhierarchical routing4.6 routing in the InternetRIPOSPFBGP4.7 broadcast and multicast routing

    Chapter 4: outline

    Network Layer

  • Network Layer4-*Connection, connection-less servicedatagram network provides network-layer connectionless servicevirtual-circuit network provides network-layer connection serviceanalogous to TCP/UDP connecton-oriented / connectionless transport-layer services, but:service: host-to-hostno choice: network provides one or the otherimplementation: in network core

    Network Layer

  • Network Layer4-*Virtual circuitscall setup, teardown for each call before data can floweach packet carries VC identifier (not destination host address)every router on source-dest path maintains state for each passing connectionlink, router resources (bandwidth, buffers) may be allocated to VC (dedicated resources = predictable service)

    source-to-dest path behaves much like telephone circuitperformance-wisenetwork actions along source-to-dest path

    Network Layer

  • Network Layer4-*VC implementationa VC consists of:path from source to destinationVC numbers, one number for each link along pathentries in forwarding tables in routers along pathpacket belonging to VC carries VC number (rather than dest address)VC number can be changed on each link.new VC number comes from forwarding table

    Network Layer

  • Network Layer4-*VC forwarding table122232123VC numberinterfacenumberIncoming interface Incoming VC # Outgoing interface Outgoing VC #1 12 3 222 63 1 18 3 7 2 171 97 3 87 forwarding table innorthwest router:VC routers maintain connection state information!

    Network Layer

  • Network Layer4-*Virtual circuits: signaling protocolsused to setup, maintain teardown VCused in ATM, frame-relay, X.25not used in todays Internet1. initiate call2. incoming call3. accept call4. call connected5. data flow begins6. receive data

    Network Layer

  • Network Layer4-*Datagram networksno call setup at network layerrouters: no state about end-to-end connectionsno network-level concept of connectionpackets forwarded using destination host address1. send datagrams2. receive datagrams

    Network Layer

  • Network Layer4-*Datagram forwarding tableIP destination address in arriving packets headerrouting algorithmlocal forwarding tabledest addressoutput linkaddress-range 1address-range 2address-range 3address-range 43221

    Network Layer

  • Network Layer4-*Destination Address Range

    11001000 00010111 00010000 00000000through 11001000 00010111 00010111 11111111

    11001000 00010111 00011000 00000000through11001000 00010111 00011000 11111111

    11001000 00010111 00011001 00000000through11001000 00010111 00011111 11111111

    otherwiseLink Interface

    0

    1

    2

    3

    Q: but what happens if ranges dont divide up so nicely? Datagram forwarding table

    Network Layer

  • Network Layer4-*Longest prefix matchingDestination Address Range 11001000 00010111 00010*** ********* 11001000 00010111 00011000 *********11001000 00010111 00011*** *********otherwise DA: 11001000 00010111 00011000 10101010 examples:DA: 11001000 00010111 00010110 10100001 which interface?which interface?when looking for forwarding table entry for given destination address, use longest address prefix that matches destination address.longest prefix matchingLink interface0123

    Network Layer

  • Network Layer4-*4.1 introduction4.2 virtual circuit and datagram networks4.3 whats inside a router4.4 IP: Internet Protocoldatagram formatIPv4 addressingICMPIPv64.5 routing algorithmslink statedistance vectorhierarchical routing4.6 broadcast and multicast routing

    Chapter 4: outline

    Network Layer

  • Network Layer4-*Router architecture overviewtwo key router functions: run routing algorithms/protocol (RIP, OSPF, BGP)forwarding datagrams from incoming to outgoing linkrouting processorrouter input portsrouter output portsforwarding data plane (hardware)routing, managementcontrol plane (software)forwarding tables computed,pushed to input ports

    Network Layer

  • Network Layer4-*lineterminationlink layer protocol(receive)lookup,forwarding

    queueingInput port functionsdecentralized switching: given datagram dest., lookup output port using forwarding table in input port memory (match plus action)goal: complete input port processing at line speedqueuing: if datagrams arrive faster than forwarding rate into switch fabricphysical layer:bit-level receptiondata link layer:e.g., Ethernet

    switchfabric

    Network Layer

  • Network Layer4-*Switching fabricstransfer packet from input buffer to appropriate output bufferswitching rate: rate at which packets can be transfer from inputs to outputsoften measured as multiple of input/output line rateN inputs: switching rate N times line rate desirablethree types of switching fabricsmemorymemorybuscrossbar

    Network Layer

  • Network Layer4-*Switching via memoryfirst generation routers:traditional computers with switching under direct control of CPUpacket copied to systems memory speed limited by memory bandwidth (2 bus crossings per datagram)

    Network Layer

  • Network Layer4-*Switching via a busdatagram from input port memory to output port memory via a shared busbus contention: switching speed limited by bus bandwidth

    bus

    Network Layer

  • Network Layer4-*Switching via interconnection networkovercome bus bandwidth limitationscrossbar, other interconnection nets initially developed to connect processors in multiprocessoradvanced design: fragmenting datagram into fixed length cells, switch cells through the fabric.

    Network Layer

  • Network Layer4-*Output portsbuffering required when datagrams arrive from fabric faster than the transmission ratescheduling discipline chooses among queued datagrams for transmissionlineterminationlink layer protocol(send)switchfabricDatagram (packets) can be lost due to congestion, lack of buffersPriority scheduling who gets best performance, network neutrality

    Network Layer

  • Network Layer4-*4.1 introduction4.2 virtual circuit and datagram networks4.3 whats inside a router4.4 IP: Internet Protocoldatagram formatIPv4 addressingICMPIPv64.5 routing algorithmslink statedistance vectorhierarchical routing4.6 routing in the InternetRIPOSPFBGP4.7 broadcast and multicast routing

    Chapter 4: outline

    Network Layer

  • Network Layer4-*The Internet network layerhost, router network layer functions:routing protocols path selection RIP, OSPF, BGPICMP protocol error reporting router signalingtransport layer: TCP, UDPlink layerphysical layernetworklayer

    Network Layer

  • Network Layer4-*IP datagram formathow much overhead?20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead

    Network Layer

  • Network Layer4-*IP fragmentation, reassemblynetwork links have MTU (max.transfer size) - largest possible link-level framedifferent link types, different MTUs large IP datagram divided (fragmented) within netone datagram becomes several datagramsreassembled only at final destinationIP header bits used to identify, order related fragmentsfragmentation: in: one large datagramout: 3 smaller datagrams

    Network Layer

  • Network Layer4-*example:4000 byte datagramMTU = 1500 bytes

    1480 bytes in data fieldoffset =1480/8 IP fragmentation, reassembly

    Network Layer

  • Network Layer4-*4.1 introduction4.2 virtual circuit and datagram networks4.3 whats inside a router4.4 IP: Internet Protocoldatagram formatIPv4 addressingICMPIPv64.5 routing algorithmslink statedistance vectorhierarchical routing4.6 routing in the InternetRIPOSPFBGP4.7 broadcast and multicast routing

    Chapter 4: outline

    Network Layer

  • Network Layer4-*IP addressing: introductionIP address: 32-bit identifier for host, router interface interface: connection between host/router and physical linkrouters typically have multiple interfaceshost typically has one or two interfaces (e.g., wired Ethernet, wireless 802.11)IP addresses associated with each interface223.1.1.1223.1.1.3223.1.1.4223.1.2.9223.1.2.2223.1.2.1223.1.3.2223.1.3.1223.1.1.1 = 11011111 00000001 00000001 00000001223111

    Network Layer

  • Network Layer4-*IP addressing: introductionQ: how are interfaces actually connected?A: well learn about that in chapter 5, 6.223.1.1.1223.1.1.3223.1.1.4223.1.2.9223.1.2.2223.1.2.1223.1.3.2223.1.3.1For now: dont need to worry about how one interface is connected to another (with no intervening router)

    Network Layer

  • Network Layer4-*SubnetsIP address: subnet part - high order bitshost part - low order bits whats a subnet ?device interfaces with same subnet part of IP addresscan physically reach each other without intervening routernetwork consisting of 3 subnets223.1.1.1223.1.1.3223.1.1.4223.1.2.9223.1.3.2223.1.3.1223.1.1.2223.1.3.27223.1.2.2223.1.2.1

    Network Layer

  • Network Layer4-*

    recipeto determine the subnets, detach each interface from its host or router, creating islands of isolated networkseach isolated network is called a subnetsubnet mask: /24Subnets

    Network Layer

  • Network Layer4-*how many?223.1.1.1223.1.1.3223.1.1.4223.1.2.2223.1.2.1223.1.2.6223.1.3.2223.1.3.1223.1.3.27223.1.1.2223.1.7.0223.1.7.1223.1.8.0223.1.8.1223.1.9.1223.1.9.2Subnets

    Network Layer

  • Network Layer4-*IP addresses: how to get one?Q: How does a host get IP address?

    DHCP: Dynamic Host Configuration Protocol: dynamically get address from as server

    Network Layer

  • Network Layer4-*DHCP: Dynamic Host Configuration Protocolgoal: allow host to dynamically obtain its IP address from network server when it joins networkcan renew its lease on address in useallows reuse of addresses (only hold address while connected/on)support for mobile users who want to join network (more shortly)DHCP overview:host broadcasts DHCP discover msg [optional]DHCP server responds with DHCP offer msg [optional]host requests IP address: DHCP request msgDHCP server sends address: DHCP ack msg

    Network Layer

  • Network Layer4-*DHCP client-server scenario 223.1.1.0/24223.1.2.0/24223.1.3.0/24223.1.1.1223.1.1.3223.1.1.4223.1.2.9223.1.3.2223.1.3.1223.1.1.2223.1.3.27223.1.2.2223.1.2.1DHCPserverarriving DHCPclient needs address in thisnetwork

    Network Layer

  • Network Layer4-*DHCP server: 223.1.2.5arriving clientDHCP client-server scenario

    Network Layer

  • Network Layer4-*DHCP: more than IP addressesDHCP can return more than just allocated IP address on subnet:address of first-hop router for clientname and IP address of DNS severnetwork mask (indicating network versus host portion of address)

    Network Layer

  • Network Layer4-*connecting laptop needs its IP address, addr of first-hop router, addr of DNS server: use DHCProuter with DHCP server built into routerDHCP request encapsulated in UDP, encapsulated in IP, encapsulated in 802.1 Ethernet

    Ethernet frame broadcast (dest: FFFFFFFFFFFF) on LAN, received at router running DHCP serverEthernet demuxed to IP demuxed, UDP demuxed to DHCP 168.1.1.1

    DHCP: example

    Network Layer

  • Network Layer4-*DCP server formulates DHCP ACK containing clients IP address, IP address of first-hop router for client, name & IP address of DNS server

    encapsulation of DHCP server, frame forwarded to client, demuxing up to DHCP at clientDHCP: examplerouter with DHCP server built into routerclient now knows its IP address, name and IP address of DSN server, IP address of its first-hop router

    Network Layer

  • Network Layer4-*NAT: network address translation10.0.0.110.0.0.210.0.0.310.0.0.4138.76.29.7local network(e.g., home network)10.0.0/24rest ofInternetdatagrams with source or destination in this networkhave 10.0.0/24 address for source, destination (as usual)all datagrams leaving localnetwork have same single source NAT IP address: 138.76.29.7,different source port numbers

    Network Layer

  • Network Layer4-*motivation: local network uses just one IP address as far as outside world is concerned:range of addresses not needed from ISP: just one IP address for all devicescan change addresses of devices in local network without notifying outside worldcan change ISP without changing addresses of devices in local networkdevices inside local net not explicitly addressable, visible by outside world (a security plus)

    NAT: network address translation

    Network Layer

  • Network Layer4-* implementation: NAT router must: outgoing datagrams: replace (source IP address, port #) of every outgoing datagram to (NAT IP address, new port #). . . remote clients/servers will respond using (NAT IP address, new port #) as destination addr remember (in NAT translation table) every (source IP address, port #) to (NAT IP address, new port #) translation pair incoming datagrams: replace (NAT IP address, new port #) in dest fields of every incoming datagram with corresponding (source IP address, port #) stored in NAT table

    NAT: network address translation

    Network Layer

  • Network Layer4-*10.0.0.110.0.0.210.0.0.310.0.0.4138.76.29.7NAT translation tableWAN side addr LAN side addr138.76.29.7, 5001 10.0.0.1, 3345 3: reply arrives dest. address: 138.76.29.7, 50014: NAT routerchanges datagramdest addr from138.76.29.7, 5001 to 10.0.0.1, 3345

    NAT: network address translation

    Network Layer

  • Network Layer4-*16-bit port-number field: 60,000 simultaneous connections with a single LAN-side address!NAT is controversial:routers should only process up to layer 3violates end-to-end argumentNAT possibility must be taken into account by app designers, e.g., P2P applicationsaddress shortage should instead be solved by IPv6

    NAT: network address translation

    Network Layer

  • Network Layer4-*4.1 introduction4.2 virtual circuit and datagram networks4.3 whats inside a router4.4 IP: Internet Protocoldatagram formatIPv4 addressingICMPIPv64.5 routing algorithmslink statedistance vectorhierarchical routing4.6 routing in the InternetRIPOSPFBGP4.7 broadcast and multicast routing

    Chapter 4: outline

    Network Layer

  • Network Layer4-*ICMP: internet control message protocolIp provides unreliable and connectionless dattagram delivery.Have best effort delivery services that take a datagram from its source to destination.Drawbacks- No error control mechanism No assistance mechanismICMP overcome these drawbacks and reports presence of errors and sends the control messages.

    Network Layer

  • Network Layer4-*ICMP: internet control message protocolType of Messages-Error reporting messagesDestination unreachableSource quenchTime exceededParameter problemredirectionQuery messagesEcho request and replyTime stamp request and replyAddress mask and reply

    Network Layer

  • Network Layer4-*ICMP: internet control message protocolError report messagesDestination unreachable- when a router cannot forward or deliver an IP packet , it sends a dest. Unreachable ICMP msg back to the source.Source quench- A host or router to tell the original source that congestion has occurred and to request it to reduce its current fate of packet transmission.Redirection message- router or host wants to send a packet to another network then it should know the ip address of the next router.

    Network Layer

  • Network Layer4-*ICMP: internet control message protocolQuery

    Echo req and reply- it determines whether two systems can successfully communicate with each other.Time stamp req and reply- used by host or router to find out the round trip time for IP datagramAlso used for the synchronization of clock signalsAddress mask req and reply- to find out the address mask .

    Network Layer

  • Network Layer4-*ICMP: internet control message protocolused by hosts & routers to communicate network-level informationerror reporting: unreachable host, network, port, protocolecho request/reply (used by ping)network-layer above IP:ICMP msgs carried in IP datagramsICMP message: type, code plus first 8 bytes of IP datagram causing errorType Code description0 0 echo reply (ping)3 0 dest. network unreachable3 1 dest host unreachable3 2 dest protocol unreachable3 3 dest port unreachable3 6 dest network unknown3 7 dest host unknown4 0 source quench (congestion control - not used)8 0 echo request (ping)9 0 route advertisement10 0 router discovery11 0 TTL expired12 0 bad IP header

    Network Layer

  • Network Layer4-*Traceroute and ICMPsource sends series of UDP segments to destfirst set has TTL =1second set has TTL=2, etc.unlikely port numberwhen nth set of datagrams arrives to nth router:router discards datagramsand sends source ICMP messages (type 11, code 0)ICMP messages includes name of router & IP addresswhen ICMP messages arrives, source records RTTsstopping criteria:UDP segment eventually arrives at destination hostdestination returns ICMP port unreachable message (type 3, code 3)source stops3 probes3 probes3 probes

    Network Layer

  • Network Layer4-*IPv6: motivationIPv6 address is 128 bit long initial motivation: 32-bit address space soon to be completely allocated. additional motivation:header format helps speed processing/forwardingheader changes to facilitate QoS

    IPv6 datagram format: fixed-length 40 byte headerno fragmentation allowed

    Network Layer

  • Network Layer4-*IPv6 datagram formatpriority: identify priority among datagrams in flowflow Label: identify datagrams in same flow. next header: identify upper layer protocol for data datadestination address(128 bits)source address(128 bits)payload lennext hdrhop limitflow labelpriver32 bits

    Network Layer

  • Network Layer4-*Other changes from IPv4Payload length: total length of the IP datad\gram excluding the base headerchecksum: removed entirely to reduce processing time at each hopHope limit: like TTLICMPv6: new version of ICMPadditional message types, e.g. Packet Too Bigmulticast group management functions

    Network Layer

  • Network Layer4-*Transition from IPv4 to IPv6not all routers can be upgraded simultaneouslyno flag dayshow will network operate with mixed IPv4 and IPv6 routers? tunneling: IPv6 datagram carried as payload in IPv4 datagram among IPv4 routersIPv4 source, dest addr IPv4 header fields IPv4 datagramIPv6 datagram

    Network Layer

  • Network Layer4-*Tunnelingphysical view:IPv4IPv4CD

    Network Layer

  • Network Layer4-*physical view:CDTunnelingIPv4IPv4

    Network Layer

  • ARPNetwork Layer4-*

    Network Layer

  • ARPHtype- defines the type of network on which ARP is being runPtype- define the protocol using ARP.Eg. IPv4Hlen-Plen- define the length ip Address length in bytes.Oper- define the type of packet either req or reply. Network Layer4-*

    Network Layer

  • Network Layer4-*4.1 introduction4.2 virtual circuit and datagram networks4.3 whats inside a router4.4 IP: Internet Protocoldatagram formatIPv4 addressingICMPIPv64.5 routing algorithmslink statedistance vectorhierarchical routing4.6 routing in the InternetRIPOSPFBGP4.7 broadcast and multicast routing

    Chapter 4: outline

    Network Layer

  • Network Layer4-*IP destination address in arriving packets headerrouting algorithmlocal forwarding tabledest addressoutput linkaddress-range 1address-range 2address-range 3address-range 43221Interplay between routing, forwarding

    Network Layer

  • Network Layer4-*graph: G = (N,E)

    N = set of routers = { u, v, w, x, y, z }

    E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }Graph abstractionaside: graph abstraction is useful in other network contexts, e.g., P2P, where N is set of peers and E is set of TCP connections

    Network Layer

  • Network Layer4-*Graph abstraction: costsc(x,x) = cost of link (x,x) e.g., c(w,z) = 5

    cost could always be 1, or inversely related to bandwidth,or inversely related to congestioncost of path (x1, x2, x3,, xp) = c(x1,x2) + c(x2,x3) + + c(xp-1,xp) key question: what is the least-cost path between u and z ?routing algorithm: algorithm that finds that least cost path

    Network Layer

  • Network Layer4-*Routing algorithm classificationQ: global or decentralized information?global:all routers have complete topology, link cost infolink state algorithmsdecentralized: router knows physically-connected neighbors, link costs to neighborsiterative process of computation, exchange of info with neighborsdistance vector algorithmsQ: static or dynamic?static: routes change slowly over timedynamic: routes change more quicklyperiodic updatein response to link cost changes

    Network Layer

  • Network Layer4-*4.1 introduction4.2 virtual circuit and datagram networks4.3 whats inside a router4.4 IP: Internet Protocoldatagram formatIPv4 addressingICMPIPv64.5 routing algorithmslink statedistance vectorhierarchical routing4.6 routing in the InternetRIPOSPFBGP4.7 broadcast and multicast routing

    Chapter 4: outline

    Network Layer

  • Network Layer4-*A Link-State Routing AlgorithmDijkstras algorithmnet topology, link costs known to all nodesaccomplished via link state broadcast all nodes have same infocomputes least cost paths from one node (source) to all other nodesgives forwarding table for that nodeiterative: after k iterations, know least cost path to k dest.snotation:c(x,y): link cost from node x to y; = if not direct neighborsD(v): current value of cost of path from source to dest. vp(v): predecessor node along path from source to vN': set of nodes whose least cost path definitively known

    Network Layer

  • Network Layer4-*Dijsktras Algorithm1 Initialization: 2 N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = 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'

    Network Layer

  • Network Layer4-*Dijkstras algorithm: exampleStep

    N'D(v)p(v)012345D(w)p(w)D(x)p(x)D(y)p(y)D(z)p(z)uuwuwxuwxvuwxvy12,y notes:construct shortest path tree by tracing predecessor nodesties can exist (can be broken arbitrarily)uwxvyz

    Network Layer

  • Network Layer4-*Dijkstras algorithm: another exampleStep012345N'uuxuxyuxyvuxyvwuxyvwzD(v),p(v)2,u2,u2,uD(w),p(w)5,u4,x3,y3,yD(x),p(x)1,uD(y),p(y)2,xD(z),p(z) 4,y4,y4,y

    Network Layer

  • Network Layer4-*Dijkstras algorithm: example (2) resulting shortest-path tree from u:resulting forwarding table in u:

    Network Layer

  • Dijkstras algorithm, discussionalgorithm complexity: n nodeseach iteration: need to check all nodes, w, not in Nn(n+1)/2 comparisons: O(n2)1

  • Network Layer4-*4.1 introduction4.2 virtual circuit and datagram networks4.3 whats inside a router4.4 IP: Internet Protocoldatagram formatIPv4 addressingICMPIPv64.5 routing algorithmslink statedistance vectorhierarchical routing4.6 broadcast and multicast routing

    Chapter 4: outline

    Network Layer

  • Network Layer4-*Distance vector algorithm Bellman-Ford equation (dynamic programming)

    let dx(y) := cost of least-cost path from x to ythen dx(y) = min {c(x,v) + dv(y) }

    vcost to neighbor vmin taken over all neighbors v of xcost from neighbor v to destination y

    Network Layer

  • Network Layer4-*Bellman-Ford example clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3du(z) = min { c(u,v) + dv(z), c(u,x) + dx(z), c(u,w) + dw(z) } = min {2 + 5, 1 + 3, 5 + 3} = 4node achieving minimum is nexthop in shortest path, used in forwarding tableB-F equation says:

    Network Layer

  • Network Layer4-*Distance vector algorithm Dx(y) = estimate of least cost from x to yx maintains distance vector Dx = [Dx(y): y N ]node x:knows cost to each neighbor v: c(x,v)maintains its neighbors distance vectors. For each neighbor v, x maintains Dv = [Dv(y): y N ]

    Network Layer

  • Network Layer4-*key idea: from time-to-time, each node sends its own distance vector estimate to neighborswhen x receives new DV estimate from neighbor, it updates its own DV using B-F equation:Dx(y) minv{c(x,v) + Dv(y)} for each node y Nunder minor, natural conditions, the estimate Dx(y) converge to the actual least cost dx(y) Distance vector algorithm

    Network Layer

  • Network Layer4-*iterative, asynchronous: each local iteration caused by: local link cost change DV update message from neighbordistributed:each node notifies neighbors only when its DV changesneighbors then notify their neighbors if necessary

    wait for (change in local link cost or msg from neighbor)

    recompute estimates

    if DV to any dest has changed, notify neighbors

    each node:Distance vector algorithm

    Network Layer

  • Network Layer4-*x y zxyz0 2 7fromcost tofromfromx y zxyz0x y zxyzcost tox y zxyz710cost to2 0 1 2 0 17 1 0timenode xtableDx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 , 7+0} = 332 node ytablenode ztablecost tofrom

    Network Layer

  • Network Layer4-*x y zxyz0 2 3fromcost tox y zxyz0 2 7fromcost tox y zxyz0 2 3fromcost tox y zxyz0 2 3fromcost tox y zxyz0 2 7fromcost to2 0 17 1 02 0 13 1 02 0 13 1 02 0 13 1 02 0 13 1 0timex y zxyz0 2 7fromcost tofromfromx y zxyz0x y zxyzcost tox y zxyz710cost to2 0 1 2 0 17 1 0timenode xtableDx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 , 7+0} = 332 node ytablenode ztablecost tofrom

    Network Layer

  • Network Layer4-*Distance vector: link cost changeslink cost changes:node detects local link cost change bad news travels slow - count to infinity problem!44 iterations before algorithm stabilizes:poisoned reverse: If Z routes through Y to get to X :Z tells Y its (Zs) distance to X is infinite (so Y wont route to X via Z)will this completely solve count to infinity problem?

    Network Layer

  • Network Layer4-*4.1 introduction4.2 virtual circuit and datagram networks4.3 whats inside a router4.4 IP: Internet Protocoldatagram formatIPv4 addressingICMPIPv64.5 routing algorithmslink statedistance vectorhierarchical routing4.6 broadcast and multicast routing

    Chapter 4: outline

    Network Layer

  • Network Layer4-*Hierarchical routingNetwork size increase- routing tables of the routers also increasesSo more CPU time, more bandwidth required to send status report.Network large so routing tables becomes excessively large , not possible for router to have an entry for all other routers.Than Hierarchical routing used....Large network devide in hierarchyLevel 1: RegionsLevel 2: Clusters- group of regionsLevel 3: Zones- group of clustersLevel 4: Groups- contains many zones

    Network Layer

  • Network Layer4-*Hierarchical routingscale: with 600 million destinations:cant store all dests in routing tables!routing table exchange would swamp links!

    administrative autonomyinternet = network of networkseach network admin may want to control routing in its own networkour routing study thus far - idealization all routers identicalnetwork flat not true in practice

    Network Layer

  • Network Layer4-*aggregate routers into regions, autonomous systems (AS)routers in same AS run same routing protocolintra-AS routing protocolrouters in different AS can run different intra-AS routing protocolHierarchical routing

    Network Layer

  • Network Layer4-*Interconnected ASesforwarding table configured by both intra- and inter-AS routing algorithmintra-AS sets entries for internal destsinter-AS & intra-AS sets entries for external dests

    Network Layer

  • Network Layer4-*Inter-AS taskssuppose router in AS1 receives datagram destined outside of AS1:router should forward packet to gateway router, but which one?AS1 must:learn which dests are reachable through AS2, which through AS3propagate this reachability info to all routers in AS1job of inter-AS routing!AS3AS2othernetworksothernetworks

    Network Layer

  • Network Layer4-*Example: setting forwarding table in router 1dsuppose AS1 learns (via inter-AS protocol) that subnet x reachable via AS3 (gateway 1c), but not via AS2inter-AS protocol propagates reachability info to all internal routersrouter 1d determines from intra-AS routing info that its interface I is on the least cost path to 1cinstalls forwarding table entry (x,I)AS3AS2othernetworksothernetworksx

    Network Layer

  • Network Layer4-*Example: choosing among multiple ASesnow suppose AS1 learns from inter-AS protocol that subnet x is reachable from AS3 and from AS2.to configure forwarding table, router 1d must determine which gateway it should forward packets towards for dest x this is also job of inter-AS routing protocol!

    AS3AS2othernetworksothernetworksx?

    Network Layer

  • Network Layer4-*4.1 introduction4.2 virtual circuit and datagram networks4.3 whats inside a router4.4 IP: Internet Protocoldatagram formatIPv4 addressingICMPIPv64.5 routing algorithmslink statedistance vectorhierarchical routing4.6 broadcast and multicast routing

    Chapter 4: outline

    Network Layer

  • Network Layer4-*Broadcast routingdeliver packets from source to all other nodessource duplication is inefficient:source duplication: how does source determine recipient addresses?

    Network Layer

    ****