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.

Slides:



Advertisements
Similar presentations
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Link-State Routing Protocols Routing Protocols and Concepts – Chapter.
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.
1 Dijkstra’s Shortest Path Algorithm Gordon College.
Data Communication and Networks Lecture 7 Networks: Part 2 Routing Algorithms October 27, 2005.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Link-State Routing Protocols Routing Protocols and Concepts – Chapter.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
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.
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 18.
Network Layer Goals: understand principles behind network layer services: –routing (path selection) –dealing with scale –how a router works –advanced topics:
Link State Routing Protocol W.lilakiatsakun. Introduction (1) Link-state routing protocols are also known as shortest path first protocols and built around.
1 11-Sep-15 S Ward Abingdon and Witney College Link State CCNA Exploration Semester 2 Chapter 10.
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.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Link-State Routing Protocols Routing Protocols and Concepts – Chapter.
Link-State Routing Protocols
Lecture Week 10 Link-State Routing Protocols. Objectives Describe the basic features & concepts of link-state routing protocols. List the benefits and.
Introduction to Routing and Routing Protocols By Ashar Anwar.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
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.
Introduction 1 Lecture 21 Network Layer (Routing Activity) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science &
IP routing. Simple Routing Table svr 4% netstat –r n Routing tables DestinationGatewayFlagsRefcntUseInterface UGH00emd UH10lo0.
Network Layer4-1 Chapter 4 Network Layer Part 3: Routing Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Link-State Routing Protocols Routing Protocols and Concepts – Chapter 10.
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.
13 – Routing Algorithms Network Layer.
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.
Overview of Internet Routing (I) Fall 2004 CS644 Advanced Topics in Networking Sue B. Moon Division of Computer Science Dept. of EECS KAIST.
Routing and Routing Protocols
Routing 1 Network Layer Network Layer goals:  understand principles behind network layer services:  routing (path selection)  how a router works  instantiation.
Introduction 1 Lecture 19 Network Layer (Routing Algorithms) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
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.
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.
Transport Layer3-1 Network Layer Every man dies. Not every man really lives.
Network Layer4-1 Routing Algorithm Classification Global or decentralized information? Global: r all routers have complete topology, link cost info r “link.
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.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Link-State Routing Protocols Routing Protocols and Concepts – Chapter 10.
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.
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.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
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.
+ Dynamic Routing Protocols 2 nd semester
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.
ROURING ALGORITHM: LINK STATE
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CPSC 335 Data Communication.
Instructor Materials Chapter 5: Dynamic Routing
Chapter 7 Dynamic Routing
Routing Protocols and Concepts
Link-State Routing Protocols
Dynamic Routing Protocols part2
CS 457 – Lecture 12 Routing Spring 2012.
Network Layer Introduction Datagram networks IP: Internet Protocol
Chapter 5 Network Layer.
Chapter 5: Dynamic Routing
Chapter 5: Dynamic Routing
Lecture 10 Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CS3516: These slides are generated from.
Chapter 4-4 routing and IP routing
Link-State Routing Protocols
CS4470 Computer Networking Protocols
Link-State Routing Protocols
CMPE 252A : Computer Networks
Network Layer (contd.) Routing
Chapter 10 Link State Routing Protocols
Chapter 4: Network Layer
Chapter 4: Network Layer
Chapter 4: Network Layer
CSCD 330 Network Programming
Presentation transcript:

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

Network Layer Link-State Routing Protocols r Distance Vector routing protocols are like road signs. m Routers must make preferred path decisions based on a distance or metric to a network. r Link-State routing protocols are more like a road map. m They create a topological map of the network and each router uses this map to determine the shortest path to each network.

Network Layer r Link-state routing protocols are also known as shortest path first protocols and are built around Edsger Dijkstra’s shortest path first (SPF) algorithm. r While they have the reputation of being much more complex than distance vector, the basic functionality and configuration of link state routing protocols are not complex. Link-State Routing Protocols

Network Layer 4-5 A Link-State Routing Algorithm Dijkstra’s algorithm- Shortest Path First r net topology, link costs known to all nodes m accomplished via “link state broadcast” m all nodes have same info r computes least cost paths from one node (‘source”) to all other nodes m gives forwarding table for that node r iterative: after k iterations, know least cost path to k dest.’s

Network Layer Dijkstra ’ s algorithm Notation:  c(x,y): link cost from node x to y; = ∞ 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  N': set of nodes whose least cost path definitively known u y x wv z

Network Layer 4-7 Dijsktra’s Algorithm 1 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 4-8 Dijkstra’s algorithm: example Step N' u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u D(w),p(w) 5,u 4,x 3,y D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ 4,y u y x wv z

Network Layer SPF Algorithm - Example r Dijkstra’s algorithm is commonly referred to as the Shortest Path First (SPF) algorithm. r This algorithm accumulates costs along each path, from source to destination.

Network Layer SPF Algorithm r To illustrate how SPF operates, each path in the figure is labeled with an arbitrary value for cost. r Each router calculates the SPF algorithm and determines the cost of a link from its own perspective.

Network Layer SPF Algorithm r For example: m The cost of the shortest path for R2 to send packets to the LAN attached to R3 is 27 ( = 27).

Network Layer SPF Algorithm r R1 has data to send to the network on R5. m You might think that R1 would send directly to R4 (2 hops) instead of to R3 (3 hops) R1 uses 3 “hops” but “faster” links.

Network Layer Link-State Routing Process r 5 Step Process: 1. Each router learns about its own directly connected networks. 2. Each router is responsible for contacting its neighbors on directly connected networks. 3. Each router builds a link-state packet (LSP) containing the state of each directly connected link. 4. Each router floods the LSP to all neighbors, who then store all LSPs received in a database. 5. Each router uses the LSPs to construct a database that is a complete map of the topology and computes the best path to each destination network.

Network Layer Step 1: Directly Connected Networks Each router learns about its own directly connected networks. Each router learns about its own directly connected networks. m When a router interface is configured with an IP address and subnet mask and activated, the interface becomes part of that network. m Regardless of the routing protocols used, these directly connected networks are now part of the routing table. We will focus on the Link-State routing process from the perspective of R1.

Network Layer Step 1: Directly Connected Networks Information about the state of a router’s links is known as link states.

Network Layer Step 2: Hello Packets Each router is responsible for contacting its neighbors on directly connected networks. Each router is responsible for contacting its neighbors on directly connected networks. m The router will not be aware of any neighbor routers on the link until it receives a Hello packet from that neighbor. m At that time, it establishes an adjacency with the neighboring router.

Network Layer Step 2: Hello Packets

Network Layer Step 2: Hello Packets A neighbor is any other router that is enabled with the same link-state routing protocol. A neighbor is any other router that is enabled with the same link-state routing protocol. r These small Hello packets continue to be exchanged between two adjacent neighbors. r These packets serve as a keepalive function to monitor the state of the neighbor.

Network Layer Step 3: Build the Link-State Packet Each router builds a link-state packet (LSP) containing the state of each directly connected link. Each router builds a link-state packet (LSP) containing the state of each directly connected link. m The LSP contains the link-state information about the sending router’s links. m The router only sends LSPs out interfaces where it has established adjacencies with other routers.

Network Layer Step 4: Flooding Link-State Packets Each router floods the LSP to all neighbors, who then store all LSPs received in a database. Each router floods the LSP to all neighbors, who then store all LSPs received in a database. Whenever a router receives an LSP from a neighboring router, it immediately sends that LSP out all other interfaces, except the interface that received the LSP. Whenever a router receives an LSP from a neighboring router, it immediately sends that LSP out all other interfaces, except the interface that received the LSP. Flooding of R1 LSP No response to Hello – no LSP sent.

Network Layer Step 4: Flooding Link-State Packets r Link-state routing protocols calculate the SPF algorithm after the flooding is complete. r As a result, link-state routing protocols reach convergence much faster than distance vector routing protocols.

Network Layer Step 4: Flooding Link-State Packets r An LSP needs to be sent only: m During initial startup of the router or routing protocol. m Whenever there is a change in the topology (link going down or coming up) or a neighbor adjacency being established or broken.

Network Layer Step 5: Constructing a Link-State Database Each router uses the LSPs to construct a database that is a complete map of the topology and computes the best path to each destination network. Each router uses the LSPs to construct a database that is a complete map of the topology and computes the best path to each destination network.

Network Layer Step 5: Constructing a Link- State Database As a result of the flooding process, router R1 has learned the link-state information for each router in its routing area. As a result of the flooding process, router R1 has learned the link-state information for each router in its routing area.

Network Layer Step 5: Constructing a Link-State Database r With a complete link-state database, R1 can now use the database and the shortest path first (SPF) algorithm to calculate the preferred path or shortest path to each network. Each router in the topology determines the shortest path from its own perspective.

Network Layer R1: Building the SPF Tree

Network Layer R1: Building the SPF Tree All LSPs have been processed using the SPF algorithm and R1 has now constructed the complete SPF tree. All LSPs have been processed using the SPF algorithm and R1 has now constructed the complete SPF tree. Root

Network Layer R1: Determining the Shortest Path r Using this tree, the SPF algorithm results indicate the shortest path to each network. Root

Network Layer Root R1: Determining the Shortest Path Network /16 via R2 Serial 0/0/0 at a cost of 22

Network Layer Network /16 via R3 Serial 0/0/1 at a cost of 7 Root R1: Determining the Shortest Path

Network Layer Network /16 via R3 Serial 0/0/1 at a cost of 15 Root R1: Determining the Shortest Path

Network Layer Network /16 via R3 Serial 0/0/1 at a cost of 17 Root R1: Determining the Shortest Path

Network Layer Network /16 via R2 Serial 0/0/0 at a cost of 30 Root R1: Determining the Shortest Path

Network Layer Network /16 via R3 Serial 0/0/1 at a cost of 25 Root R1: Determining the Shortest Path

Network Layer Network /16 via R3 Serial 0/0/1 at a cost of 27 Root R1: Determining the Shortest Path

Network Layer Generating a Routing Table

Network Layer Advantages: Link-State