Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #181990 > unrolled thread
| Started by | Joel Rees <joel.rees@gmail.com> |
|---|---|
| First post | 2017-06-10 04:00 +0200 |
| Last post | 2017-06-11 10:20 +0200 |
| Articles | 20 on this page of 23 — 8 participants |
Back to article view | Back to linux.debian.user
ifconfig network resolution (Re: pointers to material for using netbook's wireless as access point) Joel Rees <joel.rees@gmail.com> - 2017-06-10 04:00 +0200
Re: ifconfig network resolution (Re: pointers to material for using netbook's wireless as access point) Joel Rees <joel.rees@gmail.com> - 2017-06-10 08:50 +0200
Re: ifconfig network resolution Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-06-10 09:00 +0200
Re: ifconfig network resolution Joel Rees <joel.rees@gmail.com> - 2017-06-10 12:20 +0200
Re: ifconfig network resolution Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-06-10 13:20 +0200
Re: ifconfig network resolution Joel Rees <joel.rees@gmail.com> - 2017-06-10 16:40 +0200
Re: ifconfig network resolution Joe <joe@jretrading.com> - 2017-06-10 17:00 +0200
Re: ifconfig network resolution Cindy-Sue Causey <butterflybytes@gmail.com> - 2017-06-10 22:10 +0200
Re: ifconfig network resolution Cindy-Sue Causey <butterflybytes@gmail.com> - 2017-06-10 22:20 +0200
Re: ifconfig network resolution Lisi Reisz <lisi.reisz@gmail.com> - 2017-06-11 07:10 +0200
Re: ifconfig network resolution Joel Rees <joel.rees@gmail.com> - 2017-06-11 10:00 +0200
Re: ifconfig network resolution Greg Wooledge <wooledg@eeg.ccf.org> - 2017-06-13 14:30 +0200
Re: ifconfig network resolution Joel Rees <joel.rees@gmail.com> - 2017-06-10 23:00 +0200
Re: ifconfig network resolution Joel Rees <joel.rees@gmail.com> - 2017-06-11 01:00 +0200
Re: ifconfig network resolution Joel Rees <joel.rees@gmail.com> - 2017-06-11 01:50 +0200
Re: ifconfig network resolution Andy Smith <andy@strugglers.net> - 2017-06-11 04:20 +0200
Re: ifconfig network resolution Joel Rees <joel.rees@gmail.com> - 2017-06-11 09:50 +0200
Re: ifconfig network resolution Richard Owlett <rowlett@cloud85.net> - 2017-06-13 12:30 +0200
Introductory iproute2 documentation (Was Re: ifconfig network resolution) Andy Smith <andy@strugglers.net> - 2017-06-13 14:40 +0200
Re: Introductory iproute2 documentation (Was Re: ifconfig network resolution) Richard Owlett <rowlett@cloud85.net> - 2017-06-13 16:50 +0200
Re: ifconfig network resolution (Re: pointers to material for using netbook's wireless as access point) Joe <joe@jretrading.com> - 2017-06-11 10:00 +0200
Re: ifconfig network resolution (Re: pointers to material for using netbook's wireless as access point) Joel Rees <joel.rees@gmail.com> - 2017-06-11 10:10 +0200
Re: ifconfig network resolution (Re: pointers to material for using netbook's wireless as access point) Joe <joe@jretrading.com> - 2017-06-11 10:20 +0200
Page 1 of 2 [1] 2 Next page →
| From | Joel Rees <joel.rees@gmail.com> |
|---|---|
| Date | 2017-06-10 04:00 +0200 |
| Subject | ifconfig network resolution (Re: pointers to material for using netbook's wireless as access point) |
| Message-ID | <tQDQZ-Gs-1@gated-at.bofh.it> |
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.
If I repeat the command, it gives no errors, but the netmask and
broadcast address end up full class A (255.0.0.0 and 10.255.255.255).
Anyone have an idea what's happening?
--
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
[toc] | [next] | [standalone]
| From | Joel Rees <joel.rees@gmail.com> |
|---|---|
| Date | 2017-06-10 08:50 +0200 |
| Message-ID | <tQInD-3FO-1@gated-at.bofh.it> |
| In reply to | #181990 |
Sorry my typing is so lame. On Sat, Jun 10, 2017 at 10:57 AM, Joel Rees <joel.rees@gmail.com> wrote: > 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 sudo ifconfig eth0 netmask 255.255.255.224 broadcast 10.19.23.223 10.19.23.194 > But the command returns with > > SIOCSIFNETMASK: Can't allocate this address. > SIOCSIFBRDADDR: Can't allocate this address. > > If I repeat the command, it gives no errors, but the netmask and > broadcast address end up full class A (255.0.0.0 and 10.255.255.255). But if I repeat it often enough (with legitimate parameters), it seems to decide to believe me, and sets the nic to the requested netmask and broadcast address. Once or twice may have been bad parameters, but I have just hit the up arrow and it goes ahead and sets the parameters to what I said on the second try. > Anyone have an idea what's happening? -- 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 my 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
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Date | 2017-06-10 09:00 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tQIxj-3IT-1@gated-at.bofh.it> |
| In reply to | #181990 |
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. The address must be set before the mask and broadcast address.
[toc] | [prev] | [next] | [standalone]
| From | Joel Rees <joel.rees@gmail.com> |
|---|---|
| Date | 2017-06-10 12:20 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tQLER-5LG-3@gated-at.bofh.it> |
| In reply to | #181995 |
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 : >> >> 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. -- 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
[toc] | [prev] | [next] | [standalone]
| From | Pascal Hambourg <pascal@plouf.fr.eu.org> |
|---|---|
| Date | 2017-06-10 13:20 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tQMAW-6l1-3@gated-at.bofh.it> |
| In reply to | #182006 |
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 >>> >>> 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 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.
[toc] | [prev] | [next] | [standalone]
| From | Joel Rees <joel.rees@gmail.com> |
|---|---|
| Date | 2017-06-10 16:40 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tQPIu-8h7-5@gated-at.bofh.it> |
| In reply to | #182010 |
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
UP BROADCAST RUNNING MULTICAST MTU:1500 メトリック:1
割り込み:42 ベースアドレス:0xa000
myadm@mycomp:~$ sudo ifconfig eth0:1 netmask 255.255.255.224 broadcast
10.19.201.223 10.19.201.198
SIOCSIFNETMASK: 要求アドレスに割り当てられません
SIOCSIFBRDADDR: 要求アドレスに割り当てられません
SIOCSIFFLAGS: 要求アドレスに割り当てられません
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
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
[toc] | [prev] | [next] | [standalone]
| From | Joe <joe@jretrading.com> |
|---|---|
| Date | 2017-06-10 17:00 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tQQ1P-8p6-3@gated-at.bofh.it> |
| In reply to | #182021 |
On Sat, 10 Jun 2017 23:36:06 +0900 Joel Rees <joel.rees@gmail.com> wrote: > ----------------------------------------- > myadm@mycomp:~$ sudo ifconfig eth0:1 down > myadm@mycomp:~$ sudo ifconfig eth0:1 > eth0:1 Link encap:イーサネット ハードウェアアドレス > 50:af:73:12:64:aa UP BROADCAST RUNNING MULTICAST MTU:1500 > メトリック:1 割り込み:42 ベースアドレス:0xa000 > Your problem is getting worse. Your computer appears to be learning Japanese. -- Joe
[toc] | [prev] | [next] | [standalone]
| From | Cindy-Sue Causey <butterflybytes@gmail.com> |
|---|---|
| Date | 2017-06-10 22:10 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tQURQ-3yw-5@gated-at.bofh.it> |
| In reply to | #182022 |
On 6/10/17, Joe <joe@jretrading.com> wrote: > On Sat, 10 Jun 2017 23:36:06 +0900 > Joel Rees <joel.rees@gmail.com> wrote: > > >> ----------------------------------------- >> myadm@mycomp:~$ sudo ifconfig eth0:1 down >> myadm@mycomp:~$ sudo ifconfig eth0:1 >> eth0:1 Link encap:イーサネット ハードウェアアドレス >> 50:af:73:12:64:aa UP BROADCAST RUNNING MULTICAST MTU:1500 >> メトリック:1 割り込み:42 ベースアドレス:0xa000 >> > > Your problem is getting worse. Your computer appears to be learning > Japanese. That was so funny, I just took a swig of coffee so I could spew it when I laughed yet again... The good news is... OUR computers are set up universally enough that we can see those very pretty Japanese characters on this end....... PS Thanks, I really needed that laugh........ :) -- Cindy-Sue Causey Talking Rock, Pickens County, Georgia, USA * runs with duct tape *
[toc] | [prev] | [next] | [standalone]
| From | Cindy-Sue Causey <butterflybytes@gmail.com> |
|---|---|
| Date | 2017-06-10 22:20 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tQV1v-3Cv-5@gated-at.bofh.it> |
| In reply to | #182036 |
On 6/10/17, Cindy-Sue Causey <butterflybytes@gmail.com> wrote: > On 6/10/17, Joe <joe@jretrading.com> wrote: >> On Sat, 10 Jun 2017 23:36:06 +0900 >> Joel Rees <joel.rees@gmail.com> wrote: >> >> >>> ----------------------------------------- >>> myadm@mycomp:~$ sudo ifconfig eth0:1 down >>> myadm@mycomp:~$ sudo ifconfig eth0:1 >>> eth0:1 Link encap:イーサネット ハードウェアアドレス >>> 50:af:73:12:64:aa UP BROADCAST RUNNING MULTICAST MTU:1500 >>> メトリック:1 割り込み:42 ベースアドレス:0xa000 >>> >> >> Your problem is getting worse. Your computer appears to be learning >> Japanese. > > > That was so funny, I just took a swig of coffee so I could spew it > when I laughed yet again... > > The good news is... OUR computers are set up universally enough that > we can see those very pretty Japanese characters on this end....... > > PS Thanks, I really needed that laugh........ :) PPS I'm thinking... ABORT MISSION POSTHASTE..... Anyone have tips for him right now.... *while he can read them* related to the language appearing to switch teams on him? It's been long enough in between debootstrap installs that I'm too rusty on where to touch on that to see how things are going. My apologies in advance because I'm asking that without knowing if he does or does not actually speak Japanese. He might be able to read that quite well. In that case, I'm envious because that's on a #Life to-do bucket list for me.. :) Cindy :) -- Cindy-Sue Causey Talking Rock, Pickens County, Georgia, USA * runs with duct tape *
[toc] | [prev] | [next] | [standalone]
| From | Lisi Reisz <lisi.reisz@gmail.com> |
|---|---|
| Date | 2017-06-11 07:10 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tR3ip-Vy-5@gated-at.bofh.it> |
| In reply to | #182037 |
On Saturday 10 June 2017 21:18:42 Cindy-Sue Causey wrote: > My apologies in advance because I'm asking that without knowing if he > does or does not actually speak Japanese. He might be able to read > that quite well. In that case, I'm envious because that's on a #Life > to-do bucket list for me.. :) He lives in Japan and probably actually has a Japanese computer that has to be persuaded to talk English. ;-). Now, I have debugged network problems on a UNIX computer that spoke Japanese, knowing none myself and reading even less. AND I succeeded. I felt very proud not just of myself but of UNIX. (Japanese Macbook withMac-OSX) Lisi
[toc] | [prev] | [next] | [standalone]
| From | Joel Rees <joel.rees@gmail.com> |
|---|---|
| Date | 2017-06-11 10:00 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tR5WV-2lr-3@gated-at.bofh.it> |
| In reply to | #182048 |
On Sun, Jun 11, 2017 at 2:04 PM, Lisi Reisz <lisi.reisz@gmail.com> wrote: > On Saturday 10 June 2017 21:18:42 Cindy-Sue Causey wrote: >> My apologies in advance because I'm asking that without knowing if he >> does or does not actually speak Japanese. He might be able to read >> that quite well. In that case, I'm envious because that's on a #Life >> to-do bucket list for me.. :) > > He lives in Japan and probably actually has a Japanese computer that has to > be persuaded to talk English. ;-). Sometimes *I* have to be persuaded to speak English. > Now, I have debugged network problems on a UNIX computer that spoke Japanese, > knowing none myself and reading even less. AND I succeeded. I felt very > proud not just of myself but of UNIX. (Japanese Macbook withMac-OSX) > > Lisi > I like Macs, too. -- 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
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2017-06-13 14:30 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tRT7j-7UN-7@gated-at.bofh.it> |
| In reply to | #182037 |
On Sat, Jun 10, 2017 at 04:18:42PM -0400, Cindy-Sue Causey wrote: > Anyone have tips for him right now.... *while he can read them* > related to the language appearing to switch teams on him? When pasting commands and output to an English-speaking mailing list, it's often a good idea to do "export LC_ALL=C" beforehand. Unless your commands actually involve non-ASCII characters, or the behavior of a command in a non-C locale, in which case: good luck. As far as ifconfig goes (which, by the way, is considered deprecated by many people), the traditional syntax is: ifconfig <iface> <ip> netmask <netmask> You generally don't need to specify the broadcast address, or the network address. These can be calculated from the IP + netmask. Those options exist only for extremely bizarre networks that used "all zeros" for the broadcast instead of "all ones". No new networks should be set up this way.
[toc] | [prev] | [next] | [standalone]
| From | Joel Rees <joel.rees@gmail.com> |
|---|---|
| Date | 2017-06-10 23:00 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tQVEd-3Ts-7@gated-at.bofh.it> |
| In reply to | #182021 |
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
[toc] | [prev] | [next] | [standalone]
| From | Joel Rees <joel.rees@gmail.com> |
|---|---|
| Date | 2017-06-11 01:00 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tQXwl-5db-1@gated-at.bofh.it> |
| In reply to | #182039 |
Okay, here it is in the common language:
---------------------------------
myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1 down
myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1
eth0:1 Link encap:Ethernet HWaddr 53:bc:81:02:21:bb
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:42 Base address:0xa000
# with everything cleared:
myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1 netmask
255.255.255.224 broadcast 10.19.201.223 10.19.201.198
SIOCSIFNETMASK: Cannot assign requested address
SIOCSIFBRDADDR: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address
# check it,
myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1
eth0:1 Link encap:Ethernet HWaddr 53:bc:81:02:21:bb
inet addr:10.19.201.198 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:42 Base address:0xa000
# and apparently it is
# processing the arguments in the order they are given,
# and applying them to the state at the point they are given,
# which I sort of thought might be the case, but doesn't seem to be
# be clearly stated in the man pages.
# Thus, if you repeat the command as given,
myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1 netmask
255.255.255.224 broadcast 10.19.201.223 10.19.201.198
# and check again,
myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1
eth0:1 Link encap:Ethernet HWaddr 53:bc:81:02:21:bb
inet addr:10.19.201.198 Bcast:10.19.201.223 Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:42 Base address:0xa000
# this time it sets them as intended.
# If the address to be assigned is given first, which I think everyone
# pretty much does:
myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1 down
myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1
10.19.201.198 netmask 255.255.255.224 broadcast 10.19.201.223
myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1
eth0:1 Link encap:Ethernet HWaddr 53:bc:81:02:21:bb
inet addr:10.19.201.198 Bcast:10.19.201.223 Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:42 Base address:0xa000
# it seems to see the address first and set things as intended in one pass.
---------------------------------
Which is confusing to my middle-aged brain. So I could suggest editing
the man page, something along the lines of the following
---------------------------------
SYNOPSIS
ifconfig [-v] [-a] [-s] [interface]
{change}
ifconfig [-v] interface [aftype] options | address ...
{change-to}
ifconfig [-v] interface [aftype] [ display-options ] [ address
] [ other-options ... ]
{end change}
DESCRIPTION
Ifconfig is used to configure the kernel-resident network interfaces.
It is used at boot time to set up interfaces as necessary. After
that, it is usually only needed when debugging or when system tuning
is needed.
If no arguments are given, ifconfig displays the status of the
currently active interfaces. If a single interface argument is given,
it displays the status of the given interface only; if a
single -a argument is given, it displays the status of all interfaces,
even those that are down. Otherwise, it configures an interface.
{move the interface paragraph here:}
interface
The name of the interface. This is usually a driver name followed by
a unit number, for example eth0 for the first Ethernet interface.
If your kernel supports alias interfaces, you can specify them with
eth0:0 for the first alias of eth0. You can use them to assign a second
address. To delete an alias interface use ifconfig eth0:0 down.
Note: for every scope (i.e. same net with address/netmask combina-
tion) all aliases are deleted, if you delete the first (primary).
{end move}
Address Families {insert}(aftype){end-insert}
If the first argument after the interface name is recognized as the
name of a supported address family, that address family is
used for decoding and displaying all protocol addresses. Currently
supported address families include inet (TCP/IP, default),
inet6 (IPv6), ax25 (AMPR Packet Radio), ddp (Appletalk Phase 2),
ipx (Novell IPX) and netrom (AMPR Packet radio).
{insert}DISPLAY{end-insert} OPTIONS
-a display all interfaces which are currently available,
even if down
-s display a short list (like netstat -i)
-v be more verbose for some error conditions
{move the address paragraph here:}
address
The IP address to be assigned to this interface.
{end move}
{insert}OTHER OPTIONS{end-insert}
up This flag causes the interface to be activated. It is
implicitly specified if an address is assigned to the
interface.
down This flag causes the driver for this interface to be shut
down.
{...}
netmask addr
Set the IP network mask for this interface. This value
defaults to the usual class A, B or C network mask (as
derived from the interface IP address), but it can be
set to any value.
{...}
[-]broadcast [addr]
If the address argument is given, set the protocol
broadcast address for this interface. Otherwise,
set (or clear) the IFF_BROADCAST flag for the interface.
{...}
NOTES
The parameters and options are processed in the order given, thus
if the address appears after the netmask and broadcast address,
the netmask and broadcast address may be re-interpreted and applied
to an existing address, or to the state of having no address
assigned, with unintended results which affect the security state
of the host.
{...}
---------------------------------
--
Joel Rees
randomly ranting:
http://reiisi.blogspot.com
[toc] | [prev] | [next] | [standalone]
| From | Joel Rees <joel.rees@gmail.com> |
|---|---|
| Date | 2017-06-11 01:50 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tQYiJ-5Mt-13@gated-at.bofh.it> |
| In reply to | #182040 |
erk
On Sun, Jun 11, 2017 at 7:55 AM, Joel Rees <joel.rees@gmail.com> wrote:
> [...]
> Which is confusing to my middle-aged brain. So I could suggest editing
> the man page, something along the lines of the following
>
> ---------------------------------
> [...]
>
{add}
> NOTES
> The parameters and options are processed in the order given, thus
> if the address appears after the netmask and broadcast address,
> the netmask and broadcast address may be re-interpreted and applied
> to an existing address, or to the state of having no address
> assigned, with unintended results which affect the security state
> of the host.
{end add}
> {...}
> ---------------------------------
>
> --
> Joel Rees
>
> randomly ranting:
> http://reiisi.blogspot.com
--
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
[toc] | [prev] | [next] | [standalone]
| From | Andy Smith <andy@strugglers.net> |
|---|---|
| Date | 2017-06-11 04:20 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tR0DT-7Av-7@gated-at.bofh.it> |
| In reply to | #182040 |
Hi Joel,
On Sun, Jun 11, 2017 at 07:55:50AM +0900, Joel Rees wrote:
> # If the address to be assigned is given first, which I think everyone
> # pretty much does:
>
> myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1 down
> myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1
> 10.19.201.198 netmask 255.255.255.224 broadcast 10.19.201.223
> myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1
> eth0:1 Link encap:Ethernet HWaddr 53:bc:81:02:21:bb
> inet addr:10.19.201.198 Bcast:10.19.201.223 Mask:255.255.255.224
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> Interrupt:42 Base address:0xa000
>
> # it seems to see the address first and set things as intended in one pass.
> ---------------------------------
>
> Which is confusing to my middle-aged brain.
Have you considered just using "ip"?
# ip address add 10.19.201.198/27 dev eth0
You don't need to specify the broadcast address as it will by
default be the top-most address (10.19.201.233 for
10.19.201.192/27).
> So I could suggest editing the man page, something along the lines
> of the following…
The binaries provided by the net-tools package are considered
obsolete on Linux, and from stretch onwards the package is not
marked essential. It would only be installed if a dependency pulled
it in (which is admittedly still very likely at this point).
I'm not trying to start an ip vs. ifconfig debate, but it is a fact
that development of net-tools has stagnated and already doesn't
support some kernel features.
It seems likely that eventually net-tools will not be in a default
Debian install and you would have to go out of your way to install
it.
So, I am not sure that anyone would be willing to keep the relevant
net-tools manpages up to date.
Even the net-tools maintainers in Debian have wanted it removed from
the base install for more than 8 years now. I'm not saying they
would refuse to fix documentation bugs, but the motivation may be
very low at this point.
Some more info:
https://lwn.net/Articles/710533/
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
[toc] | [prev] | [next] | [standalone]
| From | Joel Rees <joel.rees@gmail.com> |
|---|---|
| Date | 2017-06-11 09:50 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tR5Nf-2g5-5@gated-at.bofh.it> |
| In reply to | #182045 |
On Sun, Jun 11, 2017 at 11:09 AM, Andy Smith <andy@strugglers.net> wrote: > Hi Joel, > > On Sun, Jun 11, 2017 at 07:55:50AM +0900, Joel Rees wrote: >> # If the address to be assigned is given first, which I think everyone >> # pretty much does: >> >> myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1 down >> myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1 >> 10.19.201.198 netmask 255.255.255.224 broadcast 10.19.201.223 >> myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1 >> eth0:1 Link encap:Ethernet HWaddr 53:bc:81:02:21:bb >> inet addr:10.19.201.198 Bcast:10.19.201.223 Mask:255.255.255.224 >> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >> Interrupt:42 Base address:0xa000 >> >> # it seems to see the address first and set things as intended in one pass. >> --------------------------------- >> >> Which is confusing to my middle-aged brain. > > Have you considered just using "ip"? Once upon a time, I tried to learn ip. It does not stick in my memory. The fires burning from systemd Still feel fresh and hot to me. Too hot to think of words more pithy. But when I left RH behind I felt free. For a year or two. When the inevitable happens, I'll probably just kill myself trying to rewrite the whole thing from scratch, with a unified,logical basis, and short, concise commands that don't try to take over the whole system and the kitchen sink. Just leave me alone in my codgerism. -- Joel Rees Trying to re-invent the industry all by myself: http://defining-computers.blogspot.jp/
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2017-06-13 12:30 +0200 |
| Subject | Re: ifconfig network resolution |
| Message-ID | <tRRfc-6Mo-37@gated-at.bofh.it> |
| In reply to | #182045 |
On 06/10/2017 09:09 PM, Andy Smith wrote: > [snip] > Even the net-tools maintainers in Debian have wanted it removed from > the base install for more than 8 years now. I'm not saying they > would refuse to fix documentation bugs, but the motivation may be > very low at this point. > > Some more info: > > https://lwn.net/Articles/710533/ > Though as a computer _user_ I predate Dartmouth BASIC, I'm fairly new to Linux and as a "de facto" sysadmin for my own computers I'm as raw as they come. Can you recommend a good introduction to iproute2 which ignores the existence of net-tools (start newbies with good habits)? I find man pages a poor fit for what I'm looking for. TIA
[toc] | [prev] | [next] | [standalone]
| From | Andy Smith <andy@strugglers.net> |
|---|---|
| Date | 2017-06-13 14:40 +0200 |
| Subject | Introductory iproute2 documentation (Was Re: ifconfig network resolution) |
| Message-ID | <tRTgZ-7YB-5@gated-at.bofh.it> |
| In reply to | #182123 |
Hi Richard,
On Tue, Jun 13, 2017 at 05:11:47AM -0500, Richard Owlett wrote:
> Can you recommend a good introduction to iproute2 which ignores the
> existence of net-tools (start newbies with good habits)?
Unfortunately I don't think I actually can. Being someone who
started off with the net-tools commands (and frankly, still having
to force myself to reach for the newer iproute2 ones) I've never
really gone looking for iproute2 tutorials. More "how do I do this
net-tools thing in iproute2?".
Anyway, the best I've found is this:
http://baturin.org/docs/iproute2/
but some of the more advanced examples here suffer from the problem
of explaining how to do a thing without actually explaining what that
thing is or why one might want to do it.
Here's a page I sometimes refer to when trying to work out what teh
iproute2 equivalent is:
https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/
That's about the best I can do I'm afraid. Perhaps others have
better links.
> I find man pages a poor fit for what I'm looking for.
Yes, the man pages for the iproute2 tools are notoriously awful,
looking as they do like the output of some sort of automated tool
rather than actual documentation.
The topic of "documentation is hard" is one that this list has
been over and over quite a few times recently.
The question that immediately springs to mind for many people is, if
the documentation is not acceptable then why have the net-tools
commands been deprecated? But this is the real world and things are
not so simple.
Demand for features led the kernel side of things to develop in ways
that the net-tools commands can't handle, so new tools were needed
to interrogate and manage those features. As of today, you can still
configure and manage a simple and functional network setup with the
net-tools commands, but to do advanced things you need the iproute2
commands. And because of the different interfaces it is even
possible for some binary to do something as simple as add multiple
IP addresses to an interface, but in a way that ifconfig cannot see.
So while it is not a great situation to be in with regard to
documentation, it is even worse to have multiple incompatible ways
of doing things, and that is why Debian and other Linux
distributions are making a concerted effort to deprecate the
net-tools commands.
Cheers,
Andy
--
https://bitfolk.com/ -- No-nonsense VPS hosting
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2017-06-13 16:50 +0200 |
| Subject | Re: Introductory iproute2 documentation (Was Re: ifconfig network resolution) |
| Message-ID | <tRViO-Jw-27@gated-at.bofh.it> |
| In reply to | #182135 |
On 06/13/2017 07:29 AM, Andy Smith wrote: > Hi Richard, > > On Tue, Jun 13, 2017 at 05:11:47AM -0500, Richard Owlett wrote: >> Can you recommend a good introduction to iproute2 which ignores the >> existence of net-tools (start newbies with good habits)? > > Unfortunately I don't think I actually can. Being someone who > started off with the net-tools commands (and frankly, still having > to force myself to reach for the newer iproute2 ones) I've never > really gone looking for iproute2 tutorials. More "how do I do this > net-tools thing in iproute2?". > > Anyway, the best I've found is this: > > http://baturin.org/docs/iproute2/ > > but some of the more advanced examples here suffer from the problem > of explaining how to do a thing without actually explaining what that > thing is or why one might want to do it. > > Here's a page I sometimes refer to when trying to work out what teh > iproute2 equivalent is: > > https://dougvitale.wordpress.com/2011/12/21/deprecated-linux-networking-commands-and-their-replacements/ > > That's about the best I can do I'm afraid. Perhaps others have > better links. > >> I find man pages a poor fit for what I'm looking for. > > Yes, the man pages for the iproute2 tools are notoriously awful, > looking as they do like the output of some sort of automated tool > rather than actual documentation. > > The topic of "documentation is hard" is one that this list has > been over and over quite a few times recently. [snip] > My problem is not with the iproute2 man page specifically. I find "man pages" generally unsuitable to task as they are generally written by *AND* for experts. They must be adequate to that task as they have not been replaced by something else. For sometime I've been mulling over a possible "form" of a solution. It stems from encountering the concept of "shadow screens" used in early FORTH implementations. What my current mental image might be described as a amalgam of a wiki and a blog. The user would go to the website and enter the command's name. The first thing displayed would be the content of a a standard man page. There would be a set of selection buttons to move among "man page"/examples/tutorial. I envision highlighting a keyword on one page would lead to the appropriate section when a different page was selected. YMMV Comments? TIA
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | linux.debian.user
csiph-web