chapter 15 interior routing protocols 1 chapter 15 interior routing protocols
TRANSCRIPT
Chapter 15 Interior Routing Protocols1
Chapter 15Chapter 15Interior Routing Protocols
Chapter 15 Interior Routing Protocols2
IntroductionIntroduction
Routing protocols essential to operation of an internet
Routers forward IP datagrams from one router to another on path from source to destination
Router must have idea of topology of internet
Routing protocols provide this information
Chapter 15 Interior Routing Protocols3
Internet Routing PrinciplesInternet Routing Principles
Routers receive and forward datagramsMake routing decisions based on
knowledge of topology and conditions on internet
Decisions based on some least cost criterion (chapter 14)
Chapter 15 Interior Routing Protocols4
Fixed RoutingFixed Routing
Single permanent route configured for each source-destination pair– Routes fixed– May change when topology changes– Link cost not based on dynamic data– Based on estimated traffic volumes or
capacity of link
Chapter 15 Interior Routing Protocols5
Example ConfigurationExample Configuration
Chapter 15 Interior Routing Protocols6
Discussion of ExampleDiscussion of Example
5 networks, 8 routersLink cost for output side of each router for
each network– Next slide shows how fixed cost routing may
be implementedEach router has routing table
Chapter 15 Interior Routing Protocols7
Routing TableRouting Table
One required for each router Entry for each network
– Not for each destination– Routing only needs network portion
Once datagram reaches router attached to destination network, that router can deliver to host
IP address typically has network and host portion Each entry shows next node on route
– Not whole route
Chapter 15 Interior Routing Protocols8
Routing Tables in HostsRouting Tables in Hosts
May also exist in hosts– If attached to single network with single
router then not neededAll traffic must go through that router (called the
gateway)
– If multiple routers attached to network, host needs table saying which to use
Chapter 15 Interior Routing Protocols9
Example Routing TablesExample Routing Tables
Chapter 15 Interior Routing Protocols10
Adaptive RoutingAdaptive Routing
As conditions on internet changes, routes may change– Failure
Can route round problems
– CongestionCan route round congestionAvoid, or at least not add to further congestion
Chapter 15 Interior Routing Protocols11
Drawbacks of Adaptive RoutingDrawbacks of Adaptive Routing
More complex routing decisions– Router processing increases
Depends on information collected in one place but used in another– More information exchanged improves routing decisions but
increases overhead May react two fast causing congestion through
oscillation May react to slow, being irrelevant Can produce pathologies
– Fluttering– Looping
Chapter 15 Interior Routing Protocols12
FlutteringFluttering
Rapid oscillation in routingDue to router attempting load balancing or
splitting– Splitting traffic among a number of routes– May result in successive packets bound for
same destination taking very different routes (see next slide)
Chapter 15 Interior Routing Protocols13
Example of FlutteringExample of Fluttering
Chapter 15 Interior Routing Protocols14
Problems with FlutteringProblems with Fluttering
If in one direction only, route characteristics may differ in the two directions– Including timing and error characteristics
Confuses management and troubleshooting applications that measure these
Difficulty estimating round trip times TCP packets arrive out of order
– Spurious retransmission
– Duplicate acknowledgements
Chapter 15 Interior Routing Protocols15
LoopingLooping
Packet forwarded by router eventually returns to that router
Algorithms designed to prevent loopingMay occur when changes in connectivity
not propagated fast enough to all other routers
Chapter 15 Interior Routing Protocols16
Adaptive Routing AdvantagesAdaptive Routing Advantages
Improve performance as seen by userCan aid congestion controlBenefits depend on soundness of designAdaptive routing very complex
– Continual evolution of protocols
Chapter 15 Interior Routing Protocols17
Classification of Adaptive Classification of Adaptive Routing StrategiesRouting Strategies Based on information sources
– Local E.g. route each datagram to network with shortest queue Balance loads on networks May not be heading in correct direction
– Include preferred direction Rarely used
– Adjacent nodes Distance vector algorithms
– All nodes Link-state algorithms Both need routing protocol to exchange information
Chapter 15 Interior Routing Protocols18
Autonomous Systems (AS)Autonomous Systems (AS)
Group of routers exchanging information via common routing protocol
Set of routers and networks managed by single organization
Connected– Except in time of failure
Chapter 15 Interior Routing Protocols19
Interior Routing Protocol (IRP)Interior Routing Protocol (IRP)
Passes routing information between routers within AS
Does not need to be implemented outside AS– Allows IRP to be tailored
May be different algorithms and routing information in different connected AS
Need minimum information from other connected AS– At least one router in each AS must talk– Use Exterior Routing Protocol (ERP)
Chapter 15 Interior Routing Protocols20
Exterior Routing Protocol Exterior Routing Protocol (ERP)(ERP)Pass less information than IRPRouter in first system determines route to
target ASRouters in target AS then co-operate to
deliver datagramERP does not deal with details within
target AS
Chapter 15 Interior Routing Protocols21
IRP and ERPIRP and ERP
Chapter 15 Interior Routing Protocols22
Routing Information ProtocolRouting Information Protocol(RIP)(RIP)SimpleSuitable for small internetsWidely usedUses Distance vector routing
Chapter 15 Interior Routing Protocols23
Distance Vector RoutingDistance Vector Routing
Each node exchange information with neighbors– Directly connected by same network
Each node maintains three vectors– Link cost
– Distance vector
– Next hop vector Every 30 seconds, exchange distance vector with
neighbors Use this to update distance and next hop vector
Chapter 15 Interior Routing Protocols24
Distance Vector ExampleDistance Vector Example
Chapter 15 Interior Routing Protocols25
Distributed Bellman-FordDistributed Bellman-Ford
RIP is a distributed version of Bellman-Ford Original routing algorithm in ARPANET Each simultaneous exchange of vectors between
routers is equivalent to one iteration of step 2 In fact, asynchronous exchange used
– At start-up, get vectors from neighbors Gives initial routing
– By own timer, update every 30 seconds– Changes are propagated across network – Routing converges within finite time
Proportional to number of routers
Chapter 15 Interior Routing Protocols26
RIP Details – RIP Details – Incremental UpdateIncremental UpdateUpdates do not arrive from neighbors
within small time windowRIP packets use UDPTables updated after receipt of individual
distance vector– Add any new destination network– Replace existing routes with small delay ones– If update from router R, update all routes
using R as next hop
Chapter 15 Interior Routing Protocols27
RIP Details –RIP Details –Topology ChangeTopology ChangeIf no updates received from a router within
180 seconds, mark route invalid– Assumes router crash or network connection
unstable– Set distance value to infinity
Actually 16
Chapter 15 Interior Routing Protocols28
Counting to Infinity Problem (1)Counting to Infinity Problem (1)
Slow convergence may cause: All link costs 1 B has distance to network 5 as 2, next hop D A & C have distance 3 and next hop B
Chapter 15 Interior Routing Protocols29
Counting to Infinity Problem (2)Counting to Infinity Problem (2)
Suppose router D fails:– B determines network 5 no longer reachable via D
Sets distance to 4 based on report from A or C
– At next update, B tells A and C this
– A and C receive this and increment their network 5 distance to 5 4 from B plus 1 to reach B
– B receives distance count 5 and assumes network 5 is 6 away
– Repeat until reach infinity (16)
– Takes 8 to 16 minutes to resolve
Chapter 15 Interior Routing Protocols30
Counting to Infinity DiagramCounting to Infinity Diagram
Chapter 15 Interior Routing Protocols31
Split HorizonSplit Horizon
Counting to infinity problem caused by misunderstanding between B and A, and B and C– Each thinks it can reach network 5 via the other
Split Horizon rule says do not send information about a route back in the direction it came from– Router sending information is nearer destination than
you
– Erroneous route now eliminated within time out period (180 seconds)
Chapter 15 Interior Routing Protocols32
Poisoned ReversePoisoned Reverse
Send updates with hop count of 16 to neighbors for route learned from those neighbors– If two routers have routes pointing at each
other advertising reverse route with metric 16 breaks loop immediately
Chapter 15 Interior Routing Protocols33
RIP Packet FormatRIP Packet Format
Chapter 15 Interior Routing Protocols34
RIP Packet Format NotesRIP Packet Format Notes
Command: 1=request 2=reply– Updates are replies whether asked for or not– Initializing node broadcasts request– Requests are replied to immediately
Version: 1 or 2 Address family: 2 for IP IP address: non-zero network portion, zero host portion
– Identifies particular network Metric
– Path distance from this router to network– Typically 1, so metric is hop count
Chapter 15 Interior Routing Protocols35
RIP LimitationsRIP Limitations
Destinations with metric more than 15 are unreachable– If larger metric allowed, convergence becomes
lengthy Simple metric leads to sub-optimal routing tables
– Packets sent over slower links Accept RIP updates from any device
– Misconfigured device can disrupt entire configuration
Chapter 15 Interior Routing Protocols36
Open Shortest Path First Open Shortest Path First (OSPF)(OSPF)RIP limited in large internetsOSPF preferred interior routing protocol
for TCP/IP based internetsLink state routing used
Chapter 15 Interior Routing Protocols37
Link State RoutingLink State Routing
When initialized, router determines link cost on each interface
Router advertises these costs to all other routers in topology
Router monitors its costs– When changes occurs, costs are re-advertised
Each router constructs topology and calculates shortest path to each destination network
Not distributed version of routing algorithm Can use any algorithm
– Dijkstra
Chapter 15 Interior Routing Protocols38
FloodingFlooding Packet sent by source router to every neighbor Incoming packet resent to all outgoing links except source
link Duplicate packets already transmitted are discarded
– Prevent incessant retransmission All possible routes tried so packet will get through if route
exists– Highly robust
At least one packet follows minimum delay route– Reach all routers quickly
All nodes connected to source are visited– All routers get information to build routing table
High traffic load
Chapter 15 Interior Routing Protocols39
Flooding ExampleFlooding Example
Chapter 15 Interior Routing Protocols40
OSPF OverviewOSPF Overview
Router maintains descriptions of state of local links
Transmits updated state information to all routers it knows about
Router receiving update must acknowledge– Lots of traffic generated
Each router maintains database– Directed graph
Chapter 15 Interior Routing Protocols41
Router Database GraphRouter Database Graph
Vertices– Router– Network
Transit Stub
Edges– Connecting two routers– Connecting router to network
Built using link state information from other routers
Chapter 15 Interior Routing Protocols42
Sample Sample Autonomous Autonomous SystemSystem
Chapter 15 Interior Routing Protocols43
Resultant Resultant Directed Directed GraphGraph
Chapter 15 Interior Routing Protocols44
Link CostsLink Costs
Cost of each hop in each direction is called routing metric
OSPF provides flexible metric scheme based on type of service (TOS)– Normal (TOS) 0– Minimize monetary cost (TOS 2)– Maximize reliability (TOS 4)– Maximize throughput (TOS 8)– Minimize delay (TOS 16)
Each router generates 5 spanning trees (and 5 routing tables)
Chapter 15 Interior Routing Protocols45
SPF Tree SPF Tree for for Router 6Router 6
Chapter 15 Interior Routing Protocols46
AreasAreas
Make large internets more manageableConfigure as backbone and multiple areasArea – Collection of contiguous networks
and hosts plus routers connected to any included network
Backbone – contiguous collection of networks not contained in any area, their attached routers and routers belonging to multiple areas
Chapter 15 Interior Routing Protocols47
Operation of AreasOperation of Areas
Each are runs a separate copy of the link state algorithm– Topological database and graph of just that
area– Link state information broadcast to other
routers in area– Reduces traffic– Intra-area routing relies solely on local link
state information
Chapter 15 Interior Routing Protocols48
Inter-Area RoutingInter-Area Routing
Path consists of three legs– Within source area
Intra-area
– Through backboneHas properties of an areaUses link state routing algorithm for inter-area
routing
– Within destination area Intra-area
Chapter 15 Interior Routing Protocols49
OSPF Packet FormatOSPF Packet Format
Chapter 15 Interior Routing Protocols50
Packet Format NotesPacket Format Notes
Version number: 2 is current Type: one of 5, see next slide Packet length: in octets including header Router id: this packet’s source, 32 bit Area id: Area to which source router belongs Authentication type: null, simple password or
encryption Authentication data: used by authentication
procedure
Chapter 15 Interior Routing Protocols51
OSPF Packet TypesOSPF Packet Types
Hello: used in neighbor discoveryDatabase description: Defines set of link
state information present in each router’s database
Link state requestLink state updateLink state acknowledgement