Routing Protocols RIP, OSPF, BGP. A Routing Protocol’s Job Is to Find a “Best” Path between Any Pair of Nodes Routers in a network exchange their routing.

Slides:



Advertisements
Similar presentations
CSCI-1680 Network Layer: Intra-domain Routing Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure.
Computer Networks with Internet Technology William Stallings
Courtesy: Nick McKeown, Stanford
© 2007 Cisco Systems, Inc. All rights reserved.ICND2 v1.0—3-1 Medium-Sized Routed Network Construction Reviewing Routing Operations.
1 LINK STATE PROTOCOLS (contents) Disadvantages of the distance vector protocols Link state protocols Why is a link state protocol better?
Routing - I Important concepts: link state based routing, distance vector based routing.
Networks: Routing1 Network Layer Routing. Networks: Routing2 Network Layer Concerned with getting packets from source to destination Network layer must.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization –All routers are identical –Network is flat. Not true in Practice Hierarchical.
CSE331: Introduction to Networks and Security Lecture 9 Fall 2002.
Routing So how does the network layer do its business?
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 22 Introduction to Computer Networks.
RD-CSY3021 Comparing Routing Protocols. RD-CSY3021 Criteria used to compare routing protocols includes  Time to convergence  Proprietary/open standards.
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
CSEE W4140 Networking Laboratory Lecture 4: IP Routing (RIP) Jong Yul Kim
Spring Routing & Switching Umar Kalim Dept. of Communication Systems Engineering 17/04/2007.
CSE 461: Distance Vector Routing. Next Topic  Focus  How do we calculate routes for packets?  Routing is a network layer function  Routing Algorithms.
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
Delivery, Forwarding and
Routing Algorithms (Ch5 of Computer Network by A. Tanenbaum)
Routing Concepts Warren Toomey GCIT. Introduction Switches need to know the link address and location of every station. Doesn't scale well, e.g. to several.
Interior Gateway Protocols: RIP & OSPF
Lecture Week 10 Link-State Routing Protocols. Objectives Describe the basic features & concepts of link-state routing protocols. List the benefits and.
Distance Vector Routing Protocols W.lilakiatsakun.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
Dynamic Routing Protocols  Function(s) of Dynamic Routing Protocols: – Dynamically share information between routers (Discover remote networks). – Automatically.
1 Routing Protocols. 2 Distributed Routing Protocols Rtrs exchange control info Use it to calculate forwarding table Two basic types –distance vector.
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.
Spring 2008CS 3321 Intradomain Routing Outline Algorithms Scalability.
Unicast Routing Protocols  A routing protocol is a combination of rules and procedures that lets routers in the internet inform each other of changes.
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.
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.
Border Gateway Protocol
Distance Vector Routing Protocols Routing Protocols and Concepts Lecture Week 4.
Page 110/27/2015 A router ‘knows’ only of networks attached to it directly – unless you configure a static route or use routing protocols 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.
Spring 2006CS 3321 Intradomain Routing Outline Algorithms Scalability.
Distance Vector Routing Protocols Dynamic Routing.
Routing and Routing Protocols
Cisco Systems Networking Academy S2 C 11 Routing Basics.
ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine.
Routing protocols. Static Routing Routes to destinations are set up manually Route may be up or down but static routes will remain in the routing tables.
Chapter 5 IP Routing Routing Protocol vs. Routed Protocol.
Stainov - DataComMET CS TC5353 THE NETWORK LAYER 5.2 ROUTING ALGORITHMS - adaptive Distance Vector Routing (Bellman-Ford, Ford-Fulkenson). It was used.
1 Version 3.1 Module 6 Routed & Routing Protocols.
Teknik Routing Pertemuan 10 Matakuliah: H0524/Jaringan Komputer Tahun: 2009.
Routing Algorithms and IP Addressing Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality.
Routing Protocols Brandon Wagner.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Ch 22. Routing Direct and Indirect Delivery.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Routing Protocols and Concepts Dr. Muazzam A. Khan.
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
ROUTING ON THE INTERNET COSC Jun-16. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
+ Dynamic Routing Protocols 2 nd semester
Routing Protocols and Concepts
Link-State Routing Protocols
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
CS 3700 Networks and Distributed Systems
Link-State Routing Protocols
Intradomain Routing Outline Introduction to Routing
CS 640: Introduction to Computer Networks
RFC 1058 & RFC 2453 Routing Information Protocol
CS 3700 Networks and Distributed Systems
Link-State Routing Protocols
Delivery, Forwarding, and Routing
Presentation transcript:

Routing Protocols RIP, OSPF, BGP

A Routing Protocol’s Job Is to Find a “Best” Path between Any Pair of Nodes Routers in a network exchange their routing information using a routing protocol. A routing table is set up in every router. The routing table consists of many (destination host/network, next hop) entries. When a packet arrives at a router, the router can look up the routing table to determine the next hop to forward the packet.

Routing Protocol Requirements Minimize routing table space –Router’s memory is expensive. –The size of the Internet is huge! Minimize control messages –Avoid wasting too much network bandwidth Robustness –Avoid black holes –Avoid loops –Avoid oscillations Using optimal paths –“Best” may mean (1) minimum number of hops, (2) least delay, (3) largest bandwidth, (4) least cost, or (5) others.

Choices Centralized v.s. distributed Source-based v.s. hop-by-hop –The header of a packet can carry (1) the addresses of every routers on the path from the source to the destination, or (2) just the address of the destination –QoS and resources can be reserved on the path –Two options: strict v.s. loose source routing –Has larger header overhead and may suffer the black holes problem

Choices (cont’d) Stochastic v.s. deterministic –In stochastic method, packets can arrive at the destination out-of-order and/or with varying delay Single v.s. multiple path –Internet uses the single path method for saving routers’ memory State-dependent v.s. state-independent –In state-dependent routing, the choice of a route depends on the current network state (e.g., the loads, delays of links) Good for load balancing and robustness but may have the loop, black hole, oscillation problems –State-independent routing (e.g., shortest-path routing) does not take the network state into account.

The Internet Uses a Two-Level Routing Approach For management reasons, the Internet is divided into many autonomous systems (AS) connected together. –Routers in an AS use the same routing protocol. –Routes in an AS are managed by a single organization. –Routers in different ASes may use different routing protocols. Interior Routing Protocols (e.g., RIP, OSPF) –Use within an AS Exterior Routing protocols (e.g., BGP) –Exchange AS’s routing information between all ASes

Interior Routing Protocols

Distance Vector Routing Algorithm Each router is configure with its own ID. Each router is also configured with a number to use as the cost of each link. Each router starts with a distance vector consisting of the value 0 for itself and the value infinity for every other destination. Each router transmits its distance vector to each of its neighbor whenever the information changes. Each router saves the most recently received distance vector from each of its neighbors. RIP uses DV.

Distance Vector Routing Algorithm (cont’d) Each router calculates its own distance vector, based on minimizing the cost to each destination, by examining the the cost to that destination reported by each neighbor in turn and then adding the configured cost of the link to that neighbor. The following events cause recalculation of the distance vector. –Receipt from a neighbor of a distance vector containing different information than before. –Discovery that a link to a neighbor has gone down. In that case, the distance vector from that neighbor is discarded before the distance vector is recalculated. The above uses Triggered Update, to prevent generating tom many control messages, we can use non-Triggered Update.

An Example of DVR Operation

The “Count-to-Infinity” Problem of DVR Initially, on node B, the cost to C is 1. On node A, the cost to C is 2. When the link between B and C breaks, B thinks that its shortest path to C is through A and now the cost becomes = 3. Because B’s distance vector has changed, B sends the newest information to node A. Now A thinks that the cost to C becomes 1+3 = 4. This process repeats until the infinity is reached and then both nodes realize there is no route to C.

The Effects of the “Count-to-Infinity” Problem Slow down route convergence. –When the network topology has changed, the routing protocol cannot immediately change the routing table to reflect the new topology. Loops now are formed. Packets are sent in a circle wasting network bandwidth What value should be used for “Infinity”? –Too small, good packets may be discarded if they need to traverse many hops. –Too large, the “count-to-infinity” problem may last too long and in the mean times, many packets will be trapped in the routing loops.

Many Solutions to the “Count-to- Infinity” Problems Hold-down –If the path you are using to D does down, you wait for some time before switching to another path. At the same time, you advertise your cost to D as infinity. –Slow convergence. Reporting the entire path instead of just the next hop –By checking the entire routing path to the destination, we can detect routing loops. –Too expensive.

Many Solutions to the “Count-to- Infinity” Problems (Cont’d) Split horizon –A router never advertises the cost of a destination to its neighbor N, if N is the next hop to that destination. –This solves many cases. However, it cannot solve some cases such as the following case.

Many Solutions to the “Count-to- Infinity” Problems (Cont’d) Triggered update –In non-Triggered update, new distance vector information is exchanged once every 30 seconds. This takes too much time before the the “count-to-infinity” problem to be detected. –Triggered update speeds up the detection of the “count-to-infinity” problem at the cost of more control messages and more oscillations.

Many Solutions to the “Count-to- Infinity” Problems (Cont’d) Source tracing –Augment a distance vector so that it carries not only the cost to a destination, but also the router immediately preceding the destination. –The purpose is to be able to construct the entire routing path to a destination without carrying the it. –Once we have the entire routing path, we can detect routing loops.

Link State Routing Algorithm Each router is responsible for meeting its neighbors and learning their names. Each router constructs a packet known as a link state packet, or LSP, which contains a list of names of the cost to each of its neighbors. The LSP is somehow transmitted to all the other routers, and each router stores the most recently received generated LSP from each other router. Each router, armed with a complete map of the topology, computes routes to each destination. OSPF uses LSR.

Link State Routing Algorithm (Cont’d) Meeting neighbors –Send special packets over a link to identify themselves Constructing an LSP –A router R generates an LSP periodically as well as when R discovers that It has a new neighbor. The cost of the link to an existing neighbor has changed. A link to a neighbor has gone down.

Link State Routing Algorithm (Cont’d) Disseminating the LSP to all routers –The most critical and difficult part of LSR. –If it is not done right, Different routers in a network may have different views of the network, causing back holes, routing loops, oscillations to happen. The LSP distribution may become cancerous, causing all network resources to be spent on processing LSPs. –Disseminating LSPs to other routers cannot rely on the routing protocols that is being used. This causes the chicken-or-the-egg problem. –We need to use a more primitive method. Flooding.

Flooding Guarantees That Every Router Receives a LSP When a router receives a packet from a link, for each other link, it makes a copy of the packet and send it out. The number of copies of the packet in the network grows exponentially like cancer.

An Improved Flooding Method Use TTL (hop count) to prevent a packet’s endless spawning. If a router R keeps the most recently generated LSP from each router S, R can recognize when it is receiving a duplicate of S’s most recently generated LSP, and refrain from flooding the packet more than once. Sounds good. Now the problem becomes how does a router know which LSP is the most recently generated LSP (not the most recently received LSP – not always the most recently generated LSP due to network queueing delay, or taking different path) from a router S?

Timestamp or Sequence Number Can Help Routers To Determine Which LSP Is More Recently Generated. A router can put a timestamp or a sequence number into its LSP so that other routers can which LSP is more recently generated. –What if, due to router bugs or signal errors, the timestamp or the sequence number jumps to 15 years later? –Also, the number of bits used to represent either timestamp or sequence number is limited (16 or 32). The timestamp or sequence number will wrap back.

The Method Used to Compare Two Sequence Numbers Two sequence numbers a and b between [0 and n]: –a is considered to be less than b if |a –b| n/2 and a > b.

Age Limits the Effect of a Bad LSP If we set an age in a LSP indicating the length of the period in which this LSP is considered as valid, a bad LSP (e.g., a timestamp that jumps 15 years into the future) will be purged away after some time (e.g., after 1 hour) Also, a router R that wants all other routers to discard its current LSP, can send a LSP with the currently highest sequence number and 0 as its age value.

LSR Use Dijkstra’s Algorithm to Compute One-to-Many Shortest Paths

Comparison of LSR and DV Nowadays, OSPF (using LSR) is more popular than RIP (using DV) Convergence speed –LSR is better than DV –A router propagates a LSP before updating its routing table. Functionality –LSR supports more functionality. (because it has the global network topology) Robustness –LSR is better. (because it has the global network topology) Computation cost –Roughly the same Bandwidth consumed –Different results for different cases Memory –The same. (k * n)

Exterior Routing Protocol

Border Gateway Protocol (BGP): A Path Distance Vector Routing Protocol Those routers that are at the border of an AS and connect to other routers in another AS are called “border gateway”. Border gateways of different ASes exchange their routing information. BGP uses various policies to determine the routing path for different traffic. E.g., –If the packet comes from Pentagon, do not let it traverse an AS in Iraq –If the packet comes from Toronto and destines to Vancouver, do not let it traverse an AS in US –If the packet comes from HINET, do not let it use my ASes.

BGP Message Format AS_Path: A list of ASes that are traversed for this route. Next_Hop: The IP address of the border router that should be use as the next hop to the destination listed in NLRI. NLRI: consists of a list of network addresses

AS_Path: AS1 Next_Hop: R1 NLRI: 1.1, 1.2, 1.3, 1.4 AS_Path: AS2, AS1 Next_Hop: R5 NLRI: 1.1, 1.2, 1.3, 1.4 AS_Path: AS2 Next_Hop: R5 NLRI: 2.1, 2.2, 2.3, 2.4 R9 Example