CSE 421 Computer Networks. Chapter 4 Network Layer Thanks to you All material copyright 1996-2009 J.F Kurose and K.W. Ross, All Rights Reserved Computer.

Slides:



Advertisements
Similar presentations
What is “Routing”? Routing algorithm that part of the network layer responsible for deciding on which output line to transmit an incoming packet Adaptive.
Advertisements

13 –Routing Protocols Network Layer4-1. Network Layer4-2 Chapter 4 Network Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.5 Routing algorithms m Link state m Distance.
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.
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 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.
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,
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 13.
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.
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 11 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
Lecture 7 Overview. Two Key Network-Layer Functions forwarding: move packets from router’s input to appropriate router output routing: determine route.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.5 Routing algorithms m Link state m Distance.
Announcement r Project 2 due next week! r Homework 3 available soon, will put it online r Recitation tomorrow on Minet and project 2.
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
1 Announcement #1 r Did you all receive homework #1 and #2? r Homework #3 will be available online during the day r Midterm.
Chapter 4 Network Layer slides are modified from J. Kurose & K. Ross CPE 400 / 600 Computer Communication Networks Lecture 15.
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 All material copyright
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
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.
7-1 Last time □ Wireless link-layer ♦ Introduction Wireless hosts, base stations, wireless links ♦ Characteristics of wireless links Signal strength, interference,
1 CSE3213 Computer Network I Network Layer (7.1, 7.3, ) Course page: Slides modified from Alberto Leon-Garcia.
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.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
EEC-484/584 Computer Networks Lecture 9 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
13 – Routing Algorithms Network Layer.
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.
1 Network Layer Lecture 13 Imran Ahmed University of Management & Technology.
The Network Layer & Routing
1 Week 5 Lecture 2 IP Layer. 2 Network layer functions transport packet from sending to receiving hosts transport packet from sending to receiving hosts.
Introduction 1 Lecture 19 Network Layer (Routing Algorithms) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
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.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 20 Omar Meqdadi Department of Computer Science and Software Engineering University.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Computer Networks CSE 434 Fall 2009 Sandeep K. S. Gupta Arizona State University Research Experience.
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley Chapter4_3.
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
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.
Project 2 r DUE Wed: 02/24 Network Layer4-1. Project 2 r DUE Wed: 02/24 r DUE Mon: 02/29 Network Layer4-2.
@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.
Application Layer 2-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
CSE 421 Computer Networks. Network Layer 4-2 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside.
Application Layer 2-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
Network Layer4-1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol.
INTRODUCTION NETWORKING CONCEPTS AND ADMINISTRATION CSIS 3723
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CPSC 335 Data Communication.
Chapter 4 Network Layer All material copyright
Chapter 4 Network Layer A note on the use of these ppt slides:
EEC-484/584 Computer Networks
Network Layer Introduction Datagram networks IP: Internet Protocol
EEC-484/584 Computer Networks
Chapter 4-4 routing and IP routing
Network Layer I have learned from life no matter how far you go
CS4470 Computer Networking Protocols
EEC-484/584 Computer Networks
Chapter 4: Network Layer
Chapter 4: Network Layer
Chapter 4: Network Layer
Chapter 4 Network Layer A note on the use of these ppt slides:
Presentation transcript:

CSE 421 Computer Networks

Chapter 4 Network Layer Thanks to you All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 6 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2012.

Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP m IPv6 r 4.5 Routing algorithms m Link state m Distance Vector m Hierarchical routing r 4.6 Routing in the Internet m RIP m OSPF m BGP r 4.7 Broadcast and multicast routing

Network layer r transport segment from sending to receiving host r on sending side encapsulates segments into packets r network layer protocols in every host, router r router examines header fields in all IP packets passing through it r on rcving side, delivers segments to transport layer 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

Two Key Network-Layer Functions r forwarding: move packets from router’s input to appropriate router output r routing: determine route taken by packets from source to dest. m routing algorithms analogy: r routing: process of planning trip from source to dest r forwarding: process of getting through single interchange

value in arriving packet’s header routing algorithm local forwarding table header value output link Interplay between routing and forwarding

Network Layer4-7 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP m IPv6 r 4.5 Routing algorithms m Link state m Distance Vector m Hierarchical routing r 4.6 Routing in the Internet m RIP m OSPF m BGP r 4.7 Broadcast and multicast routing

Network Layer4-8 Network layer connection and connection-less service r Datagram network => network-layer connectionless service r VC network => network-layer connection service m analogous to the transport-layer services, but: m service: host-to-host m no choice: network provides one or the other m implementation: in network core

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

Network Layer4-10 Datagram networks r no call setup at network layer r routers: no state about end-to-end connections m no network-level concept of “connection” r packets forwarded using destination host address m 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

Network Layer4-11 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP m IPv6 r 4.5 Routing algorithms m Link state m Distance Vector m Hierarchical routing r 4.6 Routing in the Internet m RIP m OSPF m BGP r 4.7 Broadcast and multicast routing

Network Layer4-12 Router Functions: r Run routing algorithms/protocol (RIP, OSPF, BGP) r Forwarding datagrams from incoming to outgoing link

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

Network Layer4-14 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP m IPv6 r 4.5 Routing algorithms m Link state m Distance Vector m Hierarchical routing r 4.6 Routing in the Internet m RIP m OSPF m BGP

Routing Algorithms r Given a set of routers and links connecting the routers. r Routing algorithm finds a “good” path from the source and destination router. r Good path = Least cost path

Routing Algorithm classification Global or Decentralized Global: r all routers have complete topology and link cost info r “link state” algorithms Decentralized: r router knows physically-connected neighbors, link costs to neighbors r iterative process of computation, exchange of info with neighbors r “distance vector” algorithms

Routing Algorithm classification Static or dynamic? Static: r routes change slowly over time r Manually configured Dynamic: r routes change more quickly m in response to link cost changes

Routing on a Graph r Essentially a graph theory problem m Network is a directed graph; routers are vertices r Find “best” path between every pair of vertices m In the simplest case, best path is the shortest path Network Layer4-18

Network Layer4-19 u y x wv z 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 abstraction

Network Layer4-20 Graph abstraction: costs u y x wv z c(x,x’) = cost of link (x,x’) - e.g., c(w,z) = 5 Question: What’s the least-cost path between u and z ? Routing algorithm: algorithm that finds least-cost path

Distance Vector Algorithm

Network Layer4-22 Distance Vector Algorithm Distributed: r each node receives info from one or more of its directly connected neighbors r Performs a calculations r Distributes the results back to its neighbors Iterative r Process continues until no more info to exchange Asynchronous: r All nodes operate independently

Network Layer4-23 Distance Vector Algorithm

4-24 Distance Vector Algorithm Bellman-Ford Equation Algorithm  computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph.  Distributed route computation using only neighbor’s info

Objective: d x (y) := cost of least-cost path from x to y Then where min is taken over all neighbors v of x Network Layer4-25 d x (y) = min v {c(x,v) + d v (y) } Distance Vector Algorithm

r c(x,v)= cost for direct link from x to v Node x maintains costs of direct links c(x,v). r D x (y)= estimate of least cost from x to y Node x maintains distance vector D x = [D x (y): y є N ] r Node x maintains its neighbor’s distance vectors For each neighbor v, x maintains Dv= [Dv(y): y єN ] Network Layer4-26 Distance Vector Algorithm

Network Layer4-27 Bellman-Ford example from u to z u y x wv z Clearly, d v (z) = 5, d x (z) = 3, d w (z) = 3 d u (z) = min { c(u,v) + d v (z), c(u,x) + d x (z), c(u,w) + d w (z) } = min {2 + 5, 1 + 3, 5 + 3} = 4  Node that achieves minimum is the next hop in shortest path to a destination,  To go to z from u, x in the next hop in the forwarding table B-F equation says: U has 3 neighbors v,x and w

Network Layer4-28 Distance vector algorithm Basic idea: r Each node periodically sends its own distance vector estimate to neighbors r When a node x receives new DV estimate from neighbor; r It updates its own DV using B-F equation:

x y z x y z ∞∞∞ ∞∞∞ from cost to from x y z x y z 0 from cost to x y z x y z ∞∞ ∞∞∞ cost to x y z x y z ∞∞∞ 710 cost to ∞ ∞ ∞ ∞ time x z y node x table node y table node z table D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{2+0, 7+1} = 2 D x (z) = min{c(x,y) + D y (z), c(x,z) + D z (z)} = min{2+1, 7+0} = 3 32

x y z x y z ∞∞∞ ∞∞∞ from cost to from x y z x y z 0 from cost to x y z x y z ∞∞ ∞∞∞ cost to x y z x y z ∞∞∞ 710 cost to ∞ ∞ ∞ ∞ time x z y node x table node y table node z table Dy(x) = min{c(y,x) + Dx(x), c(y,z) + D z (x)} = min{2+0, 1+7} = 2 Dy(z) = min{c(y,x) + Dx(z), c(y,z) + D z (z)} = min{2+7, 1+0} = 1 32 x y z x y z

x y z x y z ∞∞∞ ∞∞∞ from cost to from x y z x y z 0 from cost to x y z x y z ∞∞ ∞∞∞ cost to x y z x y z ∞∞∞ 710 cost to ∞ ∞ ∞ ∞ time x z y node x table node y table node z table Dz(x) = min{c(z,x) + Dx(x), c(z,y) + Dy(x)} = min{7+0, 1+2} = 3 Dz(y) = min{c(z,x) + Dx(y), c(z,y) + Dy(y)} = min{7+2, 1+0} = 1 32 x y z x y z x y z x y z from from 31 0

x y z x y z ∞∞∞ ∞∞∞ from cost to from x y z x y z from cost to x y z x y z from cost to x y z x y z ∞∞ ∞∞∞ cost to x y z x y z from cost to x y z x y z from cost to x y z x y z from cost to x y z x y z from cost to x y z x y z ∞∞∞ 710 cost to ∞ ∞ ∞ ∞ time x z y node x table node y table node z table

Operation of Distance Vector r Periodic Updates: m Periodically broadcast the entire routing table to each of its neighbors (RIP – every 30 seconds). –Inefficient m Router is only aware of the: –Network addresses of its –Network addresses of its own interfaces. –Network addresses of the. –Network addresses of the neighbors running the same routing protocol.

Operation of Distance Vector r Periodic Updates: R1 Update Timer expires Neighbour of R1 R1 is unaware of R3 and its networks Updates sent. Broadcast!

Distance Vector Routing Protocols Network Discovery

Cold Start r Network Discovery: m Is part of the process of the routing protocol algorithm that enables routers to learn about remote networks for the first time.

Cold Start r When a router powers up: m Knows nothing about the network topology. m Knows only the information saved in NVRAM. m Sends updates about its known networks out all ports.

Initial Exchange of Routing Information r Sends an update about network out the Serial 0/0/0 interface with a metric of 1. r Sends an update about network out the Fa0/0 interface with a metric of

Initial Exchange of Routing Information

R1 Receives the update from R2 about network and adds it to its routing table. R1 Receives the update from R2 about network and adds it to its routing table. R3 Receives the update from R2 about network and adds it to its routing table. R3 Receives the update from R2 about network and adds it to its routing table

Initial Exchange of Routing Information R2 Receives the update from R1 about network and adds it to its routing table. R2 Receives the update from R1 about network and adds it to its routing table. R2 Receives the update from R3 about network and adds it to its routing table. R2 Receives the update from R3 about network and adds it to its routing table

Initial Exchange of Routing Information r First round of update exchanges: Each router knows about the connected networks of its directly connected neighbors.

Next Exchange of Routing Information r Sends an update about network out the S0/0/0 interface with a metric of 1 - AGAIN! r When R2 receives the update, there is no change in information so the update is ignored

Next Exchange of Routing Information r Sends an update about networks with a metric of 1 and with a metric of 2 out the Serial 0/0/0 interface. r Similarly sends updates about networks with a metric of 2 and with a metric of 1 out the Serial 0/0/1 interface NEW NEW

Initial Exchange of Routing Information r Sends an update about network out the S0/0/0 interface with a metric of 1 - AGAIN! r When R2 receives the update, there is no change in information so the update is ignored.

Next Exchange of Routing Information R1 receives an update from R2 about network and there is no change – update ignored. R1 receives an update from R2 about network and there is no change – update ignored. R1 receives an update from R2 about network (new) and adds it to its routing table. R1 receives an update from R2 about network (new) and adds it to its routing table

Next Exchange of Routing Information R3 receives an update from R2 about network and there is no change – update ignored. R3 receives an update from R2 about network and there is no change – update ignored. R3 receives an update from R2 about network (new) and adds it to its routing table. R3 receives an update from R2 about network (new) and adds it to its routing table

Next Exchange of Routing Information The network has CONVERGED! The network has CONVERGED! All routers now know about all of the networks attached to all of their neighbouring routers. All routers now know about all of the networks attached to all of their neighbouring routers.

Convergence r The amount of time it takes for a network to converge is directly proportional to the size of that network. r Routing protocols are compared based on how fast they can propagate this information - their speed to convergence. r A network is not completely operable until it has converged. m Network administrators prefer routing protocols with shorter convergence times.

Network Layer4-51 Node c ab c df e c Node e ab c df e e∞∞ Node f ab c df e f∞∞ 5 ∞0 2 For the above figure no. 1, the table represents the routing table of node “c”, “f” and “e” at a certain instant. Node f receives updates from node c and node e only. All routers are running Distance Vector algorithm. What will be the status of the routing table of node f be after receiving the updates by node c and e as shown above? (Use Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} for explaining your answer)