You are on page 1of 132

TN 206: Network Routers and

Routing Protocols

Routing Protocols
Autonomous System (AS)
 An autonomous system is a region of the Internet that is
administered by a single entity.
 Example: ISP.
 Routing is done differently within an autonomous system
(intradomain routing) and between autonomous system
(interdomain routing).

Autonomous System (AS)
Ethernet Ethernet Autonomous
System 1

Router Ethernet Router

Router

Router Ethernet

Autonomous
Ethernet
Router System 2 RouterEthernet
Interdomain and Intradomain Routing
Interdomain Routing
Intradomain Routing
 Routing between AS’s
 Routing within an AS
 Assumes that the Internet consists of
 Ignores the Internet outside a collection of interconnected AS’s
the AS
 Normally, there is one dedicated
 Protocols for Intradomain router in each AS that handles
routing are also called interdomain traffic.
Interior Gateway Protocols
 Protocols for interdomain routing are
or IGP’s.
also called Exterior Gateway
 Popular protocols are Protocols or EGP’s.
 RIP (simple, old)  Routing protocols:
 OSPF (better)
 EGP
 BGP (more recent)

4
Network as a Graph

 In the following, networks are represented as a network graph:


 Nodes (routers) are connected by networks
 network can be a link or a LAN
 network interface has cost- c(v,w)
 networks are destinations
 Net(v,w) is an IP address of a network
 For ease of notation, c(v,w)
Net(v,w) w
clouds between nodes are v
replaced by the Net
by simple links. c(v,n) Net(v,n)
n
Network as a Graph

 The cost of each link can be assigned manually or dynamically.


The cost can be based on latency, bandwidth, queue length, …
 Problem: find lowest-cost path between nodes. Each node
individually computes routes

c(v,w)
Net(v,w) w
v
Net
c(v,n) Net(v,n)
n
Distance Vector Algorithm: Routing Table

c(v,w): cost to transmit on the


interface to network Net(v,w)

Net(v,w): Network address of the network between v and


w
The network can be a link, but could also be a LAN
RoutingTable of node v
Dest via cost
(next hop)
Net(v,w) w
c(v,w)
v
Net n D (v,Net)
Net(v,n) Net
c(v,n)
n
Distance Vector Algorithm: Messages
RoutingTable of node v
Dest via cost
(next hop)

Net n D (v,Net)

Nodes send messages to their neighbors which contain routing table


entries [Net , D(v,Net)]
vv nn

A message has the format: [Net , D(v,Net)] means“My cost to go to


Net is D (v,Net)”
Distance Vector Algorithm: Sending Updates
RoutingTable of node v
Dest via cost
(next hop)
Net m D (v,Net )
1 1
Periodically, each node v sends
Net 2
n D (v,Net 2
) the content of its routing table
to its neighbors:
Net N
w D (v,Net N
)

[Net 1
,D(v,Net 1
)] [Net 1
,D(v,Net 1
)]
[Net N
,D(v,Net N
)] [Net N
,D(v,Net N
)]
m v w
[Net 1 ,D(v,Net 1)]

[Net N ,D(v,Net N )]

n
Initiating Routing Table I
 Suppose a new node v becomes active.
 The cost to access directly connected networks is zero:
 D (v, Net(v,m)) = 0
 D (v, Net(v,w)) = 0

 D (v, Net(v,n)) = 0
RoutingTable
c(v,m) c (v,w) via
Net(v,m) Net(v,w) Dest cost
(next hop)
m v w
Net(v,m) m 0
c(v,n)
Net(v,n) Net(v,w) w 0
Net(v,n) n 0
n
Initiating Routing Table II
RoutingTable

Dest via cost


(next hop)

Net(v,m) m 0
Net(v,w) w 0

Net(v,n) n 0

 New node v sends the routing table entry to all neighbors:

[Net(v,n),0]
[ n,0 ] [Net(v,n),0]
[ n,0 ]
[Net(v,w),0]
[w,0] [Net(v,m),0]
[m,0]
m
m v
v w
w
[m,0]
[Net(v,m),0]
[w,0][Net(v,w),0]

n
n
Initiating Routing Table III

 Node v receives the routing tables from other nodes and


builds up its routing table
[Net 1 ,D(m,Net 1)] [Net 1 ,D(w,Net 1)]

[Net N ,D(m,Net N )] [Net N ,D(w,Net N )]


m v w

[Net 1 ,D(n,Net 1)]

[Net N ,D(n,Net N )]
n
Updating Routing Tables I
Suppose node v receives a message from node m: [Net,D(m,Net)]
[Net,D(m,Net)]

Net m v w
c(v,m)
Net(v,m)

Node v updates its routing table and sends out further messages if
the message reduces the cost of a route:

if ( D(m,Net) + c (v,m) < D (v,Net) ) {


Dnew (v,Net) := D (m,Net) + c (v,m);
Update routing table;
send message [Net, Dnew (v,Net)] to all neighbors
}
Updating Routing Tables II
Before receiving the message:
RoutingTable
[Net,D(m,Net)] via
Dest cost
(next hop)
Net m v w
c(v,m)
Net ?? D(v,Net)
Net(v,m)

Suppose D (m,Net) + c (v,m) < D (v,Net): RoutingTable


Dest via cost
new
[Net,D (v,Net)] (next hop)

Net m v w
Net m D new
(v,Net)
c(v,m)
Net(v,m) [Net,D new (v,Net)]

n
Distance Vector Routing Protocols
 Each node maintains a set of triples
<Destination, Cost, NextHop>
 Exchange updates with neighbors
 Periodically (seconds to minutes)
 Whenever table changes (triggered update)
 Each update is a list of pairs
 <Destination, Cost>
 Update local table if receive a “better” route
 Smaller cost
 Refresh existing routes, delete if time out
Assume: - link cost is 1, i.e., c(v,w) = 1
- all updates, updates occur simultaneously
Example: - Initially, each router only knows the cost of
connected interfaces
10.0.1.0/24 10.0.2.0/24 10.0.3.0/24 10.0.4.0/24 10.0.5.0/24

.2 .1 .2 .1 .2 .1 .2 .1
Router A Router B Router C Router D

cost
cost

cost

cost
Net via Net via Net via Net via

t=0: t=0: t=0: t=0:


10.0.1.0 - 0 10.0.2.0 - 0 10.0.3.0 - 0 10.0.4.0 - 0
10.0.2.0 - 0 10.0.3.0 - 0 10.0.4.0 - 0 10.0.5.0 - 0

t=1: t=1: t=1: t=1:


10.0.1.0 - 0 10.0.1.0 10.0.2.1 1 10.0.2.0 10.0.3.1 1 10.0.3.0 10.0.4.1 1
10.0.2.0 - 0 10.0.2.0 - 0 10.0.3.0 - 0 10.0.4.0 - 0
10.0.3.0 10.0.2.2 1 10.0.3.0 - 0 10.0.4.0 - 0 10.0.5.0 - 0
10.0.4.0 10.0.3.2 1 10.0.5.0 10.0.4.2 1
t=2: t=2: t=2: t=2:
10.0.1.0 - 0 10.0.1.0 10.0.2.1 1 10.0.1.0 10.0.3.1 2 10.0.2.0 10.0.4.1 2
10.0.2.0 - 0 10.0.2.0 - 0 10.0.2.0 10.0.3.1 1 10.0.3.0 10.0.4.1 1
10.0.3.0 10.0.2.2 1 10.0.3.0 - 0 10.0.3.0 - 0 10.0.4.0 - 0
10.0.4.0 10.0.2.2 2 10.0.4.0 10.0.3.2 1 10.0.4.0 - 0 10.0.5.0 - 0
10.0.5.0 10.0.3.2 2 10.0.5.0 10.0.4.2 1
Example
10.0.1.0/24 10.0.2.0/24 10.0.3.0/24 10.0.4.0/24 10.0.5.0/24

.2 .1 .2 .1 .2 .1 .2 .1
Router A Router B Router C Router D

cost
cost

cost

cost
Net via Net via Net via Net via

t=2: t=2: t=2: t=2:


10.0.1.0 - 0 10.0.1.0 10.0.2.1 1 10.0.1.0 10.0.3.1 2 10.0.2.0 10.0.4.1 2
10.0.2.0 - 0 10.0.2.0 - 0 10.0.2.0 10.0.3.1 1 10.0.3.0 10.0.4.1 1
10.0.3.0 10.0.2.2 1 10.0.3.0 - 0 10.0.3.0 - 0 10.0.4.0 - 0
10.0.4.0 10.0.2.2 2 10.0.4.0 10.0.3.2 1 10.0.4.0 - 0 10.0.5.0 - 0
10.0.5.0 10.0.3.2 2 10.0.5.0 10.0.4.2 1

t=3: t=3:
t=3: t=3:
10.0.1.0 - 0 10.0.1.0 10.0.2.1 1 10.0.1.0 10.0.4.1 3
10.0.2.0 - 0 10.0.2.0 - 0 10.0.1.0 10.0.3.1 2
10.0.2.0 10.0.3.1 1 10.0.2.0 10.0.4.1 2
10.0.3.0 10.0.2.2 1 10.0.3.0 - 0 10.0.3.0 10.0.4.1 1
10.0.4.0 10.0.2.2 2 10.0.4.0 10.0.3.2 1 10.0.3.0 - 0
10.0.4.0 - 0 10.0.4.0 - 0
10.0.5.0 10.0.2.2 3 10.0.5.0 10.0.3.2 2
10.0.5.0 10.0.4.2 1 10.0.5.0 - 0

Now, routing tables have converged !


The Count-to-Infinity Problem
 Router A and C continue increasing their metric up to
infinity.
 Each claims to be able to reach destination network
through the partner
 To avoid this, in RIP no metric can be larger than 16
hops
 Disadvantage is that more than 15 hops to reach a
destination network is considered invalid
 To avoid long convergence on topology changes two
modifications to the RIP algorithm are
 Split horizon
 Triggered updates
The Count-to-Infinity Problem
AA 1 BB 1 CC

A's Routing Table B's Routing Table

to via cost to via cost


(next hop) (next hop)
C B 2 C C 1
now link B-C goes down
C B 2 C - oo

C 2 C oo

C - oo C A 3

C oo C 3

C B 4 C - oo

C 4 C oo
Count-to-Infinity
 The reason for the count-to-infinity problem is that each
node only has a “next-hop-view”
 For example, in the first step, A did not realize that its
route (with cost 2) to C went through node B
 How can the Count-to-Infinity problem be solved?
 Solution 1: Always advertise the entire path in an update
message (Path vectors)
 If routing tables are large, the routing messages
require substantial bandwidth
 BGP uses this solution
Count-to-Infinity
 The reason for the count-to-infinity problem is that each
node only has a “next-hop-view”
 For example, in the first step, A did not realize that its
route (with cost 2) to C went through node B
 How can the Count-to-Infinity problem be solved?
 Solution 2: Never advertise the cost to a neighbor if this
neighbor is the next hop on the current path (Split
Horizon)
 Example: A would not send the first routing update to
B, since B is the next hop on A’s current route to C
 Split Horizon does not solve count-to-infinity in all
cases!
Approaches to Shortest-Path Routing
There are two basic routing algorithms found on the Internet.
1. Distance Vector Routing
 Each node knows the distance (=cost) to its directly connected neighbors
 A node sends periodically a list of routing updates to its neighbors.
 If all nodes update their distances, the routing tables eventually converge
 New nodes advertise themselves to their neighbors
2. Link State Routing
 Each node knows the distance to its neighbors
 The distance information (=link state) is broadcast to all nodes in the
network
 Each node calculates the routing tables independently
Distance Vector Routing Protocols
 A router running a distance vector protocol does not know
the entire path to a destination; it only knows the distance
to the remote network and the direction, or vector. Its
knowledge comes through information from directly
connected neighbors.
 Like all routing protocols, distance vector protocols use a
metric to determine the best route.
 Distance vector protocols calculate the best route based on
the distance from a router to a network.
 An example of a metric used is hop count, which is the
number of routers, or hops, between the router and the
destination.
Calculating the Best Path
 Bellman-Ford equation
 Let:
 Da(b) denote the current best distance from a to b
 c(a,b)denote the cost of a link from a to b
 Then Dx(y) = minz(c(x,z) + Dz(y))
 Routing messages contain D
 D is any additive metric
 e.g, number of hops, queue length, delay
 log can convert multiplicative metric into an additive
one (e.g., probability of failure)
Distance Vector Routing Protocols
 Distance vector protocols usually require less complicated
configurations and management than link-state protocols.
 They can run on older, less powerful routers and require
lower amounts of memory and processing.
 Routers using distance vector protocols broadcast or
multicast their entire routing table to their neighbors at
regular intervals.
 If a router learns more than one route to a destination, it
calculates and advertises the route with the lowest metric.
Features of Distance Vector Routing Protocols
 Periodic Updates: Updates to the routing tables are sent at
the end of a certain time period. A typical value is 90
seconds.
 Triggered Updates: If a metric changes on a link, a router
immediately sends out an update without waiting for the end
of the update period.
 Full Routing Table Update: Most distance vector routing
protocol send their neighbors the entire routing table (not
only entries which change).
 Route invalidation timers: Routing table entries are invalid
if they are not refreshed. A typical value is to invalidate an
entry if no update is received after 3-6 update periods.
Distance Vector Routing Protocols
 This method of moving routing information through large
networks is slow.
 At any given moment, some routers may not have the
most current information about the network. This limits
the scalability of the protocols and causes issues such as
routing loops.
 Advantages: (a) Simple implementation and
maintenance (b) Low resource requirements
 Disadvantages: (a) Slow convergence (b)Limited
scalability (c) Routing loops
Routing Information Protocol (RIP)
 RIPv1 was the first and only IP routing protocol available
in the early days of networking.
 RIPv1 does not send subnet mask information in its routing
updates and, therefore, does not support VLSM and CIDR.
 RIPv1 automatically summarizes networks at the classful
boundary, treating all networks as though they were
default classes A, B, and C.
 As long as networks are contiguous, such as 192.168.1.0,
192.168.2.0, and so on, this feature may not pose a serious
problem.
Routing Information Protocol (RIP)
 RIPv1 was the first and only IP routing protocol available
in the early days of networking.
 RIPv1 does not send subnet mask information in its routing
updates and, therefore, does not support VLSM and CIDR.
 RIPv1 automatically summarizes networks at the classful
boundary, treating all networks as though they were
default classes A, B, and C.
 As long as networks are contiguous, such as 192.168.1.0,
192.168.2.0, and so on, this feature may not pose a serious
problem.
Routing Information Protocol (RIP)
 If the networks are discontiguous, for example if the
networks 192.168.1.0 and 192.168.2.0 are separated by
the network 10.0.1.0, RIPv1 may not correctly report the
routes.
 By default, RIPv1 broadcasts its routing updates to all
connected routers every 30 seconds.
RIPv1 Packet Format
IP header UDP header RIP Message 1: RIPv1

1: request
2: response
Command Version Set to 00...0
2: for IP
address family Set to 00.00
0…0: request full rou-
ting table 32-bit address

Unused (Set to 00...0)

(20 bytes)
one route entry
Address of destination
Unused (Set to 00...0)

Cost (measured in hops) metric (1-16)

Up to 24 more routes (each 20 bytes)


One RIP message can
have up to 25 route entries

32 bits
RIP v2
 RIP v2 has many of the features of RIPv1. It also includes
important enhancements.
 RIPv2 is a classless routing protocol that supports VLSM
and CIDR. A subnet mask field is included in v2 updates,
which allows the use of discontiguous networks.
 RIPv2 also has the ability to turn off automatic
summarization of routes.
RIP v2
 Both versions of RIP send their entire routing table out all
participating interfaces in updates.
 RIP v1 broadcasts these updates to 255.255.255.255.
This requires all devices on a broadcast network like
Ethernet to process the data.
 RIP v2 multicasts its updates to 224.0.0.9. Multicasts take
up less network bandwidth than broadcasts.
 Devices that are not configured for RIPv2 discard
multicasts at the Data Link Layer.
RIP v2
 Attackers often introduce invalid updates to trick a router
into sending data to the wrong destination or to seriously
degrade network performance.
 Invalid information can also end up in the routing table
due to poor configuration or a malfunctioning router.
 Encrypting routing information hides the content of the
routing table from any routers that do not possess the
password or authentication data.
 RIPv2 has an authentication mechanism, whereas RIPv1
does not.
RIP v2
 Although RIPv2 provides many enhancements, it is not an
entirely different protocol. RIPv2 shares many of the
features found in RIPv1, such as:
 Hop-count metric
 15-hop maximum
 TTL equals 16 hops
 Default 30-second update interval
 Route poisoning, poison reverse, split horizon, and hold-downs to
avoid loops
 Updates using UDP port 520
 Administrative distance of 120
 Message header containing up to 25 routes without authentication
RIP v2
 When a router starts up, each RIP-configured interface sends
out a request message. This message requests that all RIP
neighbors send their complete routing tables.
 RIP-enabled neighbors send a response message that includes
known network entries. The receiving router evaluates each
route entry based on the following criteria:
 If a route entry is new, the receiving router installs the route in
the routing table.
 If the route is already in the table and the entry comes from a
different source, the routing table replaces the existing entry if
the new entry has a better hop count.
 If the route is already in the table and the entry comes from the
same source, it replaces the existing entry even if the metric is not
better.
RIP v2
 The startup router then sends a triggered update out all
RIP-enabled interfaces containing its own routing table.
RIP neighbors are informed of any new routes.
 As long as routers send and process the correct versions of
routing updates, RIPv1 and RIPv2 are completely
compatible. By default, RIPv2 sends and receives only
version 2 updates.
 If a network must use both versions of RIP, the network
administrator configures RIPv2 to send and receive both
versions 1 and 2. By default, RIPv1 sends version 1
updates, but receives both versions 1 and 2.
RIP v2
 Within an enterprise, it may be necessary to use both
versions of RIP. For example, part of the network may be
migrating to RIPv2, whereas another part may be staying
with RIPv1.
 Overriding the global RIP configuration with interface-
specific behavior allows routers to support both versions
of RIP.
RIPv2 Packet Format
IP header UDP header RIP Message 2: RIPv2

1: request
2: response
Command Version Set to 00...0
2: for IP
address family Set to 00.00
0…0: request full rou-
ting table 32-bit address

Unused (Set to 00...0)

(20 bytes)
one route entry
Address of destination
Unused (Set to 00...0)

Cost (measured in hops) metric (1-16)

Up to 24 more routes (each 20 bytes)


One RIP message can
have up to 25 route entries

32 bits
RIPv2 Packet Format
IP header UDP header RIPv2 Message 2: RIPv2

Used to carry information


from other routing
protocols (e.g., Command Version Set to 00.00
autonomous system
address family route tag
number)
IP address
Subnet mask for IP
address Subnet Mask

(20 bytes)
one route entry
Next-Hop IP address
Identifies a better next-hop
metric (1-16)
address on the same
subnet than the advertising
router, if one exists Up to 24 more routes (each 20 bytes)
(otherwise 0….0)

32 bits
RIP Security
 Issue: Sending bogus routing updates to a router
 RIPv1: No protection
 RIPv2: Simple authentication scheme
IP header UDP header RIPv2 Message
2: plaintext
password
Command Version Set to 00.00

0xffff Authentication Type

Password (Bytes 0 - 3)

Password (Bytes 4 - 7)

Authetication
Password (Bytes 8- 11)

Password (Bytes 12 - 15)

Up to 24 more routes (each 20 bytes)

32 bits
RIP Problems

 Routing table inaccuracy: Both versions of RIP


automatically summarize subnets on the classful
boundary. This means that RIP recognizes subnets as a
single Class A, B, or C network. Enterprise networks
typically use classless IP addressing and a variety of
subnets, some of which are not directly connected to each
other, which creates discontiguous subnets.
 Unlike RIPv1, with RIPv2 the automatic summarization
feature can be disabled. When disabled, RIPv2 will report
all subnets with subnet mask information. This is done to
ensure a more accurate routing table.
RIP Problems

 Broadcast nature of RIP updates: As soon as the RIP


configuration lists a network command for a given
network, RIP immediately begins to send advertisements
out all interfaces that belong to that network.
 These updates may not be needed on all portions of a
network. For example, an Ethernet LAN interface passes
these updates to every device on its network segment,
which produces unnecessary traffic.
 The routing update could also be intercepted by any
device. This makes the network less secure.
RIP Problems
 A network running RIP needs time to converge. Some
routers may contain incorrect routes in their routing tables
until all routers have updated and have the same view of
the network.
 Erroneous network information may cause routing updates
and traffic to loop endlessly as they count to infinity. In
the RIP routing protocol, infinity occurs when the hop
count is 16.
 Routing loops negatively affect network performance. RIP
contains several features designed to combat this impact.
These features are often used in combination: Poisoned
reverse, Split horizon, Holddown timer, and Triggered
updates
Poisoned Reverse
 Poisoned reverse sets the metric for a route to 16, making
it unreachable. Because RIP defines infinity as 16 hops,
any network further away than 15 hops is unreachable.
 If a network is down, a router changes the metric for that
route to 16 so that all other routers see it as unreachable.
 This feature prevents the routing protocol from sending
information via poisoned routes.
Split Horizon

 Split horizon prevents the formation of loops.


 When multiple routers advertise the same network routes
to each other, routing loops may form.
 Split horizon dictates that a router receiving routing
information on an interface cannot send an update about
that same network back out the same interface.
Split Horizon with Poison Reverse
 This is an enhancement on Split Horizon, where all
networks are advertised yet those which have been learnt
through the specific interface will be advertised as
unreachable on that interface.
 When a router learns a route which becomes unreachable,
this route is immediately deleted from the local table.
 This avoids propagation of erroneous routes
 Poison Reverse is useless when the network has no
redundant links.
Split Horizon with Poison Reverse

 Major disadvantage is that the size of routing


announcements are larger than split horizon
advertisements.
 Split horizon/split horizon with poison reverse only help
between two nodes.
 Can still get loop with three nodes involved.
 Might need to delay advertising routes after changes, but
affects convergence time
Hold-down Timer
 The hold-down timer stabilizes routes.
 The hold-down timer refuses to accept route updates with a
higher metric to the same destination network for a period
after a route goes down.
 If, during the hold-down period, the original route comes
back up or the router receives route information with a
lower metric, the router installs the route in the routing table
and immediately begins to use it.
 The default hold-down time is 180 seconds, six times the
regular update period. The default can be changed.
 However, any hold-down period increases the convergence
time and has a negative impact on network performance.
Triggered Updates

 When a route fails, RIP does not wait for the next periodic
update.
 Instead, RIP sends an immediate update, called a
triggered update. It advertises the failed route by
increasing the metric to 16, effectively poisoning the route.
 This update places the route in hold-down status while RIP
attempts to locate an alternate route with a better metric.
RIP Limitations
 The RIP distance vector routing protocol is easy to
configure and requires minimal amounts of router
resources in order to function.
 However, the simple hop count metric used by RIP is not
an accurate way to determine the best path in complex
networks. Additionally, the RIP limitation of 15 hops can
mark distant networks as unreachable.
 RIP issues periodic updates of its routing table, which
consumes bandwidth, even when no network changes have
occurred. Routers must accept these updates and process
them to see if they contain updated route information.
RIP Limitations

 Updates passed from router to router take time to reach all


areas of the network.
 As a result, routers may not have an accurate picture of the
network.
 Routing loops can develop due to slow convergence time,
which wastes valuable bandwidth.
 These characteristics limit the usefulness of the RIP
routing protocol within the enterprise environment.
Link-State Protocols
 Enterprise networks and ISPs use link-state protocols
because of their hierarchical design and ability to scale
for large networks.
 The properties of link state protocols are:
 Each node requires complete topology information
 Link state information must be flooded to all nodes
 Guaranteed to converge
 Distance vector routing protocols are usually not the right
choice for a complex enterprise network, instead, Link-
State Protocols can be used.
Link State Routing
 Also called shortest path first (SPF) forwarding.
 Named after Dijkstra’s algorithm (1959) which it uses to
compute routes.
 All routers have tables which contain a representation of the
entire network topology.
 In the form of lists of routers and information about each
router’s neighbours and the connection between the two.
 Each router creates a link state packet (LSP) which contains
names (e.g. network addresses) and cost to each of its
neighbours
 The LSP is transmitted to all other routers, who each update
their own records
 When a routers receives LSPs from all routers, it can use
(collectively) that information to make topology-level decisions
Operation of a Link State Routing protocol

Received Dijkstra’s
Link State Algorithm IP Routing
LSAs Database Table

LSAs are flooded


to other interfaces
Link State Packets
 LSPs are generated and distributed when:
 A time period passes
 New neighbours connect to the router
 The link cost of a neighbour has changed
 A link to a neighbour has failed (link failure)
 A neighbour has failed (node failure)
 LSP are essentially a list of tuples, containing:
 The name of a neighbour to a router, which may be a router
or a network.
 The cost of the link to that neighbour
Link State Packets
 Distribution of LSPs can be difficult
 Routers themselves are the means for delivering messages.
 How do routers deliver their own messages, particularly
when routers are in an inconsistent state. e.g. During link
failure, before each router has been notified of the problem
 One method for LSP distribution: Flooding
 Each LSP received is transmitted to every direct neighbour
(except the neighbour where the LSP came from)
 This creates an exponential number of packets on the
network (similar to O(2R), where R is the number of routers)
 It does, however, guarantee that the LSP will be received by
every router. Assuming that node or link failure does
not occur, and LSPs are not somehow lost
Link State Packets
 An improvement on this scheme is as follows:
 When an LSP is received, it is compared with the stored
copy
 If it is identical to the stored copy, it is dropped.
 If it is different, the stored LSP is overwritten with the
new LSP and the LSP is transmitted to every direct
neighbour (except the source of the LSP).
 This scheme works because if a given router has already
received a LSP from another neighbour, it will have also
already distributed the LSP to all of its neighbours.
 This scheme has a network complexity similar to O(R2).
Link State Routing Algorithm
 Ok, now that we know how to distribute LSPs, how are
they used to determine routes?
 The algorithm used (mostly) was developed by Dijkstra
 Essentially, the algorithm runs at each router, computing
each possible path to the destination, adding up each cost.
The path with the lowest cost is used
The algorithm requires the following information:
 Link state database: List of all the latest LSPs from
each router on the network
 Path: Tree structure storing previously computed best
paths
 Consider this a sort of cache
 Data type for nodes: (ID, path cost, port)
Link State Routing Algorithm
 Tent: Tree structure storing paths currently being
tested and compared (tentative)
 Consider this a sort of rough workspace
 Data type for nodes: (ID, path cost, port)
 Forwarding database: Table storing all IDs that can
be reached, and the port to which messages should be
sent
 This is simply a reduced version of the ‘Path’, which
contains (destination, port) pairs
 This can be used by the router to quickly forward packets
for which the best path has already been determined
 Data type for table rows: (ID, port)
Dijkstra’s LSR Algorithm
 Initially, PATH is just a root containing (this router’s ID,
0, 0)
 For every node placed into path, N:
 For all neighbours M of node N:
o If M is not in TENT, add a node to TENT for M (use the

LSP for N to determine link cost)


o If M is in TENT already, and its cost is lower than an

existing entry for M, replace that entry with information


from N’s LSP
o If M is in TENT already, but its cost is higher, ignore N’s

link to M
o Calculate the shortest route in TENT

 If the shortest route has lower cost than the route in


PATH, overwrite the route in PATH with the route in
TENT
Dijkstra’s Shortest Path Algorithm for a Graph
Input: Graph (N,E) with
N the set of nodes and E  N  N the set of edges
dvw link cost (dvw = infinity if (v,w)  E, dvv = 0)

s source node.

Output: Dn cost of the least-cost path from node s to node n

M = {s};
for each n  M
Dn = dsn;
while (M  all nodes) do
Find w  M for which Dw = min{Dj ; j  M};
Add w to M;
for each n  M
Dn = minw [ Dn, Dw + dwn ];
Update route;
enddo
Dijkstra’s LSR Algorithm
 Consider the following network:

6 2
A B C 5

2 1 2
G
2 4
D E F 1

Link state database:

A B C D E F G
B 6 A 6 B 6 A 2 B 1 C 2 C 5
D 2 C 2 F 2 E 2 D 2 E 4 F 1
E 1 G 5 F 4 G 1
Dijkstra’s LSR Algorithm
 Now, if we want to generate a PATH for C:
 First, we add (C,0,0) to PATH

C (0)
Dijkstra’s LSR Algorithm
 Examine C’s LSP
 Add F, G, and B to TENT

C (0)

(2) (5) (2)


F G B
Dijkstra’s LSR Algorithm
 Place F in PATH (shown as solid line)
 Add G and E to TENT (adding costs)

C (0)

(2) (5) (2)


F G B

(3) (6)
G
E
Dijkstra’s LSR Algorithm
 G exists in TENT twice, keep only the best
 The new G is a better path than the old (3 < 5)

C (0)

(2) (5) (2)


F G B

(3) (6)
G
E
Dijkstra’s LSR Algorithm
 Put B into path (shown as solid line)
 Add A and E to TENT

C (0)

(2) (2)
F B

(3) (6) (3) (8)


G A
E E
Dijkstra’s LSR Algorithm
 E exists in TENT twice, keep only the best
 The new E is better than the old (3 < 6)

C (0)

(2) (2)
F B

(3) (6) (3) (8)


G A
E E
Dijkstra’s LSR Algorithm
 Place E in PATH (shown as solid line)
 Add D to TENT

C (0)

(2) (2)
F B

(3) (3) (8)


G A
E

(5)
D
Dijkstra’s LSR Algorithm
 Place G in PATH (shown as solid line)
 All G’s LSP elements already exist in TENT

C (0)

(2) (2)
F B

(3) (3) (8)


G A
E

(5)
D
Dijkstra’s LSR Algorithm
 Place D in PATH (shown as solid line)
 Add path to A since it is better than old A

C (0)

(2) (2)
F B

(3) (3) (8)


G A
E

(5)
D

(7)
A
Dijkstra’s LSR Algorithm
 Place A in PATH (shown as solid line)
 All A’s LSP elements already exist in PATH

C (0)

(2) (2)
F B

(3) (3)
G
E

(5)
D

(7)
A
Dijkstra’s LSR Algorithm
 We are done since all routes from TENT were placed into
PATH

C (0)

(2) (2)
F B

(3) (3)
G
E

(5)
D

(7)
A
Dijkstra’s LSR Algorithm
 We can now create a forwarding database:

Forwarding Database
C (0) Destination Port

(2) (2) C C
F B
F F
(3) (3)
G
E G F
B B
(5) E B
D
D B
(7)
A A B
LSR Topology Changes
 LSR forwarding tables must be recalculated whenever a
topology change occurs
 For example, a new router and/or link is added to the
network. This new link may provide a more efficient
route to one or more other nodes.
 For example, a given link’s cost is reduce. This new
link may now provide the lowest total cost route to a
destination that was previously forwarded in another
direction.
 For example, a given link’s cost is increased. This new
link may no longer provide the lowest total cost route
to a given destination, and another route should now be
chosen
LSR Topology Changes

 In a nutshell, LSR routers should invalidate (indicate that


it needs to be regenerated) its PATH data structure, and
thus its forwarding table. The entire PATH generation
algorithm (e.g. Dijkstra’s algorithm) should be reapplied.
Topology Change Example
 Let’s consider our previously generated PATH
structure for the router C

C (0)

(2) (2)
F B

(3) (3)
G
E

(5)
D

(7)
A
Topology Change Example
 Say we receive an LSP from router B, indicating the
link cost from B to E is now 6.

C (0)

(2) (2)
F B

(3) (3)
G
E

(5)
D

(7)
A
Topology Change Example
 The total route costs are different in PATH:

C (0)

(2) (2)
F B

(3) (8)
G
E

(10)
D

(12)
A
Topology Change Example
 Consider for now, only the cost to A

C (0)

(2) (2)
F B

(3) (8)
G
E

(10)
D

(12)
A
Topology Change Example
 Recall that another path to A existed
 Now, that path is more efficient

C (0)

(2) (2)
F B

(3) (8) (8)


G A
E

(10)
D

(12)
A
Topology Change Example
 The PATH data structure is complete, the forwarding
table can now be regenerated.

C (0)

(2) (2)
F B

(3) (8) (8)


G A
E

(10)
D
Topology Change Example

 In a router, which will be running as a computer


program, finding if a new path exists essentially requires
complete re-execution of Dijkstra’s algorithm.

 For example, there could have been many routes to A,


each of which would have to be compared to find the
most efficient route.
Distance Vector vs. Link State Routing
 With distance vector routing, each node has information
only about the next hop:
 Node A: to reach F go to B
 Node B: to reach F go to D
 Node D: to reach F go to E
AA BB CC
 Node E: go directly to F
 Distance vector routing makes
poor routing decisions if
directions are not completely DD EE FF
correct (e.g., because a node is down).
 If parts of the directions incorrect, the routing may be
incorrect until the routing algorithms has re-converged.
Distance Vector vs. Link State Routing
 In link state routing, each node has a complete map of the
topology
A B C A B C A B C

D E F D E F D E F
 If a node fails, each AA BB CC
node can calculate
the new route

 Difficulty: All nodes need to DD EE FF


have a consistent view of the A B C
A B C
A B C

network D E F
D E F
D E F
Link State Routing: Basic principles
1. Each router establishes a relationship (“adjacency”)
with its neighbors
2.Each router generates link state advertisements
(LSAs) which are distributed to all routers
LSA = (link id, state of the link, cost, neighbors of
the link)
3. Each router maintains a database of all received LSAs
(topological database or link state database), which
describes the network has a graph with weighted edges
4. Each router uses its link state database to run a shortest
path algorithm (Dijkstra’s algorithm) to produce the
shortest path to each network
OSPF
 Open Shortest Path First (OSPF) is an example of a link-
state routing protocol.

 OSPF is an open standard routing protocol, developed by


the Internet Engineering Task Force (IETF) to support IP
traffic.
 OSPF is a classless interior gateway protocol (IGP). It
divides the network into different sections, which are
referred to as areas.
 This division allows for greater scalability. Working with
multiple areas allows the network administrator to
selectively enable route summarization and to isolate
routing issues within a single area.
OSPF

 Link-state routing protocols, such as OSPF, do not send


frequent periodic updates of the entire routing table.
 Instead, after the network converges, a link-state protocol
sends an update only when a change in the topology
occurs, such as a link going down.
 In addition, OSPF performs a full update every 30
minutes.
OSPF

 Link-state routing protocols like OSPF work well for


larger hierarchical networks where fast convergence is
important.
 Compared with distance vector protocols, link-state
routing protocols:
 Requires more complex network planning and configuration
 Requires increased router resources
 Requires more memory for storing multiple tables
 Requires more CPU and processing power for the complex
routing calculations
 With the high performance of routers available today,
however, these requirements are usually not a problem.
OSPF
 Routers running RIP receive updates from their immediate
neighbors, but with no details about the network as a whole.
 Routers running OSPF generate a complete map of the
network from their own viewpoint.
 This map allows them to quickly determine loop-free
alternate paths in the case of a network link failure.
 OSPF does not automatically summarize at major network
boundaries(Supports subnetting).
 OSPF bases the cost metric for an individual link on its
bandwidth or speed. The metric for a particular destination
network is the sum of all link costs in the path. If there are
multiple paths to the network, the path with the lowest
overall cost is the preferred path and is placed in the routing
table.
OSPF Features
 Provides authentication of routing messages.
 Enables load balancing by allowing traffic to be split
evenly across routes with equal cost.
 Type-of-Service routing allows to setup different routes
dependent on the TOS field.
 Supports subnetting.
 Supports multicasting.
 Allows hierarchical routing.
OSPF Metrics and Convergence

 The OSPF link-state or topology database stores the SPF


tree information. The router installs the shortest path to
each network in the routing table.
 Convergence occurs when all routers:
 Receive information about every destination on the network
 Process this information with the SPF algorithm
 Update their routing tables
OSPF Metrics and Convergence
OSPF Metrics and Convergence
 OSPF routers within a single area advertise information
about the status of their links to their neighbors.
 Messages called Link State Advertisements, or LSAs, are
used to advertise this status information.
 Once an OSPF router receives LSAs describing all of the
links within an area, it uses the SPF algorithm, also called
Dijkstra's Algorithm, to generate a topological tree, or
map of the network.
 Each router running the algorithm identifies itself as the
root of its own SPF tree. Starting from the root, the SPF tree
identifies the shortest path to each destination and the total
cost of each path.
Example Network
10.10.10.1 10.10.10.2 10.10.10.4 10.10.10.6
.1
4 .2 .2
2 .4 .4
1 .6

10.1.1.0 / 24 10.1.4.0 / 24 10.1.7.0 / 24


.1 .2 .4
.6

Router IDs are


selected 3 2 3 1

10.1.3.0 / 24

10.1.6.0 / 24
independent of
interface addresses
.3 .5

.3 5 .5
.3 .5
10.1.5.0/24
Link costs are called Metric
10.10.10.2 10.10.10.5
Metric is in the range [0 , 216]
Metric can be asymmetric
Link State Advertisement (LSA)
10.10.10.1 10.10.10.2 10.10.10.4

 The LSA of router 10.10.10.1 is as .1 4 .2 .2 .4 .4

10.1.1.0 / 24 10.1.4.0 / 24 10.1.7


follows: .1 .2 .4

 Link State ID: 10.10.10.1 = Router ID


3 2
 Advertising Router: 10.10.10.1 = Router ID

10.1.3.0 / 24

10.1.6.0 / 24
 Number of links: 3 = 2 links plus router itself .3 .5

.3 .5
.3 .5
10.1.5.0/24
 Description of Link 1: Link ID = 10.1.1.1, Metric = 4
10.10.10.3 10.10.10.5
 Description of Link 2: Link ID = 10.1.2.1, Metric = 3
 Description of Link 3: Link ID = 10.10.10.1, Metric = 0

Each router sends its LSA to all routers in the


network (using a method called reliable flooding)
Link State Database
 The collection of all LSAs is called the link-
state database
 Each router has and identical link-state database
 Useful for debugging: Each router has a complete
description of the network
 If neighboring routers discover each other for
the first time, they will exchange their link-state
databases
 The link-state databases are synchronized using
reliable flooding.
Network and Link State Database
10.10.10.1 10.10.10.2 10.10.10.4 10.10.10.6
.1 .2 .2 .4 .4 .6

10.1.1.0 / 24 10.1.4.0 / 24 10.1.7.0 / 24


.1 .2 .4
.6

Each router has a

10.1.3.0 / 24

10.1.6.0 / 24
database which
contains the LSAs .3 .5

from all other .3 .5


.5
.3 10.1.5.0/24
routers
10.10.10.2 10.10.10.5
LS Type Link StateID Adv. Router Checksum LS SeqNo LS Age
Router-LSA 10.1.10.1 10.1.10.1 0x9b47 0x80000006 0
Router-LSA 10.1.10.2 10.1.10.2 0x219e 0x80000007 1618
Router-LSA 10.1.10.3 10.1.10.3 0x6b53 0x80000003 1712
Router-LSA 10.1.10.4 10.1.10.4 0xe39a 0x8000003a 20
Router-LSA 10.1.10.5 10.1.10.5 0xd2a6 0x80000038 18
Router-LSA 10.1.10.6 10.1.10.6 0x05c3 0x80000005 1680
OSPF Packet Format

IP header OSPF Message

OSPF packets are not OSPF Message


Body of OSPF Message
Header
carried as UDP
payload!
OSPF has its own IP
protocol number: 89
Message Type
Specific Data
LSA LSA ... ... LSA

TTL: set to 1 (in most cases)


LSA LSA
Header Data

Destination IP: neighbor’s IP address or 224.0.0.5


(ALLSPFRouters) or 224.0.0.6 (AllDRouters)
OSPF Packet Format

OSPF Message
Header
Body of OSPF Message

2: current version is
OSPF V2
version type message length ID of the Area from
Message types: source router IP address which the packet
originated
1: Hello (tests reachability)
Area ID
2: Database description
3: Link Status request checksum authentication type 0: no authentication
4: Link state update 1: Cleartext password
authentication 2: MD5 checksum
5: Link state acknowledgement (added to end packet)
authentication
Standard IP checksum taken
32 bits
over entire packet
Authentication passwd = 1: 64 cleartext password
Authentication passwd = 2: 0x0000 (16 bits)
KeyID (8 bits) Prevents replay
Length of MD5 checksum (8 bits) attacks
Nondecreasing sequence number (32 bits)
OSPF LSA Format

LSA Link Age Link Type

LSA Link State ID


Header advertising router
LSA LSA link sequence number
Header Data
checksum length

Link ID

Link 1 Link Data


Link Type #TOS metrics Metric

Link ID

Link 2 Link Data


Link Type #TOS metrics Metric
OSPF Neighbors and Adjacencies
 With OSPF, link state updates are sent when network
changes occur. But how does a router know when a
neighboring router fails?
 OSPF routers establish and maintain neighbor relationships,
or or adjacencies, with other connected OSPF routers.
 Adjacency is an advanced form of neighborship between
routers that are willing to exchange routing information.
 When routers initiate an adjacency with neighbors, an
exchange of link-state updates begins. Routers reach a
FULL state of adjacency when they have synchronized
views on their link-state database.
OSPF Neighbors and Adjacencies
 The OSPF Hello protocol is used to initially establish and
maintain adjacencies.
 The hello protocol sends very small hello packets to directly
connected OSPF routers on the multicast address of
224.0.0.5.
 The packets are sent every 10 seconds on Ethernet and
broadcast links and every 30 seconds for non-broadcast links.
Router settings are also included in the hello packets.
 The settings include the hello interval, dead interval, and
network type, as well as the authentication type and
authentication data if configured. For any two routers to
form an adjacency, all settings must match. The router
records neighbor adjacencies discovered in an OSPF
adjacencies database.
Discovery of Neighbors
 Routers multicasts OSPF Hello packets on all OSPF-enabled
interfaces.
 If two routers share a link, they can become neighbors, and
establish an adjacency
10.1.10.1 10.1.10.2

Scenario:
Router 10.1.10.2 restarts
OSPF Hello

OSPF Hello: I heard 10.1.10.2

 After becoming a neighbor, routers exchange their link state


databases
Scenario:
Neighbor discovery and Router
10.1.10.2
database synchronization
10.1.10.1 10.1.10.2
restarts

Discovery of OSPF Hello


adjacency
OSPF Hello: I heard 10.1.10.2
After neighbors are discovered the nodes exchange their databases

Sends database Database Description: Sequence = X


Sends empty
description.
Database Description: Sequence = X, 5 LSA headers = database
(description Router-LSA, 10.1.10.1, 0x80000006
Router-LSA, 10.1.10.2, 0x80000007 description
only contains Router-LSA, 10.1.10.3, 0x80000003
LSA headers) Router-LSA, 10.1.10.4, 0x8000003a Database
Router-LSA, 10.1.10.5, 0x80000038
Acknowledges Router-LSA, 10.1.10.6, 0x80000005 description of
receipt of 10.1.10.2
Database Description: Sequence = X+1, 1 LSA header=
description Router-LSA, 10.1.10.2, 0x80000005

Database Description: Sequence = X+1


Regular LSA exchanges
10.1.10.1 10.1.10.2

Link State Request packets, LSAs =


Router-LSA, 10.1.10.1,
10.1.10.2
Router-LSA,
Router-LSA,
10.1.10.2,
10.1.10.3,
explicitly requests
Router-LSA, 10.1.10.4, each LSA from
Router-LSA, 10.1.10.5,
Router-LSA, 10.1.10.6, 10.1.10.1

Link State Update Packet, LSAs =


10.1.10.1 Router-LSA, 10.1.10.1, 0x80000006
Router-LSA, 10.1.10.2, 0x80000007 10.1.10.2 has more
sends Router-LSA, 10.1.10.3, 0x80000003
recent value for
requested Router-LSA, 10.1.10.4, 0x8000003a
Router-LSA, 10.1.10.5, 0x80000038 10.0.1.6 and sends it
LSAs Router-LSA, 10.1.10.6, 0x80000005
to 10.1.10.1
(with higher sequence
Link State Update Packet, LSA =
Router-LSA, 10.1.1.6, 0x80000006
number)
Routing Data Distribution
 LSA-Updates are distributed to all other routers via
Reliable Flooding
 Example: Flooding of LSA from 10.10.10.1
10.10.10.1 10.10.10.2 10.10.10.4 10.10.10.6
LSA LSA LSA
Update ACK Update Update
ACK database database ACK database
LS

ACK
ACK
LSA

LSA
LSA

AC A
LSA
A

ACK

LS
ACK
AC

K
K

LSA
Update ACK Update
database database
10.10.10.2 10.10.10.5
Dissemination of LSA-Update
 A router sends and re-floods LSA-Updates, whenever the
topology or link cost changes. (If a received LSA does not
contain new information, the router will not flood the
packet)
 Exception: Infrequently (every 30 minutes), a router will
flood LSAs even if there are not new changes.
 Acknowledgements of LSA-updates:
 explicit ACK, or
 implicit via reception of an LSA-Update

 Question: If a new node comes up, it could build the


database from regular LSA-Updates (rather than exchange
of database description). What role do the database
description packets play?
OSPF Neighbors and Adjacencies
 The router goes through several state changes before
becoming fully adjacent with its neighbor:
 Init, 2-Way, Exstart, Exchange, Loading and Full
 Init: the router received an initial hello packet from its
neighbor. When a router receives a hello packet from a
neighbor, it lists the sending router ID in its own hello
packet as an acknowledgment.
 2-way: bi-directional communication is established in that
each router has seen the hello packet from each other. This
state is attained when the router receiving the hello packet
sees its own Router ID within the neighbor field of the hello
packet. At this state, a router decides whether to become
fully adjacent with this neighbor.
OSPF Neighbors and Adjacencies
 Exstart: The routers establish a master-slave relationship
and choose the initial sequence number for adjacency
formation. Between two routers, the router with the higher
router ID becomes the master and starts the exchange (DR
and BDR election).
 Exchange: OSPF routers exchange database descriptor
(DBD) packets that contain link-state advertisement (LSA)
headers only. The DBD describes the contents of the entire
link-state database. Each DBD packet has a sequence
number which can be incremented only by the master.
 Loading: Based on the information provided by the DBDs,
routers send link-state request packets for more specific
information. The neighbor provides the requested link-state
information in link-state update packets.
OSPF Neighbors and Adjacencies
 Full: All the router and network LSAs are exchanged and
the router databases are fully synchronized. It is the normal
state for an OSPF router. If a router is stuck in another state,
this is an indication of a problem such as mismatched
settings.

 The only exception to this is the 2-way state. In a broadcast


environment, a router will only achieve a full state with a
designated router (DR) and a backup designated router
(BDR). All other neighbors will be viewed in the 2-way
state.
OSPF Neighbors and Adjacencies

 The purpose of the DR and BDR is to reduces the number


of updates sent, unnecessary traffic flow, and processing
overhead on all routers.
 This is accomplished by requiring all routers to accept
updates from the DR only. On broadcast network
segments there is only one DR and BDR.
 All other routers must have a connection to the DR and
BDR. When a link fails, the router with information about
the link sends the information to the DR, using the
multicast address 224.0.0.6.
OSPF Neighbors and Adjacencies
 Not all link types require a DR and BDR. Link types
identified by OSPF include:
 Broadcast Multi-Access Networks-e.g. Ethernet
 Point-to-Point (PPP) Networks-e.g. Serial, T1,E1
 Non-Broadcast Multi-Access (NBMA) Networks-e.g. ATM,
Frame Relay.
 On broadcast multi-access networks, such as Ethernet, the
number of neighbor relationships can become large, and
therefore a DR election is required.
 On point-to-point networks, the establishment of full
adjacencies is not an issue because, by definition, there
can only be two routers on the link. The DR election is not
necessary and does not apply.
OSPF Neighbors and Adjacencies
On NBMA networks, OSPF can run in two modes:
 Simulated broadcast environment: An administrator can
define the network type as broadcast and the network
simulates a broadcast model by electing a DR and a BDR.
 In this environment, it is generally recommended that the
administrator choose the DR and BDR by configuring the
priority of the router. This ensures that the DR and BDR
have full connectivity to all other neighboring routers.
 Point-to-multipoint environment: In this environment,
each non-broadcast network is treated as a collection of
point-to-point links and a DR is not elected. This
environment also requires that neighboring routers are
statically defined.
OSPF Neighbors and Adjacencies
 The DR is responsible for distributing the change to all
other OSPF routers, using multicast 224.0.0.5.
 In addition to reducing the number of updates sent across
the network, this process also ensures that all routers
receive the same information at the same time from a
single source.
 The BDR ensures that there is no single point of failure.
Like the DR, the BDR listens to 224.0.0.6 and receives all
updates that are sent to the DR.
 If the DR fails, the BDR immediately takes over as DR,
and a new BDR is elected. Any router not elected as the
DR or BDR is known as a DROther.
OSPF Areas
 All OSPF networks begin with Area 0, also called the
backbone area. As the network is expanded, other areas
can be created that are adjacent to Area 0.
 These other areas can be assigned any number, up to
65,535. The maximum number of routers allowed in one
area is 50.
 OSPF has a two-layer hierarchical design. Area 0, also
referred to as the backbone area, exists at the top and all
other areas are located at the next level.
 All non-backbone areas must directly connect to area 0.
This group of areas creates an OSPF Autonomous System
(AS).
OSPF Areas
 The operation of OSPF within an area is different from
operation between that area and the backbone area. For
example, when there is a change in the topology, only
those routers in the affected area receive the LSA and run
the SPF algorithm.

 Summarization of network information usually occurs


between areas. This helps to decrease the size of routing
tables in the backbone. Summarization also isolates
changes and unstable, or flapping, links to a specific area
in the routing domain.
OSPF Areas

 A router that connects an area to the backbone area is called an


Area Border Router (ABR).
 A router that connects an area to a different routing protocol, such
as EIGRP, or redistributes static routes into the OSPF area is
called an Autonomous System Border Router (ASBR).
OSPF Issues and Limitations
 OSPF is a scalable routing protocol. It has the ability to
converge quickly and operate within very large networks.
There are however, some issues to consider when using it.
 OSPF must maintain multiple databases and therefore
requires more router memory and CPU capabilities than
distance vector routing protocols.
 The Dijkstra Algorithm requires CPU cycles to calculate
the best path. If the OSPF network is complex and
unstable, the algorithm consumes significant resources
when recalculating frequently.
 Routers running OSPF are typically more powerful and
more expensive.
OSPF Issues and Limitations

 To avoid excessive use of router resources, employ a


strict hierarchical design to divide the network into
smaller areas. All areas must maintain connectivity to
Area 0. If not, they may lose connectivity to other areas.

 OSPF can be challenging to configure if the network is


large and the design is complex. In addition, interpreting
the information contained in the OSPF databases and
routing tables requires a good understanding of the
technology.
OSPF Issues and Limitations

 During the initial discovery process, OSPF can flood the


network with LSAs and severely limit the amount of data
that the network can transport. Flooding in large networks
with many routers and low bandwidth noticeably
decreases network throughput.
 Despite the issues and limitations of OSPF, it is still the
most widely used link-state routing protocol within an
enterprise
Inter-domain Routing
Border Gateway Protocol (BGP)
 BGP performs inter-domain routing in Transmission-
Control Protocol/Internet Protocol (TCP/IP) networks.
 BGP is an exterior gateway protocol (EGP), which
means that it performs routing between multiple
autonomous systems or domains and exchanges routing
and reachability information with other BGP systems.
 BGP was developed to replace its predecessor, the now
obsolete Exterior Gateway Protocol (EGP), as the
standard exterior gateway-routing protocol used in the
global Internet.
 BGP solves serious problems with EGP and scales to
Internet growth more efficiently.
BGP
BGP Routing
 As with any routing protocol, BGP maintains routing
tables, transmits routing updates, and bases routing
decisions on routing metrics.
 The primary function of a BGP system is to exchange
network-reachability information, including information
about the list of autonomous system paths, with other BGP
systems.
 This information can be used to construct a graph of
autonomous system connectivity from which routing loops
can be pruned and with which autonomous system-level
 policy decisions can be enforced.
BGP Routing
 Each BGP router maintains a routing table that lists all
feasible paths to a particular network.
 The router does not refresh the routing table, however.
Instead, routing information received from peer routers is
retained until an incremental update is received.
 BGP devices exchange routing information upon initial
data exchange and after incremental updates. When a
router first connects to the network, BGP routers
exchange their entire BGP routing tables.
BGP Routing
 Similarly, when the routing table changes, routers send
the portion of their routing table that has changed.
 BGP routers do not send regularly scheduled routing
updates, and BGP routing updates advertise only the
optimal path to a network.
 BGP uses a single routing metric to determine the best
path to a given network. This metric consists of an
arbitrary unit number that specifies the degree of
preference of a particular link.
BGP Routing
 The BGP metric typically is assigned to each link by the
network administrator.
 The value assigned to a link can be based on any number
of criteria, including the number of autonomous systems
through which the path passes, stability, speed, delay, or
cost.
Choosing of routing protocol

 The proper choice of routing protocol is very


important.
 Selection depends on
 Network complexity
 Size,
and
 Administrative Policies
Choosing of routing protocol
 A number of design requirements have to be evaluated
 Scalability to large environments: distance vector does not
scale
 Stability during Outages: Distance vector introduce
instabilities during outage periods
 Speed of Convergence: Triggered updates makes RIP
equal to all the rest, yet they all still can be quite slow
 Metrics: LS Algorithms use bandwidth to calculate routes,
EIGRP can use network delays
 Support for VLSM + use of Private Address Ranges
 Vendor Interoperability
 Ease of Implementation: Distance Vector the simplest to
implement. One might use static routes for small networks
Based on CCNA Curicullum
Courtesy of Karlston D'Emanuele

You might also like