Chapter 4:
Manipulating Routing
Updates
Implementing Cisco IP Routing (ROUTE)
Elaborated by: Ing. Ariel Germán
For: ITLA
Based on: Foundation Learning Guide
CCNP ROUTE 300-101
Diane Teare, Bob Vachon, Rick Graziani
2015
Chapter 4
2
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Chapter 4 Topics
Using Multiple IP Routing Protocols on a Network
Implementing Route Redistribution
Controlling Routing Update Traffic
Using Multiple IP Routing
Protocols on a Network
Chapter 4
4
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Upon completing this section, you will be able to do the
following:
•
Describe the need for using more than one protocol in a network
•
Describe how routing protocols interact
•
Describe solutions for operating in a multiple routing protocol
environment
Why Run Multiple Routing Protocols?
It is desirable to run a single routing protocol throughout an entire
IP internetwork.
However, in some circumstances we need to use more than one:
•
When migrating from an older Interior Gateway Protocol (IGP) to a new
IGP.
•
Mergers between companies.
•
In mixed-router vendor environments.
•
When the use of a new protocol is desired, but the old routing protocol is
needed.
•
When some departments do not want to upgrade their routers to support
a new routing protocol.
Chapter 4
6
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Running Multiple Routing Protocols
When running multiple routing protocols, a router may learn
of a route from different routing sources.
If a router learns of a specific destination from two different
routing domains, the route with the lowest administrative
Running Multiple Routing Protocols
If a router receives these routing updates (from three different sources),
which one(s) will be installed in the routing table?
•
EIGRP (internal): 192.168.32.0/26
•
RIP: 192.168.32.0/24
•
OSPF: 192.168.32.0/19
If a packet arrives on a router interface destined for 192.168.32.1, which route would
the router choose?
If a packet arrives on a router interface destined for 192.168.32.100, which route would
the router choose?
10.1.1.1
Chapter 4
8
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Administrative Distance (AD)
Is used to rate a routing protocol’s believability (also called its
trustworthiness).
This criterion is the first thing a router uses to determine which
routing protocol to believe if more than one protocol provides
route information for the same destination.
The path with the lowest administrative distance is installed in the
Multiple Routing Protocols Solutions
Careful routing protocol design and traffic optimization
solutions should be implemented when supporting complex
multiprotocol networks.
These solutions include the following:
•
Summarization (Already covered in previous chapters)
•
Redistribution between routing protocols
Chapter 4
10
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Implementing Route
Redistribution
Upon completing this section, you will be able to do the
following:
•
Describe the need for route redistribution
•
Identify some considerations for route redistribution
•
Describe how to configure and verify route redistribution
Chapter 4
12
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Defining Route Redistribution
Is defined as the capability of boundary routers connecting
different routing domains to exchange and advertise routing
information between them.
Redistribution shares routing information about routes that
the router has learned with other routing protocols.
Planning to Redistribute Routes
Network administrators must manage the migration from
one routing protocol to another, or to multiple protocols,
carefully and thoughtfully, or routing loops can occur.
To have a scalable solution and limit the amount of routing
update traffic, the redistribution process must selectively
insert the routes that are learned.
When a router redistributes routes, it only propagates routes
that are in the routing table.
Therefore, a router can redistribute dynamically learned
routes, static routes, and direct connected routes.
Chapter 4
14
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Redistributing Routes
Redistribution is always performed outbound.
This means that the router doing redistribution does not change
its own routing table.
Only downstream routers receiving the redistributed routes could
Seed Metrics
Because redistributed routes are learned from other sources a boundary
router must be capable of translating the metric of the received route
from the source routing protocol into the receiving routing protocol.
The seed or default metric is defined during redistribution configuration.
After the seed metric for a redistributed route is established, the metric
increments normally within the autonomous system. (Except OE2).
The seed metric can be configured using either of the following:
•
The default-metric router configuration command (for all redistributed routes).
•
The redistribute router configuration command using either the metric option or a
route map.
To help prevent suboptimal routing and routing loops, always set the
initial seed metric to a value that is larger than the largest metric within
the receiving autonomous system.
Chapter 4
16
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Configuring and Verifying Basic Redistribution
in IPv4 and IPv6
Chapter 4
18
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Redistributing OSPFv2 Routes into the EIGRP
Routing Domain
To redistribute routes from one routing domain into another routing
domain, use the redistribute router configuration command.
It is important to note that routes are redistributed into a routing
protocol, so the redistribute command is configured under the routing
process that is to receive the redistributed routes.
Because different routing protocols use different metrics, the
redistribute command parameters vary between routing protocols.
To configure redistribution into EIGRP, the following command syntax is
used:
•
Router(config-router)# redistribute protocol process-id [metric bandwidth-metric
Redistributing OSPFv2 Routes into the EIGRP
Routing Domain
Chapter 4
20
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Redistributing OSPFv2 Routes into the EIGRP
Routing Domain
Redistributing OSPFv3 Routes into the EIGRP
for IPv6 Routing Domain
Chapter 4
22
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Redistributing OSPFv3 Routes into the EIGRP
for IPv6 Routing Domain
Redistributing OSPFv3 Routes into the EIGRP
for IPv6 Routing Domain
Unlike in IPv4, in IPV6 EIGRP does not automatically
include connected routes in the redistribution.
Chapter 4
24
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Redistributing OSPFv3 Routes into the EIGRP
for IPv6 Routing Domain
Redistributing EIGRP Routes into the OSPFv2
Routing Domain
To configure redistribution into OSPF, use the following
command syntax:
The subnets keyword is necessary for classless networks
to be advertised.
Without this keyword, only routes that are in the routing
table with the default classful mask will be redistributed.
Chapter 4
26
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Redistributing EIGRP Routes into the OSPFv2
Routing Domain
Redistributing EIGRP Routes into the OSPFv2
Routing Domain
Chapter 4
28
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Redistributing EIGRP Routes into the OSPFv2
Routing Domain
External link-state advertisements (LSAs) appear in the routing
table and are marked as external type 1 (E1) or external type 2
(E2) routes.
•
E1: Type O E1 external routes calculate the cost by adding the external
cost to the internal cost of each link that the packet crosses.
•
Use this type when there are multiple ASBRs advertising an external route to
the same autonomous system.
•
E2 (default): The external cost of O E2 routes is fixed and does not
change across OSPF domain.
•
Use this type if only one ASBR is advertising an external route to the
autonomous system.
If an OSPF router receives both type E1 and type E2 routes for
the same destination, the type E1 route is always preferred over
type E2 regardless of the actual calculated cost.
Redistributing EIGRP Routes into the OSPFv2
Routing Domain
Chapter 4
30
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Redistributing EIGRP for IPv6 Routes into the
OSPFv3 Routing Domain
Redistributing EIGRP for IPv6 Routes into the
OSPFv3 Routing Domain
Chapter 4
32
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Types of Redistribution Techniques
One-Point Redistribution:
•
One way
•
Two way
Multipoint Redistribution:
•
One way
•
Two way
One-Point Redistribution (One way)
This method only redistributes the networks learned from one routing
protocol into the other routing protocol.
R1 performs one-way redistribution because it only redistributes AS1
routes into the AS2 routing domain.
AS2 routes are not being redistributed in AS1.
Typically, AS1 routers would require the use of a default route or one or
more static routes to reach AS2 routes.
Chapter 4
34
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
One-Point Redistribution (Two way)
This method redistributes routes between the two routing processes in
both directions.
R1 provides two-way redistribution because it redistributes AS1 routes
into AS2 and AS2 routes into AS1.
One-way or two-way redistribution at one point is always safe.
One-point redistribution represents the only exit and entrance from one
routing protocol to another.
Multipoint Redistribution (One way)
This method consists of two or more boundary routers only
redistributing networks learned from one routing protocol into the other
routing protocol.
The boundary routers R3 and R4 are both redistributing AS1 routes into
the AS2 routing domain.
Again, AS1 routers would require the use of a default route or one or
more static routes to reach AS2 routes.
Chapter 4
36
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Multipoint Redistribution (Two way)
Also referred to as mutual redistribution, this method consists of two or
more boundary routers redistributing routes in both directions.
Multipoint redistribution is likely to introduce potential routing loops.
Multipoint one-way redistribution is problematic, and multipoint two-way
redistribution is highly dangerous.
Redistribution Problems
Problems that can occur during multipoint two-way
redistribution include the following:
•
Suboptimal routing. (Only part of the total cost is considered in routing
decisions.)
•
Self-sustained routing loops upon route loss.
If metric is lost, R1
might choose R2 to
Chapter 4
38
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Redistribution Problems
M
etric
=
6
Metric = 6
Metric
=
7
/
AD
=
120
M
et
ric
=
3
?
Metric = 4
Preventing Routing Loops in a Redistribution
Environment
The safest way to perform redistribution is to redistribute routes in
only one direction, on only one boundary router within the
network.
Only redistribute internal routes from one autonomous system to
another (and vice versa).
Tag routes in redistribution points and filter based on these tags
when configuring redistribution in the other direction.
Propagate metrics from one autonomous system to another
autonomous system properly.
Chapter 4
40
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Verifying Redistribution Operation
Know your network topology, particularly where redundant routes
exist.
Study the routing tables on a variety of routers in the internetwork
using the show ip route [ip-address] EXEC command.
Examine the topology table of each configured routing protocol to
ensure that all appropriate prefixes are being learned.
Perform a trace using the traceroute [ip-address] EXEC
command on some of the routes that go across the autonomous
systems to verify that the shortest path is being used for routing.
If you encounter routing problems, use the traceroute and
debug commands to observe the routing update traffic on the
Controlling
Routing
Chapter 4
42
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Upon completing this section, you will be able to do the
following:
•
Describe the general mechanics and need for route filtering
•
Identify how to use and configure distribute lists
•
Identify how to use and configure prefix lists
•
Identify how to use and configure route maps
Why Filter Routes?
Avoid redistributing external routes.
Routing tables not too big.
Chapter 4
44
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Route Filtering Methods
Routing updates compete with user data for bandwidth and router
resources.
Information about networks must be sent where it is needed and filtered
from where it is not needed.
This can involve controlling routing update traffic using static and default
routes, and passive interfaces.
However, more advanced route filtering mechanisms are available:
•
Distribute lists: A distribute list allows an access control lists (ACLs) to be applied to
routing updates.
•
Prefix lists: A prefix list is an alternative to ACLs designed to filter routes. It can be
used with distribute lists, route maps, and other commands.
•
Route maps: Route maps are complex access lists that allow conditions to be tested
against a packet or route, and then actions taken to modify attributes of the packet or
route.
Using Distribute Lists
Classic ACLs do not affect traffic that is originated by the
router.
When you link an ACL to a distribute list, routing updates
can be controlled no matter what their source is.
ACLs are configured in the global configuration mode and
are then associated with a distribute list under the routing
protocol.
The ACL should permit the networks that should be
advertised or redistributed and deny the networks that
should be filtered.
Chapter 4
46
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Configuring Distribute Lists
A distribute list filter can be applied for received, sent or
redistributed routes.
The distribute-list out command filters updates going out of the
interface or routing protocol specified in the command, into the
routing process under which it is configured.
The distribute-list in command filters updates going into the
interface specified in the command, into the routing process
under which it is configured.
Distribute List and ACL Example
In this example, R3 must redistribute EIGRP routes into the
OSPF domain with a metric of 40.
However, the administrator only wants to allow the 10.10.11.0/24
and 10.10.12.0/24 routes to be propagated.
Chapter 4
48
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Chapter 4
50
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Using Prefix Lists
Traditionally, route filtering was accomplished using ACLs
with the distribute-list command.
However, using ACLs as route filters for distribute lists has
several drawbacks, including the following:
•
A subnet mask cannot be easily matched.
•
Access lists are evaluated sequentially for every IP prefix in the
routing update.
Prefix List Characteristics
The advantages of using prefix lists include the following:
•
Friendlier command-line interface.
•
Faster processing: A router transforms a prefix list into a tree
structure, with each branch of the tree serving as a test.
•
Support for incremental modifications: Sequence numbers are
assigned to ip prefix-list statements, making it easier to edit.
•
Greater flexibility: Routers match networks in a routing update
against the prefix list using as many bits as indicated.
•
A prefix list can specify the exact size of the subnet mask, or it can indicate
Chapter 4
52
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Distribute List and Prefix List Example
In this example, R3 must redistribute EIGRP routes into the
OSPF domain with a metric of 40.
However, the administrator only wants to allow the 10.10.11.0/24
and 10.10.12.0/24 routes to be propagated.
Chapter 4
54
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Prefix List Examples
ip prefix-list TEST permit 172.0.0.0/8 le 24
•
R1 learns about 172.16.0.0/16, 172.16.10.0/24, and 172.16.11.0/24.
•
These are the routes that match the first 8 bits of 172.0.0.0 and have a prefix length
between 8 and 24.
ip prefix-list TEST permit 172.0.0.0/8 le 16
•
R1 learns only about 172.16.0.0/16.
•
This is the only route that matches the first 8 bits of 172.0.0.0 and has a prefix length
between 8 and 16.
Chapter 4
56
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Prefix List Examples
ip prefix-list TEST permit 172.0.0.0/8 ge 17
•
R1 learns only about 172.16.10.0/24 and 172.16.11.0/24.
•
Router A ignores the /8 parameter and treats the command as if it has the parameters
ge 17 le 32.
ip prefix-list TEST permit 172.0.0.0/8 ge 16 le 24
•
R1 learns about 172.16.0.0/16, 172.16.10.0/24, and 172.16.11.0/24.
•
Router A ignores the /8 parameter and treats the command as if it has the parameters
Prefix List Examples
ip prefix-list TEST permit 172.0.0.0/8 ge 17 le 23
R1 does not learn about any network.
ip prefix-list TEST permit 0.0.0.0/0 le 32
R1 learns about all EIGRP Routes.
ip prefix-list TEST permit 0.0.0.0/0
Chapter 4
58
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Verifying Prefix Lists
Use the show ip prefix-list ? command to see all the show commands
available for prefix lists.
show ip prefix-list [detail | summary]
•
Displays information on all prefix lists. Specifying the detail keyword includes the
description and the hit count.
show ip prefix-list prefix-list-name [network/length]
•
Displays the policy associated with a specific network/ length in a prefix list.
clear ip prefix-list prefix-list-name [network/length]
Manipulating Redistribution Using ACLs, Prefix
Lists, and Distribute Lists
Chapter 4
60
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Redistributing OSPFv2 Routes into the EIGRP
Routing Domain Using an ACL and Distribute List
R1 will be configured to specifically filter and not redistribute
the 10.10.21.0/24, 10.10.22.0/24, 10.10.23.0/24, and
Redistributing OSPFv2 Routes into the EIGRP
Chapter 4
62
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Redistributing EIGRP Routes into the OSPF
Routing Domain Using a Prefix List and Distribute
List
R1 will be configured to specifically filter and only
redistribute all matching prefixes in the range of
Redistributing EIGRP Routes into the OSPF
Routing Domain Using a Prefix List and Distribute
List
Chapter 4
64
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Using Route Maps
Route maps provide another technique to manipulate and
control routing protocol updates.
Route maps may be used for a variety of purposes.
All the IP routing protocols can use route maps for
redistribution filtering.
Understanding Route Maps
Route maps are complex access lists
They allow some conditions to be tested against the packet or
route in question using match commands.
If the conditions match, some actions can be taken to modify
attributes of the packet or route.
•
These actions are specified by set commands.
A collection of route-map statements that have the same route
map name is considered one route map.
One major difference between route maps and access lists is that
route maps can use the set commands to modify the packet or
route.
Chapter 4
66
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Route Map Applications
Route filtering during redistribution
•
Although distribute lists can be used for this purpose, route maps offer
the added benefit of manipulating routing metrics through the use of
set commands.
Policy-based routing (PBR)
•
When a match occurs, a set command can be used to define the
interface or next-hop address to which the packet should be sent.
BGP
Configuring Route Maps
Step 1. Define the route map using the route-map global
configuration command.
Step 2. Define the matching conditions using the match
command and optionally the action to be taken when each
condition is matched using the set command.
Step 3. Apply the route map.
To define a route map, use the route-map map-tag [permit
| deny] [sequence-number] global configuration command.
Chapter 4
68
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Configuring Route Maps
A route map may be made up of multiple route-map statements (with
different sequence numbers).
The statements are processed top-down, similar to an access list. The
first match found for a route is applied.
Route map sequence numbers do not automatically increment. When
the sequence-number parameter of the route-map command is not
used, the following occurs:
•
If no other entry is already defined with the supplied route-map map-tag, an entry
is created, with the sequence-number set to 10.
•
If only one entry is already defined with the supplied route-map tag, The router
assumes you are editing the one entry that is already defined.
•
If more than one entry is already defined with the supplied route-map tag, an
error message is displayed, indicating that the sequence-number is required.
•
If the no route-map map-tag command is specified (without the
Configuring Route Maps
Like an access list, an implicit deny any appears at the end
of a route map. The consequences of this deny depend on
how the route map is being used.
The match condition route map configuration commands
are used to define the conditions to be checked.
The set condition route map configuration commands are
used to define the actions to be followed if there is a match
and the action to be taken is permit.
A route-map statement without any match statements will
be considered matched.
Chapter 4
70
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Configuring Route Maps
A single match statement may contain multiple conditions. Only
one condition in the same match statement must be true for that
match statement to be considered a match. (Logical OR)
route-map statement may contain multiple match statements. All
match statements within a route-map statement must be
considered true for the route-map statement to be considered
matched. (Logical AND).
Route Map Match and Set Statements
Command
Description
match community
Matches a BGP community
match interface
Matches any routes that have the next hop out of one of the
interfaces specified
match ip address
Matches any routes that have a destination network number
address that is permitted by a standard or extended ACL
match ip next-hop
Matches any routes that have a next-hop router address that is
passed by one of the ACLs specified
match ip route-source
Matches routes that have been advertised by routers and access
servers at the address that is specified by the ACLs
match length
Matches based on the layer 3 length of a packet
match metric
Matches routes with the metric specified
match route-type
Matches routes of the specified type
Chapter 4
72
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Route Map Match and Set Statements
Command
Description
set as-path
Modifies an AS path for BGP routes
set automatic-tag
Computes automatically the tag value
set community
Sets the BGP communities attribute
set default interface
Indicates where to output packets that pass a match clause of a route
map for policy routing and have no explicit route to the destination
set interface
Indicates where to output packets that pass a match clause of a route
map for policy routing
set ip default next-hop
Indicates where to output packets that pass a match clause of a route
map for policy routing and for which the Cisco IOS software has no
explicit route to a destination
set ip next-hop
Indicates where to output packets that pass a match clause of a route
map for policy routing
set level
Indicates where to import routes for IS-IS and OSPF
set local-preference
Specifies a BGP local preference value
set metric
Sets the metric value for a routing protocol
set metric-type
Sets the metric type for the destination routing protocol
set tag
Sets tag value for destination routing protocol
Configuring Route Redistribution Using Route
Maps
Use route maps when you want detailed control over how
routes are redistributed between routing protocols.
The redistribute command has a route-map keyword with
a map-tag parameter.
It is important to understand what the permit and deny
mean when redistributing.
•
permit: indicates that the matched route is to be redistributed
Chapter 4
74
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Manipulating Redistribution Using Route Maps
R1 and R4 will be configured to support mutual redistribution without any filtering
mechanism.
R1 and R4 will be configured to support mutual redistribution using route maps.
Chapter 4
76
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Chapter 4
78
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Chapter 4
80
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Change Administrative Distance to Enable Optimal
Routing
Chapter 4
82
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Change Administrative Distance to Enable Optimal
Routing
Change Administrative Distance to Enable Optimal
Routing
Chapter 4
84
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Change Administrative Distance to Enable Optimal
Routing
Manipulating Redistribution Using Route
Tagging
Chapter 4
86
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Caveats of Redistribution
Redistribution of routing information adds to the complexity
of a network and increases the potential for routing
confusion, so you should use it only when necessary.
The key issues that arise when you are using redistribution
are as follows:
•
Routing loops
•
Incompatible routing information (suboptimal routing)
Chapter 4
88
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public
Summary
Chapter 4
90
© 2007 – 2010, Cisco Systems, Inc. All rights reserved. Cisco Public