Prerequisites OSPF Inbound Filtering Using Route Maps with a Distribute List
It is presumed that you have OSPF configured in your network.
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
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.
It is presumed that you have OSPF configured in your network.
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.
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.
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.
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.
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.
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.
Command or Action | Purpose | |
---|---|---|
Step 1 |
enable Example:
|
Enables privileged EXEC mode.
|
Step 2 |
configure terminal Example:
|
Enters global configuration mode. |
Step 3 |
route-map map-tag [permit | deny ] [sequence-number ] Example:
|
Defines a route map to control filtering. |
Step 4 |
match tag tag-name Example:
Example:
Example:
|
Matches routes with a specified name, to be used as the route map is referenced.
|
Step 5 |
Repeat Steps 3 and 4 with other route-map and match commands if you choose. |
-- |
Step 6 |
exit Example:
|
Exits router configuration mode. |
Step 7 |
router ospf process-id Example:
|
Configures an OSPF routing process. |
Step 8 |
distribute-list route-map map-tag in Example:
|
Enables filtering based on an OSPF route map. |
Step 9 |
end Example:
|
Exits router configuration mode. |
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
match tag 777
route-map tag-filter permit 20
!
router ospf 1
router-id 10.0.0.2
log-adjacency-changes
network 172.16.2.1 0.0.0.255 area 0
distribute-list route-map tag-filter in
The following sections provide references related to configuring the OSPF Inbound Filtering Using Route Maps with a Distribute List feature.
Related Topic |
Document Title |
---|---|
OSPF commands |
Cisco IOS IP Routing: OSPF Command Reference |
Configuring OSPF |
"Configuring OSPF" |
Cisco IOS master command list, all releases |
Standard |
Title |
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
-- |
MIB |
MIBs Link |
---|---|
No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature. |
To locate and download MIBs for selected platforms, Cisco IOS XE software releases, and feature sets, use Cisco MIB Locator found at the following URL: |
RFC |
Title |
---|---|
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature. |
-- |
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Feature Name |
Releases |
Feature Information |
---|---|---|
OSPF Inbound Filtering Using Route Maps with a Distribute List |
Cisco IOS XE Release 2.1 |
The OSPF Inbound Filtering Using Route Maps with a Distribute List feature allows users to define a route map to prevent OSPF routes from being added to the routing table. The following commands are introduced or modified in the feature documented in this module:
|
Feature Name |
Releases |
Feature Information |
---|---|---|
OSPF Inbound Filtering Using Route Maps with a Distribute List |
Cisco IOS XE Release 17.4 |
This feature was introduced. |