[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: virtual interfaces not routing properly.



Well this does exactly the same thing, unfortunately.

Pings from the same subnet work for all of the interfaces/ip addresses
Pings from other subnets only work for the primary interface/address.

And...form the machine in question;
~# ip route show
10.25.48.0/24 dev eth0  proto kernel  scope link  src 10.25.48.140
default via 10.25.48.254 dev eth0


but on a lenny box with this setup that is working I see default routes for each of the IP addresses.


?

-----Original Message-----
From: Bob Proulx [mailto:bob@proulx.com] 
Sent: Friday, 13 January 2012 9:49 AM
To: debian-user@lists.debian.org
Subject: Re: virtual interfaces not routing properly.

Pascal Hambourg wrote:
> Bob Proulx a écrit :
> > Instead I prefer setting up the dependent aliased virtual interfaces
> 
> Please don't call ethX:Y virtual interfaces. They are not interfaces.
> Only ifconfig artificially treats them as interfaces. They cannot be 
> used as interfaces by other tools nor by the kernel.

I think that was pretty much the entire point of my message.  So let me assure you that on this point we are in agreement.

> > 	up   ip addr add 10.25.48.141/24 dev eth0 label eth0:0
> > 	down ip addr del 10.25.48.141/24 dev eth0 label eth0:0
> 
> That sucks big time. Don't tell me it is the new official way to 
> replace aliases.

It doesn't have any official status beyond being able to work with the (at least for some period of time) broken ifupdown in Sid.  And it seems very reasonable to me.  I am sorry that you don't like it.  In which case you don't need to use it.  But I don't think it sucks at all.  *I* like it.

I find the use of ip in up/down methods to be much more clear what is happening than when ethX:Y is faked up by ifupdown to look like a real interface.  I think having it faked to look like a real interface is much more confusing because the status of the dependent interface is not independent of the main interface.  And for at least some time it wasn't working at all.  I think it is now fixed in the experimental repository.  I need to get back to checking on the status of it.  But I don't think it has migrated to Sid yet.  I am still running a locally hacked version of 0.7~beta1.  I need to try the 0.7~beta2 in experimental.

> This is just an ugly hack to work around ifupdown's lack of ability to 
> assign more than one addresse to an interface.

Eventually when ifupdown has migrated it will be doing vitually the same thing as the above.  It will simply be doing it internally.
Previous versions of 'ifupdown' called ifconfig.  Newer versions of ifupdown call 'ip'.

> IMHO it would be much better to upgrade ifupdown, for example by 
> allowing the 'address' option to contain several address/prefixlength 
> values, or multiple 'address' options.

That would be fine with me.  Go for it!

Bob


Reply to: