The command ifup from ifupdown fails when using some mask for static configuration on Ubuntu 20.04 LTS.
Example of working configuration
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto enp1s0
iface enp1s0 inet static
address 172.31.1.102
netmask 255.255.255.0
Example of non-working configuration
$ cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto enp1s0
iface enp1s0 inet static
address 172.31.1.102
netmask 255.255.255.8
The error
$ sudo ifup enp1s0
Error: any valid prefix is expected rather than "172.31.1.102/255.255.255.8".
ifup: failed to bring up enp1s0
Is it not possible to separate a network with non-continuous range of IP addresses? For example, I don't want 172.31.1.102 to be able to reach 172.31.1.118, but 172.31.1.230 should be reachable.