You are on page 1of 30

IP Routing Principles

IP routing Principles
• Direct Routing:- if the Datagram is routed
locally i.e if the destination is on the same
subnet as the originator.

Indirect Routing :- if the use of aForwarding


devices such as router is invoked i.e the
destination is remote .
IP Routing
• A Datagram that is sent may invoke both
Direct and indirect routing
• The last router in the path must use direct
routing to deliver the packet to the
destination host.
• A framed Packet will be accepted by a
router only if Data link identifier in
destination address Contains
Routing
• Identification of router’s interface or
• A broadcast identification
• Router Strips off the frame and passes the
enclosed packet to the network layer.
• At network layer the destination IP
address is examined
Routing Basics

• If the destination network indicated by the


address in the IP header is directly attached to
the router , it will forward the packets directly to
the destination station, after encapsulation.
• If the destination network indicated by the
address in the IP header is not directly attached
to the router , it must use the services of another
router to forward the packets and let the router
determine the next Hop.
Router Basics

• For routing the Router will do a route table


look up
• At minimum , each address of the network
the router can reach.
• A pointer to the destination
• The pointer will indicate the destination
network directly connected to the router.
Router Basics
• The address of another router on a directly
connected network
• A router one hop closer to the the
destination is called a next hop router.
Router Table Updation

• Route Table acquires information in two


ways
• i) Information may be added manually , by
means of static route entries or
• Automatically by one of the several
systems of automatic information
discovery and sharing known as dynamic
routing protocols.
Static – Dynamic Routing
• Static / Non – Adoptive
• Choice of route is computed in advance,
off line , and downloaded to the router
when network is booted.
Dynamic / Adaptive
• Routing decisions change to reflect the
hanges in topology and / or traffic.
Static Routing
• Routes to destination are set up Manually.
• Network reach ability is not dependent on
the existence and state of the network.
• Route may be up or down but static routes
will remain in the routing tables and traffic
would still be sent towards the route.
• Not suitable for large networks.
Default Routing
• When a router receives a packet and its
table does not contain the network number
indicated in the packet , it is forwarded to
default router.
• If there is no routes or default route at any
stage , the router will send a control
message ( through ICMP ) to the
originating station.
Default Routing
• Refers to “ last resort “ outlet.
• Easiest form of Routing for a domain
connected to a single exit point.
• Default router is indicated as 0.0.0.0 with
no subnet mask.
• Routes are learnt via an internal and
external routing protocols.
Dynamic Routing
• If a router is down , its entry will be deleted
from the routing table and traffic to that will
not be forwarded.
• Used to enable routers to build their own
routing tables and make appropriate
decisions.
Route Table
Router lookup
• The router will match the most specific
address it can in the descending order of
specificity as below :-
• A host address
• A subnet
• A group of Subnets
• A major network Number
• A default Number
Routing Protocol
• It is a language a router speaks with other
routers to share information about the
reach ability and status of the network.
• Provides mechanisms for sharing routing
information.
• Allows the routers to communicate with
other routers to update and maintain
routing table.
Routing Protocol
• Routing protocol messages do not carry
end user traffic from network to network .
• Routing protocol uses the routed protocol
to pass information between routers.
• Rip and OSPF are Routing protocols.
Convergence
• The process of bringing all routes table to
a state of consistency is called
convergence .
• The time it takes to share information
acress an internet work and for all routers
to calculate best path in convergence
time.
• When an internet work is in unconverged
state , it may cause routing errors.
Metrics
• A metric is a variable assigned to routes
as a means of ranking them.
• Different routing protocols use different
and sometimes multiples metrics.
o RIP defines the “ best “ route as one with
minimum number of hops.
o IGRP defines the “ best “ route on a
combination of lowest bandwidth along the
route and the total delay of the route.
Metrics
• Hop Count
• Bandwidth
• Load
• Delay
• Reliability
• Cost
Metrics
• Hop Count
• A hop Count metric simply count router
hops.
Metrics
• Bandwidth
• A bandwidth metric would choose a higher
bandwidth over a lower bandwidth.
Metrics
• Load
• The metric reflects the amount of traffic utilizing
the links along the path.
• The best path is the one with the lowest load.
• Unlike hop count and bandwidth , the load on a
route changes and therefore the metric will
change and is called route flapping.
• Route flaps have adverse effect on routers CPU
and the overall stability of the network.
Metrics
• Delay
• Delay is the measure of time a packet
takes to traverse a route.
• A protocol using delay as metric would
choose the path with the least delay as the
best path.
Metrics
• Reliability
• Reliability measures the likelihood that the
link will fail in some way.
• Variable reliability metrics are
• i) Number of times link has failed or
• Ii) Number of errors it has received within
a certain time period
• The path with highest reliability would be
selected as the best.
Metrics
• Cost
• Cost may be defined by any policy or link
characteristic or may reflect the arbitrary
judgment of the administrator.
• The Term “ Cost “ is often used as generic term.
• E.g RIP chooses the lowest – cost path based
on hop count.
• Another generic term is “ Shortest “ e.g RIP
chooses the shortest path based on the hop
count.
Interior- Exterior Protocols
• Interior Gateway protocols
• Routing protocol which run with an Autonomous
system are IGPs.
• Distance Vector and Link state protocols are
IGPs.
Exterior Gateway Protocols
• Routing protocols that route between
Autonomous system are EGPs.
• IGPs discover paths between Networks.
• EGPs discovers paths between autonomous
Sysyems.
Administrative Distances
• Metrics are assigned to the routes to
determine the most preferred route.
• RIP Metric is hop count.
• IGRP uses bandwidth and delay
• OSPF uses COST
• EIGRP uses composite metrics.
• Diversity of metrics poses problems in
routers running more than one routing
protocol.
Administrative Distances
• The administrative Distance of various
protocols is as below:
• Connected Interface - 0
• Static Route -1
• EIGRP summary route – 5
• External BGP - 20
• EIGRP - 90
• IGRP - 100
Administrative Distance
• OSPF - 110
• IS – IS - 115
• RIP - 120
• EGP - 140
• Unknown - 255