I am trying to bind a range of IPs(2048 total) on an Ubuntu server and the only way I know of is adding one by one to the interfaces file and restarting the network service like this:
### /etc/network/interfaces ###
auto enp2s0:1
iface enp2s0:1 inet static
address 200.20.39.1
netmask 255.255.255.255
auto enp2s0:2
iface enp2s0:2 inet static
address 200.20.39.2
netmask 255.255.255.255
etc etc.
The problem with this approach is that when I restart the network to apply these changes and checking the ifconfig command is only adding 8 or 9 ips at the time, so i have to restart the service again to add 8 more and so on, so it will take me 30 hours to add those ips.
I know that on Redhat based systems you have an option to add ranges easily like this:
/etc/sysconfig/network-scripts/ifcfg-eth0-range0
IPADDR_START=192.168.0.100
IPADDR_END=192.168.0.200
CLONENUM_START=0
Is there any way to do this on Ubuntu? or any other faster way?