I am a little confused about the functional difference between policy local-route
and policy route ...
. The manual does not provide a concise explanation.
From the name, I would expect that “local-route” handles locally generated packets and “route” everything that’s routed through VyOS. This is even written in the manual:
Local Route: The following example allows VyOS to use PBR for traffic, which originated from the router itself.
[…]
But this is functionally not the case: “local-route” modifies ip route
and ip rule
output directly. For example, I can use:
local-route {
rule 110 {
destination {
address 0.0.0.0/0
}
set {
table 44
}
source {
address 192.168.56.0/24
}
}
}
to create a “policy routing” that works for local and forwarded packets. I am not sure what I would need policy route
for and when I should use it over policy local-route
…