0

My machine was to act as the router for an IP address 10.0.0.66 inside a /29 subnet with gateway 10.0.0.65. It would thus be physically connected to the downstream machine 10.0.0.66 on one network interface, as well as the upstream gateway 10.0.0.65 on another network interface. It would itself not have an own IP address inside this network.

I set up the route to 10.0.0.66/32 on the downstream network interface (not shown here) and then tried to configure the upstream network interface as follows:

[Match]
Name=enpXsY

[Network]
Address=192.168.0.2/24
Gateway=192.168.0.1
IPForward=yes

[Route]
Destination=10.0.0.66/29

This results in an error: Could not set route: Invalid argument.

1

Notice the destination address 10.0.0.66/29. This has the desired effect if used as an Address in the [Network] section, but not here. The correct Destination would have been 10.0.0.64/29, because 10.0.0.64 is the network address of the /29 network around 10.0.0.66. Non-network-addresses cannot be used as a Destination and be expected to be automatically translated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.