Table Of Contents
OSPF Inbound Filtering Using Route Maps with a Distribute List
Contents
Prerequisites OSPF Inbound Filtering Using Route Maps with a Distribute List
Information About OSPF Inbound Filtering Using Route Maps with a Distribute List
Benefits of OSPF Route-Map-Based-Filtering
How to Configure OSPF Inbound Filtering Using Route Maps
Configuring OSPF Route- Map-Based Filtering
Configuration Examples for OSPF Inbound Filtering Using Route Maps with a Distribute List
OSPF Route-Map-Based Filtering: Example
Additional References
Related Documents
Standards
MIBs
RFCs
Technical Assistance
Command Reference
OSPF Inbound Filtering Using Route Maps with a Distribute List
The OSPF Inbound Filtering Using Route Maps with a Distribute List feature allows users to define a route map to prevent Open Shortest Path First (OSPF) routes from being added to the routing table. In the route map, the user can match on any attribute of the OSPF route.
History for the OSPF Inbound Filtering Using Route Maps with a Distribute List Feature
Release
|
Modification
|
12.0(24)S
|
This feature was introduced.
|
12.2(15)T
|
This feature was integrated into Cisco IOS Release 12.2(15)T.
|
12.2(18)S
|
This feature was integrated into Cisco IOS Release 12.2(18)S.
|
12.2(27)SBC
|
This feature was integrated into Cisco IOS Release 12.2(27)SBC.
|
Finding Support Information for Platforms and Cisco IOS Software Images
Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn. You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear.
Contents
•
Prerequisites OSPF Inbound Filtering Using Route Maps with a Distribute List
•
Information About OSPF Inbound Filtering Using Route Maps with a Distribute List
•
How to Configure OSPF Inbound Filtering Using Route Maps
•
Configuration Examples for OSPF Inbound Filtering Using Route Maps with a Distribute List
•
Additional References
•
Command Reference
Prerequisites OSPF Inbound Filtering Using Route Maps with a Distribute List
It is presumed that you have OSPF configured in your network.
Information About OSPF Inbound Filtering Using Route Maps with a Distribute List
Before you configure filtering based on an OSPF route map, you should understand the concept described in this section.
•
Benefits of OSPF Route-Map-Based-Filtering
Benefits of OSPF Route-Map-Based-Filtering
Users can define a route map to prevent OSPF routes from being added to the routing table. This filtering happens at the moment when OSPF is installing the route in the routing table. This feature has no effect on LSA flooding. In the route map, the user can match on any attribute of the OSPF route. That is, the route map could be based on the following match options:
•
match interface
•
match ip address
•
match ip next-hop
•
match ip route-source
•
match metric
•
match route-type
•
match tag
This feature can be useful during redistribution if the user tags prefixes when they get redistributed on ASBRs and later uses the tag to filter the prefixes from being installed in the routing table on other routers.
Filtering Based on Route Tag
Users can assign tags to external routes when they are redistributed to OSPF. Then the user can deny or permit those routes in the OSPF domain by identifying that tag in the route-map and distribute-list in commands.
Filtering Based on Route Type
In OSPF, the external routes could be Type 1 or Type 2. Users can create route maps to match either Type 1 or Type 2 and then use the distribute-list in command to filter certain prefixes. Also, route maps can identify internal routes (interarea and intra-area) and then those routes can be filtered.
Filtering Based on Route Source
When a match is done on the route source, the route source represents the OSPF Router ID of the LSA originator of the LSA in which the prefix is advertised.
Filtering Based on Interface
When a match is done on the interface, the interface represents the outgoing interface for the route that OSPF is trying to install in the routing table.
Filtering Based on Next-Hop
When a match is done on the next hop, the next hop represents the next hop for the route that OSPF is trying to install in the routing table.
How to Configure OSPF Inbound Filtering Using Route Maps
This section describes enabling OSPF filtering based on a route map.
•
Configuring OSPF Route- Map-Based Filtering
Configuring OSPF Route- Map-Based Filtering
This section describes how to configure OSPF route map-based filtering. Step 4 is simply an example of a route map; other match commands could be used.
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
route-map map-tag [permit | deny] [sequence-number]
4.
match tag tag-name
or other match commands.
5.
Repeat Steps 3 and 4 with other route-map and match commands if you choose.
6.
exit
7.
router ospf process-id
8.
distribute-list route-map map-tag in
9.
end
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
enable
Example:
Router> enable
|
Enables privileged EXEC mode.
• Enter your password if prompted.
|
Step 2
|
configure terminal
Example:
Router# configure terminal
|
Enters global configuration mode.
|
Step 3
|
route-map map-tag [permit | deny]
[sequence-number]
Example:
Router(config)# route-map tag-filter deny 10
|
Defines a route map to control filtering.
|
Step 4
|
match tag tag-name
or other match command(s)
Example:
Router(config-router)# match tag 777
|
Matches routes with a specified name, to be used as the route map is referenced.
• At least one match command is required, but it need not be this match command. This is just an example.
• The list of match commands available to be used in this type of route map appears on the distribute-list in command reference page.
• This type of route map will have no set commands.
|
Step 5
|
Repeat Steps 3 and 4 with other route-map and match commands if you choose.
|
Optional.
|
Step 6
|
exit
Example:
Router(config-router)# exit
|
Exits router configuration mode.
|
Step 7
|
router ospf process-id
Example:
Router(config)# router ospf 1
|
Configures an OSPF routing process.
|
Step 8
|
distribute-list route-map map-tag in
Example:
Router(config-router)# distribute-list
route-map tag-filter in
|
Enables filtering based on an OSPF route map.
|
Step 9
|
end
Example:
Router(config-router)# end
|
Exits router configuration mode.
|
Configuration Examples for OSPF Inbound Filtering Using Route Maps with a Distribute List
This section contains an example of filtering based on an OSPF route map.
•
OSPF Route-Map-Based Filtering: Example
OSPF Route-Map-Based Filtering: Example
In this example, OSPF external LSAs have a tag. The value of the tag is examined before the prefix is installed in the routing table. All OSPF external prefixes that have the tag value of 777 are filtered (prevented from being installed in the routing table). The permit statement with sequence number 20 has no match conditions, and there are no other route-map statements after sequence number 20, so all other conditions are permitted.
route-map tag-filter deny 10
route-map tag-filter permit 20
network 172.16.2.1 0.0.0.255 area 0
distribute-list route-map tag-filter in
Additional References
The following sections provide references related to configuring the OSPF Inbound Filtering Using Route Maps with a Distribute List feature.
Related Documents
Standards
Standards
|
Title
|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
|
—
|
MIBs
MIBs
|
MIBs Link
|
None
|
To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL:
http://www.cisco.com/go/mibs
|
RFCs
RFCs
|
Title
|
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature.
|
—
|
Technical Assistance
Description
|
Link
|
The Cisco Technical Support website contains thousands of pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.
|
http://www.cisco.com/techsupport
|
Command Reference
The following commands are introduced or modified in the feature or features documented in this module. For information about these commands, see the Cisco IOS IP Routing Protocols Command Reference at http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_book.html. For information about all Cisco IOS commands, go to the Command Lookup Tool at http://tools.cisco.com/Support/CLILookup or to the Cisco IOS Master Commands List.
•
distribute-list in (IP)
CCDE, CCSI, CCENT, Cisco Eos, Cisco HealthPresence, the Cisco logo, Cisco Lumin, Cisco Nexus, Cisco Nurse Connect, Cisco Stackpower, Cisco StadiumVision, Cisco TelePresence, Cisco WebEx, DCE, and Welcome to the Human Network are trademarks; Changing the Way We Work, Live, Play, and Learn and Cisco Store are service marks; and Access Registrar, Aironet, AsyncOS, Bringing the Meeting To You, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, CCSP, CCVP, Cisco, the Cisco Certified Internetwork Expert logo, Cisco IOS, Cisco Press, Cisco Systems, Cisco Systems Capital, the Cisco Systems logo, Cisco Unity, Collaboration Without Limitation, EtherFast, EtherSwitch, Event Center, Fast Step, Follow Me Browsing, FormShare, GigaDrive, HomeLink, Internet Quotient, IOS, iPhone, iQuick Study, IronPort, the IronPort logo, LightStream, Linksys, MediaTone, MeetingPlace, MeetingPlace Chime Sound, MGX, Networkers, Networking Academy, Network Registrar, PCNow, PIX, PowerPanels, ProConnect, ScriptShare, SenderBase, SMARTnet, Spectrum Expert, StackWise, The Fastest Way to Increase Your Internet Quotient, TransPath, WebEx, and the WebEx logo are registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.
All other trademarks mentioned in this document or website are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (0903R)
Any Internet Protocol (IP) addresses used in this document are not intended to be actual addresses. Any examples, command display output, and figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses in illustrative content is unintentional and coincidental.
© 2008 Cisco Systems, Inc. All rights reserved.