About this list Date view Thread view Subject view Author view Attachment view

From: Jacques Gelinas (jack_at_solucorp.qc.ca)
Date: Mon 03 Nov 2003 - 09:23:13 GMT


On Fri, 31 Oct 2003 10:05:02 -0500, Chris Wright wrote
> * Jacques Gelinas (jack_at_solucorp.qc.ca) wrote:
> > The ip command uses the same kernel interface as ifconfig to setup IP aliases.
> > The SECONDARY flag can't be touched using the kernel interface.
> > So the command will produce the same problem.
> >
> > While the ip command do more, especially on the routing side, it does the
> > same thing on the IP aliases side.
>
> This isn't actually the case. The difference is how you can set the
> secondary flag, etc. Try this:
>
> # ip addr add 192.168.1.0/24 dev eth0
> # ip addr add 192.168.1.1 dev eth0
> # ip addr add 192.168.1.2 dev eth0
> # ip addr list
>
> now you have two useable aliaes .1 and .2 (try pinging them from another
> machine). With .1 being the first one you set up (take note of the
> subnets that they are assigned to).

Yes I am taking note. Both (1.2 and 1.1) end up on /32. I am getting the same
result with ifconfig. They end up on different networks.

$ /sbin/ip addr add 192.168.0.0/24 dev eth0
$ /sbin/ip addr add 192.168.0.1 dev eth0
$ /sbin/ip addr add 192.168.0.2 dev eth0
$ /sbin/ip addr list

    inet 192.168.0.0/24 scope global eth0
    inet 192.168.0.1/32 scope global eth0
    inet 192.168.0.2/32 scope global eth0

Now if I do

$ /sbin/ip addr add 192.168.0.0/24 dev eth0
$ /sbin/ip addr add 192.168.0.1/24 dev eth0
$ /sbin/ip addr add 192.168.0.2/24 dev eth0
$ /sbin/ip addr list

    inet 192.168.0.0/24 scope global eth0
    inet 192.168.0.1/24 scope global secondary eth0
    inet 192.168.0.2/24 scope global secondary eth0

Now if I delete 192.168.0.0, I am loosing then all.

-----

I have review this problem. I realise now why most people have not experienced
this problem. If you set an IP alias (using whatever tool) on eth0, using the same
network as currently defined on eth0, then the aliases become all secondary
and you loose the aliases definition only if you unconfigure eth0, which you seldom
do.

We have withness this problem because we generally use private networks inside
a host server and all the vservers are hook to this network. We do this to
achieve physical network failover. All our server have 2 nics and using gated
the "internal network" used by the vservers is advertised on both nics.

Using the "ip addr add 192.168.0.0/24 dev eth0" above should cure our own
problem. I realise this is not a typical setup.

---------------------------------------------------------
Jacques Gelinas <jack_at_solucorp.qc.ca>
vserver: run general purpose virtual servers on one box, full speed!
http://www.solucorp.qc.ca/miscprj/s_context.hc
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 03 Nov 2003 - 17:24:53 GMT by hypermail 2.1.3