Hi Anand! On Sunday 21 August 2005 03:07, you wrote: > Hi Georg, > > On Fri, Aug 19, 2005 at 02:45:50AM +0200, Georg Wittenburg wrote: > > Hi Anand! > > > > Has there been any progress on this issue? In some situations it's > > getting slightly annoying not to known the real IP of your machine... > > As I explained in my earlier response - this is not the fault of > zeroconf but of the particular tool you are using. The 'ip' tool from > the iproute package has no issue displaying the correct address.
I've filed bug report #324306 against the net-tools package, and the maintainer replied stating that he'll eventually migrate to netdev. Personally, I'm however a bit skeptical whether this will solve this issue: Far too many tools (such as the systray icon that displays some net stats in my case) wrongly rely on the exact formatting of the output of ifconfig. Yes, this isn't the way things should be done, but filing a zillion bug reports would take ages, apart from some GUI people complaining that their neat layouts are broken by the fact that they need to provide space for a variable number of IPs per interface. :( So how about this (hackish) solution: Assuming (and correct me if I'm wrong) that the last IP that was added to an interface is always the one displayed by ifconfig. Then it should be feasible to handle the standard zeroconf case by saving the IP of an interface, removing that IP, adding the LL zeroconf IP, and then re-adding the original IP. This should result in the "main" IP to be shown in ifconfig and GUI tools without much tweaking. Too ugly or something that I should send you a patch for? > > Have you considered using IP aliasing to do the trick? As far as I know, > > that's the standard way to run one NIC with multiple IPs. One of many > > HOWTOs is at http://www.faqs.org/docs/Linux-mini/IP-Alias.html. > > IP aliasing does not add a secondary address; it creates an additional > (virtual) device and then adds an address to it. > > The correct way to add a secondary address is via netlink; currently I > use the 'ip' tools to do this but in the future zeroconf will do this > directly. Thanks! Georg -- Georg Wittenburg http://page.mi.fu-berlin.de/~wittenbu/
pgp1mBeoONPxE.pgp
Description: PGP signature