0% found this document useful (0 votes)
3 views46 pages

Routing

The document discusses the network layer's role in packet delivery, forwarding, and routing, distinguishing between direct and indirect delivery methods. It explains various forwarding techniques, routing protocols like RIP and OSPF, and the concept of autonomous systems in managing routing tables. Additionally, it covers path vector routing and the Border Gateway Protocol (BGP), detailing types of autonomous systems and their characteristics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views46 pages

Routing

The document discusses the network layer's role in packet delivery, forwarding, and routing, distinguishing between direct and indirect delivery methods. It explains various forwarding techniques, routing protocols like RIP and OSPF, and the concept of autonomous systems in managing routing tables. Additionally, it covers path vector routing and the Border Gateway Protocol (BGP), detailing types of autonomous systems and their characteristics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Network Layer:

refers to the way a packet is handled by the


Delivery :
underlying networks under the control of the network layer.
Forwarding :refers to the way a packet is delivered to the next
station.
Routing :refers to the way routing tables are created to help in
forwarding
DELIVERY

The network layer supervises the handling of the


packets by the underlying physical networks. We
define this handling as the delivery of a packet.

Direct Versus Indirect Delivery


Direct Delivery: In a direct delivery, the final destination of the packet is a host
connected to the same physical network as the deliverer. Direct delivery occurs
when the source and destination of the packet are located on the same physical
network or when the delivery is between the last router and the destination host.
The sender can easily determine if the delivery is direct. It can extract the network
address of the destination (using the mask) and compare this address with the
addresses of the networks to which it is connected. If a match is found, the
delivery is direct.
Direct and indirect delivery

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

Forwarding means to place the packet in its route to


its destination. Forwarding requires a host or a router
to have a routing table. When a host has a packet to
send or when a router has received a packet to be
forwarded, it looks at this table to find the route to the
final destination.
Forwarding Techniques:
Route method versus next-hop method:
Host-specific versus network-specific method
Default method
Note

In classless addressing, we need at least


four columns in a routing table.
Example

Make a routing table for router R1, using the


configuration in Figure .

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

In distance vector routing, each node


shares its routing table with its
immediate neighbors periodically and
when there is a change.
Updating in distance vector routing
Two-node instability
Split Horizon:
Solution is called split horizon. In this strategy, instead of
flooding the table through each interface, each node sends only part of its
table through each interface. 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.
22.22
RIP
1. It uses Distance Vector Routing.
2. Sharing knowledge about the entire autonomous system. Each router
shares its knowledge about entire autonomous system with its neighbors.
3. Sharing only with neighbors.
4. Sharing at regular intervals. For example, every 30s.
5. The cost is hop count.
Concept of link state routing
Link state knowledge

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

its autonomous system .

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

You might also like