Dynamic Routing
Dynamic Routing
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 2
Dynamic Routing Protocol Overview
Dynamic Routing Protocol Overview
Interior gateway protocols are used inside an organization's network and are limited to
the border router.
Exterior gateway protocols are used to connect the different Autonomous Systems (ASs).
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3
Dynamic Routing Protocol Overview
Dynamic Routing Protocol Overview
The Distance Vector (DV) protocol is the oldest routing protocol in practice. With distance vector
routes are advertised based upon the following characteristics:
• Distance - How far the destination network is based upon a metric such as hop count.
• Vector - The direction (next-hop router or egress interface) required to get to the destination.
This routing information is exchanged between directly connected neighbours
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 4
Dynamic Routing Protocol Overview
Dynamic Routing Protocol Overview
Link state routing (OSPF, ISIS) relies on each node advertising/flooding the state (i.e. delay,
bandwidth etc) of their links to every node within the link state domain.
Link-state neighbours only sends incremental routing updates (LSAs) rather than a full routing
update.
Also, these updates are only sent at the point a change in the network topology occurs, rather
than at regular intervals.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 5
Dynamic Routing Protocol Overview
Dynamic Routing Protocol Overview
Path vector (PV) protocols, such as BGP, are used across domains aka autonomous systems
The router does not just receive the distance vector for a particular destination from its neighbor;
instead, a node receives the distance as well as path information (aka BGP path attributes), that
the node can use to calculate (via the BGP path selection process) how traffic is routed to the
destination AS.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 6
Dynamic Routing Protocol Overview
Dynamic Routing Protocol Overview
RIP protocol was updated to RIPv2 to accommodate growth in the network environment
• RIPv1 uses classful routing. This limitation makes it impossible to have different-sized
subnets inside of the same network class. In other words, all subnets in a network class
must have the same size.
• RIPv2 is a classless, means, it includes the subnet mask with the network addresses in its routing
updates.
.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 7
Dynamic Routing Protocol Overview
Dynamic Routing Protocol Overview
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8
Dynamic Routing Protocol Overview
The Evolution of Dynamic Routing Protocols
• Dynamic routing protocols have been used in networks since the early 1980s. The first version of RIP
was released in 1982, but some of the basic algorithms within the protocol were used on the ARPANET
as early as 1969.
• As networks have evolved and become more complex, new routing protocols have emerged. The figure
shows the classification of routing protocols.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 9
Dynamic Routing Protocol Overview
Dynamic Routing Protocol Components
Purpose of dynamic routing protocols includes:
• Discovery of remote networks
• Maintaining up-to-date routing information
• Choosing the best path to destination networks
• Ability to find a new best path if the current path is no
longer available
The main components of dynamic routing
protocols include:
• Data structures - tables or databases kept in RAM.
• Routing protocol messages - to discover neighboring
routers, exchange routing information, and maintain
accurate information about the network.
• Algorithms – to facilitate learning routing information
and for best path determination.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 10
Dynamic versus Static Routing
Dynamic Routing Protocols Uses
Dynamic routing is the best
choice for large networks
Dynamic routing protocols help
the network administrator
manage the network:
• Providing redundant paths
• Automatically implementing the
alternate path when a link goes
down.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 11
Dynamic versus Static Routing
Dynamic Routing Advantages and Disadvantages
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 12
RIPv2
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 13
Dynamic versus Static Routing
Router RIP Configuration Mode
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 14
Configuring the RIP Protocol
Advertise Networks
The network network-address
router configuration mode
command:
• Enables RIP on all interfaces that
belong to a specific network
• Advertises the network in RIP routing
updates sent to other routers every 30
seconds.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 15
Configuring the RIP Protocol
Verify RIP Routing
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 17
Configuring the RIP Protocol
Disable Auto Summarization
RIPv2 automatically
summarizes networks at major
network boundaries.
Use the no auto-summary
router configuration mode
command to disable auto
summarization.
Use the show ip protocols
command to verify that auto
summarization is off.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 18
Configuring the RIP Protocol
Configure Passive Interfaces
RIP updates:
• Are forwarded out all RIP-enabled
interfaces by default.
• Only need to be sent out interfaces that are
connected to other RIP-enabled routers.
Sending RIP updates to LANs wastes
bandwidth, wastes resources, and is a
security risk.
Use the passive-interface router
configuration command to stop routing
updates out the interface. Still allows
that network to be advertised to other
routers.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19
Configuring the RIP Protocol
Propagate a Default Route
In the diagram a default static
route to the Internet is configured
on R1.
router configuration command
instructs R1 to send the default
static route information in the RIP
updates.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 20
The Routing Table
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 21
Parts of an IPv4 Route Entry
Routing Table Entries
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 22
Parts of an IPv4 Route Entry
Directly Connected Entries Directly Connected Networks (C) are
automatically added to the routing table
when the interface is configured and
activated.
Entries contain the following information:
• Route source - how the route was learned.
• Destination network – remote network.
• Outgoing Interface – exit interface used to
forward packets to destination.
Other route source entries include:
• S –Static Route
• D – EIGRP routing protocol
• O – OSPF routing protocol
• R - RIP routing protocol
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 23
Parts of an IPv4 Route Entry
Remote Network Entries
Routes to remote networks contain the
following information:
• Route source – how route was learned
• Destination network
• Administrative distance (AD) -
trustworthiness of the route.
• Metric – value assigned to reach the remote
network. Lower is better.
• Next hop – IPv4 address of the next router
that the packet should be forwarded to.
• Route timestamp – time since the route was
updated.
• Outgoing interface - the exit interface to use
to forward the packet
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24
Dynamically Learned IPv4 Routes
Routing Table Terms
The routing table is a hierarchical
structure that is used to speed up the
lookup process when locating routes and
forwarding packets.
The hierarchy includes:
• Ultimate Routes
• Level 1 routes
• Level 1 parent routes
• Level 2 child routes
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 25
Dynamically Learned IPv4 Routes
Ultimate Route
An ultimate route is a routing table
entry that contains either a next-hop
IPv4 address or an exit interface.
Directly connected, dynamically
learned, and local routes are
ultimate routes.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 26
Dynamically Learned IPv4 Routes
Level 1 Route
A level 1 route can be a:
• Network route - a network route that
has a subnet mask equal to that of the
classful mask.
• Supernet route - a network address
with a mask less than the classful
mask, for example, a summary
address.
• Default route - a static route with the
address 0.0.0.0/0
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 27
Dynamically Learned IPv4 Routes
Level 1 Parent Route
A parent route is a level 1 network
route that is subnetted.
In the routing table, it basically provides
a heading for the specific subnets it
contains.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 28
Dynamically Learned IPv4 Routes
Level 2 Child Route A level 2 child route is a route that is
a subnet of a classful network
address.
Level 1 parent routes contain level 2
child routes.
Level 2 child routes are also ultimate
routes.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 29
The IPv4 Route Lookup Process
Route Lookup Process Router lookup process:
• If the best match is a level 1 ultimate
route, then this route is used to forward
the packet.
• If the best match is a level 1 parent route,
the router then examines child routes (the
subnet routes).
• If there is a match with a level 2 child
route, that is used to forward the packet.
• If there is no match with level 2 child
routes, the router searches level 1
supernet or default routes. If there is a
match, that route is used.
• If there is no match found in the routing
table the packet is dropped.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 30
The IPv4 Route Lookup Process
Best Route = Longest Match
The best match is the route in the
routing table that has the most number
of far left matching bits with the
destination IPv4 address of the packet.
The route with the greatest number of
equivalent far left bits, or the longest
match, is always the preferred route.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 31
Analyze an IPv6 Routing Table
IPv6 Routing Table Entries
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 32
Analyze an IPv6 Routing Table
Directly Connected Entries
Use the show ipv6 route command to
display the IPv6 routing table.
The directly connected route entries
include the following:
• Route source – How the route was learned.
Directly connected indicated with a C and L for
local route.
• Directly connected network address.
• Administrative distance – Trustworthiness of
the route (lower more trustworthy).
• Metric – Value assigned to reach the network
(lower is preferred route).
• Outgoing interface – Exit interface used to
forward packet.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 33
Analyze an IPv6 Routing Table
Remote IPv6 Network Entries
The remote IPv6 route entries also
include the following:
• Route source – How the route was
learned. Common codes include O
(OSPF), D (EIGRP), R (RIP), and S
(Static route).
• Next hop - Identifies the IPv6 address of
the next router to forward the packet to.
The IPv6 router lookup process:
• Examines level 1 network routes for the
best match.
• Longest match is the best match.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 34
3.4 Chapter Summary
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 35
Conclusion
Chapter 3: Dynamic Routing
Explain the function of dynamic routing protocols.
Implement RIPv2.
© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 36