cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3021
Views
0
Helpful
6
Replies

Nexus 7k redistribute static into OSPF to block one static route

Steev112
Level 1
Level 1

Hi All,

i want to do redistribute static route into ospf on N7k, for example all want to advertise all static route except one route, i tried why access-list but unfortunately i can't block this route.

 

how can achieve it?

 

Thanks

6 Replies 6

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

Can  you provide the OSPF and relevant ACL config so we can see what needs tweaking?

 

cheers,

Seb.

chrihussey
VIP Alumni
VIP Alumni

Are you using a route-map?

!
!
ip access-list STATIC_ROUTES
  10 deny ip 1.1.1.0/24 any
  20 permit ip any any
!
!
route-map STATIC permit 10
 match ip address STATIC_ROUTES
!
!
router ospf 100
  redistribute static route-map STATIC
!
!

 

 

 

Hello

Try a prefix-list instead:


NX-OS

ip prefix-list tst deny 1.1.1.0/24
ip prefix-list tst permit 0.0.0.0/0 le 32
route-map stan permit 10
match ip address prefix-list tst

 

feature ospf
int x/x
ip address x.x.x.x y.y.y.y
ip router ospf x area x

router ospf 1
router-id x.x.x.x.
redistribute static route-map stan
end
clear ip ospf  redistribution


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,

Thanks for your reply, i will try and update you.

 

Thanks

Hi chrihussey,

i have tried this but didn't work.

 

Thanks

!
ip access-list STATIC_ROUTES
10 permit ip 1.1.1.0/24 any
!
!
route-map STATIC deny 10
match ip address STATIC_ROUTES
!
route-map STATIC permit 20
!
router ospf 100
redistribute static route-map STATIC
!
!

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco