Malathi Veeraraghavan (originals by Jörg Liebeherr) 1 Link State Routing Algorithm Use a routing protocol to collect the whole network topology Obtain.

Slides:



Advertisements
Similar presentations
RIP V2 CCNP S1(5), Chapter 4.
Advertisements

Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization –All routers are identical –Network is flat. Not true in Practice Hierarchical.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
RIP – Routing Information Protocol Syeda Momina Tabish MIT - 7.
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
CSCE 515: Computer Network Programming Chin-Tser Huang University of South Carolina.
Unicast Routing Protocols: RIP, OSPF, and BGP
CSEE W4140 Networking Laboratory Lecture 5: IP Routing (OSPF and BGP) Jong Yul Kim
Routing.
1 Autonomous Systems An autonomous system is a region of the Internet that is administered by a single entity. Examples of autonomous regions are: UVA’s.
1 Dynamic Routing Protocols I RIP Relates to Lab 4. The first module on dynamic routing protocols. This module provides an overview of routing, introduces.
ROUTING PROTOCOLS Rizwan Rehman. Static routing  each router manually configured with a list of destinations and the next hop to reach those destinations.
RIP. A PPROACHES TO S HORTEST P ATH R OUTING There are two basic routing algorithms found on the Internet. 1. Distance Vector Routing Each node knows.
1 ECE453 – Introduction to Computer Networks Lecture 10 – Network Layer (Routing II)
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
INTRA- AND INTERDOMAIN ROUTING Routing inside an autonomous system is referred to as intradomain routing. Routing between autonomous systems is.
TCP/IP Protocol Suite1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
Interior Gateway Protocols: RIP & OSPF
1 CS 4396 Computer Networks Lab Dynamic Routing Protocols - II OSPF.
Routing Information Protocol (RIP). Intra-and Interdomain Routing An internet is divided into autonomous systems. An autonomous system (AS) is a group.
Dynamic Routing Protocols  Function(s) of Dynamic Routing Protocols: – Dynamically share information between routers (Discover remote networks). – Automatically.
CS 4396 Computer Networks Lab
Unicast Routing Protocols  A routing protocol is a combination of rules and procedures that lets routers in the internet inform each other of changes.
Routing and Routing Protocols Routing Protocols Overview.
M.Menelaou CCNA2 ROUTING. M.Menelaou ROUTING Routing is the process that a router uses to forward packets toward the destination network. A router makes.
Routing protocols Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF)
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine.
An internet is a combination of networks connected by routers. When a datagram goes from a source to a destination, it will probably pass through many.
Dynamic Routing Protocols II OSPF
Routing protocols. 1.Introduction A routing protocol is the communication used between routers. A routing protocol allows routers to share information.
TCP/IP Protocol Suite 1 Chapter 14 Upon completion you will be able to: Unicast Routing Protocols: RIP, OSPF, and BGP Distinguish between intra and interdomain.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Ch 22. Routing Direct and Indirect Delivery.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
RIP Routing Protocol. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.
Chapter 25 Internet Routing. Static Routing manually configured routes that do not change Used by hosts whose routing table contains one static route.
1 Dynamic Routing Protocols I RIP Relates to Lab 4. The first module on dynamic routing protocols. This module provides an overview of routing, introduces.
1. 2  An autonomous system is a region of the Internet that is administered by a single entity.  Examples of autonomous regions are:  UVA’s campus.
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Working at a Small-to-Medium Business or ISP – Chapter 6
Autonomous Systems An autonomous system is a region of the Internet that is administered by a single entity. Examples of autonomous regions are: UVA’s.
Dynamic Routing Protocols II OSPF
Dynamic Routing Protocols part2
Chapter 14 Routing Protocols (RIP, OSPF, and BGP)
Routing Protocols (RIP, OSPF, BGP)
OSPF (Open Shortest Path First)
Routing Information Protocol (RIP)
Routing and Routing Protocols: Routing Static
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
COMP 3270 Computer Networks
CCNA 2 v3.1 Module 6 Routing and Routing Protocols
Static and Dynamic Routing
Distance Vector and Link State RIP OSPF
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Routing.
Autonomous Systems An autonomous system is a region of the Internet that is administered by a single entity. Examples of autonomous regions are: UVA’s.
Chapter 5: Dynamic Routing
Dynamic Routing Protocols part2
Routing and Routing Protocols: Routing Static
Dynamic Routing Protocols II OSPF
Dynamic Routing and OSPF
Switch controller: Routing
Working at a Small-to-Medium Business or ISP – Chapter 6
Routing.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Presentation transcript:

Malathi Veeraraghavan (originals by Jörg Liebeherr) 1 Link State Routing Algorithm Use a routing protocol to collect the whole network topology Obtain destination reachability information as well as link weights/states Compute shortest paths using Dijkstra’s algorithm from a node to all other nodes Construct routing tables that show the destination addresses and the next hop addresses Note that while Dijkstra’s algorithm gives you end-to-end routes, the routing tables may only store the next hop address.

Malathi Veeraraghavan (originals by Jörg Liebeherr) 2 Shortest path calculations Calculate shortest paths for node s to all other nodes Dijkstra’s Algorithm: s source node. D n cost of the least-cost path from node s to node n M = {s}; for each n  M D n = d sn ; while (M  all nodes) do Find w  M for which D w = min{D j ; j  M}; Add w to M; for each n  M D n = min w [ D n, D w + d wn ]; Update route; enddo

Malathi Veeraraghavan (originals by Jörg Liebeherr) 3 Example Assume node 1 has obtained the entire network topology using some link state routing protocol Construct the routing table at node 1 using Dijkstra’s algorithm to determine shortest paths from node 1 to all other nodes in the network

Malathi Veeraraghavan (originals by Jörg Liebeherr) 4 Example (at node 1) IterationMD 1 D 2 D 3 D 4 D 5 D 6 Init

Malathi Veeraraghavan (originals by Jörg Liebeherr) 5 Solution Use Dijkstra’s algorithm described in slide 2 Start with M consisting of only node 1.

Malathi Veeraraghavan (originals by Jörg Liebeherr) 6 Resulting Routing Tree The tree is translated into a routing table at node 1: Destination Next Hop

Malathi Veeraraghavan (originals by Jörg Liebeherr) 7 Link State Discussion Each node requires complete topology information. Link state Information must be flooded to all nodes. Guaranteed to converge. Each node must maintain a global database. Convergence of the algorithm is guaranteed.

Malathi Veeraraghavan (originals by Jörg Liebeherr) 8 IP Routing IP Forwarding is performed by IP (in OS kernel) IP Routing is performed by a user-level process In Unix, by the daemon processes routed and gated

Malathi Veeraraghavan (originals by Jörg Liebeherr) 9 IP Routing

Malathi Veeraraghavan (originals by Jörg Liebeherr) 10 Routing Table Lookup For each IP packet, there is one routing table lookup. 1. Find matching host address 2. Find matching network address 3. Find default entry Routing table printout with netstat -rn Example: DestinationGateway Flags RefcntUse Interface UGH emd UH 10 lo0 default UG 00 emd0

Malathi Veeraraghavan (originals by Jörg Liebeherr) 11 Explanation of the printout Flags: –U: route is up –G: route is to a gateway (router); if flag is not set, destination is directly connected –H: route is to a host, I.e., destination address is the complete host address; if flag is not set, route is to a network and destination address is netID or subnetID –D: route created by redirect –M: route modified by redirect Refcnt: reference count: number of active uses of each route; for each TCP connection passing through route, this is increased by 1 Use: number of packets sent on route Interface: local interface

Malathi Veeraraghavan (originals by Jörg Liebeherr) 12 Statically Setting IP Routing Tables There are several ways for setting IP routing tables without a routing protocol (=Static Routing) 1. Automatic creation of entry during initialization of a local interface (with ifconfig ) 2. During bootstrap with route command 3. Via ICMP redirect messages 4. Via ICMP router advertisement/router discovery messages

Malathi Veeraraghavan (originals by Jörg Liebeherr) 13 Route Command Route commands are put in a system file that is read during system bootstrap System file is: /etc/rc2.d/S69inet in Solaris, /etc/netstart in FreeBSD. Example: “default:” destination “sun:” gateway or router 1: metric route add default sun 1 route add slip bsdi 1

Malathi Veeraraghavan (originals by Jörg Liebeherr) 14 ICMP Redirect Based on routing data in host, it does an arp for router 1 and sends packet to router 1 When router 1 detects that an IP datagram should have gone to a different router, the router: forwards the IP datagram to the correct router sends an ICMP redirect message to the host Host uses ICMP message to update its routing table

Malathi Veeraraghavan (originals by Jörg Liebeherr) 15 ICMP Router Solicitation ICMP Router Advertisement Specified in RFC 1256 (1991) After bootstrapping a host broadcasts an ICMP router solicitation message. In response, routers send an ICMP router advertisement message Also, routers periodically broadcast ICMP router advertisement

Malathi Veeraraghavan (originals by Jörg Liebeherr) 16 Dynamic IP Routing Protocols In Unix systems, the dynamic setting of routing tables is done by the routed or gated daemons The routing daemons execute the following intradomain and interdomain routing protocols intradomain interdomain

Malathi Veeraraghavan (originals by Jörg Liebeherr) 17 RIP - Routing Information Protocol A simple intradomain protocol Straightforward implementation of Distance Vector Routing Each router advertises its minimum distances to destinations every 30 seconds (or whenever its routing table changes) RIP always uses the hop-count as link metric. Maximum hop count is 15, with “16” equal to “  ”. Routes timeout after 3 minutes if they are not updated. Route metric is set to  (16) and marked for deletion

Malathi Veeraraghavan (originals by Jörg Liebeherr) 18 RIP Packet Format

Malathi Veeraraghavan (originals by Jörg Liebeherr) 19 Routing with RIP This is the operation of RIP in routed. Dedicated port for RIP is UDP port 520. Initialization: Broadcast a request packet (command = 1, metric=16; address family=0, metric=16) on the interfaces requesting current routing tables from routers. Request received: Routers that receive above request send their entire routing table. Response received: Update the routing table (see distance vector algorithm). Regular routing updates: Every 30 seconds, send all or part of the routing tables to every neighbor. Triggered Updates: Whenever the metric for a route changes, send data that has changed.

Malathi Veeraraghavan (originals by Jörg Liebeherr) 20 RIPv2 RIPv2 also supports multicast and provides authentication

Malathi Veeraraghavan (originals by Jörg Liebeherr) 21 OSPF OSPF = Open Shortest Path First RFC 1247 from 1991 Alternative solution to RIP as interior gateway protocol OSPF is a link state protocol, i.e., each node has complete topology information OSPF messages are sent directly in IP (and not as payload of UDP packets) Hellos and Link State Advertisements (LSAs) –To get the topology of the network Shortest-path algorithm, e.g., Dijkstra’s to precompute routing tables.

Malathi Veeraraghavan (originals by Jörg Liebeherr) 22 Features of OSPF Provides authentication of routing messages Enables load balancing by allowing traffic to be split evenly across routes with equal cost Supports subnetting Supports multicasting

Malathi Veeraraghavan (originals by Jörg Liebeherr) 23 BGP BGP = Border Gateway Protocol Currently in version 4 Note: In the context of BGP, a gateway is nothing else but an IP router that connects autonomous systems. Interdomain routing protocol for routing between autonomous systems Uses TCP to send routing messages BGP is a distance vector protocol, but unlike in RIP, routing messages in BGP contain complete routes. Network administrators can specify routing policies

Malathi Veeraraghavan (originals by Jörg Liebeherr) 24 BGP BGP’s goal is to find any path (not an optimal one). Since the internals of the AS are never revealed, finding an optimal path is not feasible. For each autonomous system (AS), BGP distinguishes: local traffic = traffic with source or destination in AS transit traffic = traffic that passes through the AS Stub AS = has connection to only one AS, only carry local traffic Multihomed AS = has connection to >1 AS, but does not carry transit traffic Transit AS = has connection to >1 AS and carries transit traffic

Malathi Veeraraghavan (originals by Jörg Liebeherr) 25 BGP

Malathi Veeraraghavan (originals by Jörg Liebeherr) 26 Exercise R1 R Assume route commands in the bootstrap sequence in both routers allows them to immediately recognize their directly connected subnets Show the routing tables at nodes R1 and R2 initially before they exchange RIP messages and after. See Page 131 of your textbook for guidance

Malathi Veeraraghavan (originals by Jörg Liebeherr) 27 Exercise solution Table created by route commands executed during boot-up procedure - directly-connected interfaces have a route command metric of 0 (pg. 116) but a RIP metric of 1 (pg. 131) See page 116, it states that the metric is 0 if the G flag is not set, which means a direct route. The gateway column has the IP address of the outgoing interface.

Malathi Veeraraghavan (originals by Jörg Liebeherr) 28 Exercise solution contd. Same as on previous slide

Malathi Veeraraghavan (originals by Jörg Liebeherr) 29 Exercise solution contd. RIP messages sent. As per fig on page 131 of your text book each router advertises routes to each subnet on all other subnets with a hop count of 1. Thus, each router listens to the broadcasts about the other router’s subnets. Updated routing tables are shown on the next two slides.

Malathi Veeraraghavan (originals by Jörg Liebeherr) 30 Exercise solution contd. See page 131 of your textbook for RIP metrics for subnets on adjacent routers

Malathi Veeraraghavan (originals by Jörg Liebeherr) 31 Exercise solution contd.