BIRD, redistribute static into OSPF
Feb. 15th, 2016 11:20 pmСабж делается так
Вообще семантика import и export в BIRD неинтуитивная. Export пишется в секции протокола, но означает экспорт маршрутов из routing table в данный протокол. IMHO интуитивно было бы наоборот.
import all | none | filter name | filter { filter commands } | where filter expression
Specify a filter to be used for filtering routes coming from the protocol to the routing table. all is shorthand for where true and none is shorthand for where false. Default: all.
export filter
This is similar to the import keyword, except that it works in the direction from the routing table to the protocol. Default: none.
protocol static pool1 { route x.x.x.x/24 unreachable ; } protocol ospf MyOSPF { export filter { ospf_metric1 = 200; if proto = "pool1" then accept; else reject; }; ... }
Вообще семантика import и export в BIRD неинтуитивная. Export пишется в секции протокола, но означает экспорт маршрутов из routing table в данный протокол. IMHO интуитивно было бы наоборот.
import all | none | filter name | filter { filter commands } | where filter expression
Specify a filter to be used for filtering routes coming from the protocol to the routing table. all is shorthand for where true and none is shorthand for where false. Default: all.
export filter
This is similar to the import keyword, except that it works in the direction from the routing table to the protocol. Default: none.