By default, we buy the server will give us more than 5 IP, the general host has a master IP, if you want to add 4 remaining IP to the host, you need to manually configure, the specific operation is
Open Vim/etc/network/interfaces
Default is
Auto Lo
Iface Lo inet Loopback
Auto Eth0
Iface eth0 inet Static
Address 8.8.8.8 (based on your IP)
Netmask 255.255.255.248
Gateway 8.8.8.8 (according to your own getway)
To add it again, plus
Auto Eth0:1
Iface eth0:1 inet Static
Address 8.8.8.8 (based on your IP)
Netmask 255.255.255.248
Gateway 8.8.8.8 (according to your own getway)
Auto Eth0:2
Iface eth0:2 inet Static
Address 8.8.8.8 (based on your IP)
Netmask 255.255.255.248
Gateway 8.8.8.8 (according to your own getway)
And so on
Save after adding, restart
/etc/init.d/networking restart
Ok
Errors that you may encounter
/etc/init.d/networking Restart Error analysis case:
[Email protected]www.ctohome.com:/etc/network#/etc/init.d/networking Restart
* Reconfiguring network Interfaces ...
/etc/network/interfaces:165:interface Eth0:28 declared Allow-auto twice
IFDOWN:COULDN ' t read interfaces file "/etc/network/interfaces"
/etc/network/interfaces:165:interface Eth0:28 declared Allow-auto twice
IFUP:COULDN ' t read interfaces file "/etc/network/interfaces"
... fail!
Description eth0:28 Duplicate, Solution: VI interfaces Find eth0:28, delete the duplicate
[Email protected]www.ctohome.com:/etc/network#/etc/init.d/networking Restart
* Reconfiguring network Interfaces ...
/etc/network/interfaces:166:duplicate interface
IFDOWN:COULDN ' t read interfaces file "/etc/network/interfaces"
/etc/network/interfaces:166:duplicate interface
IFUP:COULDN ' t read interfaces file "/etc/network/interfaces"
... fail!
Description 166 lines have duplicates, workaround: VI Interfaces Find 166 rows (set number), delete the duplicate
[Email protected]www.ctohome.com:/etc/network#/etc/init.d/networking Restart
* Reconfiguring network Interfaces ...
/etc/network/interfaces:162:duplicate interface
IFDOWN:COULDN ' t read interfaces file "/etc/network/interfaces"
/etc/network/interfaces:162:duplicate interface
IFUP:COULDN ' t read interfaces file "/etc/network/interfaces"
Description 162 lines have duplicates, workaround: VI Interfaces Find 166 rows (set number), delete the duplicate
Ubuntu System Add IP