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

Re: ifconfig network resolution



Sorry, again,

On Sat, Jun 10, 2017 at 11:36 PM, Joel Rees <joel.rees@gmail.com> wrote:
> On Sat, Jun 10, 2017 at 8:16 PM, Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:
>> Le 10/06/2017 à 12:13, Joel Rees a écrit :
>>>
>>> On Sat, Jun 10, 2017 at 3:52 PM, Pascal Hambourg <pascal@plouf.fr.eu.org>
>>> wrote:
>>>>
>>>> Le 10/06/2017 à 03:57, Joel Rees a écrit :
>>>>>
>>>>>
>>>>>     ifconfig eth0 netmask 255.255.255.224 netmask 255.255.255.224
>>>>> broadcast 10.19.23.223 10.19.23.94
>
> Noting, as I did in my previous followup post, that the device address
> and the broadcast address and the netmask do not match.
>
>>>>> But the command returns with
>>>>>
>>>>> SIOCSIFNETMASK: Can't allocate this address.
>>>>> SIOCSIFBRDADDR: Can't allocate this address.
>>
>> (...)
>>>>
>>>> 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.
>>
>>
>> Actually the man page does not indicate any order : it just says "option |
>> address ..." (options or address)
>
> I guess it could be read that way.
>
> 8)
>
> Would that mean you could give it more than one address to assign to
> the device on a single command line?
>
>>> 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.
>>
>>
>> I tested before replying and got the correct result.
>>
>
> Okay, I guess my follow-up wasn't clear enough.
>
> -----------------------------------------
> myadm@mycomp:~$ sudo ifconfig eth0:1 down
> myadm@mycomp:~$ sudo ifconfig eth0:1
> eth0:1    Link encap:イーサネット  ハードウェアアドレス 50:af:73:12:64:aa
ethernet hardware address
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  メトリック:1
>           割り込み:42 ベースアドレス:0xa000
metric:1 IRQ:42 base address: 0xa000
>
> myadm@mycomp:~$ sudo ifconfig eth0:1 netmask 255.255.255.224 broadcast
> 10.19.201.223 10.19.201.198
> SIOCSIFNETMASK: 要求アドレスに割り当てられません
Could not allocate requested address
> SIOCSIFBRDADDR: 要求アドレスに割り当てられません
could not allocate requested address
> SIOCSIFFLAGS: 要求アドレスに割り当てられません
could not allocate requested address
> myadm@mycomp:~$ sudo ifconfig eth0:1
> eth0:1    Link encap:イーサネット  ハードウェアアドレス 50:af:73:12:64:aa
>           inetアドレス:10.19.201.198 ブロードキャスト:10.255.255.255  マスク:255.0.0.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  メトリック:1
>           割り込み:42 ベースアドレス:0xa000
>
(see above)
> myadm@mycomp:~$ sudo ifconfig eth0:1 netmask 255.255.255.224 broadcast
> 10.19.201.223 10.19.201.198
> myadm@mycomp:~$ sudo ifconfig eth0:1
> eth0:1    Link encap:イーサネット  ハードウェアアドレス 50:af:73:12:64:aa
>           inetアドレス:10.19.201.198 ブロードキャスト:10.19.201.223  マスク:255.255.255.224
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  メトリック:1
>           割り込み:42 ベースアドレス:0xa000
>
> myadm@mycomp:~$ sudo ifconfig eth0:1 down
> myadm@mycomp:~$ sudo ifconfig eth0:1 10.19.201.198 netmask
> 255.255.255.224 broadcast 10.19.201.223
> myadm@mycomp:~$ sudo ifconfig eth0:1
> eth0:1    Link encap:イーサネット  ハードウェアアドレス 50:af:73:12:64:aa
>           inetアドレス:10.19.201.198 ブロードキャスト:10.19.201.223  マスク:255.255.255.224
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  メトリック:1
>           割り込み:42 ベースアドレス:0xa000
>
> myadm@mycomp:~$ sudo ifconfig eth0:1 down
> -----------------------------------------
>
> I still say the man page could use a little revision.
>
> --
> Joel Rees
>
> 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:
> http://reiisi.blogspot.com/2017/05/do-not-pay-modern-danegeld-ransomware.html
> http://reiisi.blogspot.jp/p/novels-i-am-writing.html


Reply to: