11-22-2023
01:05 PM
- last edited on
11-29-2023
12:21 AM
by
Translator
Hi all,
I'm replacing a switch and see this route map on it, but I don't seem to see how its applied to anything. Can someone please let me know step by step how this is being processed?
# sh run | i route-map
route-map ospf-redist permit 10
redistribute static route-map ospf-redist
# sh route-map ospf-redist
route-map ospf-redist, permit, sequence 10
Match clauses:
ip address prefix-lists: statics
Set clauses:
Thank you.
Solved! Go to Solution.
11-22-2023
01:47 PM
- last edited on
12-08-2023
01:44 AM
by
Translator
Hello @tolinrome tolinrome,
The configuration you share shows a route map named "ospf-redist," and it is used to control the redistribution of static routes into OSPF.
route-map ospf-redist permit 10
redistribute static route-map ospf-redist
This configuration defines a route map named "ospf-redist" with a single permit statement (sequence number 10). It is used for redistributing routes into OSPF. Specifically, it is redistributing static routes, and it references the route map "ospf-redist" to control the redistribution.
sh route-map ospf-redist
route-map ospf-redist, permit, sequence 10
Match clauses:
ip address prefix-lists: statics
Set clauses:
The detailed view of the route map shows that it has sequence number 10 and is a permit statement. It includes match and set clauses.
Match Clauses
It matches IP addresses based on prefix-lists. In this case, it's looking for routes in the prefix-list named "statics." The actual content of the "statics" prefix-list would determine which static routes are considered for redistribution.
Set Clauses
There are no set clauses specified in the configuration. This means there are no modifications or conditions applied to routes being redistributed; they are redistributed as-is.
The route map is applied under OSPF redistribution:
redistribute static route-map ospf-redist
This line in the configuration applies the "ospf-redist" route map to control how static routes are redistributed into OSPF.
11-22-2023
01:14 PM
- last edited on
12-08-2023
01:47 AM
by
Translator
First there is redistribution from static into ospf
Then route-map use to filter what redistrubte
The route-map as I see (show run) have no match and any route-map without match meaning match any.
In other word this match all static route.
I think he use it becuase he dont use subnet keyword in
redistrubte
command.
If route-map (show route-map) match prefix name ststics' then only static route specify by this prefix list allow to redistrubte other not and it effect by subnet keyword add to
redistrubte
command.
11-22-2023
01:39 PM
- last edited on
12-08-2023
02:05 AM
by
Translator
Hello,
To understand how this is working you can take the elements and step backwards through them.
1. redistribute static route-map ospf-redist - here we are redistributing routes into a routing protocol with a route map atteched. This sets parameters of the routes we are in fact allowed to redistribute.
2. route-map ospf-redist, permit, sequence 10 - just as with any ACL or prefix list you have sequence numbers to show the order in which statements are processed. 10 is usually the first entry in a route-map
3. Match clauses:
ip address prefix-lists: statics - this shows that the route-map in question is referencing a prefix list called statics. If you do a "show run" or show ip prefix-list" you should see network statements configured under it. Those are the routes allowed to be redistributed into the routing protocol
Altogether it should look a bit like this:
ip route 192.168.1.0 255.255.255.0 g0/0
ip route 192.168.5.0 255.255.255.0 g0/1
ip prefix-list statics permit 192.168.1.0/24
route-map ospf-redist permit 10
match ip address prefix-list statics
router ospf 1
redistribute static route-map ospf-redist
I configure 2 static routes, and without the route-map referencing the prefix list of just 1 static route then both would be redistributed. As a network administrator I may not want that. Its a way to provide granularity to be able to pick and choose what and how we want to install/advertise routes.
Hope that helps
-David
11-22-2023
01:47 PM
- last edited on
12-08-2023
01:44 AM
by
Translator
Hello @tolinrome tolinrome,
The configuration you share shows a route map named "ospf-redist," and it is used to control the redistribution of static routes into OSPF.
route-map ospf-redist permit 10
redistribute static route-map ospf-redist
This configuration defines a route map named "ospf-redist" with a single permit statement (sequence number 10). It is used for redistributing routes into OSPF. Specifically, it is redistributing static routes, and it references the route map "ospf-redist" to control the redistribution.
sh route-map ospf-redist
route-map ospf-redist, permit, sequence 10
Match clauses:
ip address prefix-lists: statics
Set clauses:
The detailed view of the route map shows that it has sequence number 10 and is a permit statement. It includes match and set clauses.
Match Clauses
It matches IP addresses based on prefix-lists. In this case, it's looking for routes in the prefix-list named "statics." The actual content of the "statics" prefix-list would determine which static routes are considered for redistribution.
Set Clauses
There are no set clauses specified in the configuration. This means there are no modifications or conditions applied to routes being redistributed; they are redistributed as-is.
The route map is applied under OSPF redistribution:
redistribute static route-map ospf-redist
This line in the configuration applies the "ospf-redist" route map to control how static routes are redistributed into OSPF.
11-23-2023
12:22 AM
- last edited on
12-08-2023
01:34 AM
by
Translator
Hello
Its being used to advertise certain static routes into ospf routing process based on the a prefix-list called "statics"
However if it isnt applied to the ospf routing process your good to remove it as it wont be doing anything.
sh run | sec router
sh prefix-list ipv4 statics
11-28-2023 07:23 AM
Thank you everyone for your excellent replies. All solutions were correct, I accepted the one that was easier for me to follow.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide