How to filter ospf route updates.


#1

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.


#2

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


#3

Thanks 16again,

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

I think the other way.

Thanks again.