cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1249
Views
5
Helpful
13
Replies

NX-OS OSPF Redestribute Static-Route With Route-map filter not work

Bill lo
Level 1
Level 1

Hi Community 

 

I have trouble with OSPF route-filter ;

the situation as below:

we add some static-route on N9504

---------------------------------

ip route 192.168.128.0/24 x.x.x.x.x

ip route 192.168.151.0/24 x.x.x.x.x

ip route 192.168.153.0/24 x.x.x.x.x

----------------------------------

Before add those route, there are Route-map for filter the static redistribute in OSPF

---------------------------------

route-map red_static_list permite 10

match ip address red_static_list

!

ip access-list red_static_list

permit ip 10.x.x.x.0/24 any

permit ip 124.x.x.0/24 any

!

router ospf 10 

route-id x .x.x.x

redistribute static route-map red_static_list

!

-----------------------------------------

 

even though the Route-map is already on there , but it's not work, the ospf redistribute all static-router to other ospf neithbor.

On downstream neighbor (N5K) ,  show ip route  can see the 192.168.128.0/24  route , and show ip ospf database external 192.168.128.0 . display the advertise-router id is the N9504

 

the Nx-OS  version is 9.2(3)

1 Accepted Solution

Accepted Solutions

ip access-list red_static_list

permit ip 10.x.x.x.0/24 any <- remove any 

permit ip 124.x.x.0/24 any <- remove any 

 

then try again
the access-list only use source to filter the prefix 

View solution in original post

13 Replies 13

kkkkkkk.png

ip access-list red_static_list

permit ip 10.x.x.x.0/24 any <- remove any 

permit ip 124.x.x.0/24 any <- remove any 

 

then try again
the access-list only use source to filter the prefix 

Hi MHM

 

Maybe you are right ,  from : Troubleshooting Cisco Nexus Switches and NX-OS

Interior Gateway Protocol (IGP) Network Selection
When ACLs are used for the IGP network selection during redistribution, the source
fields of the ACL are used to identify the network, and the destination fields identify
the smallest prefix length allowed in the network range. 

 

And i also find the Bug:NXOS: routing redistribution route-map with ACL will allow any prefix (CSCtt04685)

 

It's seem not good ideal for using ACL to match route.

Yes the acl for route filter have many limit so instead can you try use prefix list.

Prefix list is so simple and accurate for route filter 

Do you have 'redistribure static' on the OSPF process?

Hi 

Yes , the redistribute static is work , "show ip ospf database " on N9504  , can see there are all static-route in it as type-5 route.

even though the route not match the ACL , still appear in the Database.

 

Hello,

 

Try re-applying the redistribute static command with route map.

 

-David

Hi David

thank you reply

will take a try when prepare the LAB environment for reproduce situation.

 

 

thx

Bill

Mahmoud Elsoury
Level 1
Level 1

Use 'redistribute static subnets'

Hi  Mahmoud 

there are no "subnet"  to use , when redistribute route into OSPF:

redistribute [bgp asn | direct | eigrp process-tag | isis process-tag | ospf process-tag | rip process-tag | static] route-map route-map-name

 

 

also thax your reply.

 

Bill

Hello


@Bill lo wrote:

ip access-list red_static_list

permit ip 10.x.x.x.0/24 any

permit ip 124.x.x.0/24 any

!

router ospf 10 

route-id x .x.x.x

redistribute static route-map red_static_list subnets



Try and append the subnets keyword so subnetted prefixes are advertised 



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

Hi Paul

 NX-OS  don't have the keyword "subnet" to use,

and my trouble is filter route not work , instead of missing-route.

 

thank you reply

 

Bill

Hello

Can you confirm if the current default routes are specifying a next-hop ip address or a connected interface, if its a connected interface then the redistribute command should state -  direct

 

redistribute direct route-map xxxx


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
Review Cisco Networking for a $25 gift card