Routing
Routing
Delivery, Forwarding,
and Routing
22.1
DELIVERY
22.2
Direct and indirect delivery
22.3
FORWARDING
22.4
Route method versus next-hop method
22.5
Host-specific versus network-specific method
22.6
Default method
22.7
Simplified forwarding module in classless address
22.8
Note
22.9
Example
Solution
Table shows the corresponding table.
22.10
Configuration for Example
22.11
Routing table for router R1
22.12
Common fields in a dynamic routing table
22.13
• Mask: Mask applied for the entry
• Network Address: This field defines the network address to
which the packet is finally delivered.
• Next-hop Address: Address of the next-hop router to which
the packet is delivered
• Interface: Name of interface
• Flags:
• U (Up): It indicates that router is up and running.
22.14
• H (Host-specific): It indicates that the entry in the network address
field is a host-specific address. When it is missing, it means that the
address is only the network address of the destination.
• D (added by redirection): The D indicates that routing information for
this destination has been added to the host routing table by a
redirection table by a redirection message from ICMP.
• M (Modified by redirection): It indicates that the routing information
for this destination has been modified by a redirection message from
ICMP.
22.15
UNICAST ROUTING PROTOCOLS
22.17
Popular routing protocols
22.18
Optimality Principal
• This statement is known as the optimality principle
(Bellman,1957).
• It states that if router J is on the optimal path from
router I to router K, then the optimal path from J to K
also falls along the same route
• The set of optimal routes to a particular node forms a
sink tree.
• Sink trees are not necessarily unique
• Goal of all routing algorithms
• Discover sink trees for all destinations
22.19
Shortest Path Algorithm
Mark the source node as permanent.
Designate the source node as the working node.
Set the tentative distance to all other nodes to infinity.
While some nodes are not marked permanent
Compute the tentative distance from the source to all nodes adjacent to
the working node. If this is shorter than the current tentative distance
replace the tentative distance of the destination and record the label of
the working node there.
Examine ALL tentatively labeled nodes in the graph. Select the node with
the smallest value and make it the new working node. Designate the node
permanent.
22.20
Dijkstra algorithm
22.21
Shortest Path Algorithm
22.22
Why the Shortest Path Algorithm
Works
B
E
A
Z
• Perhaps A*ZE is a better path to E than ABE
• nodes are made permanent when paths to them are the shortest paths in
the graph
• All subsequent paths found to permanent nodes will be at least as long as
previously found paths
• Two cases
1.) If Z is permanent, then we have already checked A*ZE
2.) If Z is tentatively labeled, paths to Z must be longer than paths to E,
otherwise Z would have been made permanent
Flooding (a nonadaptive routing
algorithm)
• Brute force routing
• Every incoming packet is sent on every outgoing line
• Always finds the shortest path quickly
• Also finds many long paths
• Time to live is set to size of subnet
• Selective Flooding
• Flood only in the direction of the destination
• Practical in a few settings
• Military Applications
• Distributed Databases
• Metric for comparison
Distance Vector Routing (an adaptive
routing algorithm)
• Neighboring routers periodically exchange information from their
routing tables.
• Routers replace routes in their own routing tables anytime that
neighbors have found better routes.
• Information provided from neighbors
• Outgoing line used for destination
• Estimate of time or distance
• can be number of hops, time delay, packet queue length, etc.
Distance Vector Routing (an adaptive routing
algorithm)
The Count to Infinity Problem
Link State Routing (an adaptive routing algorithm)
Five Steps
1.) Discover your neighbors and learn their addresses.
2.) Measure the cost (delay) to each neighbor.
3.) Construct a packet containing all this information
4.) Send this packet to all other routers.
5.) Compute the shortest path to every other router.
1.) Discovering Your Neighbors
• Send “Hello” packet on each point-to-point line. Destination node
replies with its address.
22.36
OSFP Contt..
• Process Id is locally affected
• Must have a area 0 for connection (Backbone area)
• If any router configure with area 1 and area 0 is called as ABR (Area
Border Router)
• Router ospf 500
• Network 192.168.1.0 0.0.0.255 area 0
• Network 10.0.0.0 0.255.255.255 area 0
22.37