Uploaded by Rikesh Bajracharya

routing

advertisement
Intra-AS Routing in the Internet






An intra-AS routing protocol is used to determine how routing is performed within an
autonomous system (AS).
Intra-AS routing protocols are also known as interior gateway protocols.
RIP was one of the earliest intra-AS Internet routing protocols. RIP is a distance-vector
protocol that operates in a manner very close to the idealized DV protocol.
It uses hop count as a cost metric; that is, each link has a cost of 1.
In RIP (and also in OSPF), costs are actually from source router to a destination subnet.
RIP uses the term hop, which is the number of subnets traversed along the shortest path
from source router to destination subnet, including the destination subnet. The maximum
cost of a path is limited to 15, thus limiting the use of RIP to autonomous systems that are
fewer than 15 hops in diameter. In RIP, routing updates are exchanged between neighbors
approximately every 30 seconds using a RIP response message.
The response message sent by a router or host contains a list of up to 25 destination
subnets within the AS, as well as the sender’s distance to each of those subnets. Response
messages are also known as RIP advertisements.
Consider the following example. Then the routing table for router D can be obtained as
below.
Problems with RIP: Two-Node Loop Instability/Count to infinity
A problem with distance vector routing is instability, which means that a network using this
protocol can become unstable.
Consider the example as shown in figure. At the beginning, both nodes A and B know how to
reach node X. But suddenly, the link between A and X fails. Node A changes its table. If A can
send its table to B immediately, everything is fine. However, the system becomes unstable if B
sends its routing table to A before receiving A's routing table. Node A receives the update and,
assuming that B has found a way to reach X, immediately updates its routing table. Based on the
triggered update strategy, A sends its new update to B. Now B thinks that something has been
changed around A and updates its routing table. The cost of reaching X increases gradually until
it reaches infinity. At this moment, both A and B know that X cannot be reached. However,
Roshan Tandukar
1
during this time the system is not stable. Node A thinks that the route to X is via B; node B thinks
that the route to X is via A. If A receives a packet destined for X, it goes to B and then comes
back to A. Similarly, if B receives a packet destined for X, it goes to A and comes back to B.
Packets bounce between A and B, creating a two-node loop problem. A few solutions have been
proposed for instability of this kind.
Solutions:
1. Defining Infinity: The first obvious solution is to redefine infinity to a smaller number,
such as 100. For our previous scenario, the system will be stable in less than 20 updates.
As a matter of fact, most implementations of the distance vector protocol define the
distance between each node to be 1 and define 16 as infinity. However, this means that
the distance vector routing cannot be used in large systems. The size of the network, in
each direction, cannot exceed 15 hops.
2. Split Horizon: In this strategy, instead of flooding the table through each interface, each
node sends only part of its table through each interface.
It is never useful to send information about a route back in the direction from which it
came and thus split horizons is used to prevent updates that are redundant to the network.
For this purpose Router records the interface over which it received a particular route and
does not propagates its information about that route back to the same interface. This
change is known as Split Horizon Technique.
If, according to its table, node B thinks that the optimum route to reach X is via A, it does
not need to advertise this piece of information to A; the information has come from A (A
already knows). Taking information from node A, modifying it, and sending it back to
node A creates the confusion.
In our scenario, node B eliminates the last line of its routing table before it sends it to A.
In this case, node A keeps the value of infinity as the distance to X. Later when node A
sends its routing table to B, node B also corrects its routing table. The system becomes
stable after the first update: both node A and B know that X is not reachable.
Roshan Tandukar
2
3. Split Horizon and Poison Reverse Using the split horizon strategy has one
drawback. Normally, the distance vector protocol uses a timer, and if there is no news
about a route, the node deletes the route from its table. When node B in the previous
scenario eliminates the route to X from its advertisement to A, node A cannot guess
that this is due to the split horizon strategy (the source of information was A) or
because B has not received any news about X recently.
The split horizon strategy can be combined with the poison reverse strategy. Node B
can still advertise the value for X, but if the source of information is A, it can replace
the distance with infinity as a warning: "Do not use this value; what I know about this
route comes from you."
4. Hold-down: It prevents inappropriately reinstating a route that has gone bad when
routers broadcast their regular update messages. Hold downs tell routers to hold on to
any changes that might affect recently removed routes for a certain period of time,
usually calculated just to be greater than the period of time necessary to update the
entire network with a route change. This prevents count-to-infinity problem. This time
duration is known as Hold Down time. Typically hold down time is around 60 sec.
So the idea is to wait
long enough to ensure that all machines receive the bad news (link failure news) and
not mistakenly accepts a message that is outdated.
Triggered updates: (continued)
5. Triggered updates: These are sent whenever a router sees a topology change or a
change in routing information (from another router). The router does not have to wait
for the period timer, but can send them immediately. Triggered updates do not need to
include the entire routing table but only the modified route(s).
The disadvantages of RIP include:
 Increased network traffic: RIP checks with its neighboring routers every 30 seconds,
which increases network traffic.
 Maximum hop count: RIP has a maximum hop count of 15, which means that on large
networks, other remote routers may not be able to be reached.
 Closest may not be shortest: Choosing the closest path by hop count does not
necessarily mean that the fastest route was selected. RIP does not consider other factors
when calculating best path.
 RIP only updates neighbors so the updates for non-neighboring routers are not first-hand
information.
Roshan Tandukar
3
Link-State Algorithm:
In a link-state algorithm also, the network topology and all link costs are known, that is,
available as input to the LS algorithm. In practice this is accomplished by having each node
broadcast link-state packets (LSP) to all other nodes in the network, with each link-state
packet containing the identities and costs of its attached links. The link-state routing is based
on Dijkstra’s algorithm for obtaining the least cost distance.
D(v): cost of the least-cost path from the source node to destination v
p(v): previous node (neighbor of v) along the current least-cost path from the source to v.
N’: subset of nodes and v is in N’ if the least-cost path from the source to v is definitively
known.
Consider an example as shown in the following figure.


In the initialization step, the currently known least-cost paths from u to its directly
attached neighbors, v, x, and w, are initialized to 2, 1, and 5, respectively. Note in
particular that the cost to w is set to 5 that link from u to w. The costs to y and z are set to
infinity because they are not directly connected to u.
In the first iteration,
Roshan Tandukar
4

o it adds the node to N’ which has not yet been added to the set N’ and has the least cost
distance. That node is x, with a cost of 1, and thus x is added to the set N’.
o Then it updates D(v) for all nodes v, yielding the results shown in the Step 1 in Table.
o The cost of the path to v is unchanged. The cost of the path to w (which was 5 at the
end of the initialization) through node x is found to have a cost of 4. Hence this lowercost path is selected and w’s predecessor along the shortest path from u is set to x.
Similarly, the cost to y (through x) is computed to be 2, and the table is updated
accordingly.
In the second iteration, nodes v and y are found to have the least-cost paths (2), and we
break the tie arbitrarily and add y to the set N’ so that N’ now contains u, x, and y. The
cost to the remaining nodes not yet in N’, that is, nodes v, w, and z, are updated and so on.
The resulting least-cost paths and forwarding table in u for the network is as below.
Roshan Tandukar
5
OSPF:
Open Shortest Path First (OSPF) protocol is widely deployed in IP networks to manage intra
domain routing. An OSPF is a link-state protocol, in which routers establish relationships
developing neighbors, enabling each to build a consistent, global view of the routing
topology.
It uses flooding of link-state information and a Dijkstra least-cost path algorithm. With
OSPF, a router constructs a complete topological map (that is, a graph) of the entire
autonomous system. The router then locally runs Dijkstra’s shortest-path algorithm to
determine a shortest-path tree to all subnets, with itself as the root node.
A Link state protocol maintains the topology map or network map of the network and all the
nodes maintain a complete copy of this network map and perform a complete computation of
the best routes from this local map. The network map is held in a database, called Link state
DB, where each record represents one link in the network.
The network as shown above is represented by the database shown in table below.
Fig. Example database representing state of network
When topology changes, maps are updated quickly. The map is used to produce the Routing
Table.
Roshan Tandukar
6
OSPF Hierarchical Topology
An OSPF autonomous system can be configured hierarchically into areas.
o
Internal Routers: These are routers that are only connected to other routers or
networks within a single area. They maintain an LSDB for only that area, and really
have no knowledge of the topology of other areas.
o
Area Border Routers: These are routers that connect to routers or networks in more
than one area. They maintain an LSDB for each area of which they are a part. They
also participate in the backbone.
o
Backbone Routers: Exactly one OSPF area in the AS is configured to be the
backbone area. These are routers that are part of the OSPF backbone. The primary
role of the backbone area is to route traffic between the other areas in the AS. The
backbone always contains all area border routers in the AS and may contain
nonborder routers as well.
o
Boundary Routers: These routers connect an AS to another ASs.
Roshan Tandukar
7
OSPF and its Sub-protocols:
OSPF protocol implements Hello, flooding and exchange of OSPF packets in OSPF networks
as its sub protocols.
Hello Protocol


Flooding Protocol
Hello protocol ensures

that links are operational.
It also selects DR and
Backup DR


Exchange Protocol
Request packets are used 
to get record contents and
these are acknowledged
by Flooding protocol

Packets.
Flooding protocol
continuously maintains
Link DB integrity.
Advertisement is
distributed acc to
flooding rules to the Area
Exchange protocol
initially synchronizes
Link DBs.
Exchange goes until all
descriptions are sent and
acknowledged.
Hello packets are used to discover the neighbors and exchange the initial parameters in strict
order to establish bidirectional communication. A Hello packet must be sent and received
before a link becomes operational. The link between two routers is declared operational if
packets can flow in both directions.
When any change or update occurs at interfaces of OSPF routers, link state updates are
flooded to every OSPF router’s LSDB. Flooding is used for LSDB synchronization. The
packet layout used in flooding process carries with number of advertisements and LSAs.
The exchange process is based on bidirectional communication used for synchronizing the
LSDB. When two routers have established two-way connectivity on a point-to-point link,
they must “synchronize” their databases. On network links, this occurs between the routers
and the designated router or the backup routers. The initial synchronization is performed
through the “exchange protocol. The method goes like this:
Roshan Tandukar
8
The first step is to decide about the roles, master and slave. This is needed because this
protocol is asymmetric. After agreeing on these roles, the two routers will exchange the
description of their databases, and each will list the records that will be requested at a later
stage.
IS-IS (Intermediate System-to-Intermediate System) Protocol:





Intermediate System-to-Intermediate System (IS-IS) Protocol is an intradomain Open
System Interconnection (OSI) dynamic routing protocol specified in International
Organization for Standardization (ISO) 10589.
The IS-IS routing protocol is a link-state protocol.
It is faster converging, supports much larger internetworks, and is less susceptible to
routing loops.
This routing protocol has become increasingly popular, with widespread usage among
Service Providers.
It is also a very flexible protocol and has been extended to incorporate leading edge
features such as MPLS Traffic Engineering.
IS-IS Operations:
From a high level, IS-IS operates as follows:
•
Routers running IS-IS will send hello packets out all IS-IS-enabled interfaces to discover
neighbors and establish adjacencies.
•
Routers sharing a common data link will become IS-IS neighbors if their hello packets
contain information that meets the criteria for forming an adjacency. The criteria differ
slightly depending on the type of media being used (p2p or broadcast). The main criteria
are matching authentication, IS-type and MTU size).
•
Routers may build a link-state packet (LSP) based upon their local interfaces that are
configured for IS-IS and prefixes learned from other adjacent routers.
•
Generally, routers flood LSPs to all adjacent neighbors except the neighbor from which
they received the same LSP. However, there are different forms of flooding and also a
number of scenarios in which the flooding operation may differ.
•
All routers will construct their link-state database from these LSPs.
•
A shortest-path tree (SPT) is calculated by each IS, and from this SPT the routing table is
built.
Roshan Tandukar
9
Path Vector Routing:
Distance vector and link state routing are both intradomain routing protocols and can be used
inside an autonomous system, but not between autonomous systems. These two protocols are
not suitable for interdomain routing mostly because of scalability. Distance vector routing is
subject to instability if there are more than a few hops in the domain of operation. Link state
routing needs a huge amount of resources to calculate routing tables. It also creates heavy
traffic because of flooding. There is a need for a third routing protocol which we call path
vector routing.
Path vector routing proved to be useful for interdomain routing. The principle of path vector
routing is similar to that of distance vector routing. In path vector routing, we assume that
there is one node in each autonomous system that acts on behalf of the entire autonomous
system, say speaker node. The speaker node in an AS creates a routing table and advertises it
to speaker nodes in the neighboring ASs. The idea is the same as for distance vector routing
except that only speaker nodes in each AS can communicate with each other. However, what
is advertised is different. A speaker node advertises the path, not the metric of the nodes, in
its autonomous system or other autonomous systems.
Initialization: At the beginning, each speaker node can know only the reachability of nodes
inside its autonomous system.
Fig. Initial routing tables in path vector routing
Roshan Tandukar
10
Sharing: Just as in distance vector routing, in path vector routing, a speaker in an
autonomous system shares its table with immediate neighbors.
Updating: When a speaker node receives a two-column table from a neighbor, it updates its
own table by adding the nodes that are not in its routing table and adding its own autonomous
system and the autonomous system that sent the table. After a while each speaker has a table
and knows how to reach each node in other ASs.
BGP (Broader Gateway Protocol):
It is an inter-autonomous system routing protocol. BGP is used to exchange routing
information for the Internet and is the protocol used between Internet service providers (ISP),
which are different ASs.
As an inter-AS routing protocol, BGP provides each AS a means to
1. Obtain subnet reachability information from neighboring ASs.
2. Propagate the reachability information to all routers internal to the AS.
3. Determine “good” routes to subnets based on the reachability information and on AS
policy.
The protocol can connect together any internetwork of autonomous systems using an
arbitrary topology. The only requirement is that each AS have at least one router that is able
to run BGP and that this router connect to at least one other AS's BGP router. Connections
between two ASs together form a path and the collection of path information forms a route to
reach a specific destination. BGP uses the path information to ensure the loop-free interdomain routing.
When a pair of autonomous systems agrees to exchange routing information, each must
designate a router that will speak BGP on its behalf; the two routers are said to become BGP
peers of one another.
For each TCP connection, the two routers at the end of the connection are called BGP peers,
and the TCP connection along with all the BGP messages sent over the connection is called a
BGP session. Furthermore, a BGP session that spans two Ass is called an external BGP
Roshan Tandukar
11
(eBGP) session, and a BGP session between routers in the same AS is called an internal BGP
(iBGP) session.
BGP Route Information Management Functions
Conceptually, the overall activity of route information management can be considered to
encompass four main tasks:
1. Route Storage: Each BGP stores information about how to reach networks in a set of
special databases. It also uses databases to hold routing information received from other
devices.
2. Route Update: When a BGP device receives an Update from one of its peers, it must
decide how to use this information. Special techniques are applied to determine when and
how to use the information received from peers to properly update the device's knowledge
of routes.
3. Route Selection: Each BGP uses the information in its route databases to select good
routes to each network on the internetwork.
4. Route Advertisement: Each BGP speaker regularly tells its peers what it knows about
various networks and methods to reach them. This is called route advertisement and is
accomplished using BGP Update messages.
Roshan Tandukar
12
Download