Routing Within An Autonomous System RIP OSPF Chapter

  • Slides: 53
Download presentation
Routing Within An Autonomous System (RIP, OSPF) Chapter 15

Routing Within An Autonomous System (RIP, OSPF) Chapter 15

Static vs Dynamic Interior Routes Interior Routers n n Two routers within an autonomous

Static vs Dynamic Interior Routes Interior Routers n n Two routers within an autonomous system Are considered to be interior to one another How do they learn about their own networks? n Small, slowly changing systems Establish and modify routes by hand Update table when new network added or deleted Figure…routing is trivial

Figure 15. 1

Figure 15. 1

Disadvantages of manual system n n Cannot accommodate rapid growth Cannot accommodate rapid change

Disadvantages of manual system n n Cannot accommodate rapid growth Cannot accommodate rapid change Need automated methods n n n Respond to change more easily Improve reliability Better response to failures

Figure 15. 2

Figure 15. 2

Multiple physical paths n n Usually pick one to be primary Router(s) fail along

Multiple physical paths n n Usually pick one to be primary Router(s) fail along primary, must change Manually: time-consuming & error prone Even in small internets need automated system For automation n Interior routers must communicate Exchange routing information Once data established, advertise One interior router advertises to other autonomous systems via Exterior Gateway Protocol

No single interior protocol has emerged n n Varied topologies and technologies Tradeoffs between

No single interior protocol has emerged n n Varied topologies and technologies Tradeoffs between simplicity & functionality Easy to install & configure; less functionality n Multiple protocols have become popular Small AS n Choose a single one; use exclusively internally Larger AS n Often choose a small set

Interior Gateway Protocol n Used as generic description n Refers to any algorithm used

Interior Gateway Protocol n Used as generic description n Refers to any algorithm used by interior routers n Routers may run BGP to advertise reachability Need an IGP to obtain information within the AS

Figure 15. 3

Figure 15. 3

Routing Information Protocol (RIP) One of most widely used IGPs n n Also know

Routing Information Protocol (RIP) One of most widely used IGPs n n Also know as route-d Came from Univ of CA – Berkeley Developed for machines on their LANs n n Relies on physical network broadcast to make routing exchanges quickly Not designed to use on large WANs Versions of RIP adapted for WANs are sold

n Popularity not only due to technical merits Was distributed with popular 4 BSD

n Popularity not only due to technical merits Was distributed with popular 4 BSD UNIX systems Lots of TCP/IP sites used without even considering technical aspects Once installed it became the basis for local routing n RIP was built and adopted without a standard Most implementations derived from Berkeley code Interoperability was limited n Many undocumented details and subtleties New versions led to more problems Standard appeared in June 1988

RIP Operation n n Straightforward distance-vector routing Partitions participants into two categories Active: n

RIP Operation n n Straightforward distance-vector routing Partitions participants into two categories Active: n n Advertise their routes Only routers Passive: n n Do not advertise Host must use passive mode

n Active RIP routers broadcast every 30 seconds Sends routing update message n n

n Active RIP routers broadcast every 30 seconds Sends routing update message n n Takes information from current routing database Update is a set of pairs (IP address, integer distance to that network) Hop count is used as the distance metric One hop: directly connected Two hops: reachable through one other router Hops = number of networks datagram will encounter Hop count for shortest path not always optimal n n 3 Ethernets faster than 2 satellites Some RIP implementations allow assignment of artificially high hop counts when advertising slow networks

n Active & passive routers listen to broadcasts All update tables according to DV

n Active & passive routers listen to broadcasts All update tables according to DV algorithm May take some time for advertisements to propagate n Routers use hysteresis to improve performance Does not replace a route with an equal cost route Prevents oscillation among equal paths n Timers are used on all routes Solves problem of routes through crashed routers Start timer when install route in table Restart whenever receive msg advertising that route Route is invalid if 180 seconds pass without another advertisement

n RIP must handle three types of errors Routing loops n n Algorithm does

n RIP must handle three types of errors Routing loops n n Algorithm does not explicitly detect routing loops Must either assume participants can be trusted or take precautions to prevent Instabilities n n n Must limit hop count to prevent Maximum possible distance value is 16 If legitimate hop count is higher, must divide the internet into sections or use an alternate protocol Slow convergence n n n Routing messages propagate slowly across the network Can lead to inconsistencies Not unique to RIP; fundamental problem in any DV protocol Hop count limit helps but does not eliminate

Figure 15. 4

Figure 15. 4

Solving slow convergence n “Good news travel quickly; bad news travel slowly” Quick to

Solving slow convergence n “Good news travel quickly; bad news travel slowly” Quick to install good route Unreachable only after timeout; then learn and propagate new route n Split horizon update Router does not propagate information over the interface from where the route arrived R 2 would not advertise route to network 1 to R 1 If R 1 loses connectivity, it must quit advertising After a few rounds of routing updates, all routers agree that the network is unreachable Does not prevent all routing loops

n Hold down Router ignores information for a period of time Typical time is

n Hold down Router ignores information for a period of time Typical time is 60 seconds Done after receiving msg that network is unreachable Wait so all machines can get bad news; keeps from mistakenly accepting an out-of-date message All machines must have same idea of hold down n Otherwise, get routing loops Disadvantages: n n If routing loop occurs, will be preserved for the hold down Also preserves incorrect routes during the hold down time Even when alternatives exist

n Poison reverse When connection disappears n n Advertising router keeps entry for few

n Poison reverse When connection disappears n n Advertising router keeps entry for few update periods Puts infinite cost in the broadcasts Combine with triggered updates n n n Router sends immediate broadcast when get bad news Not wait for next broadcast time Minimizes time it is vulnerable to believing good news

n These techniques solve some problems; introduce others Triggered updates n n n Suppose

n These techniques solve some problems; introduce others Triggered updates n n n Suppose many routers share common network Single broadcast changes all tables; triggering more Broadcast avalanche Broadcasts n Take substantial bandwidth themselves Loops prevent stopping loops n Looping messages may prevent routing msgs to break loops Hold down in WANs n n Period so long, higher level protocol timers may expire Breaks the connections

RIP 1 message format n Messages are of two types Routing information messages n

RIP 1 message format n Messages are of two types Routing information messages n Periodic broadcast of unsolicited response messages Messages to request information n Routers or hosts can ask for info with request command Routers reply using a response command Both use same format

Figure 15. 5 Command Meaning 1 Request for partial or full routing information 2

Figure 15. 5 Command Meaning 1 Request for partial or full routing information 2 Response (network-distance pairs from sender’s routing table) 9 Update Request (used with demand circuits) 10 Update Response (used with demand circuits) 11 Update Acknowledge (used with demand circuits)

RIP 2 Address Conventions n Skip…. .

RIP 2 Address Conventions n Skip…. .

RIP route interpretation and aggregation n Version 1 contains no provision for subnet mask

RIP route interpretation and aggregation n Version 1 contains no provision for subnet mask Originally designed for classful addressing Extended to allow subnetting Important restriction: n n n Subnet routes can only go in updates sent across networks that are part of the subnetted prefix Cannot use with variable-length subnet addresses or classless Due to not having explicit subnet mask information May have updates for networks in & out of prefix n Router must prepare different update messages

RIP 2 extensions n n Contains provisions for explicit subnet mask Also include explicit

RIP 2 extensions n n Contains provisions for explicit subnet mask Also include explicit next-hop information Prevents routing loops Prevents slow conversion RIP 2 message format n Puts new info in unused octets of address field Router can use both versions simultaneously Version number in same octet; inspect before process n Adds 16 -bit ROUTE TAG Identify the origin of the route

Figure 15. 6

Figure 15. 6

Transmitting RIP messages n Messages do not have explicit length field Nor any explicit

Transmitting RIP messages n Messages do not have explicit length field Nor any explicit count of entries n Rely on delivery mechanism to tell length With TCP/IP n n Rely on UDP to tell receiver the message length RIP operates on UDP port 520

Disadvantage of RIP hop counts n n RIP restricts routing to a hop-count metric

Disadvantage of RIP hop counts n n RIP restricts routing to a hop-count metric RIP restricts size of any internet using it Has small hop count value for infinity (16) Limits span to at most 15 routers between hosts Is not a limit on total number or density of routers n In any case, hop count is a crude measure Not always get least delay or highest capacity routes Makes routes static; cannot change due to load

The Hello Protocol IGP that uses routing metric other than hops n n Now

The Hello Protocol IGP that uses routing metric other than hops n n Now obsolete Historically, used in original NSFNET backbone “fuzzball” routers Uses metric of delay Provides two functions Synchronizes clocks among a set of machines Allows each machine to compute shortest delay paths

n Messages carry timestamp as well as routing info Each participating machine maintains table

n Messages carry timestamp as well as routing info Each participating machine maintains table Contains best estimate of neighboring machine clocks Transmit timestamp with each packet n Receiver computes estimate of delay on the link by using the timestamp and its estimate of the sender’s clock Periodically poll neighbors to update clock estimates n Standard D-V approach for update Send table of destinations & estimated delays Receiver’s update tables if cheaper route advertised

Delay Metrics & Oscillation Is delay a good routing metric? n n n Would

Delay Metrics & Oscillation Is delay a good routing metric? n n n Would seem so Worked well in the early Internet backbone Instability is the reason most protocols do not use delay Any protocol that changes routes quickly can become unstable

Hop counts fixed; delay is not n Minor variations in delay measurements occur Hardware

Hop counts fixed; delay is not n Minor variations in delay measurements occur Hardware clock drift CPU load during measurement Delays by link-level synchronization n If react quickly to slight variations, get twostage oscillation Switch back and forth between alternate paths

Heuristics to help avoid oscillation n Hold down Slows down changing n Round off

Heuristics to help avoid oscillation n Hold down Slows down changing n Round off measurements or use threshold Ignore differences less than the threshold n Use average measurement Keep average of recent measurements Use K-out-of-N rule n K of the most recent N measurements must be less than the current delay before route can be changed

Can still have instability n Due to comparing delays on paths with different characteristics

Can still have instability n Due to comparing delays on paths with different characteristics Traffic has dramatic effect on delay As load increases, delay grows rapidly n Fall into positive feedback cycle Burst of traffic at one place increases delay Protocol changes route New traffic may cause another change in delay n Another route change occurs Must have mechanism to dampen oscillation

Previous heuristics may not help n n They help in simple case for paths

Previous heuristics may not help n n They help in simple case for paths with same throughput characteristics Not good when paths have different delay and throughput characteristics Compare serial line and satellite link n n n First, both paths idle; serial line have much less delay Then, traffic quickly overloads low capacity line Satellite delay will be less; change to it High capacity; load not significantly change delay But, unloaded serial line will now become attractive Routing will change again and the cycle will continue Oscillations do occur in practice Difficult to manage

Combining RIP, Hello, and BGP Single router may use multiple protocols n Interior Gateway

Combining RIP, Hello, and BGP Single router may use multiple protocols n Interior Gateway Protocol Gather routing information within AS n Exterior Gateway Protocol Advertise routes to other ASs n Should be easy to combine the two Technical and political obstacles exist

IGP protocols are routing protocols n n n RIP and HELLO used to update

IGP protocols are routing protocols n n n RIP and HELLO used to update routing tables Get info from other routers inside AS routed implements RIP Advertises information from local routing table Updates local table when it receives updates RIP trusts routers within the AS to send correct data Exterior protocols (BGP) do not trust routers n Do not advertise all possible routes in local table Keep database of reachability Apply policy constraints when sending/receiving info

n n Ignoring policy constraints can make some parts of the internet unreachable Example:

n n Ignoring policy constraints can make some parts of the internet unreachable Example: Suppose router running RIP Propagates route to Purdue; actually has no route Other RIP routers will accept and update Will pass Purdue traffic to the erroneous router Problem if EGP protocol not have policy constraints n n Border router pass illegal route to other ASs Purdue may become unreachable for parts of the internet

Gated: Inter-AS Communication gated n n Interface between autonomous systems Understands multiple protocols Both

Gated: Inter-AS Communication gated n n Interface between autonomous systems Understands multiple protocols Both IGP’s and BGP n Ensures policy constraints are honored Can accept RIP msgs and modify local table (routed) Can advertise routes from within AS using BGP n n n Has rules on which networks it may & may not advertise Also has rules on how to report distances to those networks Links IGP with BGP

Open SPF Protocol (OSPF) Chapter 13: link state algorithm n n Uses SPF to

Open SPF Protocol (OSPF) Chapter 13: link state algorithm n n Uses SPF to compute shortest paths Scales better than distance-vector algorithms OSPF is an IGP using link state algorithm n n n Designed by Internet Engineering Task Force To encourage adoption of link state technology Tackles several ambitious goals

Open standard n Anyone can implement without license fees Includes type of service routing

Open standard n Anyone can implement without license fees Includes type of service routing n n n Have multiple routes for a given destination Choose by TOS field in IP header OSPF first among TCP/IP protocols to have this Provides load balancing n Distributes traffic over multiple, same cost routes Can partition routers and networks into areas n Permits growth; makes management easier

Allows exchanges to be authenticated n Variety of authentication schemes Supports host-specific, subnet-specific, and

Allows exchanges to be authenticated n Variety of authentication schemes Supports host-specific, subnet-specific, and classless routes Accommodates multi-access nets (Ethernet) Can describe network via virtual network n n Abstracts away from details of physical connections Provides flexibility for managers Allows routers to exchange routing info learned from external sites n Distinguishes where information came from

Figure 15. 7 Type Meaning 1 Hello (used to test reachability) 2 Database description

Figure 15. 7 Type Meaning 1 Hello (used to test reachability) 2 Database description (topology) 3 Link status request 4 Link status update 5 Link status acknowledgement

Figure 15. 8

Figure 15. 8

Routers exchange database description msgs n n Used to initialize network topology database During

Routers exchange database description msgs n n Used to initialize network topology database During exchange: One router is master; other is slave Slave acknowledges each description with a response n Topology database may be large Can divide into several messages using I and M bits I = 1: is initial message M = 1: additional messages follow Bit S indicates if sent by master (1) or slave (0) Sequence numbers used to make sure all received

Figure 15. 9 Link Type Meaning 1 Router link 2 Network link 3 Summary

Figure 15. 9 Link Type Meaning 1 Router link 2 Network link 3 Summary link (IP network) 4 Summary link (link to border router) 5 External link (link to another site)

Link status request message n After exchanging DB descriptions, router may discover parts of

Link status request message n After exchanging DB descriptions, router may discover parts of its DB are out of date Requests neighbor to send update Lists specific links it wants info about Neighbor responds with most current information about those links

Figure 15. 10

Figure 15. 10

Figure 15. 11 Links from router to: - given area - specific network -

Figure 15. 11 Links from router to: - given area - specific network - single, subnetted IP network - networks at other sites Figure 15. 12

Routing with Partial Information Hosts can have partial information n Rely on routers Not

Routing with Partial Information Hosts can have partial information n Rely on routers Not all routers have complete information n n Usually single router in AS connects to others Suppose site connects to global Internet At least one router must have connection to an ISP Routers inside AS know all destinations within n Have default route to send all traffic to the ISP

Examine routing tables n Routers at center of Internet know all Have complete set

Examine routing tables n Routers at center of Internet know all Have complete set of routes to all destinations Learn from the routing arbiter system They do not use default routing If destination address not in their table: n n n Either address is not valid, or Address is valid but currently unreachable Routers beyond those at center do not know all Have an incomplete set of routes Rely on default routes for addresses they do not have

Using default routes for most routers has consequences n Local routing errors can go

Using default routes for most routers has consequences n Local routing errors can go undetected Machine in AS routes packet to external AS Suppose should have gone to local router External system will route it back Preserves connectivity even if routing incorrect Very bad for a WAN n Routing update messages will be smaller A good thing!

Summary Must have automated routing procedures IGPs n n Used by 2 routers under

Summary Must have automated routing procedures IGPs n n Used by 2 routers under control of single mgr Uses either DV or link state algorithm (SPF) RIP: DV implemented by routed n Uses split horizon, hold-down and poison reverse Hello: obsolete; uses delay versus hop count OSPF: uses link status algorithm gated n Interface between IGP (RIP) and EGP (BGP)