04-25-2022 04:19 AM
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)
Solved! Go to Solution.
04-25-2022 07:33 AM
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
04-25-2022 04:39 AM - edited 04-25-2022 05:03 AM
04-25-2022 07:33 AM
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
04-26-2022 07:17 AM
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.
04-26-2022 07:25 AM
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
04-25-2022 04:47 AM
Do you have 'redistribure static' on the OSPF process?
04-25-2022 06:34 AM
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.
04-25-2022 05:04 AM
Hello,
Try re-applying the redistribute static command with route map.
-David
04-26-2022 06:58 AM
Hi David
thank you reply
will take a try when prepare the LAB environment for reproduce situation.
thx
Bill
04-25-2022 12:45 PM
Use 'redistribute static subnets'
04-26-2022 07:04 AM
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
04-26-2022 12:14 AM - edited 04-26-2022 12:14 AM
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
04-26-2022 07:09 AM
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
04-26-2022 07:21 AM
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
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