I'm trying to add IP range to eth0 interface on Ubuntu 16.04 server. Following this solution I've changed the configuration to this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
auto eth0

iface eth0 inet static
        up /sbin/ip address add dev eth0
        down /sbin/ip address delete dev eth0

And I've got only IP available. Is this issue somehow related with netmask?


You need one up (& down) line per every IP. The /25 corresponds to the netmask; it's not specifying an IP address range.

  • Let me try right now. I thought there is more elegant way to do this. May 18 '17 at 17:07
  • Typically a single server interface won't need more than a couple of IP addresses. This was more usual before SNI when you needed one IP per every TLS certificate, and I've also seen it commonly in "IRC shell" servers, where large amounts of IPv6 addresses are used for creating "vanity hosts". May 18 '17 at 17:12
  • On RH it was possible to define range START/STOP IPs like this. May 18 '17 at 17:23

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.