Re: ifconfig network resolution
- Date: Sat, 10 Jun 2017 19:13:52 +0900
- From: Joel Rees <joel.rees@xxxxxxxxx>
- Subject: Re: ifconfig network resolution
On Sat, Jun 10, 2017 at 3:52 PM, Pascal Hambourg <pascal@xxxxxxxxxxxxxxx> wrote:
> Le 10/06/2017 à 03:57, Joel Rees a écrit :
>> Experimenting from the command line, I find myself puzzled about the
>> arguments for ifconfig.
>> Reading the manual, it would appear that the arguments for ifconfig
>> should be something like this:
>> ifconfig eth0 netmask 255.255.255.224 netmask 255.255.255.224
>> broadcast 10.19.23.223 10.19.23.94
>> But the command returns with
>> SIOCSIFNETMASK: Can't allocate this address.
>> SIOCSIFBRDADDR: Can't allocate this address.
> You set the mask twice.
Actually, I did not set the the mask twice, I just typed it it twice. ;/
I hand-typed it from memory, as I noted in my followup.
But I did check, and I get the same kinds of results when I without
typing extra parameters.
> The address must be set before the mask and broadcast address.
Now there's another puzzle, because the man page indicates that the
address should come after the options.
I had been used to typing it before the options, and was getting the
same kind of results with the address before the parameters, I think.
One of these days I'll get someone to pay me
to design a language that combines the best of Forth and C.
Then I'll be able to leap wide instruction sets with a single #ifdef,
run faster than a speeding infinite loop with a #define,
and stop all integer size bugs with a bare cast.
More of my delusions: