Routing
Routing
Routing
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.
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.
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.
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:
Adaptive: Changes their routing decision to reflect changes in the topology & the
traffic.
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
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.
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.
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.