[klibc] ipconfig support for "any" interface vs "all"

Jeremy Jackson jerj at coplanar.net
Fri Nov 5 16:18:37 PDT 2010


> On Thu, Nov 4, 2010 at 12:06 PM, Jeremy Jackson <jerj at coplanar.net> wrote:
>> The current "ipconfig -i any" option waits for all interfaces, however a
>> feature that I would really like is to continue after the first
>> interface
>> that gets a valid configuration.
>>
>> This is useful in the scenario where an (diskless) host with 2 or more
>> NICs giving redundant connectivity is being network booted.  It is valid
>> to continue booting as long as at least one NIC is functional, in fact
>> it
>> is *highly* desirable.
>>
>> I would like to propose that the "-i any" be changed to implement this
>> behavior, and a new option "-i all" be added to continue to support the
>> current behaviour.
>
> Sounds very useful to me.  At work I have lots of machines set up with
> fallback NICs and they are not always all connected.  I don't want one
> failing cable or one failing (or out for work) switch to prevent me
> from booting up.
>

On diving into the code, I find an undocumented -o option exists, so that
when specifying multiple interfaces, ipconfig will exit immediately after
*one* of them gets an IP address, rather than waiting for *all* of them.

It also seems that using the special "all" interface actually acts more
like an "any" interface, that is it sets the -o option, such that ipconfig
will exit immediately after *one* interface gets an IP address.

I have tested the "all" interface, and it works as expected, which is
fantastic.

I think all that remains is to update the documentation!



More information about the klibc mailing list