I’m trying to apply policy based routing so that my VyOS installation responds correctly on all of its 802.1Q vifs. I’ve followed the example in the documentation, but it doesn’t seem to be working.
The relevant parts of the config are:
interfaces {
ethernet eth0 {
duplex auto
hw-id 52:54:00:8b:6b:61
smp-affinity auto
speed auto
vif 206 {
address 1xx.1xx.96.39/23
policy {
route PBR
}
}
vif 298 {
address 172.24.1.4/22
policy {
route PBR
}
}
}
ethernet eth1 {
address 10.10.10.6/24
duplex auto
hw-id 52:54:00:f1:7b:c2
smp-affinity auto
speed auto
}
}
policy {
route PBR {
rule 156 {
set {
table 156
}
source {
address 1xx.1xx.96.0/23
}
}
rule 198 {
set {
table 198
}
source {
address 172.24.0.0/22
}
}
}
}
protocols {
static {
route 0.0.0.0/0 {
next-hop 172.24.3.254 {
}
}
table 156 {
route 0.0.0.0/0 {
next-hop 1xx.1xx.96.1 {
}
}
}
table 198 {
route 0.0.0.0/0 {
next-hop 172.24.3.254 {
}
}
}
}
}
show policy
shows the rules and that they’re active on the vifs, but they don’t seem to be getting used.
$ show policy route PBR
-----------------------------
Rulesets Information
-----------------------------
IPv4 Policy Route "PBR":
Active on (eth0.206,ROUTE) (eth0.298,ROUTE)
rule action proto packets bytes
---- ------ ----- ------- -----
156 set all 5806 876194
condition - saddr 1xx.1xx.96.0/23 daddr 0.0.0.0/0
198 set all 621 80028
condition - saddr 172.24.0.0/22 daddr 0.0.0.0/0
10000 drop all 31868 3048090
condition - saddr 0.0.0.0/0 daddr 0.0.0.0/0
The router isn’t responding to a ping from out on the internet to 1xx.1xx.96.39, and I can’t work out how to make it do so. Beyond pinging, I’d like to run some other things into the router and it will need to be contactable from the interenet to do so.