Routing
Routing
Indirect Delivery:If the destination host is not on the same network as the deliverer,
the packet is delivered indirectly. In an indirect delivery, the packet goes from router
to router until it reaches the one connected to the same physical network as its final
destination. Note that a delivery always involves one direct delivery but zero or more
indirect deliveries.
Note also that the last delivery is always a direct delivery.
FORWARDING
Solution
Table shows the corresponding table.
Configuration for Example 22.1
Table 22.1 Routing table for router R1 in Figure 22.6
UNICAST ROUTING PROTOCOLS
A routing table can be either static or dynamic. A
static table is one with manual entries. A dynamic
table is one that is updated automatically when there is
a change somewhere in the Internet. A routing
protocol is a combination of rules and procedures that
lets routers in the Internet inform each other of
changes.
Optimization:
❖ A router receives a packet from a network and passes it to another network. A
router is usually attached to several networks. When it receives a packet, to
which network should it pass the packet? The decision is based on
optimization: Which of the available pathways is the optimum pathway? What
is the definition of the term optimum?
❖ One approach is to assign a cost for passing through a network. We call this
cost a metric. However, the metric assigned to each network depends on the
type of protocol. Some simple protocols, such as the Routing Information
Protocol (RIP), treat all networks as equals. The cost of passing through a
network is the same; it is one hop count. So if a packet passes through 10
networks to reach the destination, the total cost is 10 hop counts.
❖ Other protocols, such as Open Shortest Path First (OSPF), allow the
administrator to assign a cost for passing through a network based on the type
of service required. Example: minimum delay, maximum throughput.
❖ Other protocols define the metric in a totally different way. In the Border
Gateway Protocol (BGP), the criterion is the policy, which can be set by the
administrator.
Autonomous System
❖ Today, an Internet can be so large that one routing protocol cannot handle
the task of updating the routing tables of all routers.
❖ For this reason , an Internet is divided into autonomous systems.
❖ An autonomous system is a group of networks and routers under the
authority of a single administration.
❖ Routing inside an autonomous system is referred to as interior routing.
❖ Routing between autonomous system is referred to as exterior routing.
Popular routing protocols
Distance vector routing tables
Initialization of tables in distance vector routing
22.17
Note
Link state routing is based on the assumption that, although the global knowledge about the
topology is not clear, each node has partial knowledge: it knows the state (type, condition,
and cost) of its links. In other words, the whole topology can be compiled from the
partial knowledge of each node.
Link State Packet
■ It Carries a minimum amount of data : the node identity, the list of links, a sequence
number, and age.
■ The first two, node identity and the list of links, are needed to make the topology.
■ The third, sequence number, facilitates flooding and distinguishes new LSPs from old
ones.
■ The fourth, age, prevents old LSPs from remaining in the domain for a long time.
22.26
Flooding of LSP
■ The creating node sends a copy of the LSP out of each interface.
■ A node that receives an LSP compares it with the copy it may already have. If the
newly arrived LSP is older than the one it has (found by checking the sequence
number), it discards the LSP. If it is newer, the node does the following:
It discards the old LSP and keeps the new one.
It sends a copy of it out of each interface except the one from which the packet
arrived. This guarantees that flooding stops somewhere in the domain (where a node
has only one interface).
22.27
Dijkstra algorithm
Example of formation of shortest path tree
Table Routing table for node A
OSPF:
Areas in an autonomous system
OSPF
1. It uses Link State Routing (Dijkstra Algorithm).
2. Sharing knowledge about the neighbors. Each router sends the state of its
neighborhood to every other router in the area.
3. Flooding.
4. Sharing when there is a change.
Types of links
Point-to-point link
Transient link
Still, the link is represented as a bidirectional edge between the nodes. However,
while there is a metric from each node to the designated router, there is no metric
from the designated router to any other node.
Stub link
Example of an AS and its graphical representation in OSPF
Path vector routing:
Initialization
■ At the beginning, each speaker node can know only the reachability of nodes inside
22.39
Sharing
■ Just as in distance vector routing, in path vector routing, a speaker in an autonomous
system shares its table with immediate neighbors.
■ Node A1 shares its table with nodes B1 and C1. Node C1 shares its table with nodes
D1, B1, andA1. Node B1 shares its table with C1 andA1. Node D1 shares its table
with C1.
22.40
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.
■ Loop prevention: The instability of distance vector routing and the creation of
loops can be avoided in path vector routing. When a router receives a message, it
checks to see if its autonomous system is in the path list to the destination. If it is,
looping is involved and the message is ignored.
■ Policy routing: Policy routing can be easily implemented through path vector
routing. When a router receives a message, it can check the path. If one of the
autonomous systems listed in the path is against its policy, it can ignore that path
and that destination. It does not update its routing table with this path, and it does
not send this message to its neighbors.
22.41
Optimum path
■ What is the optimum path in path vector routing? We are looking for
a path to a destination that is the best for the organization that runs the
autonomous system. We definitely cannot include metrics in this route
because each autonomous system that is included in the path may use a
different criterion for the metric. One system may use, internally, RIP,
which defines hop count as the metric; another may use OSPF with
minimum delay defined as the metric. The optimum path is the path that
fits the organization. Each autonomous system may have more than one
path to a destination. For example, a path from AS4 to ASI can be
AS4-AS3-AS2-AS1, or it can be AS4-AS3-ASI. For the tables, we chose the
one that had the smaller number of autonomous systems, but this is not
always the case. Other criteria, such as security, safety, and reliability, can
also be applied.
22.42
BGP
■ Border Gateway Protocol (BGP) is an interdomain routing protocol using path vector
routing.
Types of Autonomous Systems:
■ The Internet is divided into hierarchical domains called autonomous systems. For
example, a large corporation that manages its own network and has full control over
it is an autonomous system. A local ISP that provides services to local customers is
an autonomous system. We can divide autonomous systems into three categories:
■ Stub
■ Multihomed
■ Transit
22.43
Stub Autonomous System
■ A stub AS has only one connection to another AS.
■ The interdomain data traffic in a stub AS can be either created or terminated in the
AS.
■ The hosts in the AS can send data traffic to other ASs. The hosts in the AS can
receive data coming from hosts in other ASs. Data traffic, however, cannot pass
through a stub AS.
■ A stub AS is either a source or a sink. A good example of a stub AS is a small
corporation or a small local ISP.
22.44
Multihomed AS
■ A multihomed AS has more than one connection to other ASs, but it is still only a
source or sink for data traffic.
■ It can receive data traffic from more than one AS. It can send data traffic to more
than one AS.
■ It does not allow data coming from one AS and going to another AS to pass through.
A good example of a multihomed AS is a large corporation that is connected to more
than one regional or national AS that does not allow transient traffic.
22.45
Transit AS
■ A transit AS is a multihomed AS that also allows transient traffic. Good examples of
transit ASs are national and international ISPs (Internet backbones).
22.46