1 CSCD 330 Network Programming Winter 2016 Lecture 13 Network Layer Reading: Chapter 4 Some slides provided courtesy of J.F Kurose and K.W. Ross, All Rights.

Slides:



Advertisements
Similar presentations
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Advertisements

IP Forwarding Relates to Lab 3.
Delivery and Forwarding of
What's inside a router? We have yet to consider the switching function of a router - the actual transfer of datagrams from a router's incoming links to.
4-1 Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving side, delivers.
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 14.
10 - Network Layer. Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into datagrams r on rcving.
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m network layer service models m forwarding.
EE 122: Router Design Kevin Lai September 25, 2002.
Network Layer4-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 15.
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
Router Architectures An overview of router architectures.
4: Network Layer4b-1 Router Architecture Overview Two key router functions: r run routing algorithms/protocol (RIP, OSPF, BGP) r switching datagrams from.
Chapter 4 Queuing, Datagrams, and Addressing
Computer Networks Switching Professor Hui Zhang
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All material copyright
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
CS 1652 The slides are adapted from the publisher’s material All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Jack Lange.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 18 Omar Meqdadi Department of Computer Science and Software Engineering University.
Network Layer4-1 Chapter 4: Network Layer Chapter goals: r understand principles behind network layer services: m network layer service models m forwarding.
Virtual Circuit Network. Network Layer 2 Network layer r transport segment from sending to receiving host r network layer protocols in every host, router.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 Network Layer introduction.
1 John Magee 24 February 2014 CS 280: Network Layer: Virtual Circuits / Datagram Networks and What’s inside a Router? Most slides adapted from Kurose and.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Router Architecture Overview
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Chapter 6 Delivery and Forwarding of IP Packets
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
Forwarding.
Network Layer4-1 Chapter 4 Network Layer All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A note on the use of these.
@Yuan Xue A special acknowledge goes to J.F Kurose and K.W. Ross Some of the slides used in this lecture are adapted from their.
Network layer (addendum) Slides adapted from material by Nick McKeown and Kevin Lai.
Graciela Perera Department of Computer Science and Information Systems Slide 1 of 18 INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723 Graciela.
INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723
Chapter 3 Part 3 Switching and Bridging
Chapter 4 Network Layer All material copyright
Packet Switching Outline Store-and-Forward Switches
IP Forwarding Covers the principles of end-to-end datagram delivery in IP networks.
Chapter 6 Delivery & Forwarding of IP Packets
Addressing: Router Design
CS4470 Computer Networking Protocols
EEC-484/584 Computer Networks
Chapter 4: Network Layer
Chapter 3 Part 3 Switching and Bridging
CS 1652 The slides are adapted from the publisher’s material
Chapter 4-1 Network layer
IP Forwarding Relates to Lab 3.
IP Forwarding Relates to Lab 3.
What’s “Inside” a Router?
IP Forwarding Relates to Lab 3.
EEC-484/584 Computer Networks
IP Forwarding Relates to Lab 3.
Network Layer I have learned from life no matter how far you go
October 26th, 2010 CS1652/Telcom2310 Jack Lange
EEC-484/584 Computer Networks
EE 122: Lecture 7 Ion Stoica September 18, 2001.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
CSCD 330 Network Programming Winter 2019 Lecture 13 Network Layer
Chapter 3 Part 3 Switching and Bridging
Delivery, Forwarding, and Routing of IP Packets
IP Forwarding Relates to Lab 3.
Networking and Network Protocols (Part2)
IP Forwarding Relates to Lab 3.
Chapter 4: Network Layer
Presentation transcript:

1 CSCD 330 Network Programming Winter 2016 Lecture 13 Network Layer Reading: Chapter 4 Some slides provided courtesy of J.F Kurose and K.W. Ross, All Rights Reserved, copyright Network Superhighway

2 Introduction So far, have looked at Application Layer Transport Layer Now, move down protocol stack to Network Layer What services are offered? How does this layer fit with other layers? Hardware is used at this layer?

3 Network Layer Goals Understand principles behind network layer Network layer service models Forwarding versus routing, difference How a router works - Internally Routing itself Addresses, paths, algorithms

TCP/IP Model 4 We are Here Network Data Link Transport Appliction

5 Routing in the Internet

6 Hierarchical Routing - Solution Internet is huge, distributed system managed by mostly private, possibly competing corporations Each corporate entity is responsible for their own routing within their IP space So, they aggregate routers into regions... Autonomous systems (AS) Routers in same AS run same routing protocol

7 Autonomous System (AS)‏ What is an Autonomous System? Within Internet, an AS is Unit of router policy, either single network or group of networks controlled by common network administrator On behalf of single administrative entity An autonomous system is assigned globally unique number, sometimes called an Autonomous System Number (ASN) Report of current numbers

Routing Within and Between AS's AS 123 AS 45 AS 678

Autonomous Systems Example AS’s AS # Provider 701 UUnet (U.S. ) (AS )‏ 1239 Sprintlink U.S. Domestic 3356 Level AT&T WorldNet 209 Qwest 3935 Eastern Washington University.. 9

Autonomous Systems Have Routing policy for each AS Can decide what routing algorithms to use Typical to have different routing algorithms Interior to the AS Interior Gateway Protocols (IGP's)‏ Exterior networks between AS's Exterior Gateway Protocols (EGP's)‏

11 Network Layer Diagram shows at end points entire protocol stack implemented Need transport and applications layers for processes Routers only need layers up through network layer Data Link Network 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 network data link physical network data link physical network data link physical network data link physical network data link physical network data link physical Diagram of Differences Network vs. Transport

12 Two Key Network-Layer Functions Forwarding Move packets from router’s input queues to router's output queues Movement contained within one router Routing Determine routing for packets from source to destination Routing algorithms important in efficiently routing packets Movement of packets is distributed

Routing vs. Forwarding Analogy You take a road trip across country, go through many highway interchanges Routing: Process of planning trip from source to destination Forwarding: Process of getting through single interchange

How Routing Works … Every router has Forwarding Table Also called a Routing Table Router forwards packets by examining value in arriving packet header – Destination IP Address Uses value to index into router’s forwarding table See following slide … 14

value in arriving packet’s header routing algorithm local forwarding table header value output link Interplay between Routing and Forwarding All routers have routing tables Specify next hop in route Create Routing Table Built by routing algorithms

16 IP Datagram Delivery IP View at Data link Layer Internetwork collection of LANs or point-to-point links or switched networks that are connected by routers Ted Ed

17 IP Datagram Delivery IP View at IP Layer An IP network is a logical entity with a network number We represent an IP network as a “cloud” The IP delivery service takes the view of clouds, and ignores data link layer view

18 Routing tables Each router keeps a routing table which tells the router how to process an outgoing packet Main columns –Destination address: Where is IP datagram going to? –Next hop: How to send the IP datagram? –Interface: What is the output port? Routing tables help datagrams gets closer to its destination Routing table unique for each router direct direct R4 direct R4 R4 Next Hop eth0 serial0 eth1 eth0 eth0 interface / / / / / /28 Destination IP datagrams can be directly delivered (“direct”) to connected networks or sent to another router (“R4”)‏ Routing Table Example

19 Delivery with routing tables to:

Two Service Models at Network Layer What services could network layer provide? Guarantee delivery, Guarantee bandwidth, Order packets, Time delay guarantee … Given what you know of the Network layer, are any of these services implemented? No! Decided that network only does best effort delivery!! 20

Two Service Models at Network Layers Recall, we discussed Circuit Switched Network and Datagram Network However, you can try to emulate these services in network layer virtually Datagram service is what we typically have 1.Datagram service – best effort, no previous connection setup Virtual service model lets you obtain services other than best effort 2. Virtual Service – tries to compensate for lack of guaranteed service, sets up connections ahead of time Examples: ATM, Asynchronous Transfer Mode 21

22 Datagram Service Connectionless Unacknowledged Network Service Attitude to packets Characterized by “Send and forget!” Does not guarantee actual delivery Does not guarantee data is undamaged Does not guarantee data delivered in order Does not guarantee that only one copy of the data will be delivered

23 Virtual Service Call setup, teardown for each call before data can flow Each packet carries Virtual Circuit (VC) identifier, VC25, VC601 – Not same as destination host address‏ Every router on source-destination path maintains “state” for each passing connection Sets Up... Source-to-destination path ahead of time Uses that route to send all packets Behaves much like telephone circuit

Virtual Service Book discusses mechanics of a generic virtual service, Section 4.2 Have virtual identifiers instead of IP addresses Can run a virtual service over the Internet Routers must recognize the virtual identifiers Two Examples: ATM and MPLS Asynchronous Transfer Mode Multiprotocol Label Switching

25 Datagram Networks Basics 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 between same source-dest pair may take different paths application transport network data link physical application transport network data link physical 1. Send data 2. Receive data

Datagram Networks No advance setup of paths, link to link connections Need a global number recognized by all network components, hosts and routers How would you set up routing tables in order to accommodate … currently, over 4 billion entries? Question: Whats the best way to do this? 26

Routing Table Organization One dumb idea, global table 4 billion entries 2 32 But … didn't do that IP addresses assigned contiguous address blocks So, can use a matching algorithm and match the network prefix to route packets Have distributed address space More on addressing later... 27

Routers 28

Routers Internals Routers are the “glue” that holds the Internet together Router speeds greatly affect how well traffic gets moved around the network Performance of routers turns out to be critical Today, look at evolution of routers and the speedups that have occurred

Routers Commercial Realities A router is sold as one big box Cisco, Juniper, Redback, Avici, … No standard interfaces between components Cisco switch, Juniper cards, and Avici software Vendors vs. Service providers Vendors: Build the routers and obey standards Providers: Buy the routers and configure them EWU is a provider

31 Routing Architectures Routing Processor Switching Fabric A Router Consists of Ports Connections to wires to other network entities Switching fabric A “network” inside the router that transfers packets between ports Routing processor: Brain of the router...Maintains lookup tables ports

32 Router Architecture Overview Routers do two important things Builds and Maintains Routing Tables Performs Packet Switching and Updating Several input ports Several output ports

33 Input Port Functions Input Port Function: Given datagram destination lookup output port using forwarding table in input port memory Physical layer: bit-level reception Data link layer: Ethernet Process packet up to network layer

34 Input Port Functions Needs to perform lookup at line speed Gbps in most networks Example: OC-48 link – runs at 2.5 Gbps (OC) Optical Carrier – SONET fiber optic network, different sizes If packets are 256 bytes – small packet Must lookup speeds of 1 Million lookups/sec Binary search typically done to speed things up And other methods... more later

35 Switching Fabrics Switching fabric is heart of a router Through switching that datagrams are actually moved from an input port to an output port Switching can be accomplished in a number of ways...

36 Three types of switching fabrics

37 First Generation Switching Via Memory First generation routers Traditional computers with switching under direct control of CPU, act as router Packet copied to system’s memory Speed limited by memory bandwidth 2 bus crossings per datagram, looks like shared memory multi-processors Input Port Output Port Memory System Bus CISCO Catalyst 8500's

38 Route Table CPU Buffer Memory Line Interface MAC Line Interface MAC Line Interface MAC Typically <0.5Gb/s aggregate capacity Shared Bus Line Interface CPU Memory First Generation Routers Off-chip Buffer

39 First Generation Switching via Memory Comment Modern routers also switch via memory Difference from early routers Address lookup and packet switching in memory Performed by processors on input line cards Greatly speeds things up !!!!

40 2 nd Generation Switching Via a Bus Use shared bus No intervention by routing processor Since bus is shared Only one packet at a time can be transferred over bus Because every packet must cross single bus, switching bandwidth of router limited to bus speed Bus contention: Switching speed limited by bus bandwidth, one packet at a time Another speedup have buffer memory on the input cards! Example: 1 Gbps bus, Cisco 1900: OK speed for access and enterprise routers (not regional or backbone)‏

41 Route Table CPU Line Card Buffer Memory Line Card MAC Buffer Memory Line Card MAC Buffer Memory Fwding Cache Fwding Cache Fwding Cache MAC Buffer Memory Typically <5Gb/s aggregate capacity Second Generation Routers Shared bus Buffer Memory

42 Third Generation Crossbar Switch A crossbar switch is a matrix of switches between inputs and outputs Overcomes bandwidth limitation of single, shared bus More sophisticated interconnection network Used in past to interconnect processors in multiprocessor computer architectures

43 Crossbar Switch Improvements C rossbar switch enables high performance for two reasons: First, connections from line cards to central switch are now simple point-to-point links Operate at very high speed. Semiconductor companies have developed chip-to-chip serial links operating at over 1 Gbps Second, can support multiple bus transactions simultaneously This greatly increases aggregate bandwidth of the system

44 Crossbar Switch How it works Consists of 2N buses Connect - N Input ports to N Output ports Packet arrives at input port travels along horizontal bus attached to input port until it intersects with vertical bus leading to desired output port Key idea – parallel processing of packets If vertical bus leading to output port is free Packet is transferred to output port Else If vertical bus being used to transfer packet from another input port to same output port, Arriving packet is blocked and must be queued at the input port … More on queuing later … Paper on routers:

45 Third Generation Routers Line Card MAC Local Buffer Memory CPU Card Line Card MAC Local Buffer Memory “Crossbar”: Switched Backplane Line Interface CPU Memory Fwding Table Routing Table Fwding Table Typically <50Gb/s aggregate capacity

46 Output Ports Output port processing Datagrams then stored in output port's memory, transmits them over outgoing link Queuing and buffer management needed when switch fabric delivers packets to output port at a rate that exceeds output link rate Cover output port queuing below

47 Output Ports Buffering required when datagrams arrive from fabric faster than transmission rate Scheduling algorithm chooses among queued datagrams for transmission Can be simple FIFO or some fairness algorithm based on destination packet distribution encapsulation Here is where many packets get dropped

Where Does Packet Queue Occur? Consider That... Packet queues can form at both input ports and output ports As queues grow large, router's buffer space will eventually be exhausted Packet loss will occur!!!

Input and Output Queues Question of Speeds Suppose that input line speeds and output line speeds are all identical, With n input ports and n output ports If switching fabric speed is at least n times as fast as the input line speed, Will queues form at input ports? NO.

Input and Output Queues What about output ports? Worst case, packets arrive at each n input ports will be destined to same output port In time it takes to receive (or send) a packet, n packets will arrive at this output port Since output port can only transmit a single packet in a unit of time (the packet transmission time), n arriving packets will have to queue (wait) for transmission over the outgoing link

Input and Output Queues If switch fabric is not fast enough to transfer all arriving packets through fabric without delay, then packet queuing will also occur at input ports If two packets at front of two input queues are destined to same output queue, then one packet will be blocked and must wait at input queue -

Input and Output Queues This phenomenon is known as Head-of-the-line (HOL) blocking On an input-queued switch Queued packet in an input queue must wait for transfer through fabric due to blocking of another packet at head-of-the-line What would be one solution?

53 Solution: Virtual Output Queues Maintain N virtual queues at each input – one per output Output 1 Output 2 Output 3 Input 1 Input 2 Input 3

54 Summary Multiple things can be done to enhance router performance Input cards Have own CPU processors Use caches for address lookup Have copies of routing tables Switch fabric Cross Switches faster - use parallelism to switch packets

55 Reading: Chapter 4 - Network Layer