Chapter 5
Chapter 5
1
Routing basics
• IP routing is the process of moving packets from one network
to another network using routers.
• Understand the difference between a routing protocol and a routed
protocol.
• 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.
• Basically, a routing protocol determines the path of a packet through an
internetwork.
2
Routing basics
• Once all routers know about all networks, a routed protocol can be used to send user
data (packets) through the established internet.
• Routed protocols are assigned to an interface and determine the method of packet
delivery.
• Examples of routed protocols are Internet Protocol (IP) and Internet Protocol version 6
(IPv6).
To be capable of routing packets, a router must know at least the following information:
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
3
Know this terminology Route table
• Connected route •The information that router need to
• Static route forward data is stored in a table, called
• Dynamic route ’route table’
• Default route •Router check the destination address of
Routing protocol the packet, and choose the next hop
Routing protocols are used b/n based on the information in route table.
routers to: determine the path •Route table is stored in RAM
of a packet through the
network,
maintain routing tables etc. Route table composition
•Destination address
Examples?
•Mask
Routed protocol
Are assigned to an interface •Next hop address (Gateway)
Once the path is determined •Forwarding physical interface
by the routing protocol, •Source of the information(Owner)
determines method of delivery. •Route priority
used to send the user data from •Metric
one network to another •What are 3 ways a router learn routes
network. Exs? 4
What is a Static Route?
•A static route is a route that is created manually by a network
administrator.
•Static routes are typically used in smaller networks.
•In static routing, the Router's routing table entries are populated
manually by a network administrator.
•The opposite of a static route is a dynamic route.
• In dynamic routing, the routing table entries are populated with the
help of routing protocols.
•The major advantages of static routing are reduced routing protocol
router overhead and reduced routing protocol network traffic.
•The major disadvantages of static routing are network changes
require manual reconfiguration in routers and network outages
cannot be automatically routed around. Also it is difficult to configure
static routing in a complex network.
•Dynamic routing use Routing Protocols that dynamically discover
network destinations and how to get to them. Dynamic routing allows
routing tables in routers to change if a router on the route goes down
or if a new network is added.
What is a Static Route?
•A Static Route configuration is one of the two ways of building the routing table.
•Static routing entails adding the network addresses leading to other devices to a
router so that it can use them to find the best path for forwarding the packet.
•There are two major ways in which static route configuration can be implemented:
through the Command Line Interface (CLI) or through the Graphic User Interface (GUI).
9
Routing 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, the route with the lower AD is the one that will get placed in the routing
table.
• If both advertised routes to the same network have the same AD, then routing
protocol metrics like hop count or the amount of bandwidth on the lines will be
used to find the best path to the remote network.
• And as it was with the AD, the advertised route with the lowest metric will be
placed in the routing table.
• But if both advertised routes have the same AD & the same metrics, then the
routing protocol will load-balance to the remote network.
• If a router finds more than one link with the same metrics to the same remote
network, it will automatically perform what’s known as round-robin load
balancing.
10
Routing basics
• You can change the ADs of static routes, but by default, they have an AD of 1.
• That’s only one place above zero, so you can see why a static route’s default AD
will always be considered the best by the router.
• This means that if you have a static route, a RIP-advertised route, and EIGRP-
advertised route listing the same network, then by default, the router will always
use the static route unless you change the AD of the static route.
• Or disabling RIP, EIGRP and OSPF to use one of them, unless all protocols run at
the background and we don’t get the best route
• This slows the router CPU as well as slow down the network speed.
11
Three classes of Routing Protocols
1. Distance vector:
The distance vector protocols find the best path to a remote network by
distance.
Each time a packet goes through a router, it equals something we call a
hop.
The route with the fewest hops to the network is determined to be the
best route.
The vector indicates the direction to the remote network.
RIP, RIPv2, and IGRP are distance vector routing protocols.
12
2. Link State:
Using link state protocols, also called shortest path
first protocols, the routers each create three separate
tables.
One of these tables keeps track of directly attached
neighbors, one determines the topology of the entire
internetwork, and one is used as the actual routing
table.
OSPF and IS-IS are IP routing protocols that are
completely link state.
Uses cost as a metrics.
determine routes by exchanging a link state packet
(LSP) with each neighboring router
13
3. Hybrid:
A hybrid protocol uses aspects of both distance
vector and link state.
EIGRP is the only example of hybrid.
It happens to be a Cisco-proprietary protocol,
meaning that it will run on only Cisco equipment.
So if you have a multivendor environment, by default,
this won’t work for you.
Enhanced Interior Gateway Routing Protocol (EIGRP) consider
the following network performance related attributes to calculate
the EIGRP metric value.
1) Bandwidth 2) Delay 3) Reliability and 4) Load
14
Routing Information Protocol (RIP)
• Routing information protocol (RIP) is a true distance-vector routing protocol.
• RIP sends the complete routing table out of all active interfaces every 30
seconds.
• It relies on hop count to determine the best route to a remote network, but it has
a maximum 15 by default, so a destination of 16 would be considered
unreachable.
• RIP works well in very small networks, but it’s not good at large networks with
WAN links or on networks with a large numbers of routers installed
and completely useless on networks have links with variable bandwidth.
• RIP version 1 uses only classful routing, it means all devices in the network
must use the same subnet mask, this is because RIP version 1 doesn’t send
updates with subnet mask information in pull.
• RIP version 2 provides something called prefix routing and does send subnet
mask information with its route update. This is called classless routing.
15
Network Command
R2(config)#router rip
R2(config-router)#network 192.168.2.0
R2(config-router)#network 192.168.3.0
R2(config-router)#network 192.168.4.0
.1
.2 .2
192.168.2.0/24 192.168.4.0/24
192.168.1.0/24 192.168.5.0/24
.1
.1
.1 .1
17
Verify: Routing Table
R1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
18
Verify: Routing Table
R2#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
• R2 Routing Table
19
Verify: Routing Table
R3#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile,
• R3 Routing Table
20
Advantage of RIP
•Easy to configure
•No design constraints like OSPF
protocol
•No complexity
•Less overhead
•Implements split horizon with
poison reverse.
Disadvantage of RIP
•Bandwidth utilization is very high
as broadcast foe every 30 seconds
•Works only on hop count
•Not scalable as hop count is only
15
21
Route table composition
Example
22
Link state
• Routing protocols that can be categorized as link-state routing
protocols include
■ Open Shortest Path First (OSPF): A link-state routing protocol that
uses a metric of cost, which is based on the link speed between two
routers. OSPF is a popular IGP, because of its scalability, fast
convergence, and vendor interoperability.
23
OSPF major example of Link state
• OSPF(Open shortest path first) is:
– Classless
– Link-state routing protocol
– Uses areas for scalability
• RFC 2328 defines the OSPF metric as an arbitrary value called cost.
– The IOS software uses bandwidth to calculate the OSPF cost
metric.
• OSPF is a Interior Gateway Protocol(IGP ) ,it is used within an AS to
decide route.
• O in OSPF means the standard is open , not private routing protocol
such as IGRP and EIGRP of CISCO.
24
Topology
•26 network commands for all three routers, enabling OSPF on all
interfaces.
The network Command
Router(config-router)# network network-address wildcard-mask area area-id
255.255.255.255
- 255.255.255.240 Subtract the subnet mask
---------------
0. 0. 0. 15 Wildcard mask
27
EIGRP
• EIGRP is cisco proprietary protocol w/c is developed by cisco
systems w/c can be used only on cisco routers.
• It is an example of hybrid protocol w/c has the properties of
distance vector and link state routing protocol.
• An advanced dynamic routing protocol used for routing decisions
and configuration on the routers.
• It sends only incremental updates, reducing the workload on the
router and the amount of data that needs to be transmitted.
• AD=90 internal, when routers are connected on the same AS.
• AD=170 external, when routers are connected in different AS or
different routing protocol.
• Support classless routing
• Support automatic & manual summarization on an enabled
interface 28
• EIGRP uses Diffusing Update Algorithm (DUAL)-to choose the best
path from the source to the destn.
• Support for VLSM & CIDR
• Use 224.0.0.10 multicast address for EIGRP routers update
• Support authentication (plain & MD5)
• Provides routing support for different routing protocols (IP, IPX,
Apple Talk and even IPv6)
• EIGRP has three conditions that must be met for neighborship
establishment.
1. Neighbor routers should be in the same subnet
2. AS should match
3. Identical values should match
• Default hop count =100
• Support load balancing over maximum 32 equal cost path, by
default is 4 and un-equal cost path
29
Route Redistribution
• Redistribution is the process of exchanging routing information
between different routing protocols.
• When we take a route from one routing protocol and inject or
distribute it into another routing protocol called redistributed.
• Routers by default only advertise and share routing information
with other routers, running the same protocol and in the same AS.
• Example if you have two routers R1 and R2, if R1 runs EIGRP and R2
runs OSPF and if you want to know them to each other’s routes by
default these routers (R1 & R2 )do not share route information.
• b/c they are not running on the same protocol.
• Here we need redistribution to know R1 and R2 to each other.
• Internal routes are routes advertised on the same protocol
• External routes are routes w/c get redistributed.
30
Routing Protocol Selection
■ Scalability
■ Vendor interoperability
■ IT staff’s familiarity with protocol
■ Speed of convergence
■ Capability to perform summarization
■ Interior or exterior routing
■ Type of routing protocol
■ Size of the network
31
Selecting and applying routing protocols…
• There are some recommendations for choosing and applying routing
protocols for your network project.
• They were developed to simplify the application of routing protocols
whenever possible.
33