How to filter ospf route updates

I use VyOS 1.1.7.

I want to filter the some network segments using ospf.

ex)

(10.10.10.0/24)----[VyOS_A]–(10.10.20.0/24)—[VyOS_B]-----[VyOS_C]-----(10.10.30.0/24)

In this case, there are single area.
I want to do that VyOS_A does not get a VyOS_C’s subnet(10.10.30.0) .
First I think that I use distribute-list or Route-map command like a cisco router, but VyOS doesn’t have these command.
(VyOS can use these command with redistribute.)

In the case of cisco, It will maybe be configration below.

@VyOS_A -------------------------------------------
router ospf 10
network 10.10.10.0 0.0.0.255 area 100
network 10.10.20.0 0.0.0.255 area 100
distribute-list route-map Deny_C in

route-map Deny_C deny 10
match address 100

access-list 100
permit ip 10.10.30.0 0.0.0.255

How can I do this ?


Thanks.

OSPF basic: you can’t filter in a single area. Since all routers know everything about the network.
In your cisco commands, router A would know if this route in it’s OSPF table, but refuse to use it in FIB.

Since you can’t filter this way you could:
-On VyOS_A , add null route for that network, having distance better than OSPF=110. 100 will do.
-Use multiple areas, so you can filter on ABR

Thanks 16again,

I understand that VyOS can’t use filter in single area.

I think the other way.

Thanks again.

This is an ancient question, but this is the top google result for OSPF filtering in Vyos, so I updated the Wiki with an example of when you WOULD want to do it - https://wiki.vyos.net/index.php?title=OSPF

Remember, you can only filter type 2, and you probably only ever want to filter static redistributions.