On Mon, 03 Mar 2008 00:09:39 -0000, Carlos Carvalho <email@example.com> wrote:
> I thought about just creating another directory in
> /etc/vservers/<guest>/interfaces, and setting dev to something like
> eth0:0 and ip to the new one. Will this work?
No need, use the different sub folders of the interfaces/ directory, interfaces/0/ interfaces/1/ etc. Don't bother to set eth0:0, just use eth0 for each of them and all the IPs will be attached to the one interface. You can see them inside the guest with
$ip addr ls
though you won't be able to see them with ifconfig, it will all work fine.
If you did want to create a eth0:0 then two things are necessary, firstly you need to make sure there is a eth0:0 on the host machine, then you need to specify a "name" file in the guests interfaces directory, so you'd have files with the following (example) contents:
/etc/vservers/example/interfaces/0/dev = eth0
/etc/vservers/example/interfaces/0/prefix = 24
/etc/vservers/example/interfaces/0/ip = 192.168.0.45
/etc/vservers/example/interfaces/0/name = 0
This is all unnecessary for have multiple IPs on one vserver interface though, use the method at the start of my reply.
-- From Ben GreenReceived on Mon Mar 3 08:34:49 2008