I have network setup where I have dual nic’s connected directly with fibers to a device which sends data only. This device never listen. The problem is that this device only have one source address, but luckily it can have many destination addresses

The setup looks like this———————> ens6f0———————> ens6f1

Of course no problem with the connection between and on interface ens6f1

How to setup the netplan yaml so interface ens6f0 understands that the packets coming from ip to should be handled by that device.

The Ubuntu version is 18.04 LTS

// Assar W.


In your example, you are declaring a netmask of /25 on each interface. But for an address of with a netmask of /25, the source address of is not on the same network (valid IP addresses for the /25 are in the range

You must either declare your network so that the source address is within the network (so using a /24 or shorter netmask), or you must add a host route for declaring it to be on link.

Given that you say that the IP address only ever sends traffic and does not listen, I think it is appropriate to just use a /24 netmask.

  • Thank you for your answer Actually I have tested to use a/24 net mals, but no success. How actually would the netplan setup be where you setup that 10.50.10 is declared to be a link? – Assar Westman Jan 31 at 6:52
  • See the documentation for 'on-link' in the netplan(5) manpage and netplan.io/reference. However if setting a /24 doesn't work, I don't expect setting an on-link route to fix it either. – slangasek Feb 4 at 1:31

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.