-1

I have read a lot of tutorial about how to add virtual IP addresses per NIC but it doesn't work for me. All tutorials that I must edit /etc/network/interfaces but when I restart the service, I always have an error.

sudo nano /etc/network/interfaces

iface eth0:0 inet static
address 192.168.1.10
netmask 255.255.255.0
broadcast 192.168.1.255

iface eth0:1 inet static
address 192.168.1.11
netmask 255.255.255.0
broadcast 192.168.1.255

How can I do it with Ubuntu Desktop ? thanks a lot !

ps: I want to use this file and not the graphical tool.

Cyrill Gremaud
  • 63
  • 1
  • 3
  • 12

1 Answers1

0

(I'm just going on what I you have posted as your config) I have done this on mine. The following works:

iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
broadcast 192.168.1.255

iface eth0:0 inet static
address 192.168.1.11
netmask 255.255.255.0
broadcast 192.168.1.255

Note the initial eth0 is not an alias, you need leave this as eth0. Then eth0:# for alias. (Assuming this is the whole file you have posted)

W Khan
  • 58
  • 7