UNICAST ROUTING PROTOCOLS • There are three common protocols used in the Internet. Routing protocols are broadly classified as: – Intra domain routing • Distance vector routing (An Adaptive Routing Algorithm) (eg. RIP) • Link state routing (An Adaptive Routing Algorithm) (eg. OSPF) – Inter domain routing • Path vector (eg. BGP) PATH-VECTOR ROUTING • Path-vector routing is not based on least-cost routing. The best route is determined by the source using the policy it imposes on the route. • In other words, the source can control the path. Although path-vector routing is not actually used in an internet, and is mostly designed to route a packet between ISPs. Spanning Trees • In path-vector routing, the path from a source to all destinations is also determined by the best spanning tree. • The best spanning tree, however, is not the least-cost tree; it is the tree determined by the source when it imposes its own policy. • If there is more than one route to a destination, the source can choose the route that meets its policy best. • A source may apply several policies at the same time. One of the common policies uses the minimum number of nodes to be visited (something similar to least-cost). • Another common policy is to avoid some nodes as the middle node in a route. • • • • • Figure. shows a small internet with only five nodes. Each source has created its own spanning tree that meets its policy. The policy imposed by all sources is to use the minimum number of nodes to reach a destination. The spanning tree selected by A and E is such that the communication does not pass through D as a middle node. Similarly, the spanning tree selected by B is such that the communication does not pass through C as a middle node. Creation of Spanning Trees • When a node is booted, it creates a path vector based on the information it can obtain about its immediate neighbor. • A node sends greeting messages to its immediate neighbors to collect these pieces of information. • In figure, Each node, after the creation of the initial path vector, sends it to all its immediate neighbors. • Each node, when it receives a path vector from a neighbor, updates its path vector using an equation similar to the Bellman-Ford, but applying its own policy instead of looking for the least cost. • We can define this equation as • The policy is defined by selecting the best of multiple paths. • Path-vector routing also imposes one more condition on this equation: If Path (v, y) includes x, that path is discarded to avoid a loop in the path. • In other words, x does not want to visit itself when it selects a path to y. • Figure. shows the path vector of node C after two events. In the first event, node C receives a copy of B’s vector, which improves its vector: now it knows how to reach node A. • In the second event, node C receives a copy of D’s vector, which does not change its vector. • As a matter of fact the vector for node C after the first event is stabilized and serves as its forwarding table. INTERDOMAIN ROUTING • The interdomain routing involves AS sharing their reach ability information with each other AS. • An Autonomous System (AS) is a connected segment of a network topology that consists of a collection of sub networks (with hosts attached) interconnected by a set of routes. • The goal of interdomain routing is reachability and • The two major interdomain routing protocols are not optimality. – ExteriorGatewayProtocol(EGP) – BorderGateway Protocol (BGP). Problems in interdomain routing • An internet backbone must be able to route packets to any destination, i.e., there should be a match in the routing/forwarding table. • Each AS has its own intradomain routing protocols and chooses the metric assigns to path. This varies from one AS to another. • Autonomous systems may not trust each other. Border Gateway Protocol (BGP) • Border Gateway Protocol (BGP) is an inter-domain routing protocol using path vector routing • Traffic on the internet can be classified into two types: – local traffic that starts/ends on nodes within an AS – transit traffic that passes through an AS • AS can be classified into three types – Stub AS has only a single connection to one other AS. This AS can carry local traffic only, such as Small Corporation. – Multihomed AS has connections to more than one other AS but refuses to carry transit traffic, such as Large Corporation. – Transit AS has connections to more than one other AS and is designed to carry both transit and local traffic, such as the backbone providers as in fig.3.45. • • • • • • • • • Each AS selects one of its nodes to be the BGP speaker. Speaker node creates a routing table for that AS and advertises it to other BGP speakers in the neighboring ASs. Each AS also has a border gateway through which packets enter and leave the AS. BGP advertises complete paths as an enumerated list of ASs to reach a particular network. BGP ensures that paths are loop-free. The attributes in a path can be well known or optional. The well known attributes are recognized by all routers. If there are different routes to a destination, the BGP speaker chooses the best one according to local policies, and then advertises. A BGP speaker need not advertise any route to a destination, even if it has one. In the following example fig.3.46, the BGP speaker for provider A (AS2) advertises that the networks 128.96, 192.4.153, 192.4.32, and 192.4.3 can be reached directly from AS2. The backbone network, on receiving this advertisement, advertises that networks 128.96, 192.4.153, 192.4.32, and 192.4.3 can be reached along the path (AS1, AS2). • BGP speakers can cancel previously advertised paths if a critical link or node on a path goes down. This negative advertisement is known as withdrawn route. • The format of BGP-4 update message that carries advertisement is shown below. BGP Sessions • The exchange of routing information between two routers takes place in a BGP session. • To create a reliable environment, BGP uses the services of TCP. • The routes need not be repeatedly sent, if there is no change. This is done by sending keep alive messages. • Two types of BGP session are external BGP (E-BGP) and internal BGP (I-BGP). • E-BGP is used to exchange routing information between two speaker nodes belonging to two different ASs. • I-BGP is used to exchange routing information between two routers inside an AS. • The exchange of routing information between two routers takes place in a BGP session. • To create a reliable environment, BGP uses the services of TCP. • The routes need not be repeatedly sent, if there is no change. This is done by sending keep alive messages. • Two types of BGP session are external BGP (E-BGP) and internal BGP (I-BGP). • E-BGP is used to exchange routing information between two speaker nodes belonging to two different ASs. • I-BGP is used to exchange routing information between two routers inside an AS.