RIP & OSPF
1. Main topic of the lecture
This lecture moves from routing algorithms to routing protocols.
The two main example protocols are:
- RIP, the Routing Information Protocol;
- OSPF, Open Shortest Path First.
The reason for choosing these two protocols is that they correspond to the two major routing algorithm families:
| Protocol | Algorithmic idea | Type |
|---|---|---|
| RIP | Bellman-Ford | distance-vector routing |
| OSPF | Dijkstra | link-state routing |
The next lecture will continue with BGP, which is an inter-AS routing protocol.
2. Routing vs forwarding
Routing and forwarding are related but different.
2.1. Routing
Routing belongs to the control plane.
Its job is to answer questions such as:
- Which destinations are reachable?
- Through which routers or links can they be reached?
- What routes should be installed in the forwarding table?
Routing protocols compute or learn the information that later becomes part of the forwarding table.
2.2. Forwarding
Forwarding belongs to the data plane.
When a packet arrives, the router looks at the destination IP address and uses the forwarding table to decide the outgoing interface.
In IP forwarding, this is normally done using longest-prefix matching.
So:
Routing computes the forwarding table. Forwarding uses the forwarding table for each packet.
3. Why Internet routing is not one flat routing problem
Earlier routing examples often assume an idealized network:
- all routers are similar;
- the topology is flat;
- one routing algorithm runs everywhere.
This is not how the real Internet works.
3.1. Scale
The Internet has a huge number of destinations.
The slide mentions about 850 million destinations. A router cannot simply store and exchange flat routing information for every possible destination in a naive way.
Problems:
- forwarding tables would become too large;
- routing updates would consume too much bandwidth;
- very fast memory for large forwarding tables is expensive;
- a single global routing algorithm would be impractical.
Therefore, the Internet needs abstraction and hierarchy.
3.2. Administrative autonomy
The Internet is a network of networks.
Different organizations operate different parts of the Internet. Each network operator wants control over routing inside its own network.
For example:
- Deutsche Telekom can decide how to route inside its own network;
- another operator can use a different internal routing design;
- these networks may geographically overlap, because different providers all place routers in major cities.
Most large Internet traffic today runs over privately operated commercial networks, even though the Internet historically started from research and educational networks.
4. Autonomous Systems
An Autonomous System, or AS, is a region of the Internet under one administrative control.
Important points:
- Routers inside the same AS usually run the same intra-AS routing protocol.
- Routers in different ASes may run different intra-AS routing protocols.
- ASes are not necessarily geographically separate.
- Multiple ASes can have routers in the same cities and interconnect there.
Examples of protocols:
| Scope | Name | Example protocols |
|---|---|---|
| inside one AS | intra-AS routing / IGP | RIP, OSPF, IS-IS |
| between ASes | inter-AS routing / EGP | BGP |
IGP means Interior Gateway Protocol. EGP means Exterior Gateway Protocol.
The lecture emphasized the difference between intra-AS and inter-AS routing.
5. Intra-AS and inter-AS routing work together
A router’s forwarding table is the result of both intra-AS and inter-AS routing.
5.1. Intra-AS routing
Intra-AS routing tells a router how to reach internal destinations inside the same AS.
It also tells an internal router how to reach an AS border router.
5.2. Inter-AS routing
Inter-AS routing tells the AS which external destinations are reachable through which neighboring ASes.
Example:
Suppose a router in AS64496 receives a packet for a destination outside AS64496.
The router needs to know:
- which external destinations are reachable through AS64497;
- which external destinations are reachable through AS64498;
- which border router should be used;
- how to reach that border router internally.
Thus:
Inter-AS routing tells the AS where external destinations are reachable. Intra-AS routing tells routers how to get to the chosen border router.
BGP is the standard inter-AS routing protocol used across the Internet.
Different ASes can choose different IGPs internally, but the inter-AS protocol must be compatible globally.
6. Intra-AS routing protocols
Intra-AS routing is also called Interior Gateway Protocol routing.
Well-known IGPs include:
- RIP;
- OSPF;
- IS-IS.
The lecture focuses on RIP and OSPF.
7. RIP: Routing Information Protocol
RIP is one of the earliest routing protocols.
It is mostly at the end of its practical lifetime today, but it is still useful pedagogically because it is simple and clearly illustrates distance-vector routing.
7.1. Basic idea
RIP is an intra-AS distance-vector protocol based on Bellman-Ford.
Each router periodically sends its routing table, or distance vector, to its neighbors.
A neighbor uses that information to update its own table.
For each destination, RIP stores information like:
- destination network;
- next-hop router;
- hop count to the destination.
7.2. Metric: hop count
RIP uses hop count as its only metric.
The cost of a route is the number of router hops.
Important limitation:
- RIP cannot assign arbitrary link weights.
- A link cannot simply be configured as weight 2 or weight 10 in the same flexible way as OSPF.
- Traffic engineering is therefore limited.
- To influence RIP routes, one often has to change the topology or the advertised reachability.
RIP uses:
- maximum useful hop count: 15;
- infinity: 16.
This is a pragmatic way to limit the count-to-infinity problem.
Because infinity is only 16, RIP is only suitable for relatively small internal networks.
7.3. RIP example
Suppose router D has a routing table like:
| destination subnet | next router | hops |
|---|---|---|
| w | A | 2 |
| y | B | 2 |
| z | B | 7 |
| x | -- | 1 |
Here:
- x is directly attached to D, so no next router is needed;
- w is reached via A;
- y and z are reached via B.
If A advertises that it can reach z with cost 4, then D can reach z via A with cost 5.
So D may update:
| destination subnet | old next router | old cost | new next router | new cost |
|---|---|---|---|---|
| z | B | 7 | A | 5 |
This is an example of “good news travels fast”: a better route can be adopted quickly.
7.4. RIP advertisements
RIP routers exchange distance vectors periodically.
Important details:
- updates are sent every 30 seconds;
- updates are sent as response messages, also called advertisements;
- each advertisement contains up to 25 destination networks;
- RIPv2 uses UDP port 520.
Because RIP periodically exchanges routing entries for destination subnets with neighbors, it is simple and works for small internal networks. However, it does not scale well to large or complex AS-internal networks, because updates become costly, convergence can be slow, and the hop-count metric is limited to 15 hops.
For example, if there were hundreds of millions of prefixes, sending only 25 entries per message would be completely impractical.
Thus RIP is only appropriate for small internal routing domains.
7.5. RIP implementation in the protocol stack
The forwarding table is needed in the network layer.
However, the routing protocol logic usually runs as an application-level routing daemon.
In Unix-like systems, this is historically the routed daemon.
The process works roughly like this:
- the routing daemon receives RIP advertisements over UDP;
- it updates its routing information;
- it installs the resulting routes into the kernel’s forwarding table;
- the kernel uses the forwarding table to forward packets.
So routing information is exchanged by a user-space process, but forwarding is performed by the network layer.
7.6. UDP and reliability
RIP uses UDP.
This means:
- RIP messages can be lost;
- there is no TCP-style reliability;
- the protocol relies on periodic repetition.
A router should not declare a neighbor dead after one missed update, because a single UDP packet could simply have been lost.
7.7. Failure detection
If no advertisement is heard from a neighbor for 180 seconds, RIP declares the neighbor or link dead.
Then:
- routes through that neighbor are invalidated;
- new advertisements are sent to neighbors;
- neighbors update their own tables if necessary;
- the information propagates through the network.
These immediate updates after a change are called triggered updates.
Triggered updates improve convergence because the network does not always have to wait for the next 30-second periodic update.
7.8. Count-to-infinity problem
Distance-vector protocols can suffer from the count-to-infinity problem.
The core issue:
Good news travels fast, but bad news travels slowly.
If a route breaks, routers may still believe that another neighbor has a path, even if that path actually depends on the broken route.
This can create routing loops where routers keep increasing the metric step by step.
RIP limits this problem by defining infinity as 16.
So the count cannot continue forever, but convergence can still be slow.
7.9. Techniques to reduce count-to-infinity problems
RIP uses several practical mechanisms.
7.9.1. Maximum metric
Infinity is 16.
Any route with metric 16 is considered unreachable.
This bounds the count-to-infinity process.
7.9.2. Triggered updates
When a route changes, the router sends an update immediately instead of waiting for the next periodic update.
This makes failure information propagate faster.
7.9.3. Split horizon
Split horizon says:
Do not advertise a route back over the interface from which it was learned.
If router A learned a route from router B, A should not advertise that same route back to B.
This prevents simple two-router loops.
7.9.4. Poisoned reverse
Poisoned reverse is a stronger version of split horizon.
Instead of not advertising the route, the router advertises it back with infinite cost.
In RIP, that means metric 16.
This explicitly tells the neighbor:
Do not use me for this destination.
This helps prevent ping-pong loops.
7.9.5. Hold-down timer
Some implementations, such as Cisco routers, use a hold-down timer.
After a route is invalidated, the router ignores updates for that route for a short time.
The goal is to avoid quickly accepting stale or looping information while the network is still converging.
7.10. Limitations of these mechanisms
Split horizon and poison reverse mainly prevent direct two-router loops.
They do not eliminate all possible loops.
Longer loops involving three or more routers can still be problematic.
Therefore, RIP remains simple but limited.
7.11. RIP routing tasks
A routing protocol must handle several tasks.
For RIP:
- routing table:
- metric: hop count;
- calculation: Bellman-Ford / distance-vector update;
- update: periodic and triggered advertisements.
- neighbor handling:
- neighbors exchange updates;
- if no update is received for 180 seconds, the neighbor/link is considered down.
- database:
- the database is essentially the distance-vector routing table;
- it is synchronized indirectly by repeated advertisements.
8. OSPF: Open Shortest Path First
OSPF is a much more complex and widely used intra-AS routing protocol.
It is a link-state protocol based on Dijkstra’s shortest-path-first algorithm.
8.1. Basic idea
In OSPF, each router does not merely tell neighbors its current best distances.
Instead, routers describe their local link state:
- who they are;
- which links they have;
- which networks are attached;
- what the administrative cost of each link is.
This information is flooded through the routing domain.
Each router builds a link-state database.
From this database, each router derives a topology map and runs Dijkstra locally.
8.2. Metric: administrative weight
OSPF uses administrative link weights.
This is more flexible than RIP’s hop count.
For example:
- crossing a mountain range may be expensive;
- long-distance links may be costly;
- some links may have higher capacity or lower cost;
- an operator may want to prefer one path over another.
With OSPF, the operator can assign link weights to influence routing.
8.3. Why not use current utilization as the metric?
The lecture emphasized that using current link utilization directly as the routing metric is usually a bad idea.
Reason:
- small changes in load can change the best path;
- routes may keep flipping back and forth;
- this causes instability and unpredictable behavior.
Therefore OSPF usually uses relatively stable administrative weights, not rapidly changing utilization values.
9. Why OSPF is complicated
At first glance, OSPF seems simple:
- learn the topology;
- run Dijkstra;
- install shortest paths.
But the hard part is learning and maintaining a consistent topology.
If routers have inconsistent link-state databases, they may compute inconsistent shortest paths.
This can create forwarding loops.
Example idea from the lecture:
- router A believes one topology;
- router B has slightly outdated or different topology information;
- A forwards to B because A thinks B is on the shortest path;
- B forwards back to A because B’s view says A is on the shortest path;
- the packet loops until TTL expires.
Therefore, OSPF spends much of its complexity on:
- neighbor discovery;
- database synchronization;
- reliable flooding;
- aging old information;
- ensuring consistent link-state databases.
The actual Dijkstra calculation is relatively simple compared with maintaining the correct database.
10. OSPF components
The main OSPF components are:
- Hello protocol;
- link-state database;
- database synchronization;
- reliable flooding;
- shortest-path calculation;
- designated router mechanism for broadcast networks;
- hierarchical areas.
11. OSPF messages
OSPF messages are sent directly over IP.
They do not use TCP or UDP.
Important details:
- IP protocol number: 89;
- TTL: 1, so packets stay on the local link;
- multicast is used for local OSPF communication.
Because OSPF does not use TCP, it must implement its own reliability mechanisms for database exchange and flooding.
OSPF has five packet types:
- Hello;
- Database Description;
- Link State Request;
- Link State Update;
- Link State Acknowledgement.
12. OSPF Hello protocol
The Hello protocol discovers and maintains neighbors.
It ensures:
- the neighbor is alive;
- communication is bidirectional;
- both sides agree on important parameters.
12.1. Neighbor states
The lecture described the basic idea of neighbor states:
| State | Meaning |
|---|---|
| Down | no communication; neighbor is considered dead |
| Init | a Hello was received, but bidirectional communication is not confirmed |
| TwoWay / ExStart | bidirectional communication exists; database exchange can begin |
The key point is that merely receiving a Hello is not enough.
A router needs evidence that the neighbor also sees it.
Only then is communication bidirectional.
12.2. Hello packet parameters
Hello packets include parameters such as:
- Router ID;
- Area ID;
- HelloInterval;
- RouterDeadInterval;
- Designated Router;
- Backup Designated Router;
- list of known neighbors.
Routers only become neighbors if important parameters match.
For example, if one router uses a different HelloInterval or RouterDeadInterval than the other, no proper OSPF neighborhood may form.
This can lead to a situation where a physical link is up but unused by OSPF due to configuration mismatch.
12.3. Timers
The exact default timers depend on configuration and implementation.
The slides show a typical default of:
- HelloInterval: 10 seconds;
- RouterDeadInterval: 4 times HelloInterval.
The lecture also emphasized the general trade-off:
- shorter timers detect failures faster;
- but timers must not be shorter than normal packet delay or RTT;
- otherwise routers may falsely declare neighbors dead.
Large operators often reduce timers to achieve faster convergence, but this must be configured carefully.
12.4. Multicast addresses
OSPF uses well-known multicast addresses.
Important examples:
| Address | Meaning |
|---|---|
| 224.0.0.5 | AllSPFRouters |
| 224.0.0.6 | AllDRouters |
| FF02::5 | OSPFv3 all SPF routers |
| FF02::6 | OSPFv3 designated routers |
Other related multicast addresses mentioned in the slides:
| Address | Meaning |
|---|---|
| 224.0.0.1 | all systems |
| 224.0.0.2 | all routers |
| 224.0.0.9 | RIP-2 routers |
| 224.0.0.10 | IGRP routers |
Multicast avoids sending routing messages to hosts that do not need to process them.
13. Link-state database
OSPF routers maintain a link-state database, or LSDB.
The LSDB contains Link State Advertisements, or LSAs.
An LSA describes local state, such as:
- a router and its attached links;
- a broadcast network represented by a designated router;
- summary information between areas;
- external routes injected from other ASes.
The LSDB is used to derive the topology graph.
Then Dijkstra is run on that graph.
13.1. LSA header fields
An LSA has a header and a body.
Important header fields include:
- LS Age;
- Options;
- LS Type;
- Link State ID;
- Advertising Router;
- LS Sequence Number;
- LS Checksum;
- Length.
An LSA instance is identified mainly by:
- LS Type;
- Link State ID;
- Advertising Router.
13.2. Sequence numbers
The LS sequence number is used to distinguish old and new versions of the same LSA.
If a router generates a newer LSA, it uses a newer sequence number.
This allows other routers to replace old information.
The sequence number space is linear and finite.
Because LSAs also have an age, old information can eventually disappear, allowing the protocol to handle sequence number limits.
13.3. Checksums
OSPF uses its own LSA checksum.
This is necessary because OSPF runs directly over IP and cannot rely on TCP or UDP checksums for its own database consistency needs.
Checksums help detect corrupted LSA contents.
13.4. Aging
The LS Age field prevents stale topology information from remaining forever.
Important values from the slides:
| Timer / value | Meaning |
|---|---|
| LSRefreshTime = 30 minutes | LSAs should be refreshed periodically |
| MaxAge = 1 hour | LSAs older than this are invalid and removed |
| CheckAge = 5 minutes | age is checked periodically |
| MaxAgeDiff = 15 minutes | maximum age difference considered in comparisons |
The point is:
Old information must eventually disappear, even if some update was lost.
At the same time, LSAs should not be refreshed too frequently, because routing overhead consumes bandwidth.
When OSPF was designed, network bandwidth was much more limited, so timer choices had to balance correctness and overhead.
14. Database synchronization
All routers in an OSPF area need consistent link-state databases.
There are two main forms of synchronization:
- initial synchronization;
- continuous synchronization by flooding.
14.1. Initial synchronization
Initial synchronization happens after two routers establish bidirectional communication.
They explicitly exchange summaries of their databases.
This uses Database Description packets, or DD packets.
Important properties:
- only one DD packet is sent at a time;
- the sender waits for acknowledgement;
- this is a stop-and-wait style protocol;
- one router acts as the leader and the other as the follower;
- older terminology used “master/slave”, but “leader/follower” is preferred.
During the exchange:
- routers send LSA headers from their databases;
- each router determines which LSAs it is missing;
- missing LSAs are requested using Link State Request packets;
- the neighbor sends the requested LSAs in Link State Update packets;
- after this, the routers are fully adjacent.
14.2. Checking whether databases are synchronized
A simple consistency check is:
- compare the number of LSAs;
- compare sums of LSA checksums.
If these match, the databases are presumed to be equivalent.
If not, more detailed synchronization is needed.
14.3. Continuous synchronization
After initial synchronization, new changes are propagated by reliable flooding.
This keeps the LSDBs up to date as links and routers change.
15. Reliable flooding
Reliable flooding disseminates LSAs throughout the OSPF area.
When a router receives a new LSA, it forwards it to its neighbors.
Each LSA must be acknowledged, either implicitly or explicitly.
15.1. Implicit acknowledgements
If a router sends an LSA to a neighbor and later receives the same LSA back from that neighbor, this can serve as an implicit acknowledgement.
It shows that the neighbor received and processed the LSA.
15.2. Explicit and delayed acknowledgements
OSPF can also use explicit Link State Acknowledgement packets.
Acknowledgements may be delayed to reduce overhead.
15.3. Why flooding instead of a spanning tree?
One might ask why OSPF does not maintain a spanning tree and send each update only once along that tree.
The lecture’s answer:
- a spanning tree itself must be maintained;
- if a tree link fails, the tree must be recomputed;
- this adds another fragile topology mechanism;
- reliable flooding is more robust.
Flooding creates more messages, but it avoids relying on a separate distribution tree.
15.4. Flooding timers
The slides list several important LSA-related timers:
| Timer | Value |
|---|---|
| MinLSArrival | 1 second |
| MinLSInterval | 5 seconds |
| CheckAge | 5 minutes |
| MaxAgeDiff | 15 minutes |
| LSRefreshTime | 30 minutes |
| MaxAge | 1 hour |
The purpose of these timers is to prevent LSAs from being sent at arbitrary rates and to control protocol overhead.
16. OSPF route calculation
Once the LSDB is synchronized, each router has a directed graph with link costs.
Then it runs Dijkstra’s shortest-path-first algorithm.
General process:
- start with the local router as the root;
- add neighbors to a candidate list;
- repeatedly select the candidate with the smallest total cost;
- add it to the shortest-path tree;
- relax outgoing links from that router;
- continue until the candidate list is empty.
The result is a shortest-path tree rooted at the local router.
From this tree, the router derives its forwarding table.
17. Equal-cost multipath routing
OSPF supports equal-cost multipath, or ECMP.
If there are multiple next hops with the same total cost, traffic may be split across them.
Example:
If there are two equal-cost paths to a destination:
- 50% of traffic may go over one next hop;
- 50% may go over the other.
However, the lecture warned that load splitting is not always as intuitive as “divide equally over all physical links”.
For example, if traffic first splits 50/50 and then one branch splits again, the final link loads may be:
- one link gets 50%;
- two downstream links get 25% each.
So three links do not necessarily each get one third.
The lecture also mentioned that implementations may use hash-based splitting. If the same hash seed is accidentally used at multiple points, the actual distribution can become wrong or surprising.
18. OSPF network types
So far, many examples assume point-to-point links.
However, OSPF also supports other network types, including:
- point-to-point;
- broadcast networks;
- non-broadcast multi-access networks;
- point-to-multipoint networks.
Different network types require different handling of:
- neighbor relationships;
- synchronization;
- database representation.
19. Broadcast networks and designated routers
On a broadcast network, many routers may share the same link.
If there are \(n\) routers and every router formed an adjacency with every other router, there would be:
\[ \frac{n(n-1)}{2} \]
adjacencies.
This creates too much overhead.
Therefore OSPF uses a Designated Router, or DR.
19.1. Designated Router
The DR represents the broadcast network to the rest of the OSPF area.
Routers form adjacencies mainly with the DR, rather than with every other router.
The DR is responsible for originating the Network LSA for that broadcast subnet.
19.2. Backup Designated Router
Because the DR is important, OSPF also elects a Backup Designated Router, or BDR.
If the DR fails:
- the BDR immediately becomes the new DR;
- a new BDR is elected.
This avoids long disruption.
19.3. DR election
The election process is conservative.
When a router joins a broadcast network:
- it listens to Hello packets;
- if a DR and BDR are already advertised, it accepts the status quo;
- it does not disrupt the existing DR just because it has a higher priority.
If there is no BDR:
- the router with the highest priority becomes BDR;
- ties are broken by the highest Router ID.
If there is no DR:
- the BDR is promoted to DR;
- then a new BDR is elected.
Important consequence:
The router with the highest priority is not necessarily always the DR.
If the highest-priority router goes down and later comes back, it normally does not preempt the current DR. It may at most become BDR.
This avoids unnecessary instability.
20. Network LSAs
A Network LSA represents a broadcast subnet.
Important points:
- Router LSAs link to the Network LSA.
- The DR is responsible for the Network LSA.
- The Link State ID is the IP address of the DR interface.
- Network LSAs reduce the number of links that must be represented in the LSDB.
There are no Network LSAs for stub networks.
A stub network is connected to the routing domain through only one router, so there is no need for a separate broadcast-network representation.
21. Hierarchical OSPF and areas
A flat OSPF domain does not scale indefinitely.
The lecture emphasized that maintaining full topology information becomes tedious and expensive when the network grows large.
OSPF therefore introduces hierarchy using areas.
21.1. Basic idea
An AS, or routing domain, can be divided into areas.
An area is a group of routers that are usually physically or logically close to each other.
Benefits:
- link-state flooding is limited to the area;
- routers do not need full detailed topology information for the whole AS;
- the amount of routing state and update traffic is reduced.
21.2. Backbone area
OSPF requires a backbone area, called Area 0.
Inter-area routing must go through the backbone.
This creates a strict two-level hierarchy:
- local areas;
- backbone area.
21.3. Types of routers
| Router type | Function |
|---|---|
| internal router | belongs to one area and routes inside it |
| area border router (ABR) | connects an area to the backbone and summarizes routes |
| backbone router | runs OSPF within the backbone |
| boundary router / ASBR | connects to other ASes and injects external routes |
21.4. Area Border Routers
Area Border Routers summarize distances to destinations inside their own area and advertise this information to the backbone.
Local routers inside an area:
- flood link-state information only inside the area;
- compute detailed shortest paths only within the area;
- send traffic to outside destinations via an area border router.
21.5. Consequences of hierarchy
Inside an area, OSPF is link-state:
- routers have detailed topology information;
- they run Dijkstra;
- routing loops are avoided if the LSDBs are consistent.
Between areas, the situation is different:
- routers do not know the full detailed topology of other areas;
- they know summarized directions through area border routers;
- routing between areas must go through the backbone;
- the globally shortest physical path may not always be used.
Thus OSPF gives exact shortest paths within an area, but hierarchical summarization can make inter-area paths less direct.
The lecture emphasized that this is a severe limitation of OSPF hierarchy:
You cannot simply route directly between two non-backbone areas, even if there is a physical link, unless the OSPF area design supports it through the required hierarchy.
21.6. Area design
Good area design groups routers that are physically or logically close.
The goal is to:
- keep flooding local;
- reduce the size of the LSDB;
- avoid unnecessary inter-area routing;
- preserve redundancy.
21.7. Area partitions
Link and router failures can partition an area.
Some partitions may be repaired automatically, but others require manual intervention.
Virtual links can sometimes be used, but isolated areas with no path to the rest of the network cannot be healed by routing alone.
Redundancy is therefore important.
22. OSPF LSA types
The slides list several LSA types.
| Type | Name |
|---|---|
| 1 | Router LSA |
| 2 | Network LSA |
| 3 | Summary LSA |
| 4 | Summary ASBR LSA |
| 5 | Autonomous System External LSA |
| 6 | Multicast OSPF LSA |
| 7 | Not-so-stubby area LSA |
| 8 | External attribute LSA for BGP |
The most important ones for this lecture are:
- Router LSA;
- Network LSA;
- Summary LSA;
- External LSA.
23. Additional OSPF features
The slides also mention several advanced OSPF features.
23.1. Authentication
OSPF messages can be authenticated to prevent malicious routers from injecting false routing information.
23.2. Equal-cost paths
OSPF allows multiple same-cost paths.
This enables load splitting across equal-cost next hops.
23.3. Multiple cost metrics
The slides mention that OSPF can support multiple cost metrics for different types of service, although this is not the main focus of the lecture.
23.4. Multicast OSPF
Multicast OSPF, or MOSPF, can use the same topology database as OSPF for multicast routing.
24. RIP vs OSPF
| Aspect | RIP | OSPF |
|---|---|---|
| Type | distance-vector | link-state |
| Algorithm | Bellman-Ford | Dijkstra |
| Scope | intra-AS / IGP | intra-AS / IGP |
| Metric | hop count | administrative weight |
| Maximum cost | 16 means infinity | configurable weights |
| Information exchanged | distance vectors / routing table entries | link-state advertisements |
| Update style | periodic neighbor exchange | reliable flooding |
| Transport | UDP port 520 | directly over IP protocol 89 |
| Failure handling | timers, triggered updates, poison reverse | Hello protocol, LSA aging, reliable flooding |
| Scalability | small networks only | better, but needs areas for large domains |
| Main advantage | very simple | flexible and powerful |
| Main disadvantage | slow convergence, loops, poor metrics | much more complex |
25. Key takeaways
- Routing is control-plane computation; forwarding is data-plane packet handling.
- The Internet is too large and administratively diverse for one flat routing protocol.
- Autonomous Systems provide administrative boundaries.
- IGPs run inside an AS; BGP is used between ASes.
- RIP is a simple distance-vector protocol based on Bellman-Ford.
- RIP uses hop count and treats 16 as infinity.
- RIP is easy to understand but suffers from slow convergence and count-to-infinity problems.
- OSPF is a link-state protocol based on Dijkstra.
- OSPF uses administrative link weights and supports equal-cost multipath.
- OSPF’s complexity mainly comes from keeping link-state databases synchronized and reliable.
- OSPF uses Hello packets, LSAs, database synchronization, and reliable flooding.
- On broadcast networks, OSPF elects a Designated Router and Backup Designated Router to reduce adjacency overhead.
- Large OSPF domains are divided into areas, with Area 0 as the backbone.
- Areas reduce flooding and database size, but inter-area routing must follow the OSPF hierarchy and may not always be globally shortest.