cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
909
Views
4
Helpful
5
Replies

Understanding a route-map

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.

1 Accepted Solution

Accepted Solutions

M02@rt37
VIP
VIP

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.

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

View solution in original post

5 Replies 5

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.

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

 

M02@rt37
VIP
VIP

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.

 

Best regards
.ı|ı.ı|ı. If This Helps, Please Rate .ı|ı.ı|ı.

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

Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thank you everyone for your excellent replies. All solutions were correct, I accepted the one that was easier for me to follow.