1 / 37

Network Layer

Network Layer. —— the core of networking. mesh of interconnected routers the fundamental question: how is data transferred through net? circuit switching: dedicated circuit per call: telephone net packet-switching: data sent thru net in discrete “chunks”. The Network Core.

Download Presentation

Network Layer

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. Network Layer —— the core of networking

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

  3. 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 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

  4. End-end resources reserved for “call” link bandwidth, switch capacity dedicated resources: no sharing circuit-like (guaranteed) performance call setup required Network Core: Circuit Switching

  5. 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

  6. Goal: move data among routers from source to dest. Network core: routing datagram packet network: • destination address determines next hop • routes may change during session • analogy: driving, asking directions • No notion of call state virtual circuit network: • packet carries tag, tag determines next hop • fixed path (for call) determined at call setup time • routers maintain little per-call state; resources not allocated circuit-switched network: • call allocated time slots of bandwidth at each link • fixed path (for call) determined at call setup • switches maintain lots of per call state (what?): resource allocation

  7. “reliability” – no congestion, in order data in circuit-switching packet switching: better bandwidth use state, resources: packet switching has less state good: less control-plane processing resources along the way More dataplane (address lookup) processing failure modes (routers/links down): packet switching routing reconfigures sub-second timescale; circuit-switching: more complex recovery – need to involve all (downstream) switches on path Packet switching vs circuit switching: why?

  8. call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host ID) every router on source-dest path maintains “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-dest path behaves much like telephone circuit” performance-wise network actions along source-to-dest path Virtual circuits

  9. 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

  10. 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

  11. 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

  12. Datagram or VC network

  13. Store-and-Forward Packet Switching Routing: Store-and-Forward A host with a packet to send transmits it to the nearest router, either on its own LAN or over a point-to-point link to the carrier. The packet is stored there until it has fully arrived so the checksum can be verified. Then it is forwarded to the next router along the path until it reaches the destination host, where it is delivered.

  14. Router Architecture Overview Two key router functions: • run routing algorithms/protocol • forwarding datagrams from incoming to outgoing link

  15. Input Port Functions Decentralized switching: • given datagram dest., lookup output port using forwarding table in input port memory • goal: complete input port processing at ‘line speed’ • queuing: if datagrams arrive faster than forwarding rate into switch fabric Physical layer: bit-level reception Data link layer: e.g., Ethernet

  16. Three types of switching fabrics

  17. Memory Input Port Output Port System Bus Switching Via Memory First generation routers: • traditional computers with switching under direct control of CPU • packet copied to system’s memory • speed limited by memory bandwidth (2 bus crossings per datagram)

  18. Switching Via a Bus • datagram from input port memory to output port memory via a shared bus • bus contention: switching speed limited by bus bandwidth • 1 Gbps bus, Cisco 1900: sufficient speed for access and enterprise routers (not regional or backbone)

  19. Switching Via An Interconnection Network (CrossBar) • overcome bus bandwidth limitations • Banyan networks, other interconnection nets initially developed to connect processors in multiprocessor • Advanced design: fragmenting datagram into fixed length cells, switch cells through the fabric. • Cisco 12000: switches Gbps through the interconnection network

  20. Output Ports • Buffering required when datagrams arrive from fabric faster than the transmission rate • Scheduling discipline chooses among queued datagrams for transmission

  21. Output port queueing • buffering when arrival rate via switch exceeds output line speed • queueing (delay) and loss due to output port buffer overflow!

  22. Routing Algorithms • The main function of the network layer is routing packets from the source machine to the destination machine. • The routing algorithm is that part of the network layer software responsible for deciding which output line an incoming packet should be transmitted on. • If the subnet uses virtual circuits internally, routing decisions are made only when a new virtual circuit is being set up. • One can think of a router as having two processes inside it. • One of them handles each packet as it arrives, looking up the outgoing line to use for it in the routing tables. This process is forwarding. • The other process is responsible for filling in and updating the routing tables.

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

  24. Global: all routers have complete topology, link cost info “link state” algorithms: use Dijkstra’s algorithm to find shortest path from given router to all destinations Decentralized: router knows physically-connected neighbors, link costs to neighbors iterative process of computation, exchange of info with neighbors “distance vector” algorithms a ‘self-stabilizing algorithm’ (we’ll see these later) Routing: only two approaches used in practice

  25. Routing: Shortest Path Routing • This is a “Global” routing algorithm • The idea is to build a graph of the subnet, with each node of the graph representing a router and each arc of the graph representing a communication line (often called a link). • To choose a route between a given pair of routers, the algorithm just finds the shortest path between them on the graph.

  26. Routing: Shortest Path Routing (Cont’d) • Dijkstra's algorithm

  27. Routing: Distance Vector Routing • Distance vector routing algorithms operate by having each router maintain a table (i.e, a vector) giving the best known distance to each destination and which line to use to get there. • These tables are updated by exchanging information with the neighbors. • It was the original ARPANET routing algorithm and was also used in the Internet under the name RIP. • each router maintains a routing table indexed by, and containing one entry for, each router in the subnet. This entry contains two parts: the preferred outgoing line to use for that destination and an estimate of the time or distance to that destination. The metric used might be number of hops, time delay in milliseconds, total number of packets queued along the path, or something similar.

  28. Routing: Distance Vector Routing (Cont’d) • An example of Distance Vector Routing (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J. Question: How J computes its new route to router G?

  29. Routing: Distance Vector Routing (Cont’d) • The Count-to-Infinity Problem • In particular, it reacts rapidly to good news, but leisurely to bad news. (a) A gets Up (b) A turns Down

  30. scale: with 200 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 Routing: Hierarchical Routing Our routing review thus far - idealization • all routers identical • network “flat” … not true in practice

  31. 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 Routing: Hierarchical Routing (Cont’d)

  32. Routing: Hierarchical Routing (Cont’d) • An example of Hierarchical Routing (a) the Topology of network (b) the Full table of 1A (c) the Hierarchical table of 1A

  33. 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

  34. 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 Internet: BGP Host h2 Intra-AS routing within AS B Intra-AS routing within AS A Internet: OSPF, IS-IS, RIP

  35. Addressing • What’s an address? • identifier that differentiates between me and someone else, and also helps route data to/from me • Real world examples of addressing? • mailing address • office #, floor, etc • different “levels of addressing” • Phone#

  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 interface, not host, router 223.1.1.2 223.1.2.1 223.1.3.27 223.1.3.1 223.1.3.2 223.1.2.2 Addressing: network layer 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

  37. 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 IP Addressing 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.3.27 223.1.1.3 LAN 223.1.3.2 223.1.3.1 network consisting of 3 IP networks (for IP addresses starting with 223, first 24 bits are network address)

More Related