0% found this document useful (0 votes)
11 views

IP Routing

Routing allows traffic from local networks to reach destinations elsewhere by passing through intermediate networks. Routers use routing protocols like RIP and OSPF to dynamically learn routes and maintain consistent routing tables. There are three main routing configurations - minimal routing for isolated networks, static routing for networks with limited gateways, and dynamic routing for networks with multiple routes using interior routing protocols to automatically adjust to changes.

Uploaded by

Samson Mumba
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)
11 views

IP Routing

Routing allows traffic from local networks to reach destinations elsewhere by passing through intermediate networks. Routers use routing protocols like RIP and OSPF to dynamically learn routes and maintain consistent routing tables. There are three main routing configurations - minimal routing for isolated networks, static routing for networks with limited gateways, and dynamic routing for networks with multiple routes using interior routing protocols to automatically adjust to changes.

Uploaded by

Samson Mumba
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/ 41

IP Routing

By Dr Ntalasha
Routing
◼ IP routing is the process of moving
packets from one network to another
network using routers
◼ A routing protocol is a tool used by routers
to dynamically find all the networks in the
internetwork, as well as to ensure that all
routers have the same routing table. Ex:
RIP, OSPF
Intro..
◼ Routing is the glue that binds the Internet together.
◼ Without it, TCP/IP is limited to a single physical network.
Routing allows traffic from your local network to reach its
destination somewhere else in the world – perhaps after
passing through many intermediate networks.
◼ The important role of routing and the complex
interconnection of Internet networks make the design of
routing protocols a major challenge to network software
developers.
Intro cont…
◼ Once all routers know about all networks,
a routed protocol can be used to send
user data (packets) through the
established internetwork.
◼ Routed protocols are assigned to an
interface and determine the method of
packet delivery.
◼ Examples of routed protocols are Internet
Protocol (IP) and IPv6.
Routing Basic
◼ 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
◼ Hardware address of the host is used to deliver
the packet from a router to the correct
destination host.
IP Routing
◼ Criteria that could (ideally) be used to make routing
decisions:
 Network characteristics
 Network topology
 Network load
 Datagram length
 Type of service requested in the datagram’s header
◼ IP routing software:
 Normally does not consider most of these factors
 Makes decisions based on fixed assumptions about
shortest paths
Common Routing Configurations
◼ First we must make a distinction between
routing and routing protocols.
◼ All systems route data, but not all systems run
routing protocols.
◼ Routing is the act of forwarding datagrams
based on the information contained in the
routing table.
◼ Routing protocols are programs that exchange
the information used to build routing tables.
Routing configurations
◼ A network’s routing configuration does not always
require a routing protocol.
◼ In situations where the routing information does not
change – for example, when there is only one possible
route, the systems administrator usually builds the
routing table manually.
◼ Some networks have no access to any other TCP/IP
networks, and therefore do not require that the systems
administrator builds the routing table at all.
◼ The three most common routing configurations are:
Minimal routing
◼ A network completely isolated from all other
TCP/IP networks requires only minimal routing.
◼ A minimal routing table is usually built by
ifconfig when the network interface is
configured.
◼ If your network doesn’t have direct access to
other TCP/IP networks, and if you are not using
subnetting, this may be the only routing table
you may require.
Static routing
◼ A network with a limited number of
gateways to other TCP/IP networks can be
configured with static routing.
◼ When a network has only one gateway, a
static route is the best choice.
◼ A static routing table is constructed
manually by the systems administrator.
◼ Static routing tables do not adjust to network
changes, so they work best where routes do
not change.
Dynamic routing
◼ A network with more than one possible route to the same
destination should use dynamic routing.
◼ A dynamic routing table is built from the information
exchanged by routing protocols.
◼ The protocols are designed to distribute information that
dynamically adjusts routes to reflect changing network
conditions.
◼ Routing protocols handle complex routing situations more
quickly and accurately than the systems administrator can.
◼ Routing protocols are designed not only to switch to a backup
route when the primary route becomes inoperable; they are
also designed to decide which route is the “best” route to a
destination.
◼ On any network where there are multiple paths to the same
destination, a routing protocol should be used.
Static and Dynamic Routing
◼ Static routing, someone hand-type all network locations
into the routing table
◼ 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
Interior Routing Protocols
◼ Routing protocols are divided into two general groups: interior and
exterior protocols. An interior protocol is a routing protocol used inside –
interior to – an independent network system.
◼ In TCP/IP terminology, these independent network systems are called
autonomous systems (AS).
◼ Within an autonomous system (AS), routing information is exchanged
using an interior protocol chosen by the autonomous system’s
administration.
◼ All interior routing protocols perform the same basic functions.
◼ They determine the “best” route to each destination and they distribute
routing information among the systems on a network.
◼ How they perform these functions, in particular, how they decide which
routes are best, is what makes routing protocols different from each
other. There are several interior routing protocols:
Routing Information Protocol (RIP)
◼ The Routing Information Protocol (RIP) is
the interior routing protocol most
commonly used in UNIX systems.
◼ RIP is included as part of the UNIX
software delivered with most systems.
◼ It is adequate for local area networks and
is simple to configure.
Hello
◼ Hello is a protocol that uses delay as the deciding factor
when choosing the best route.
◼ Delay is the length of time it takes a datagram to make
the round trip between its source and destination.
◼ A Hello packet contains a time stamp indicating when it
was sent.
◼ When the packet arrives at its destination, the receiving
system subtracts the time stamp from the current time, to
estimate how long it took the packet to arrive.
◼ Hello is not widely used. It was the interior protocol of the
original 56 kbps NSFNET backbone and has had very
little use otherwise.
Intermediate System to Intermediate System
(IS-IS)
◼ Intermediate System to Intermediate
System (IS-IS) is an interior routing
protocol from the OSI protocol suite.
◼ It is a Shortest Path First (SPF) link-state
protocol.
◼ It was the interior routing protocol used on
the T1 NSFNET backbone and is still used
by some large service providers.
Open Shortest Path First (OSPF

◼ Open Shortest Path First (OSPF) is


another link state protocol developed for
TCP/IP.
◼ It is suitable for very large networks and
provides several advantages over RIP.
Routing Information Protocol (RIP)
◼ The Routing Information Protocol (RIP) is run by the
routing daemon routed (pronounced “route” “d”).
◼ When routed starts, it issues a request for routing
updates and then listens for responses to its request.
◼ When a system configured to supply RIP information
“hears” the request, it responds with an update packet
based on the information in its routing table.
◼ The update packet contains the destination addresses
from the routing table and the routing metric associated
with each destination.
◼ Update packets are issued in response to requests, as
well as periodically to keep routing information accurate.
routing table
◼ To build a routing table, routed uses the information in the
update packets.
◼ If the routing update contains a route to the destination that
does not exist in the local routing table, the new route is
added.
◼ If the update describes a route whose destination is already
in the local routing table, the new route is used only if it has
a lower cost.
◼ The cost of a route is determined by adding the cost of
reaching the gateway that sent the update to the metric
contained in the RIP update packet.
◼ If the total metric is less than the metric of the current route,
the new route is used.
RIP routing table
◼ RIP also deletes routes from the routing table. It
accomplishes this in two ways.
◼ If the gateway to a destination says that the cost of the
route is greater than 15, then the route is deleted.
◼ RIP assumes that a gateway that does not send updates
is dead. All routes through a gateway are deleted if no
updates are received from that gateway for a specified
time period
◼ In general, RIP issues routing updates every 30
seconds. In many implementations, if a gateway does
not issue routing updates for 180 seconds, all routes
through that gateway are deleted from the routing table.
RIP Implementation
◼ RIP is easy to implement and simple to configure. However, RIP has
three serious disadvantages.
◼ Limited network diameter. The longest RIP route is 15 hops. A RIP
router cannot maintain a complete routing table for a network that has
destinations more than 15 hops away. The hop count cannot be
increased because of the second shortcoming.
◼ Slow convergence. Deleting a bad route sometimes requires the
exchange of multiple routing update packets until the route’s cost
reaches 16 or more. This is called counting to infinity, because RIP
keeps incrementing the route’s cost until it becomes greater than the
largest valid RIP metric. In this case, 16 is infinity. Additionally, RIP
may wait 180 seconds before deleting the invalid routes. We can say
that these conditions delay the “convergence of routing”, i.e., it takes a
long time for the routing table to reflect the current state of the network.
Classful routing
◼ Classful routing.
◼ RIP interprets all addresses using the IP
class rules for addressing. For RIP all
addresses are class A, B or C, which makes
RIP incompatible with CIDR supernets and
incapable of supporting variable-length
subnets.
◼ Nothing can be done to change the limited network
diameter.
◼ A small metric is essential to reduce the impact of counting
to infinity.
◼ However, limited network size is the least important of
RIP’s shortcomings.
◼ The real work of improving RIP concentrates on the other
two problems, slow convergence and classful routing.
◼ Features have been added to RIP to address slow
convergence.
◼ Figure below illustrates a network where a counting-to-
infinity problem might happen.
Internet Architecture

R3 R4 R5

Net Net
1 2

R1 R2

Host
Split Horizon
◼ With this feature, a router does not advertise routes
on the link from which those routes were obtained.
◼ This would solve the count-to-infinity problem
described above.
◼ Using the spilt horizon rule, mubilo would not
announce the route to subnet 3 on subnet 12
because it learned that route from the updates it
received from mumbole on subnet 12.
◼ While this feature works for the example described
above, it does not work for all count-to-infinity
configurations.
Poison Reverse
◼ This feature is an enhancement of split horizon. It
uses the same idea:
◼ “Do not advertise routes on the link from which
those routes were obtained.” But it adds a positive
action to that essentially negative rule.
◼ Poison reverse says that a router should advertise
an infinite distance for routes on this link.
◼ With poison reverse, mubilo would advertise subnet
3 with a cost of 16 to all systems on subnet 12.
◼ The cost of 16 means that subnet 3 cannot be
reached through mubilo.
RIP Version 2
◼ RIP Version 2 (RIP-2), is a new version of RIP. It is not a
completely new protocol. It simply defines extensions to
the RIP packet format.
◼ RIP-2 adds a network mask and a next hop address to
the destination address and metric found in the original
RIP packet.
◼ The network mask frees the RIP-2 router from the
limitation of interpreting addresses based on strict
address class rules.
◼ The mask is applied to the destination address to
determine how the address should be interpreted. Using
the mask, RIP-2 routers support variable-length subnet
and CIDR supernets.
Next Hop Address
◼ The next hop address is the IP address of the gateway that
handles the route. If the address is 0.0.0.0, the source of
the update packet is the gateway for the route.
◼ The next hop route permits a RIP-2 supplier to provide
routing information about gateways that do not speak the
RIP-2.
◼ RIP-2 adds other new features to RIP. It transmits
updates via the multicast address 224.0.0.9 to reduce the
load on systems that are not capable of processing a RIP-2
packet.
◼ RIP-2 also introduces a packet authentication scheme to
reduce the possibility of accepting erroneous updates from
the misconfigured system.

◼ Despite these changes, RIP-2 is compatible with RIP.
The original RIP specification allowed for future versions
of RIP.
◼ RIP has a version number in the packet header and it
had several empty fields for extending the packet. The
new values used by RIP-2 did not require any changes
to the structure of the packet.
◼ The new values are simply placed in the empty fields
that the original protocol reserved for future use.
Properly implemented RIP routers can receive RIP-2
packets and extract the data that they need from the
packet without becoming confused by the new data.
◼ Split horizon, poison reverse, triggered
updates and RIP-2 eliminate most of the
problems with the original protocol.
◼ But RIP-2 is still a distance vector protocol.
◼ There are other newer routing technologies
that are considered superior for large
networks.
◼ In particular, link-state routing protocols are
favoured because they provide rapid routing
convergence and reduce the possibility of
routing loops.
Open Shortest Path First (OSPF)
◼ Open Shortest Path First (OSPF) is a link-state protocol. As
such it is very different from RIP.
◼ A router running RIP shares information about the entire
network with its neighbours.
◼ Conversely, a router running OSPF shares information
about its neighbours with the entire network.
◼ The “entire network” means, at most, a single autonomous
system. RIP does not try to learn about the entire Internet,
and OSPF does not try to advertise to the entire Internet.
◼ That is not their job. These are interior routing protocols
and so their job is to construct the routing inside of an
autonomous system. OSPF further refines this task by
defining a hierarchy of routing areas within an autonomous
system:
Hierarchy of Routing Areas
◼ Areas. An area is an arbitrary collection of interconnected networks,
hosts and routers. Areas exchange routing information with other
areas within the autonomous system through area border routers.
◼ Backbone. A backbone is a special area that interconnects all of
the other areas within an autonomous system. Every area must
connect to the backbone, because the backbone is responsible for
distributing routing information between the areas.
◼ Stub area. A stub area has only one area border router, which
means that there is only one route out of the area. In this case, the
area border router does not need to advertise external routes to the
other routers within the stub area. It can simply advertise itself as
the default route.
Exterior Routing Protocols
◼ Exterior routing protocols are used to exchange routing information
between autonomous systems.
◼ The routing information passed between autonomous systems is
called reachability information.
◼ Rechability information is simply information about which networks
can be reached through specific autonomous system.
◼ Moving routing information into and out of an autonomous system is
the function of routing protocols.
◼ Exterior routing protocols are also called exterior gateway protocols.
◼ We are, however, requested not to confuse an exterior gateway
protocol with the Exterior Gateway protocol (EGP).
◼ EGP is not a generic term; it is a particular exterior routing protocol,
and an old one for that matter.
Exterior Gateway Protocol (EGP)
◼ A gateway running EGP announces that it can reach
networks that are part of its autonomous system.
◼ It does not announce that it can reach networks outside
its autonomous system.
◼ Before sending routing information, the systems first
exchange EGP Hello and I-Heard-You (I-H-U)
messages.
◼ These messages establish a dialogue between two EGP
gateways.
◼ Computers communicating via EGP are called EGP
neighbours and the exchange of Hello and I-H-U
messages is called acquiring a neighbour.
◼ Once a neighbour is acquired, routing information is
requested via a poll.
◼ The neighbour responds by sending a packet of
reachability information called an update.
◼ The local system includes the routes from the update
into its local routing table.
◼ If the neighbour fails to respond to three consecutive
polls, the system assumes that the neighbour is down
and removes the neighbour’s routes from its table.
◼ If the system receives a poll from its EGP neighbour, it
responds with its own update packet.
◼ Unlike the interior protocols discussed earlier, EGP does not attempt
to choose the “best” route. EGP updates contain distance-vector
information, but EGP does not evaluate this information. The routing
metrics from different autonomous systems are not directly
comparable. Each AS may use different criteria for developing
theses values. Therefore, EGP leaves the choice of a “best” route to
someone else.
◼ When EGP was designed, the network relied upon a group of
trusted core gateways to process and distribute the routing
information received from all the autonomous systems. These core
gateways were expected to have the information necessary to
choose gateways, where the information was combined and passed
back out to the autonomous systems.
Border gateway Protocol
(BGP)
◼ Border Gateway Protocol (BGP) is the leading exterior routing protocol
of the Internet.
◼ It is based on the OSI InterDomain Routing Protocol (IDRP). BGP
supports policy-based routing, which uses non-technical reasons (for
example, political, organisational or security considerations) to make
routing decisions.
◼ Thus BGP enhances an autonomous system’s ability to choose
between routes and to implement routing policies without relying on a
central routing authority. This feature is important in the absence of
core gateways to perform these tasks.
◼ Routing policies are not part of the BGP protocol. Policies are
provided externally as configuration information. The network
administrator enforces the routing policy through configuring the
router.

◼ BGP is implemented on top of TCP, which
provides BGP with a reliable delivery service.
◼ BGP uses well-known TCP port 179. It
acquires its neighbours through the standard
TCP three-way handshake.
◼ BGP neighbours are called peers. Once
connected, BGP peers exchange OPEN
messages to negotiate session parameters,
such as the version of BGP that is to be
used.
◼ The UPDATE message lists the destinations that can be reached
through a specific path and the attributes of the path. BGP is a path
vector protocol. It is called a path vector protocol because it provides
the entire end-to-end path of a route in the form of a sequence of
autonomous system numbers. Having the complete AS path eliminates
the possibility of routing loops and count-to-infinity problems. A BGP
UPDATE contains a single path vector and all the destinations
reachable through that path. Multiple UPDATE packets may be sent to
build a routing table.
◼ BGP peers send each other complete routing table updates when the
connection is first established. After that, only changes are sent. If
there are no changes, a small (19-byte) KEEP-ALIVE message is sent
to indicate that the peer and the link are still operational. BGP is very
efficient in its use of network bandwidth and system resources.
Choosing a Routing Protocol
◼ Although there are many routing protocols, choosing one is
usually easy.
◼ Most of the interior routing protocols mentioned above were
developed to handle the special routing problems of very
large networks.
◼ Some of the protocols have only been used by large
national and regional networks. For local area networks,
RIP is still the most common choice. For larger networks,
OSPF is the choice.
◼ If you must run an exterior routing protocol, the
protocol that you use is often not a matter of
choice.
◼ For two autonomous systems to exchange routing
information, they must use the same exterior
protocol.
◼ If the other AS is already in operation, its
administrators have probably decided which
protocol to use and you will be expected to
conform to their choice. Most often this choice is
BGP.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy