Forwading and Routing
Forwading and Routing
The main function of NL (Network Layer) is routing packets from the source machine to the
destination machine.
There are two processes inside router:
a) One of them handles each packet as it arrives, looking up the outgoing line to use for it in
the routing table. This process is forwarding.
b) The other process is responsible for filling in and updating the routing tables. That is where
the routing algorithm comes into play. This process is routing.
routing table
static dynamic
A static A dynamic table is one that is updated updated
table is one wi ht automatically automatically when there is achange
manual entries. somewhere in the Internet.
A routing protocol is a combination of rules and procedures that lets routers in the Internet inform
each other of change
An autonomous system (AS) is a group of networks and routers under the authority of a single
administration.
➔ Routing inside an autonomous system is referred to as intra domain routing
➔ Routing between autonomous systems is referred to as inter domain routing
Distance Vector Routing
• In distance vector routing, the least-cost route between any two nodes is the route with
minimum distance/cost .
• In this protocol, as the name implies, each node maintains a vector (table)
of minimum distances to every node.
• Mainly 3 things in this
Initialization
Sharing
Updating
Initialization:
Each router prepares its routing table,by their local knowledge.
each router knows about-
Sharing:Each router exchanges its distance vector with its neighboring routers.
• When to Share: the table is sent both periodically and when there is a change in the table
Updating:Each router prepares a new routing table using the distance vectors it has obtained from its
neighbors.
• For calculating shortest paths in routing algorithms we use Bellman Ford's Algorithm
D(x,y)=min{ c(x,v)+D(v,y)}
B C D updated A
A 5 2 3 0
B 0 4 - 5
C 4 0 - 2
D - - 0 3
E 3 4 - 6
(Routing information protocol)
➔Creation of the states of the links by each node, called the link state packet (LSP).
LSPs are generated on two occasions:
● 1. When there is a change in the topology of the domain
● 2. on a periodic basis: The period in this case is much longer compared to
distance vector.
➔Dissemination of LSPs to every other router, called flooding,in an efficient and reliable
way.
➔Formation of a shortest path tree for each node. (Dijkstra algorithm)