Title: Week 4: RIP vs' OSPF
1Week 4RIP vs. OSPF
- ???
- lyyu_at_cs.ecnu.edu.cn
2Outline
- RIPv2
- Introduction to RIP
- Limitations of the Protocol
- Protocol Specification
- Example Discussion
- Message Format
- OSPF
- Introduction to OSPF
- Classification of routers
- Example
- Bringing Up Adjacencies
3Introduction to RIP
- The Internet is organized as a collection of
Autonomous Systems (AS), each of which will, in
general, be administered by a single entity. - Each AS will have its own routing technology,
which may differ among ASs.
4Introduction to RIP
- The routing protocol used within an AS is
referred to as an Interior Gateway Protocol
(IGP). - A separate protocol, called an Exterior Gateway
Protocol (EGP), is used to transfer routing
information among the ASs. - RIP was designed to work as an IGP in
moderate-size ASs. It is not intended for use in
more complex environments.
5Introduction to RIP
- RIP is a routing protocol based on the
Bellman-Ford (or distance vector) algorithm. - This algorithm has been used for routing
computations in computer networks since the early
days of the ARPANET.
6Limitations of RIP
- The protocol is limited to networks whose longest
path (the networks diameter) is 15 hops. - The protocol depends upon "counting to infinity"
to resolve certain unusual situations. - This protocol uses fixed "metrics" to compare
alternative routes.
7Protocol Specification
- Each router that implements RIP is assumed to
have a routing table. - This table has one entry for every destination
that is reachable throughout the system operating
RIP.
8Protocol Specification
- Distance vector algorithms are based on the
exchange of only a small amount of information. - Each entity (router or host) that participates in
the routing protocol is assumed to keep
information about all of the destinations within
the system. - Generally, information about all entities
connected to one network is summarized by a
single entry, which describes the route to all
destinations on that network.
9Protocol Specification
- Each entry contains at least the following
information - address in IP implementations of these
algorithms, this will be the IP address of the
host or network. - router the first router along the route to the
destination. (next-hop, gateway) - interface the physical network which must be
used to reach the first router. - metric a number, indicating the distance to the
destination. (cost) - timer the amount of time since the entry was
last updated.
10Protocol Specification
- Distance vector algorithms get their name from
the fact that it is possible to compute optimal
routes when the only information exchanged is the
list of these distances. - Furthermore, information is only exchanged among
entities that are adjacent, that is, entities
that share a common network.
11Protocol Specification
- The most important information exchanged by the
hosts and routers is carried in update messages. - Each entity that participates in the routing
scheme sends update messages that describe the
routing database as it currently exists in that
entity. - It is possible to maintain optimal routes for the
entire system by using only information obtained
from neighboring entities.
12Protocol Specification
- The metric for a directly-connected network is
set to 1. - Every 30 seconds, the RIP process is awakened to
send an unsolicited Response message containing
the complete routing table to every neighboring
router.
13Protocol Specification
- Input processing of Response Message
14Protocol Specification
- Input processing of Response Message
- Ignore the response not from the RIP port
- Ignore the response not from a valid neighbor
15Protocol Specification
- Input processing of Response Message
- is the destination address valid (e.g., unicast
not net 0 or 127) - is the metric valid (i.e., between 1 and 16,
inclusive)
16Protocol Specification
- Input processing of Response Message
- The new metric
- MIN (the old metric 1, 16)
17Protocol Specification
- Input processing of Response Message
18Check the routing table
19Example
20Example
- Route table while router A is finishing booting
21Example
- Route table after exchanging route information
with Router C
22Discussion
- all networks have cost 1, except for the direct
link from C to D, which has cost 10 - D directly connected, metric 1
- B route via D, metric 2
- C route via B, metric 3
- A route via B, metric 3
- What if the link from B to D fails?
x
23Discussion
x
Worst case counting to infinity
You should now see why "infinity" is chosen to be
as small as possible.
24Discussion
- Solution
- Split horizon (????) never claim reachability
for a destination network to the neighbor(s) from
which the route was learned - Split horizon with poisoned reverse (????)
includes such routes in updates, but sets their
metrics to infinity - Triggered updates (????) whenever a router
changes the metric for a route, it is required to
send update messages almost immediately
25Protocol Specification
- When will the router send response messages that
contain all or part of the routing table - By input processing, when a Request is received
- By the regular routing update router (every 30
seconds) - By triggered updates
26Message format
27Message format
28RIP vs. OSPF
- RIP
- has very little overhead in terms of bandwidth
used and configuration and management time - very easy to implement
- - is limited to networks whose longest path is 15
hops - - uses fixed "metrics" to compare alternative
routes - - slow convergence
29Introduction to OSPF
- OSPF the Open Shortest Path First TCP/IP
internet routing protocol. - OSPF is classified as an Interior Gateway
Protocol (IGP). - This means that it distributes routing
information between routers belonging to a single
Autonomous System. - The OSPF protocol is based on link-state or SPF
technology.
30Introduction to OSPF
- In a link-state routing protocol, each router
maintains a database describing the Autonomous
Systems topology. - Each participating router has an identical
database. - Each individual piece of this database is a
particular routers local state (e.g., the
routers usable interfaces and reachable
neighbors). - The router distributes its local state throughout
the Autonomous System by flooding.
31Introduction to OSPF
- From the link-state database, each router
constructs a tree of shortest paths with itself
as root. - This shortest-path tree gives the route to each
destination in the Autonomous System. - OSPF allows sets of networks to be grouped
together. Such a grouping is called an area. - All OSPF protocol exchanges are authenticated.
32Classification of routers
- Internal routers A router with all directly
connected networks belonging to the same area. - Area border routers A router that attaches to
multiple areas. - Backbone routers A router that has an interface
to the backbone area. - AS boundary routers A router that exchanges
routing information with routers belonging to
other Autonomous Systems.
33Backbone routers RT3, RT4, RT5, RT6 , RT, RT10
and RT11
Area border routers RT3, RT4, RT7, RT10 and RT11
AS boundary routers RT5 and RT7
Internal routers RT1, RT2, RT5, RT6, RT8, RT9
and RT12
34- The resulting directed graph
35- The SPF tree for Router RT6
36Bringing Up Adjacencies
- OSPF creates adjacencies between neighboring
routers for the purpose of exchanging routing
information. - Not every two neighboring routers will become
adjacent.
37Bringing Up Adjacencies
- The Hello Protocol
- The Hello Protocol is responsible for
establishing and maintaining neighbor
relationships. - It also ensures that communication between
neighbors is bidirectional. - Hello packets are sent periodically out all
router interfaces.
38Bringing Up Adjacencies
- The Hello Protocol
- On broadcast and NBMA networks, the Hello
Protocol elects a Designated Router for the
network. - The Hello Protocol works differently on broadcast
networks, NBMA networks and Point-to-MultiPoint
networks.
39Bringing Up Adjacencies
- The Designated Router
- Every broadcast and NBMA network has a Designated
Router. - The DR performs two main functions
- Becomes adjacent to all other routers on the
network. - Originates a network-LSA on behalf of the network.
40Bringing Up Adjacencies
- The Synchronization of Databases
- If an adjacency is to be formed, the first step
is to synchronize the neighbors link-state
databases. - In a link-state routing algorithm, it is very
important for all routers link-state databases
to stay synchronized.
41Bringing Up Adjacencies
- The Synchronization of Databases
- OSPF simplifies this by requiring only adjacent
routers to remain synchronized. - The synchronization process begins as soon as the
routers attempt to bring up the adjacency.
42Bringing Up Adjacencies
- The Backup Designated Router
- In order to make the transition to a new
Designated Router smoother, there is a Backup
Designated Router for each broadcast and NBMA
network. - The Backup Designated Router is also adjacent to
all routers on the network, and becomes
Designated Router when the previous Designated
Router fails.
43Bringing Up Adjacencies
- The Backup Designated Router
- The Backup Designated Router does not generate a
network-LSA for the network. - The Backup Designated Router is also elected by
the Hello Protocol.