1 / 28

Network layer functions

transport packet from sending to receiving hosts network layer protocols in every host, router three important functions: path determination: route taken by packets from source to dest. Routing algorithms switching: move packets from router’s input to appropriate router output

chimalsi
Download Presentation

Network layer functions

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. transport packet from sending to receiving hosts network layer protocols in every host, router three important functions: path determination: route taken by packets from source to dest. Routing algorithms switching: move packets from router’s input to appropriate router output call setup: some architectures require 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 ICSS420 - Network Layer

  2. Q: What service model for “channel” transporting packets from sender to receiver? guaranteed bandwidth? preservation of inter-packet timing (no jitter)? loss-free delivery? in-order delivery? congestion feedback to sender? Network service model The most important abstraction provided by network layer: ? ? virtual circuit or datagram? ? service abstraction ICSS420 - Network Layer

  3. call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host OD) every router on source-destination path maintain “state” for each passing connection transport-layer connection only involved two end systems link, router resources (bandwidth, buffers) may be allocated to VC to get circuit-like performance. “source-to-destination path behaves much like telephone circuit” performance-wise network actions along source-to-destination path Virtual circuits ICSS420 - Network Layer

  4. no call setup at network layer routers: no state about end-to-end connections no network-level concept of “connection” packets typically routed using destination host ID packets between same source-dest pair may take different paths application transport network data link physical application transport network data link physical Datagram networks: the Internet model 1. Send data 2. Receive data ICSS420 - Network Layer

  5. used to setup, maintain teardown VC used in ATM, frame-relay, X.25 not used in today’s Internet application transport network data link physical application transport network data link physical Virtual circuits: signaling protocols 6. Receive data 5. Data flow begins 4. Call connected 3. Accept call 1. Initiate call 2. incoming call ICSS420 - Network Layer

  6. Internet data exchange among computers “elastic” service, no strict timing req. “smart” end systems (computers) can adapt, perform control, error recovery simple inside network, complexity at “edge” many link types different characteristics uniform service difficult ATM evolved from telephony human conversation: strict timing, reliability requirements need for guaranteed service “dumb” end systems telephones complexity inside network Datagram or VC network: why? ICSS420 - Network Layer

  7. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links link cost: delay, $ cost, or congestion level 5 3 5 2 2 1 3 1 2 1 A D B E F C Routing protocol Routing Goal: determine “good” path (sequence of routers) thru network from source to dest. • “good” path: • typically means minimum cost path • other def’s possible ICSS420 - Network Layer

  8. Routing Algorithms • There are certain properties that are desirable in a routing algorithm: • correctness • simplicity • robustness • stability • fairness • optimality ICSS420 - Network Layer

  9. 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 Routing Algorithm classification ICSS420 - Network Layer

  10. 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 A Link-State Routing Algorithm ICSS420 - Network Layer

  11. Dijsktra’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 ICSS420 - Network Layer

  12. Example ICSS420 - Network Layer

  13. Flooding • Every incoming packet is sent out on every outgoing line except the one it arrived on • This algorithm generates vast numbers of duplicate packets but • it will always find the optimal path • it is very robust • Some technique has to be used from generating an infinite number of packets ICSS420 - Network Layer

  14. Selective Flooding • A simple variation to the flooding algorithm is to only send outgoing packets in the correct direction • Flooding, in any form, is usually not practical • It is useful in some cases • military applications • distributed database updates • can be used to generate a metric against which other routing algorithms can be compared ICSS420 - Network Layer

  15. Distance Vector Routing • Distance vector routing algorithms operate by having each router maintain a table giving the best known distance to each destination and which line to use to get there • The routing decision is simple • find the entry for the destination and send the packet out on the indicated line • The tricky part is building, and maintaining, the tables ICSS420 - Network Layer

  16. Table Maintenance • Each router is assumed to know • who its neighbors are • the cost to reach each neighbor • At regular intervals each router sends its routing table to each of its neighbors • When a table is received, a router • steps through the table and computes the cost to each destination • the new route is used if the cost is less ICSS420 - Network Layer

  17. 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 Distance Vector Routing: overview Each node: wait for (change in local link cost of message from neighbor) recompute distance table if least cost path to any destination has changed, notify neighbors ICSS420 - Network Layer

  18. Example A B 10 10 20 10 C D Routing Table for A ICSS420 - Network Layer

  19. Example A B 10 5 Routing Table for A 20 10 C D Routing Table for B ICSS420 - Network Layer

  20. Slow Convergence • Distance Vector Routing works in theory but as a serious drawback in practice • it converges to the correct answer, but it may take a long time to get there ICSS420 - Network Layer

  21. Count to Infinity • All lines up, and then line between A and B goes down Initial AB link down, B decides to route through C C realizes neighbors cost to A is 3 ICSS420 - Network Layer

  22. Split Horizon Hack • Many solutions to the count to infinity problem have been proposed • The split horizon algorithm works the same way as distance vector routing, except that the distance to X is not reported on the line that packets for X are sent on • Split horizon, although widely used, sometimes fails ICSS420 - Network Layer

  23. 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 Comparison of LS and DV algorithms ICSS420 - Network Layer

  24. scale: with 50 million destinations: can’t store all dest’s in routing tables! routing table exchange would swamp links! administrative autonomy internet = network of networks each network admin may want to control routing in its own network Hierarchical Routing Our routing study thus far - idealization • all routers identical • network “flat” … not true in practice ICSS420 - Network Layer

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

  26. c b b c a A.c A.a C.b B.a Intra-AS and Inter-AS routing • Gateways: • 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 ICSS420 - Network Layer

  27. Inter-AS routing between A and B b c a a C b B b c a d Host h1 A A.a A.c C.b B.a Intra-AS and Inter-AS routing Host h2 Intra-AS routing within AS B Intra-AS routing within AS A • We’ll examine specific inter-AS and intra-AS Internet routing protocols shortly ICSS420 - Network Layer

  28. 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 routing table The Internet Network layer Transport layer: TCP, UDP Network layer Link layer physical layer ICSS420 - Network Layer

More Related