Hi there,
I’m currently trying to achieve the following:
I have a small iBGP network and my routers should redistribute those BGP routes via OSPF into the LAN, which works as expected. Now, to be able to filter certain OSPF routes at other stages, I’d like to add an OSPF tag to every prefix, redistributed from BGP into OSPF.
Currently, my config looks like this:
set policy route-map RM-2 rule 1 action ‘permit’
set policy route-map RM-2 rule 1 set tag ‘20570’
set policy route-map RM-3 rule 1 action ‘deny’
set policy route-map RM-3 rule 1 match tag ‘20570’
set policy route-map RM-3 rule 2 action ‘permit’
set policy route-map RM-3 rule 2 set local-preference ‘200’
set protocols bgp 3320 neighbor 172.16.1.11 remote-as ‘3320’
set protocols bgp 3320 neighbor 172.16.1.11 soft-reconfiguration ‘inbound’
set protocols bgp 3320 neighbor 172.16.1.20 remote-as ‘3320’
set protocols bgp 3320 neighbor 172.16.1.20 soft-reconfiguration ‘inbound’
set protocols bgp 3320 neighbor 172.16.1.21 remote-as ‘3320’
set protocols bgp 3320 neighbor 172.16.1.21 soft-reconfiguration ‘inbound’
set protocols bgp 3320 neighbor 172.16.1.30 remote-as ‘3320’
set protocols bgp 3320 neighbor 172.16.1.30 soft-reconfiguration ‘inbound’
set protocols bgp 3320 neighbor 172.16.1.31 remote-as ‘3320’
set protocols bgp 3320 neighbor 172.16.1.31 soft-reconfiguration ‘inbound’
set protocols bgp 3320 parameters router-id ‘172.16.1.10’
set protocols bgp 3320 redistribute connected route-map ‘RM-3’
set protocols bgp 3320 redistribute ospf route-map ‘RM-3’
set protocols ospf area 0.0.0.0 network ‘10.99.5.0/24’
set protocols ospf parameters router-id ‘10.99.5.11’
set protocols ospf redistribute bgp route-map ‘RM-2’
Now apparently, my OSPF neighbor does receive prefixes originated from BGP, but there are no route tags applied to them.
I tried to find some more ressources or examples on how to achieve this with VyOS, but it appears to be a rare case which is why I got stuck right here.
Any feedback appreciated!
Rgds,
Simon