the ens3 is reachable from 3.0 but not from anywhere else
with ifupdown on another system both interfaces would be reachable from everywhere on the private subnets.
up ip route add default table 101 dev enp8s0 via 192.168.3.1
up ip rule add from 192.168.3.0/25 lookup 101
down ip rule del from 192.168.3.0/25
down ip route del default table 101 via 192.168.3.1
network:
version: 2
renderer: networkd
ethernets:
ens3:
addresses: [192.168.3.30/25]
dhcp4: no
routes:
- to: 0.0.0.0/0
via: 192.168.3.1
metric: 100
table: 101
routing- policy:
- from: 192.168.3.0/25
table: 101
ens7:
addresses: [192.168.5.24/25]
dhcp4: no
gateway4: 192.168.5.1
nameservers:
addresses: [1.1.1.1]
this doesn't activate a proper rule for table 101:
0: from all lookup local
32766: from all lookup main
32767: from all lookup default
in place of
0: from all lookup local
32765: from 192.168.3.0/25 lookup 101
32766: from all lookup main
32767: from all lookup default
the file in /etc/systemd/ network contains the correct information:
[Match]
Name=ens3
[Network] 192.168. 3.30/25
Address=
[Route] 0.0.0.0/ 0
Destination=
Gateway=192.168.3.1
Metric=100
Table=101
[RoutingPolicyRule]
From=192.168.3.0/25
Table=101
the ens3 is reachable from 3.0 but not from anywhere else
with ifupdown on another system both interfaces would be reachable from everywhere on the private subnets.
up ip route add default table 101 dev enp8s0 via 192.168.3.1
up ip rule add from 192.168.3.0/25 lookup 101
down ip rule del from 192.168.3.0/25
down ip route del default table 101 via 192.168.3.1