Trying to tag OSPF Routes

So I’m trying to tag 10.4.4.0/24 with a tag of 10, while avoiding redistributing 192.168.4.0/31. My route map/prefix list succeeds in suppressing 192.168.4.0/31, but fails to tag the route on 10.4. If I remove the prefix list, both are advertised, but only 192 gets tagged. I’m running 1_3_rolling_202303151403 on KVM.

Not sure what I’m doing wrong, as both are connected routes. The only difference between eth0 and eth2 is that eth2 is in a vrrp group, and eth0 is the peer address upstream.

set interfaces ethernet eth0 address '192.168.4.0/31'
set interfaces ethernet eth2 address '10.4.4.2/24'


set policy prefix-list data rule 1 action 'permit'
set policy prefix-list data rule 1 prefix '10.4.4.0/24'
set policy route-map tag rule 1 action 'permit'
set policy route-map tag rule 1 match ip address prefix-list 'data'
set policy route-map tag rule 1 set tag '10'

set protocols ospf redistribute connected route-map 'tag'

Does show ip route connected show you eth2?

Maybe you need to redistribute kernel?

Yes it shows as connected. I guess I’m unfamiliar with redistributed kernel. What is the use case there??

That’s for routes that are “kernel” routes.

tim@ferrari:~$ show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,

If they’re showing up as connected though, then they’re not Kernel routes and my suggestion won’t help.

I’m not sure what the issue is here I’m sorry - a smarter brain than me will be required.

That’s still helpful, though thank you!

I found the answer to this. I had to remove the interface/network from the OSPF config, and then redist applied the tag.

image

1 Like