Routing Basics
The term routing is used for taking a packet from
one device and sending it through the network to
another device on a different network
Routers don’t really care about hosts—they only
care about networks and the best path to each
network
The logical network address of the destination host
is used to get packets to a network through a
routed network
Then the hardware address of the host is used to
deliver the packet from a router to the correct
destination host
Routing Basics
To be able to route packets, a router must
know, at a minimum, the following:
Destination address
Neighbor routers from which it can learn about
remote networks
Possible routes to all remote networks
The best route to each remote network
How to maintain and verify routing information
Routing Basics
Routers decide where to forward packets on the basis of
routing tables
The router learns about remote networks from neighbor
routers or from an administrator
The router then builds a routing table that describes how
to find the remote networks
If a network is directly connected, then the router
already knows how to get to it
If a network isn’t connected, the router must learn how
to get to the remote network in two ways:
by using static routing, meaning that someone must hand-type
all network locations into the routing table
or through something called dynamic routing
Routing Basics
In dynamic routing , a protocol on one router communicates
with the same protocol running on neighbor routers
The routers then update each other about all the
networks they know about and place this information into
the routing table
If a change occurs in the network, the dynamic routing
protocols automatically inform all routers about the event
If static routing is used, the administrator is responsible for
updating all changes by hand into all routers
Typically, in a large network, a combination of both dynamic
and static routing is used
IP Routing Process
IP Routing Process
Router consults its routing table to find Dest IP address
Router knows Dest IP exists on one of its interfaces but does not know its
MAC address . Hence it has to run its ARP protocol.
After Receiving ARP reply, packet is forwarded directly to
destination host
Router will also update TTL and header
checksum when creating new headers
for the packet
Routing Protocol Basics
Administrative Distances
An administrative distance is an integer from 0
to 255
The administrative distance (AD) is used to rate
the trustworthiness of routing information
received on a router from a neighbor router
0 is the most trusted and 255 means no traffic
will be passed via this route.
Administrative Distance (AD)
Routing Protocol Basics
If a router receives two updates listing the same
remote network, the first thing the router checks is
the AD
If one of the advertised routes has a lower AD
than the other, then the route with the lowest
AD will be placed in the routing table
If both advertised routes to the same network have
the same AD, then routing protocol metrics (such as
hop count or bandwidth of the lines) will be used to
find the best path to the remote network
The advertised route with the lowest metric will be
placed in the routing table.
Routing Protocol Basics
If a network is directly connected, the router
will always use the interface connected to
the network
If an administrator configures a static route,
the router will believe that route over any
other learned routes
You can change the administrative distance
of static routes, but, by default, they have an
AD of 1
Routers: Advertising Routes
Routers need routing protocols to know about networks
which exist behind each router
Routers advertise routes to all connected neighboring
routers
Routing Protocols
There are three classes of routing protocols,
based on the way they operate:
Distance vector
Link state
Hybrid
Distance vector Protocols
The distance-vector protocols find the best path to a remote
network by judging distance
Each time a packet goes through a router, that’s called a hop
The route with the least number of hops to the network is
determined to be the best route
The vector indicates the direction to the remote network
RIP and IGRP are examples of distance-vector routing
protocols
Distance-vector routing protocols keep track of any changes to the
internetwork by broadcasting the entire routing table to
directly connected neighbors periodically – poses great
overhead, expensive in terms of CPU process and link bandwidth
Are only capable of classful routing – do not recognize subnets
Distance vector Protocols
Routing Table of RA
Link-state Protocols
In link-state protocols, also called shortest-path-first
protocols, the routers each create three separate tables
Neighbor table: keeps track of directly attached neighbors,
Topology Table: Determines the topology of the entire internetwork
Routing Table: used as the routing table
Link-state routers know more about the internetwork
than any distance-vector routing protocol
OSPF is an example of a link state IP routing protocol
Link state protocols send updates containing the state of
their own links to all other routers on the network
Updates are only sent in case there is a change in the
network, not periodically
Can deal with classless subnetting
Link State Protocol
Routing Table of RA
Hybrid Protocols
Hybrid protocols use aspects of both
distance vector and link state
EIGRP (Enhanced Interior Gateway Routing
Protocol) is an example