Ubuntu add IP in batch
Ubuntu add ip script in batch
#! / bin/bash
For ((iSuppli > / etc/network/interfaces)
Echo "iface eth0:$i inet static" > > / etc/network/interfaces
Let j=$i+179
Echo "address 45.41.89.Secretj" > > / etc/network/interfaces
Echo "netmask 255.255.255.248" > > / etc/network/interfaces
Echo "gateway 45.41.89.177" > > / etc/network/interfaces
Echo "> > / etc/network/interfaces
Done
# end
There is a script on the (when there are more ip)
Next, the number of ip is less.
Auto eth0:1
Iface eth0:1 inet static
Address 104.237.51.90
Netmask 255.255.255.248
Gateway 104.237.51.89
Auto eth0:2
Iface eth0:2 inet static
Address 104.237.51.91
Netmask 255.255.255.248
Gateway 104.237.51.89
Auto eth0:3
Iface eth0:3 inet static
Address 104.237.51.92
Netmask 255.255.255.248
Gateway 104.237.51.89
Auto eth0:4
Iface eth0:4 inet static
Address 104.237.51.93
Netmask 255.255.255.248
Gateway 104.237.51.89