Routing

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

DSE-Sem2-Computer Networks

What is Routing?
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. (Cisco)
or
Routing is the process of moving
packets across an internetwork from a
source to a destination (by finding the
best path).

Protocols
In networking, the specification of a set of rules for a particular type of communication is
referred as protocol. When multiple computers and other networking devices use protocols
they can successfully communicate together.

Protocols can be either routing or routed as follows:


Routing protocols - Are used by routers to dynamically find all the networks in the
internetwork and to ensure that all routers have the same routing table. Basically, a
routing protocol determines the path of a packet through an internetwork. Examples
of routing protocols are RIP, IGRP, EIGRP, OSPF…

Routed protocol - Once all routers know about all networks, a routed protocol can be
used to send user data (packets) through the established enterprise. Routed protocols
determine the method of packet delivery. Examples of routed protocols are IP and
IPX.

Routing Protocols can be either Interior or Exterior Gateway Protocol (IGP or EGP):
A group of networks that are under the control of a single administrator is called as an
Autonomous System. All the networks must be controlled by a single entity.

Interior Gateway Protocol (IGP) - Is a Routing Protocol which is used to find network path
information within an Autonomous System. Eg. RIP, IGRP, OSPF

Exterior Gateway Protocol (EGP) - Is a Routing Protocol which is used to find network path
information between different Autonomous Systems. EGP is commonly used in the Internet
to exchange routing table information (ISPs). Eg. BGP, IDRP

RIP (Routing Information Protocol) – RIP only uses hop count to determine the best
way to a remote network, but it has a maximum allowable hop count of 15 by default,
meaning that 16 is deemed unreachable.

IGRP (Interior Gateway Routing Protocol) – Is Cisco-proprietary protocol. IGRP has


a maximum hop count of 255 with a default of 100. IGRP uses bandwidth and delay.

OSPF (Open Shortest Path First) – Is an open standard routing protocol that’s been
implemented by a wide variety of network vendors. Uses unlimited hops. OSPF uses
a cost factor to determine the best path.

National Institute of Business Management 1


DSE-Sem2-Computer Networks

Routing can be unicast or multicast:


In unicast routing, the router forwards the received packet through only one of its ports. RIP,
OSPF, BGP are some unicast routing protocols.

In multicast routing, the router may forward the received packet through several of its ports.
IGMP is a multicast routing protocols.

Routing Algorithms
Routing algorithms are part of the network layer. If the subnet uses datagrams, this decision
must be made for every arriving data packet since the best route may have changed since last
time. If the subnet uses virtual circuits internally, routing decisions are made only when a
new virtual circuit is being set up. Routing algorithms can be grouped into two major classes:

Non-adaptive: Do not change their routing decision on measurements of the current


traffic & topology. Instead, the choice of route to get from X to Y is computed in
advance.

Adaptive: Changes their routing decision to reflect changes in the topology & the
traffic.

Static route, Dynamic route and Default route


Static route – The network administrator enters a route manually into the router.
Eg: #ip route 192.168.30.0 255.255.255.0 192.168.20.2

Dynamic route – Uses a route that the routing protocol automatically assigns. Dynamic route
relies on the routing protocol.
Eg: #router rip
#network 192.168.10.0
#network 192.168.20.0

Dynamic routes cost you in terms of router CPU processes and bandwidth on the network
links, whereas static routes does not use them.

Default route – If a packets destination is not known by the router’s routing table, that packet
is sent to the default route. The default route leads to another router (Which treats the packet
as the same way)
Eg: #ip route 0.0.0.0 0.0.0.0 203.189.78.203

Administrative Distance (AD)


If a router has multiple routing protocols and static routes configured, it is possible that the
routing table might have more than one route for the same destination network.

Each routing protocol might prefer a different path to reach the same destination. How does
the router know which path to choose?

The Cisco IOS uses what is known as the administrative distance (AD) to determine which
route to install in the routing table.

National Institute of Business Management 2


DSE-Sem2-Computer Networks

Administrative Distance is a value that routers use in order to select the best path when there
are two or more different routes to the same destination from two different routing protocols.
Administrative Distance counts the reliability of a routing protocol.

Administrative Distance is a numeric value which can range from 0 to 255. A smaller
Administrative Distance is more trusted by a router, therefore the best AD being 0 and the
worst, 255.

AD vs Metric
AD is used to choose between multiple paths learned via different routing protocols. Metric,
on the other hand, is used to choose between multiple paths learned with the same routing
protocol.

What route will RIP select?

What route will RIP and IGRP select?

National Institute of Business Management 3


DSE-Sem2-Computer Networks

Network Address Translation (NAT) & Port Address Translation (PAT)


NAT is designed for IP address conservation/ saving/mapping. It enables private IP networks
that use unregistered IP addresses to connect to the Internet. NAT operates on a router,
usually connecting two networks together, and translates the private (not globally unique)
addresses in the internal network into real/legal addresses, before packets are forwarded to
another network.

As part of this capability, NAT can be configured to advertise only one address for the entire
network to the outside world. This provides additional security by effectively hiding the
entire internal network behind that address. NAT offers the dual functions of security and
address conservation.

Dynamic NAT - Is used when you have a “pool” of public IP addresses that you want to
assign to your internal hosts dynamically. Don’t use dynamic NAT for servers or other
devices that need to be accessible from the Internet.

NAT Overload (Sometimes also called PAT) - Is probably the most used type of NAT. You
have only one public IP address allocated by your ISP. In this case, NAT maps all your inside
hosts to the available public IP address.

Static NAT - Is used to do a one-to-one mapping between an inside address and an outside
address. Static NAT also allows connections from an outside host to an inside host. Usually,
static NAT is used for servers inside your network.

National Institute of Business Management 4

You might also like