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

Week 14 Routing Concepts Static and Dynamic Routing

The document provides an overview of routing concepts, focusing on the role of routing at layer 3 and the importance of routing tables in directing packet delivery. It distinguishes between static and dynamic routing tables, explains routing protocols, and discusses metrics used to evaluate routes. Additionally, it covers distance-vector and link-state routing protocols, emphasizing their mechanisms for network discovery and maintenance of routing information.

Uploaded by

danielkahssu
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)
7 views46 pages

Week 14 Routing Concepts Static and Dynamic Routing

The document provides an overview of routing concepts, focusing on the role of routing at layer 3 and the importance of routing tables in directing packet delivery. It distinguishes between static and dynamic routing tables, explains routing protocols, and discusses metrics used to evaluate routes. Additionally, it covers distance-vector and link-state routing protocols, emphasizing their mechanisms for network discovery and maintenance of routing information.

Uploaded by

danielkahssu
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

ROUTING CONCEPTS

Department of Computer and Information Technology


DEFENCE ENGINEERING COLLEGE
WHAT’S ROUTING
Routing - path finding from one end to the other
 Routing occurs at layer 3
 Bridging occurs at layer 2

Application layer Application layer


Presentation layer Presentation layer
Session layer Session layer
Transport layer Transport layer
Network layer Network layer Network layer
Data link layer Data link layer Data link layer
Physical link Physical link Physical link

Network A Network B
2

Data Comm & Networking


NETWORK LAYERS

 The network layer supervises the handling of the


packets by the underlying physical networks. We
define this handling as the delivery of a packet.
 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.

22.3

Data Comm & Networking


ROUTING TABLE

 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.

22.4

Data Comm & Networking


IP ROUTING

 IP performs:
 search for a matching host address
 search for a matching network address

 search for a default entry

 Routing done by IP router, when it searches


the routing table and decide which interface
to end a packet out.

incoming

which interface ?
5

Data Comm & Networking


ROUTING TABLES

 Routing is carried out in a router by consulting


routing table.
 No unique format for routing tables, typically
table contains:
 address of a destination
 IP address of next hop router
 network interface to be used
 subnet mask for the this interface
 distance to the destination

Data Comm & Networking


ROUTING COMPONENT

 Three important routing elements :


 algorithm
 database
 protocol
 Algorithm : can be differentiate based on
several key characteristics
 Database : table in routers or routing table
 Protocol: the way information for routing to
be gathered and distributed

Data Comm & Networking


ROUTING ALGORITHM
Design goals
 Optimality - compute the best route
 Simplicity/low overhead - efficient with a
minimum software and utilization overhead
 Robustness/stability- perform correctly in the
face of unusual circumstances
 Rapid convergence- responds quickly when
the network changes
 Flexibility- accurate adapt to a variety of
network

Data Comm & Networking


ROUTING PROTOCOLS

 Routing protocol : protocol to exchange of


information between routers about the
current state of the network
 Routing protocol jobs
 create routing table entries
 keep routing table up-to-date
 compute the best choice for the next hop router

Data Comm & Networking


ROUTING METRICS

 How do we decide that one route is better


than another?
 Solution : using a metric as a measurement to
compare routes
 Metrics may be distance, throughput, delay,
error rate, and cost.
 Today, IP supports Delay, Throughput,
Reliability and Cost (DTRC)

10

Data Comm & Networking


HOP COUNT

A hop is defined as a passage through one


router

2 hops

1 hop 1 hop
R1 R2

1 hop 1 hop

R3

11

Data Comm & Networking


ROUTING ALGORITHM: STATIC ROUTE
 Manually configuration routing table
 Can’t react dynamically to network change such as
router’s crash
 Work well with small network or simple topology

 Unix hosts use command route to add an entry

point to point
connection

route to this
way only, no need
for update
12

Data Comm & Networking


ROUTING ALGORITHM: STATIC TECHNIQUE
Flooding
 Every incoming packet is sent out every
outgoing
 Retransmit on all outgoing at each node

 Simple technique, require no network


information
 Generate vast numbers of duplicate packet
flooding
incoming

13

Data Comm & Networking


Popular dynamic routing protocols

22.14
Routing Theory and

Data Comm & Networking


The success of dynamic routing depends on two basic router
functions:
1. maintenance of a routing table
2. timely distribution of knowledge, in the form of routing updates,
to other routers

Data Comm & Networking


Dynamic routing relies on a routing protocol to share knowledge among
routers.
A routing protocol defines the set of rules used by a router when it
communicates with neighboring routers. For example, a routing protocol
describes:
 how to send updates
 what knowledge is contained in these updates
 when to send this knowledge
 how to locate recipients of the updates
Data Comm & Networking
 When a routing algorithm updates a routing table, its primary
objective is to determine the best information to include in the
table.
 Each routing algorithm interprets what is best in its own way. The
algorithm generates a number, called the metric value, for each
path through the network.
 Typically, the smaller the metric number, the better the path.
Data Comm & Networking
Routing Protocols Metrics:
 RIP – hop count
 IGRP – bandwidth, delay, reliability, load
 EIGRP – bandwidth, delay, reliability, load
 OSPF – bandwidth
 BGP – attribute values and shortest path

Data Comm & Networking


DYNAMIC ROUTING
Most Dynamic routing algorithms can be classified as one of two
basic algorithms:
 distance vector
 link state.
The distance-vector routing approach determines the direction
(vector) and the cost or metric (distance) to any link in the
internetwork.
 RIP, IPX RIP and IGRP
 AppleTalk, RTMP and others
The link-state (also called shortest path first) approach re-creates
the exact topology of the entire internetwork (or at least the
portion in which the router is situated).
 OSPF
 IS-IS

Data Comm & Networking


 When all routers in an internetwork are operating with the same
knowledge, the internetwork is said to have converged.
 Fast convergence is a desirable network feature because it
reduces the period of time in which routers would continue to
make incorrect/wasteful routing decisions.
Data Comm & Networking
Distance Vector Concepts
 The mathematical basis of the distance-vector routing protocols is
the Bellman-Ford algorithm.
 Pure distance-vector routing protocols suffer from long
convergence times and possible temporary routing loops

Data Comm & Networking


172.16.0.0/16

Network Discovery and Routing Table Maintenance


 Distance-vector-based routing algorithms pass periodic copies of a
routing table between adjacent routers, from router to router. (RIP
every 30 seconds, IPX RIP every 60 seconds, IGRP every 90 seconds).
 These regular updates between routers help routers discover each
other’s networks and communicate topology changes.
 Routers only learn about other networks from adjacent routers, their
directly connected neighbors.
 Router D learned about Router A’s network 172.16.0.0/16 from Router
C, who learned it from Router B, who learned it from Router A.
 This is why distance-vector routing protocols are also known as routing
by rumor.
Data Comm & Networking
 Distance-vector routing protocols do not allow routers
to know the topology of the network, as they only
know how far a network is (distance: hops) and which
way to forward the packet (vector: exit interface).
 Distances (hops) are cumulative from one router to the
next

Data Comm & Networking


How do routers learn about other networks and
determine the best routes to these networks?
 We will now look at the concepts of how this happens.

Data Comm & Networking


Distance-Vector Network Discovery
RTA RTB RTC
Network W Network X Network Y Network Z

Routing Table Routing Table Routing Table


(Distance) (Vector) (Distance) (Vector) (Distance) (Vector)
Net. Hops Exit-int. Net. Hops Exit-int. Net. Hops Exit-int.
W 0 <-- X 0 <-- Y 0 <--
X 0 --> Y 0 --> Z 0 -->

Initial Routing Tables


 The first routes entered in the routing table are directly connected
networks, assigning a metric or cost of “0” (hop count for RIP).
 The next step is for routers to share their complete routing tables with
any and all directly connected neighboring routers.
 Distance-vector routing protocols do not maintain formal relationships
with neighboring routers, I.e. they do not know who their neighboring
routers are.
 So how do they know who to send their routing tables to? Distance-
vector routing protocols use a broadcast or multicast address to send out
routing updates.

Data Comm & Networking


Distance-Vector Network Discovery

RTA RTB RTC


Network W Network X Network Y Network Z

Routing Table Routing Table Routing Table


(Distance) (Vector) (Distance) (Vector) (Distance) (Vector)
Routing Net. Hops Exit-int. Net. Hops Exit-int. Net. Hops Exit-int.
W 0 <-- X 0 <-- Y 0 <--
Tables X 0 --> Y 0 --> Z 0 -->
Y 1 RTB W 1 RTA X 1 RTB
Z 2 RTB Z 1 RTC W 2 RTB

Convergence!
 All of the routers now have a consistent and accurate view of the
network.
 Later, we will see how RIP handles this operation.

Data Comm & Networking


Data Comm & Networking
Link-State Routing Protocols
 The first type of routing protocol we discussed was distance vector.
 The second type of routing protocol that we will examine is link-state.
 In this presentation we will only examine the very basic concepts of link-
state routing protocols

Data Comm & Networking


Distance Vector Routing Protocols
 Distance vector routing protocols like RIP and IGRP do not know
the exact topology of a network.
 All distance vector routing decisions are made from information
from neighboring routers – routing by rumor.
 The only information the router has about a route is how far
away the network is in hops or using another cost (distance) and
which interface to send forward the packet out of (vector).
 The router has no way to make its own decision on which
direction is ultimately the best way to send the packets.
Data Comm & Networking
LINK-STATE ROUTING PROTOCOL
Link-State Routing Protocols - History
 An IETF working group designed a routing protocol specifically
for IP routing, OSPF (Open Shortest Path First).
 For most network administrators they had two open-standard
routing protocols to choose from: RIP, simple but very limited,
or OSPF, robust but more sophisticated to implement.
 IGRP and EIGRP are Cisco proprietary
 IS-IS is used in IP networks, but not as common as OSPF

Data Comm & Networking


MATHEMATICAL POINT OF VIEW
 Link-state routing is not based on IP addresses, subnets and
network information!
 Link-state routing has a mathematical point of view, looking at
the network as nothing more than a graph with vertices and
the costs to these vertices.
 Link-state routing is based on a very simple algorithm known as
Dijkstras’s algorithm, invented by Edsger Wybe Dijkstra
 This algorithm can and has been used in many areas of human
activity, not just for routing.

Data Comm & Networking


1 – Flooding of link-state
information

Link-State Theory
 The network is viewed as a graph, showing the complete topology of the
network.
 How do routers build this topology?
1 – Flooding of link-state information
 The first thing that happens is that each node, router, on the network
announces its own piece of link-state information to other all other
routers on the network: who their neighboring routers are and the cost
of the link between them.
 Example: “Hi, I’m RouterA, and I can reach RouterB via a T1 link and I
can reach RouterC via an Ethernet link.”
 Each router sends these announcements to all of the routers in the
network.
Data Comm & Networking
1 – Flooding of link-state
information

3 – SPF Algorithm
2 – Building a
Topological
Database

2. Building a Topological Database


 Each router collects all of this link-state information from other routers
and puts it into a topological database.

3. Shortest-Path First (SPF), Dijkstra’s Algorithm


 Using this information, the routers can recreate a topology graph of the
network.

Data Comm & Networking


1 – Flooding of link-state
information

5 – Routing Table
3 – SPF Algorithm
2 – Building a
Topological 4 – SPF Tree
Database

4. Shortest Path First Tree


 This algorithm creates an SPF tree, with the router making itself the root
of the tree and the other routers and links to those routers, the various
branches.
 Note: Just a reminder that the link-state algorithm and graph it
creates is mathematically based and although we are mentioning
routers and their links, it has nothing to do with IP addresses or other
network information.
5. Routing Table
 Using this information, the router creates a routing table.
Data Comm & Networking
Exercise: From link-state flooding to routing tables - Lets try it…
 For this exercise we will not worry about the individual, leaf,
networks attached to each node or router (shown as a blank
line), but focus on how the topology is built to find the the
shortest path between each router.
 In order to keep it simple, we will take some liberties with the
actual process and algorithm, but you will get the basic idea!
 You are RouterA and you have a link to RouterB with a cost of
15, a link to RouterC with a cost of 2, a link to RouterD with a
cost of 5, and a leaf network “apple.”
 This is your own link-state information, which you will flood to
all other routers so they can do the same thing we will be doing
for RouterA. B
“Leaf”
15
network
apples 2
A C

Data Comm & Networking


We now get the following link-state information from RouterB
 RouterB has a link to RouterA with a cost of 15.
 RouterB has a link to RouterE with a cost of 2.
 And information about its own “leaf” network “bananas.”

bananas
B
2
15

A E

Now lets attach the two graphs…

B B
B
2
15 15 2
15

A
2
C
+ E
= 2
A E
A C
5
5

D
D

Data Comm & Networking


We now get the following link-state information from RouterC
 RouterC has a link to RouterA with a cost of 2.
 RouterC has a link to RouterD with a cost of 2.
 And information about its own “leaf” network “cherries.”

2
A C

2 cherries
D

Now lets attach the two graphs…

B B
2 2
15 15
+ =
2 2 2
A C E A C A C E

5 2 5 2

D D D

Data Comm & Networking


We now get the following link-state information from RouterD
 RouterD has a link to RouterA with a cost of 5.
 RouterD has a link to RouterC with a cost of 2.
 RouterD has a link to RouterE with a cost of 10.
 And information about its own “leaf” network “donuts.”

A C E

5 2 10

donuts

Now lets attach the two graphs…

B B
2
15 E 15
2
A C

2 5 2 10
A C E 2 E
A C
5 2
+
D
= 5 2 10
D
D

Data Comm & Networking


We now get the following link-state information from RouterE
 RouterE has a link to RouterB with a cost of 2.
 RouterE has a link to RouterD with a cost of 10.
 And information about its own “leaf” network “eggs.”
B
2
eggs
E

2 10

Now lets attach the two graphs and we have all the nodes, their links
between them and their and leafs!

B B
B

15
2 + 2
= 15
2

2 E
E A C
2 E
A C
5 2 10
5 2 10
2 10
D D
D

Data Comm & Networking


Topology
 Using the topological information we listed, RouterA has now
built a complete topology of the network.
 The next step is for the link-state algorithm to find the best path
to each node and leaf network.

bananas

B
2
15

apples 2 cherries
E eggs
A C

5 2 10

donuts

Data Comm & Networking


Choosing the best path
 Using the link-state algorithm RouterA can now proceed to find
the shortest path to each leaf network.

bananas

B
2
15

apples 2 cherries
E eggs
A C

5 2 10

donuts

Data Comm & Networking


Choosing the best path
 Now RouterA knows the best path to each network.

bananas

B
2
15

apples 2 cherries
E
eggs
A C

5 2 10

D
donuts

Data Comm & Networking


Creating the Routing Table
 RouterA can now enter these paths into its routing table, with
network numbers, exit interfaces and costs to each network.

Network interface cost


Apples i0 conn.
Bananas i1 15 bananas
Cherries i2 2 Donuts
i2 4 Eggs i2 B
14 Other directly connected
2
networks 15
i1
apples i2 2 cherries
E
eggs
A C
i0
i3
i = interface 5 2 10

D
donuts

Data Comm & Networking


1 – Flooding of link-state
information

5 – Routing Table
3 – SPF Algorithm
2 – Building a
Topological 4 – SPF Tree
Database

 And now you have seen and done the process!


 All of the routers in the network go through this same
process.

Data Comm & Networking


*

**

Data Comm & Networking

You might also like