RTUEE / EC / EEEYr 2020 · Sem 82020

Q4Computer Networks

Question

16 marks

Q.4. (a) Define OSPF and BGP in brief. [8]

(b) What is Routing Protocol? Explain distance vector routing. [8]

Answer

OSPF and BGP

OSPF (Open Shortest Path First) is a widely used interior gateway protocol (IGP), meaning it is designed for routing within a single administrative domain (autonomous system), based on the link-state routing algorithm discussed elsewhere in this examination: each OSPF router floods information about its own directly connected links and their costs to every other router within the same OSPF area, allowing every router to independently build an identical, complete topological map of the network and compute shortest paths using Dijkstra's shortest-path algorithm. OSPF supports hierarchical network organization through the use of 'areas' (subdividing a large autonomous system into smaller regions to limit the scope of link-state flooding and reduce routing computation overhead), and supports rapid convergence (quick adaptation to topology changes) and load balancing across multiple equal-cost paths, making it one of the most widely deployed interior routing protocols in enterprise and service-provider networks.

BGP (Border Gateway Protocol), by contrast, is the exterior gateway protocol (EGP) used to exchange routing information between different autonomous systems (independently administered networks, such as different Internet Service Providers or large organizations) across the wider Internet - unlike OSPF's link-state, shortest-path-based approach, BGP is a path-vector protocol, in which each BGP router advertises to its neighbors the complete sequence of autonomous systems (the 'AS path') that traffic would traverse to reach a given destination network, and routing decisions incorporate not only path length but also policy-based considerations (business relationships, traffic engineering preferences, and routing policies configured by network administrators) rather than a purely shortest-path metric. BGP is the protocol that fundamentally holds together the global Internet's inter-domain routing, allowing thousands of independently operated autonomous systems to exchange reachability information and collectively determine end-to-end paths across the entire Internet.

Routing Protocol and Distance Vector Routing

A routing protocol is a set of rules and procedures that routers use to communicate routing information (network reachability and path cost) with one another and to compute, based on this exchanged information, the best path for forwarding data packets toward their destination, automatically adapting to network topology changes without requiring manual reconfiguration by a network administrator.

Distance vector routing is an adaptive routing algorithm in which each router maintains a table (its 'distance vector') listing its own current best-known distance (cost) to every destination network in the network, and periodically exchanges this entire distance table with each of its directly connected neighboring routers. Each router then updates its own distance table using the Bellman-Ford equation shown above, Dx(y) = min over all neighbors v of {c(x,v) + Dv(y)}, meaning router x's best distance to destination y is computed as the minimum, over all its directly connected neighbors v, of the cost to reach that neighbor c(x,v) plus that neighbor's own currently known best distance to y, Dv(y) - this iterative, distributed computation, repeated as routers periodically exchange updated distance vectors with their neighbors, eventually converges (under normal, stable network conditions) to the correct shortest-path distances throughout the network, without requiring any single router to have complete knowledge of the entire network topology, unlike link-state routing, where every router independently computes shortest paths using a complete topological map built from flooded link-state information.

Distance vector routing (as used in the classic RIP, Routing Information Protocol) is simpler to implement than link-state routing since routers need not maintain a full network topology map, but suffers from a well-known 'count-to-infinity' problem, in which routing loops can form and only slowly resolve (over multiple exchange cycles) following certain link-failure scenarios, since a router's distance information can become indirectly and erroneously self-referential through its neighbors before the correct, updated information eventually propagates throughout the network - various techniques such as split-horizon (never advertising a route back to the neighbor from which it was learned) and route poisoning (explicitly advertising a failed route with an infinite cost) are used to mitigate, though not entirely eliminate, this count-to-infinity vulnerability inherent to the basic distance vector approach.

It is worth further noting that OSPF's link-state approach and BGP's path-vector approach represent two fundamentally different philosophies of routing information distribution, precisely matched to their different operating scales: OSPF's complete-topology-flooding approach works well within a single administrative domain of limited size, where flooding overhead remains manageable and every router benefiting from complete topology knowledge is a reasonable design trade-off, whereas BGP's much more limited, path-vector-based information exchange (advertising only reachability and AS-path information, not complete link-level topology) is essential for BGP to scale to the enormous number of autonomous systems and routes present in the global Internet's routing table, where full link-state flooding across the entire Internet would be entirely impractical.

The distance vector algorithm's count-to-infinity problem and its mitigation techniques (split-horizon and route poisoning) illustrate a recurring theme in distributed systems design: achieving correct, consistent global behavior (correct shortest-path routing information) through purely local, neighbor-to-neighbor information exchange is inherently more fragile and slower to converge under failure conditions than an approach with access to complete global information (as link-state routing provides), a fundamental trade-off between distributed algorithm simplicity and correctness/convergence-speed guarantees that recurs throughout distributed computing beyond just computer network routing protocols.

It is also worth noting that OSPF and BGP, despite serving fundamentally different routing scopes, are frequently used together within the same network infrastructure, with BGP typically used at the network edge to exchange routes with external autonomous systems, and OSPF (or a similar interior gateway protocol) used internally to distribute these externally learned BGP routes throughout the internal network, a common architectural pattern in modern service-provider and large enterprise network design.

The Bellman-Ford-based distance vector computation described here is guaranteed to converge to correct shortest-path values under stable network conditions (no further topology changes occurring), a mathematical guarantee that follows directly from the Bellman-Ford algorithm's well-established convergence properties in graph theory, though as noted above, the specific rate of convergence following a topology change (particularly a link failure) can be considerably slower for distance vector routing than for link-state routing, due to the count-to-infinity phenomenon inherent to the purely local, neighbor-based information propagation that distance vector routing relies upon.

This architectural coexistence between interior and exterior routing protocols remains the standard design pattern used across nearly all large-scale production network deployments today.

Back to Paper