Re: ifconfig stats ??? Wrong behavior OR BUG ?

2021-06-22 Thread David Wright
On Fri 11 Jun 2021 at 14:01:02 (+), Kanto Andria wrote:

> First post here on this lists. I know about the the IP set of  commands, BUT 
> my concern is about the ifconfig one.I have 2 Debian 10 Buster systems and I 
> have the same behavior - reading the man page did not give the specific 
> options 
> 
>       dada@Jradebian:~$ sudo ifconfig enp0s31f6
> 
> So the main question: Why the stats did not generate error like no such 
> options ? Why the IP is reset to a public IP here belonging to OVH?

Others have answered the technical issues.

If you just want to run ifconfig because its output pleases the eye
(perfectly reasonable if you been using it for years), you can just
run it as a user, not root. Type, say,

$ /sbin/ifconfig -a

to display all interfaces. That way, you shouldn't be able to disturb
your networking by reconfiguring it accidentally.

If you *want* to configure it, use ip instead. Most people will not be
willing to help with ifconfig any more. It's obsolescent, and doesn't
handle a lot of modern configuration options.

Cheers,
David.



Re: ifconfig stats ??? Wrong behavior OR BUG ?

2021-06-11 Thread Andy Smith
Hi Kanto,

On Fri, Jun 11, 2021 at 02:01:02PM +, Kanto Andria wrote:
> dada@Jradebian:~$ sudo ifconfig enp0s31f6 stats    

You just resolved "stats" in DNS and set the IP address of interface
enp0s31f6 to that IP.

>     inet 54.36..162.17  netmask 255.0.0.0  broadcast 54.255.255.255

I'm guessing that due to your DNS configuration, partiocularly
search list, or any default answer your ISP provides, 54.36.162.17
came back as the answer to looking up "stats".

> So the main question: Why the stats did not generate error like no such 
> options ?

There is no way to tell that you didn't mean to look up a name in
DNS.

> Why the IP is reset to a public IP here belonging to OVH?

That's what it resolved to.

This is not a bug.

The bigger issue here is that ifconfig has been deprecated for 10+
years and whatever you are trying to do with it you should be doing
with more modern commands, usually something out of the "iproute"
package, e.g. "ip".

What stats are you trying to view? Maybe "ip -s link"?


https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf

may help.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: ifconfig stats ??? Wrong behavior OR BUG ?

2021-06-11 Thread Reco
Hi.

On Fri, Jun 11, 2021 at 02:01:02PM +, Kanto Andria wrote:
> dada@Jradebian:~$ sudo ifconfig enp0s31f6 stats    

There's no "stats" option to ifconfig, at least according to the source
of version 1.60+git20180626.aebd88e.


But what a quick test does show me, is that in my environment "stats"
apparently interpreted as a hostname, which cannot be resolved:

$ /sbin/ifconfig eth0 stats
stats: Unknown host
ifconfig: `--help' gives usage information.


So what actually happened to you is that on your host "stats" was
resolved to 54.36.162.17, and then the resolved IP was set to your
interface with /8 netmask. Since the setting was successful (and why
would not it be, since you ran ifconfig as root) - you've got no error.


> I have experienced the same issue on a FreeBSD based product close to the 
> 10.x release 

I'm unfamiliar with FreeBSD's ifconfig, and too lazy to dig their
sources. Probably the explanation is the same.

Reco



ifconfig stats ??? Wrong behavior OR BUG ?

2021-06-11 Thread Kanto Andria
Hello,
First post here on this lists. I know about the the IP set of  commands, BUT my 
concern is about the ifconfig one.I have 2 Debian 10 Buster systems and I have 
the same behavior - reading the man page did not give the specific options 

      dada@Jradebian:~$ sudo ifconfig enp0s31f6 

   
[sudo] password for dada:   

     
enp0s31f6: flags=4163  mtu 1500 

     
    inet 192..168.0.187  netmask 255.255.255.0  broadcast 192.168.0.255
    inet6 fe80::9afa:9bff:fed8:9776  prefixlen 64  scopeid 0x20
    ether 98:fa:9b:d8:97:76  txqueuelen 1000  (Ethernet)
    RX packets 128087  bytes 129259424 (123.2 MiB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 60117  bytes 11913581 (11..3 MiB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device interrupt 16  memory 0xec20-ec22    
 Not sure here but the command sudo ifconfig  STATS seems to 
reset the IP address 

    
dada@Jradebian:~$   
dada@Jradebian:~$     
dada@Jradebian:~$  
dada@Jradebian:~$ sudo ifconfig enp0s31f6 stats    
dada@Jradebian:~$     
dada@Jradebian:~$  
dada@Jradebian:~$ sudo ifconfig enp0s31f6
enp0s31f6: flags=4163  mtu 1500
    inet 54.36..162.17  netmask 255.0.0.0  broadcast 54.255.255.255
    inet6 fe80::9afa:9bff:fed8:9776  prefixlen 64  scopeid 0x20
    ether 98:fa:9b:d8:97:76  txqueuelen 1000  (Ethernet)   
    RX packets 128151  bytes 129273250 (123.2 MiB)   
    RX errors 0  dropped 0  overruns 0  frame 0     
    TX packets 60132  bytes 11918134 (11.3 MiB)   
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
    device interrupt 16  memory 0xec20-ec22
 
I have experienced the same issue on a FreeBSD based product close to the 10.x 
release 

So the main question: Why the stats did not generate error like no such options 
? Why the IP is reset to a public IP here belonging to OVH?
Best regards
Kanto


Re: No ifconfig

2019-02-13 Thread Jonathan de Boyne Pollard

 *

   https://lists.debian.org/debian-user/2017/08/msg01613.html

 *

   https://news.ycombinator.com/item?id=17152738

 *

   https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=274269

 * https://news.ycombinator.com/item?id=17151922

Since I needed an |ifconfig| with a more BSD-like interface /anyway/ so 
that I didn't have to maintain highly divergent scripts, you are going 
to gain in the future.


|ifconfig| from GNU inetutils 
<https://packages.debian.org/en/sid/inetutils-tools>:


   jdebp % inetutils-ifconfig -l
   enp14s0 enp15s0 lo
   jdebp % inetutils-ifconfig lo
   loLink encap:Local Loopback
  inet addr:127.0.0.1  Bcast:0.0.0.0  Mask:255.0.0.0
  UP LOOPBACK RUNNING  MTU:65536  Metric:1
  RX packets:9087 errors:0 dropped:0 overruns:0 frame:0
  TX packets:9087 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:51214341  TX bytes:51214341

   jdebp %

|ifconfig| from NET-3 net-tools 
<https://packages.debian.org/en/sid/net-tools>:


   jdebp % ifconfig -l
   ifconfig: option `-l' not recognised.
   ifconfig: `--help' gives usage information.
   jdebp % ifconfig lo
   lo: flags=73  mtu 65536
inet 127.0.0.1  netmask 255.0.0.0
inet6 ::1  prefixlen 128  scopeid 0x10
inet6 ::2  prefixlen 128  scopeid 0x80
loop  txqueuelen 1000  (Local Loopback)
RX packets 9087  bytes 51214341 (48.8 MiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 9087  bytes 51214341 (48.8 MiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

   jdebp %

|ifconfig| from an unreleased version of the nosh toolset 
<http://jdebp.eu./Softwares/nosh/>:


   jdebp % ifconfig -l
   enp14s0 enp15s0 lo
   jdebp % ifconfig lo
   lo
link up loopback running
link address 00:00:00:00:00:00 bdaddr 00:00:00:00:00:00
inet4 address 127.0.0.1 prefixlen 8 bdaddr 127.0.0.1
inet4 address 127.53.0.1 prefixlen 32 bdaddr 127.53.0.1
inet6 address ::2 scope 0 prefixlen 128
inet6 address ::1 scope 0 prefixlen 128
   jdebp %

FreeBSD |ifconfig| (on a different system) for comparison:

   JdeBP % ifconfig lo0
   lo0: 
flags=ffde8149
 metric 0 mtu 16384
options=63
inet6 ::2 prefixlen 128
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff00
inet 127.53.0.1 netmask 0xff00
nd6 options=61
   JdeBP %

The |ifconfig| from an unreleased version of the nosh toolset 
<http://jdebp.eu./Softwares/nosh/> on that other system:


   JdeBP % ifconfig lo0
   lo0
link up loopback drv_running running promisc multicast ppromisc monitor 
staticarp renaming
nd6 performnud auto_linklocal noradr
 rxcsum txcsum hwcsum rxcsum_ipv6 txcsum_ipv6
link address lo0 metric 0 mtu 16384
type 24 linkstate 0 physical 0 baudrate 0
inet6 address ::2 scope 0 prefixlen 128
inet6 address ::1 scope 0 prefixlen 128 bdaddr ::1 scope 0
inet6 address fe80::1 scope 3 prefixlen 64
inet4 address 127.0.0.1 prefixlen 8 bdaddr 127.0.0.1
inet4 address 127.53.0.1 prefixlen 8 bdaddr 127.53.0.1
   JdeBP %



Re: ifconfig/ ifupdown/ ip -

2018-07-14 Thread deloptes
john doe wrote:

> I would use mapping stanza instead:
> 
> http://manpages.ubuntu.com/manpages/trusty/man5/interfaces.5.html

+1



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 09:32:31AM -0400, Greg Wooledge wrote:
> On Mon, Jul 09, 2018 at 11:20:20PM +1000, Zenaan Harkness wrote:
> > configured to say office, I want to be able to run my reset bash
> > script as follows:
> > 
> >  reset eth0=internet
> 
> I suggest you choose a different name, as reset(1) is already taken.

Ack.


> If your script is supposed to take two pieces of information, I would
> suggest that you pass them as two separate arguments, rather than one
> argument with '=' in the middle of it.  That said, parsing foo=bar is
> not terribly hard, so you *could* do it this way... but it's not the
> way I would choose.

In general yes I agree, but in this case, I allow for multiple eth
devices to be reset with a single call of the script, so parse each
pair if needed (since not all device types have the mappings, in my
setup, only some).

Thanks again,



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Greg Wooledge
On Mon, Jul 09, 2018 at 11:20:20PM +1000, Zenaan Harkness wrote:
> configured to say office, I want to be able to run my reset bash
> script as follows:
> 
>  reset eth0=internet

I suggest you choose a different name, as reset(1) is already taken.

If your script is supposed to take two pieces of information, I would
suggest that you pass them as two separate arguments, rather than one
argument with '=' in the middle of it.  That said, parsing foo=bar is
not terribly hard, so you *could* do it this way... but it's not the
way I would choose.



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 09:16:51PM +1000, Zenaan Harkness wrote:
> On Mon, Jul 09, 2018 at 11:01:22AM +0100, Darac Marjal wrote:
> > On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:
> > > So I change between two internet connections from time to time.
> > > 
> > > I use /etc/network/interfaces ("/e/n/i")
> > > 
> > > When I modify /e/n/i , I then run a little "reset" script, like so:
> > > 
> > > dev=eth0
> > > ifdown $dev
> > > ifconfig $dev down
> > > ifup $dev
> > > 
> > > Here and there I've had problems.
> > > 
> > > Recently I discovered the ip command.
> > > 
> > > Apparently, after reconfiguring as above, two IP addresses end up
> > > attached to eth0 - one for each (staticly configured in /e/n/i)
> > > ISP network connection.
> > > 
> > > So now I am manually running something like:
> > > 
> > > ifconfig eth0 down
> > > ip address del 10.1.1.30/24 dev eth0
> > > ip address del 192.168.1.30/24 dev eth0
> > > ip address del fe80::f2de:f1ff:fef7:ea96/64 dev eth0
> > > ifup eth0
> > > 
> > > But this (atm) is a very manual process, and it seems to me that I am
> > > not taking down eth0 properly, and that I should not have to
> > > introduce IP address awareness into my eth reset script, just to
> > > properly reset my eth0 static configuration.
> > > 
> > > Any pointers of what I need to read/ what I am missing, would be
> > > really appreciated.
> > > 
> > 
> > ifup and ifdown read the contents of /e/n/i to determine what tasks to 
> > perform. So, in particular, ifdown reads that
> > file to determine what addresses to remove from the interface.
> > 
> > That being said, you might find it more suitable to change your script to:
> >  1. ifdown the interface
> >  2. Change the network parameters (either by using sed etc to edit the 
> > file or to move 'canned' files in/out of
> > /etc/network/interfaces.d)
> >  3. ifup the interface
> > 
> > What I would do, in your situation is to have a set of files in 
> > /etc/network/interfaces.d called, for example "!home",
> > "!work", "!travel" or whatever makes sense for your locations. The leading 
> > "!" character makes the configuration
> > invalid to ifupdown, so will be ignored. Your script can then rename any 
> > files that DON'T have a "!" in front to do
> > so, then rename the requested file to NOT have a "!" in front e.g.
> > 
> >  #!/bin/bash
> >  ifdown eth0
> >  prename 's/^/!' /etc/network/interfaces.d/[^\!]*
> >  mv /etc/network/interfaces.d/\!$1 /etc/network/interfaces.d/$1
> >  ifup eth0
> 
> Perfect! Thanks.
> Also perhaps interface map[ping] could work... I used that once years
> ago... need to re-read man interfaces again.

OK, so I learnt a bit more about interfaces mapping stanzas, and bash
parameter suffix removal:

Since I have two mappings ("office" and "internet"), when eth0 is
configured to say office, I want to be able to run my reset bash
script as follows:

 reset eth0=internet

Now "ifdown eth0=internet" when it's configured for office, might not
work, even though "ifup eth0=internet" would be fine.

We don't need to guess the previous state though, we just need to
remove the virtual interfaces specifier ("=internet") like so inside
the reset script:

 neweth="$1" # e.g. "eth0=internet"
 ifdown ${neweth%=*} # remove "=..." suffix
 ifup $neweth # include suffix

Voi la :)

Thanks everyone, really appreciated!



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 11:01:22AM +0100, Darac Marjal wrote:
> On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:
> > So I change between two internet connections from time to time.
> > 
> > I use /etc/network/interfaces ("/e/n/i")
> > 
> > When I modify /e/n/i , I then run a little "reset" script, like so:
> > 
> > dev=eth0
> > ifdown $dev
> > ifconfig $dev down
> > ifup $dev
> > 
> > Here and there I've had problems.
> > 
> > Recently I discovered the ip command.
> > 
> > Apparently, after reconfiguring as above, two IP addresses end up
> > attached to eth0 - one for each (staticly configured in /e/n/i)
> > ISP network connection.
> > 
> > So now I am manually running something like:
> > 
> > ifconfig eth0 down
> > ip address del 10.1.1.30/24 dev eth0
> > ip address del 192.168.1.30/24 dev eth0
> > ip address del fe80::f2de:f1ff:fef7:ea96/64 dev eth0
> > ifup eth0
> > 
> > But this (atm) is a very manual process, and it seems to me that I am
> > not taking down eth0 properly, and that I should not have to
> > introduce IP address awareness into my eth reset script, just to
> > properly reset my eth0 static configuration.
> > 
> > Any pointers of what I need to read/ what I am missing, would be
> > really appreciated.
> > 
> 
> ifup and ifdown read the contents of /e/n/i to determine what tasks to 
> perform. So, in particular, ifdown reads that
> file to determine what addresses to remove from the interface.
> 
> That being said, you might find it more suitable to change your script to:
>  1. ifdown the interface
>  2. Change the network parameters (either by using sed etc to edit the 
> file or to move 'canned' files in/out of
> /etc/network/interfaces.d)
>  3. ifup the interface
> 
> What I would do, in your situation is to have a set of files in 
> /etc/network/interfaces.d called, for example "!home",
> "!work", "!travel" or whatever makes sense for your locations. The leading 
> "!" character makes the configuration
> invalid to ifupdown, so will be ignored. Your script can then rename any 
> files that DON'T have a "!" in front to do
> so, then rename the requested file to NOT have a "!" in front e.g.
> 
>  #!/bin/bash
>  ifdown eth0
>  prename 's/^/!' /etc/network/interfaces.d/[^\!]*
>  mv /etc/network/interfaces.d/\!$1 /etc/network/interfaces.d/$1
>  ifup eth0

Perfect! Thanks.
Also perhaps interface map[ping] could work... I used that once years
ago... need to re-read man interfaces again.



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread john doe

On 7/9/2018 12:01 PM, Darac Marjal wrote:

On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:

So I change between two internet connections from time to time.

I use /etc/network/interfaces ("/e/n/i")

When I modify /e/n/i , I then run a little "reset" script, like so:

dev=eth0
ifdown $dev
ifconfig $dev down
ifup $dev

Here and there I've had problems.

Recently I discovered the ip command.

Apparently, after reconfiguring as above, two IP addresses end up
attached to eth0 - one for each (staticly configured in /e/n/i)
ISP network connection.

So now I am manually running something like:

ifconfig eth0 down
ip address del 10.1.1.30/24 dev eth0
ip address del 192.168.1.30/24 dev eth0
ip address del fe80::f2de:f1ff:fef7:ea96/64 dev eth0
ifup eth0

But this (atm) is a very manual process, and it seems to me that I am
not taking down eth0 properly, and that I should not have to
introduce IP address awareness into my eth reset script, just to
properly reset my eth0 static configuration.

Any pointers of what I need to read/ what I am missing, would be
really appreciated.



ifup and ifdown read the contents of /e/n/i to determine what tasks to 
perform. So, in particular, ifdown reads that file to determine what 
addresses to remove from the interface.


That being said, you might find it more suitable to change your script to:
  1. ifdown the interface
  2. Change the network parameters (either by using sed etc to edit the 
     file or to move 'canned' files in/out of /etc/network/interfaces.d)

  3. ifup the interface

What I would do, in your situation is to have a set of files in 
/etc/network/interfaces.d called, for example "!home", "!work", 
"!travel" or whatever makes sense for your locations. The leading "!" 
character makes the configuration invalid to ifupdown, so will be 
ignored. Your script can then rename any files that DON'T have a "!" in 
front to do so, then rename the requested file to NOT have a "!" in 
front e.g.


  #!/bin/bash
  ifdown eth0
  prename 's/^/!' /etc/network/interfaces.d/[^\!]*
  mv /etc/network/interfaces.d/\!$1 /etc/network/interfaces.d/$1
  ifup eth0



I would use mapping stanza instead:

http://manpages.ubuntu.com/manpages/trusty/man5/interfaces.5.html

--
John Doe



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Darac Marjal

On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:

So I change between two internet connections from time to time.

I use /etc/network/interfaces ("/e/n/i")

When I modify /e/n/i , I then run a little "reset" script, like so:

dev=eth0
ifdown $dev
ifconfig $dev down
ifup $dev

Here and there I've had problems.

Recently I discovered the ip command.

Apparently, after reconfiguring as above, two IP addresses end up
attached to eth0 - one for each (staticly configured in /e/n/i)
ISP network connection.

So now I am manually running something like:

ifconfig eth0 down
ip address del 10.1.1.30/24 dev eth0
ip address del 192.168.1.30/24 dev eth0
ip address del fe80::f2de:f1ff:fef7:ea96/64 dev eth0
ifup eth0

But this (atm) is a very manual process, and it seems to me that I am
not taking down eth0 properly, and that I should not have to
introduce IP address awareness into my eth reset script, just to
properly reset my eth0 static configuration.

Any pointers of what I need to read/ what I am missing, would be
really appreciated.



ifup and ifdown read the contents of /e/n/i to determine what tasks to 
perform. So, in particular, ifdown reads that file to determine what 
addresses to remove from the interface.


That being said, you might find it more suitable to change your script 
to:

 1. ifdown the interface
 2. Change the network parameters (either by using sed etc to edit the 
file or to move 'canned' files in/out of /etc/network/interfaces.d)

 3. ifup the interface

What I would do, in your situation is to have a set of files in 
/etc/network/interfaces.d called, for example "!home", "!work", 
"!travel" or whatever makes sense for your locations. The leading "!" 
character makes the configuration invalid to ifupdown, so will be 
ignored. Your script can then rename any files that DON'T have a "!" in 
front to do so, then rename the requested file to NOT have a "!" in 
front e.g.


 #!/bin/bash
 ifdown eth0
 prename 's/^/!' /etc/network/interfaces.d/[^\!]*
 mv /etc/network/interfaces.d/\!$1 /etc/network/interfaces.d/$1
 ifup eth0

--
For more information, please reread.


signature.asc
Description: PGP signature


Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread Zenaan Harkness
On Mon, Jul 09, 2018 at 08:08:46AM +0200, to...@tuxteam.de wrote:
> On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:
> > So I change between two internet connections from time to time.
> > 
> > I use /etc/network/interfaces ("/e/n/i")
> > 
> > When I modify /e/n/i , I then run a little "reset" script, like so:
> > 
> > dev=eth0
> > ifdown $dev
> > ifconfig $dev down
> > ifup $dev
> 
> Perhaps, just perhaps you should be doing "ifdown $dev" *before*
> editing your e/n/i: ifdown may get confused finding parameters
> there corresponding to the future, not to the current connections.
> 
> I use ifupdown myself and have hit few problems so far by doing
> changes after doing the ifdown (and before the ifup, of course :)

Ah yes, that could be possible. I shall investigate.

Re wicd - I want to maintain control by static configuration (in
/e/n/i), and absolutely minimise auto-configuration.

For example, when I need to test (or use as a one-shot) DHCP, I
ifdown $eth then:

dhclient -d $eth

(-d keeps it in the foreground, and logs are splendiforously
displayed in real time, in the tty I start it from).



Re: ifconfig/ ifupdown/ ip -

2018-07-09 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, Jul 09, 2018 at 11:52:36AM +1000, Zenaan Harkness wrote:
> So I change between two internet connections from time to time.
> 
> I use /etc/network/interfaces ("/e/n/i")
> 
> When I modify /e/n/i , I then run a little "reset" script, like so:
> 
> dev=eth0
> ifdown $dev
> ifconfig $dev down
> ifup $dev

Perhaps, just perhaps you should be doing "ifdown $dev" *before*
editing your e/n/i: ifdown may get confused finding parameters
there corresponding to the future, not to the current connections.

I use ifupdown myself and have hit few problems so far by doing
changes after doing the ifdown (and before the ifup, of course :)

Cheers
- -- t
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAltC++4ACgkQBcgs9XrR2kaEQgCeNMEkRIt/9usnzxGSYkbYPWwc
pEAAni3U19ZV730SXNwDFyFzPFjdGHd6
=VTdy
-END PGP SIGNATURE-



Re: ifconfig/ ifupdown/ ip -

2018-07-08 Thread David Wright
On Mon 09 Jul 2018 at 11:52:36 (+1000), Zenaan Harkness wrote:
> So I change between two internet connections from time to time.
> 
> I use /etc/network/interfaces ("/e/n/i")
> 
> When I modify /e/n/i , I then run a little "reset" script, like so:
> 
> dev=eth0
> ifdown $dev
> ifconfig $dev down
> ifup $dev
> 
> Here and there I've had problems.
> 
> Recently I discovered the ip command.
> 
> Apparently, after reconfiguring as above, two IP addresses end up
> attached to eth0 - one for each (staticly configured in /e/n/i)
> ISP network connection.
> 
> So now I am manually running something like:
> 
> ifconfig eth0 down
> ip address del 10.1.1.30/24 dev eth0
> ip address del 192.168.1.30/24 dev eth0
> ip address del fe80::f2de:f1ff:fef7:ea96/64 dev eth0
> ifup eth0
> 
> But this (atm) is a very manual process, and it seems to me that I am
> not taking down eth0 properly, and that I should not have to
> introduce IP address awareness into my eth reset script, just to
> properly reset my eth0 static configuration.
> 
> Any pointers of what I need to read/ what I am missing, would be
> really appreciated.

I use wicd to manage my network, but I wondered if you'd
looked at guessnet which is meant to work with ifup, and
is meant to automate the process. I haven't used it, though.

Cheers,
David.



ifconfig/ ifupdown/ ip -

2018-07-08 Thread Zenaan Harkness
So I change between two internet connections from time to time.

I use /etc/network/interfaces ("/e/n/i")

When I modify /e/n/i , I then run a little "reset" script, like so:

dev=eth0
ifdown $dev
ifconfig $dev down
ifup $dev

Here and there I've had problems.

Recently I discovered the ip command.

Apparently, after reconfiguring as above, two IP addresses end up
attached to eth0 - one for each (staticly configured in /e/n/i)
ISP network connection.

So now I am manually running something like:

ifconfig eth0 down
ip address del 10.1.1.30/24 dev eth0
ip address del 192.168.1.30/24 dev eth0
ip address del fe80::f2de:f1ff:fef7:ea96/64 dev eth0
ifup eth0

But this (atm) is a very manual process, and it seems to me that I am
not taking down eth0 properly, and that I should not have to
introduce IP address awareness into my eth reset script, just to
properly reset my eth0 static configuration.

Any pointers of what I need to read/ what I am missing, would be
really appreciated.



No ifconfig

2017-08-28 Thread Jonathan de Boyne Pollard

Eike Lantzsch:


Yes, I ask myself why this isn't possible on Linux:

ifconfig enp3s0 inet alias 192.168.12.206 netmask 255.255.255.0

while it is perfectly possible on OpenBSD (with the correct device of 
course).



It's possible if you spell it |inet add| instead of |inet alias|.  (-:



No ifconfig

2017-08-28 Thread Jonathan de Boyne Pollard

Christian Seiler:

From my personal experience, the following two things are features I'm 
actually using regularly and that don't work with it:


1.

IPv6 doesn't really work properly (as explained elsewhere by other
people in this thread)

2.

Can't add multiple IP addresses to the same interface and (worse)
even if multiple IP addresses are assigned to the same interfaces
it only shows the primary address

(2) is really bad, especially the part where it does not show all of 
the IPs that were assigned by other tools, for example NetworkManager, 
or Debian's own |ifupdown| via |/etc/network/interfaces|.




Your second point is a conflation of two things.  One is right, but the 
other is wrong.  Here is what actually happens.  Starting with this basis:



jdebp % ifconfig lo|head -n 4
loLink encap:Local Loopback
   inet addr:127.0.0.1  Mask:255.0.0.0
   inet6 addr: ::1/128 Scope:Host
   inet6 addr: ::2/128 Scope:Compat
jdebp % ip address show lo|fgrep -A 1 inet
 inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
 inet 127.53.53.1/8 scope host secondary lo:0
valid_lft forever preferred_lft forever
 inet6 ::2/128 scope global
valid_lft forever preferred_lft forever
 inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
jdebp %


|ifconfig| cannot see additional addresses assigned by the likes of |ip| 
in its simplest fashion, as here:



jdebp % sudo ip address add 127.53.0.1 dev lo
jdebp % ifconfig lo|head -n 4
loLink encap:Local Loopback
   inet addr:127.0.0.1  Mask:255.0.0.0
   inet6 addr: ::1/128 Scope:Host
   inet6 addr: ::2/128 Scope:Compat
jdebp % ip address show lo|fgrep -A 1 inet
 inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
 inet 127.53.0.1/32 scope host lo
valid_lft forever preferred_lft forever
 inet 127.53.53.1/8 scope host secondary lo:0
valid_lft forever preferred_lft forever
 inet6 ::2/128 scope global
valid_lft forever preferred_lft forever
 inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
jdebp %


But it most definitely /can/ assign multiple IP addresses to a single 
interface, and these will be reported as such by |ip| even though 
|ifconfig| shows them differently:



jdebp % sudo ifconfig lo inet add 127.53.0.2
jdebp % ifconfig lo|head -n 4
loLink encap:Local Loopback
   inet addr:127.0.0.1  Mask:255.0.0.0
   inet6 addr: ::1/128 Scope:Host
   inet6 addr: ::2/128 Scope:Compat
jdebp % ifconfig lo:0|head -n 2
lo:0  Link encap:Local Loopback
   inet addr:127.53.0.2  Mask:255.0.0.0
jdebp % ip address show lo|fgrep -A 1 inet
 inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
 inet 127.53.0.1/32 scope host lo
valid_lft forever preferred_lft forever
 inet 127.53.53.1/8 scope host secondary lo:0
valid_lft forever preferred_lft forever
 inet 127.53.0.2/8 scope host secondary lo:1
valid_lft forever preferred_lft forever
 inet6 ::2/128 scope global
valid_lft forever preferred_lft forever
 inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
jdebp %


Moreover, one /can/ add multiple IP addresses to an interface with |ip| 
in such a way that |ifconfig| sees them, by assigning labels:



jdebp % sudo ip address del 127.53.0.1/32 dev lo
jdebp % sudo ip address add 127.53.0.1 dev lo label lo:2
jdebp % ifconfig lo:2|head -n 2
lo:2  Link encap:Local Loopback
   inet addr:127.53.0.1  Mask:255.255.255.255
jdebp %


One interesting tidbit in the aforegiven:  The network mask inference 
calculation differs. |ip| inferred 127.53.0.1/32 whereas |ifconfig| 
inferred 127.53.0.2/8.




No ifconfig [Was: no /etc/inittab]

2017-08-28 Thread Jonathan de Boyne Pollard

Greg Wooledge:



wooledg:~$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode 
DEFAULT group default qlen 1
 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP 
mode DEFAULT group default qlen 1000
 link/ether a0:8c:fd:c3:89:e0 brd ff:ff:ff:ff:ff:ff

Parsing the interface names out of THAT is significantly harder.



In support of my earlier point that some /other/ people /did/ make 
modern |ifconfig| usable in such ways:

JdeBP % ifconfig -l
bge0 bge1 lo0 tun0
JdeBP %


Here's something from a script of mine:

list_available_network_interfaces() {
 case "`uname`" in
 Linux)  /bin/ls /sys/class/net ;;
     *)  ifconfig -l ;;
 esac
}


(Note that this is as loose as it is because I'm only targetting 
Linux-based operating systems and the BSDs so far here.  Also note that 
this breaks on OpenBSD which does not have the |-l| option to 
|ifconfig|.  Fixing that is on the to-do list.)




Re: No ifconfig

2017-08-22 Thread Christian Seiler

Am 2017-08-22 17:11, schrieb Sven Hartge:

Christian Seiler  wrote:


auto eth0
iface eth0 inet static
  address 192.168.0.1/24
  address 192.168.0.42/24
  address 10.5.6.7/8



This will work, and it will assign all IPs to the interface (the first
one being the primary and the source IP of outgoing packets where the
program doesn't explicitly bind anything).


No, this does not work in Stretch. Only the first address is added. To
get additional addresses, it has to look like this:

,
| auto eth0
| iface eth0 inet static
|   address 192.168.0.1/24
|
| iface eth0 inet static
|   address 192.168.0.42/24
|
| iface eth0 inet static
|   address 10.5.6.7/8
`


Oh yeah, sorry, I wrote that from memory and misremembered a bit.
Thanks for the clarification!

Regards,
Christian



Re: No ifconfig

2017-08-22 Thread Sven Hartge
Christian Seiler  wrote:

> auto eth0
> iface eth0 inet static
>   address 192.168.0.1/24
>   address 192.168.0.42/24
>   address 10.5.6.7/8

> This will work, and it will assign all IPs to the interface (the first
> one being the primary and the source IP of outgoing packets where the
> program doesn't explicitly bind anything).

No, this does not work in Stretch. Only the first address is added. To
get additional addresses, it has to look like this:

,
| auto eth0
| iface eth0 inet static
|   address 192.168.0.1/24
|
| iface eth0 inet static
|   address 192.168.0.42/24
|
| iface eth0 inet static
|   address 10.5.6.7/8
`

Grüße,
Sven.

-- 
Sigmentation fault. Core dumped.



Re: No ifconfig

2017-08-21 Thread Gene Heskett
On Monday 21 August 2017 14:05:48 Christian Seiler wrote:

> On 08/21/2017 07:40 PM, Gene Heskett wrote:
> > I'll have to study up on this "binding" and how its done.
>
> Note that that's something a program can do if it wants to, but not
> something you can generically configure (though individual programs
> might offer you configuration options for this), and most programs
> that make outgoing connections don't bind the outgoing socket
> because they don't care about which IP their packets originate from
> and are happy to use the OS's defaults.
>
> In case you want a pointer on how this works from a programming
> perspective, I can always recommend Richard Stevens's book UNIX
> Network Programming (_the_ book about this topic), and the manpage
> of the bind syscall (section 2; man 2 bind) is also a possible
> starting point.
>
> Regards,
> Christian

Thank you Christian. I am up to my lower jaw in other commitments till 
much later today before I can follow up on the latter.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 



Re: No ifconfig

2017-08-21 Thread Christian Seiler
On 08/21/2017 07:40 PM, Gene Heskett wrote:
> I'll have to study up on this "binding" and how its done.

Note that that's something a program can do if it wants to, but not
something you can generically configure (though individual programs
might offer you configuration options for this), and most programs
that make outgoing connections don't bind the outgoing socket
because they don't care about which IP their packets originate from
and are happy to use the OS's defaults.

In case you want a pointer on how this works from a programming
perspective, I can always recommend Richard Stevens's book UNIX
Network Programming (_the_ book about this topic), and the manpage
of the bind syscall (section 2; man 2 bind) is also a possible
starting point.

Regards,
Christian



Re: No ifconfig

2017-08-21 Thread Gene Heskett
On Monday 21 August 2017 13:19:11 Christian Seiler wrote:

> On 08/21/2017 07:07 PM, Gene Heskett wrote:
> > On Monday 21 August 2017 12:11:38 Christian Seiler wrote:
> >> On 08/21/2017 05:03 PM, Gene Heskett wrote:
> >> iface eth0 inet static
> >>   address 192.168.0.1/24
> >>   address 192.168.0.42/24
> >>   address 10.5.6.7/8
> >>
> >> This will work, and it will assign all IPs to the interface (the
> >> first one being the primary and the source IP of outgoing packets
> >> where the program doesn't explicitly bind anything). And "ip a"
> >> will show all three addresses, but "ifconfig -a" will only show the
> >> first.
> >
> > Ok, but then how do you differentiate between the addresses without
> > the :1 [:2 etc] notation?
>
> I don't understand the question? Where do you want to specify an
> address? When removing the address you just say "remove address XYZ
> from interface ABC".
>
> > It doesn't seem right that is would bang all the assigned addresses
> > with duplicate data.
>
> I don't get what you mean here. What is duplicate? If you open an
> outgoing connection by default the primary (first) IP that matches
> the outgoing subnet will be used as the source IP for that
> connection - but a program can override that by binding the socket
> to any of the other IPs of that interface.
>
I'll have to study up on this "binding" and how its done.

> In the above example: any connection to 192.168.0.23 will by default
> carry the source IP 192.168.0.1, and any connection to 10.1.1.1 will
> by default carry the source IP 10.5.6.7. An application can create
> an outgoing connection with source IP 192.168.0.42 by explicitly
> binding the socket to that IP before making the connection.
>
> Which is kind of similar to alias interfaces: with alias interfaces
> the route metric of the alias interfaces relative to each other
> defines what IP will be used by default, but again it is possible
> for an application to override that by binding the socket to a
> specific IP address.
>
> And incoming connections are trivial anyway in these setups.
>
> From the point of view of applications that just use the socket layer
> (and don't care about network interface names) the system will react
> in the same way whether you use multiple addresses per interface or
> whether you use alias interfaces. The main differences are in how it
> is configured and how the kernel code works.
>
> Regards,
> Christian

This has been an enlightening discussion, Christian, thank you for your 
time.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig

2017-08-21 Thread Christian Seiler
On 08/21/2017 07:07 PM, Gene Heskett wrote:
> On Monday 21 August 2017 12:11:38 Christian Seiler wrote:
> 
>> On 08/21/2017 05:03 PM, Gene Heskett wrote:
>> iface eth0 inet static
>>   address 192.168.0.1/24
>>   address 192.168.0.42/24
>>   address 10.5.6.7/8
>>
>> This will work, and it will assign all IPs to the interface (the first
>> one being the primary and the source IP of outgoing packets where the
>> program doesn't explicitly bind anything). And "ip a" will show all
>> three addresses, but "ifconfig -a" will only show the first.
>>
> Ok, but then how do you differentiate between the addresses without 
> the :1 [:2 etc] notation?

I don't understand the question? Where do you want to specify an
address? When removing the address you just say "remove address XYZ
from interface ABC".

> It doesn't seem right that is would bang all the assigned addresses with 
> duplicate data.

I don't get what you mean here. What is duplicate? If you open an
outgoing connection by default the primary (first) IP that matches
the outgoing subnet will be used as the source IP for that
connection - but a program can override that by binding the socket
to any of the other IPs of that interface.

In the above example: any connection to 192.168.0.23 will by default
carry the source IP 192.168.0.1, and any connection to 10.1.1.1 will
by default carry the source IP 10.5.6.7. An application can create
an outgoing connection with source IP 192.168.0.42 by explicitly
binding the socket to that IP before making the connection.

Which is kind of similar to alias interfaces: with alias interfaces
the route metric of the alias interfaces relative to each other
defines what IP will be used by default, but again it is possible
for an application to override that by binding the socket to a
specific IP address.

And incoming connections are trivial anyway in these setups.

>From the point of view of applications that just use the socket layer
(and don't care about network interface names) the system will react
in the same way whether you use multiple addresses per interface or
whether you use alias interfaces. The main differences are in how it
is configured and how the kernel code works.

Regards,
Christian



Re: No ifconfig

2017-08-21 Thread Gene Heskett
On Monday 21 August 2017 12:11:38 Christian Seiler wrote:

> On 08/21/2017 05:03 PM, Gene Heskett wrote:
> > On Monday 21 August 2017 09:08:11 Christian Seiler wrote:
> >> 2. Can't add multiple IP addresses to the same interface and
> >> (worse) even if multiple IP addresses are assigned to the
> >> same interfaces it only shows the primary address
> >
> > I don't know as to how ifconfig sets it up, but its a piece of cake
> > to edit /etc/network/interfaces to do that. If I bring in a new
> > router, I uncomment this stanza in the interfaces file:
> > 
> > #auto eth0:1
> >
> > # to access reset to 192.168.0.1 routers/switches on the 2nd cat5
> > port #iface eth0:1 inet static
> > #address 192.168.0.3
> > #netmask 255.255.255.0
> > ==
> > giving me an address I can use to talk to and configure the new
> > router.
>
> Yeah, that's the old way of doing this via an alias interface. I was
> talking about the new-style way of doing so though.
>
> For example:
>
> auto eth0
>
> iface eth0 inet static
>   address 192.168.0.1/24
>   address 192.168.0.42/24
>   address 10.5.6.7/8
>
> This will work, and it will assign all IPs to the interface (the first
> one being the primary and the source IP of outgoing packets where the
> program doesn't explicitly bind anything). And "ip a" will show all
> three addresses, but "ifconfig -a" will only show the first.
>
Ok, but then how do you differentiate between the addresses without 
the :1 [:2 etc] notation?

It doesn't seem right that is would bang all the assigned addresses with 
duplicate data.
 
> Alias interfaes are kind of legacy, and while they still work, they do
> have a couple of drawbacks: they aren't really an own interface
> because they share options with the interface they are based on (which
> can be confusing if you want to change interface options), there is no
> way to automatically add a new IP to a given interface without probing
> first which aliases have already been "used up", the alias namespace
> is limited by both the max length of an interface name and the
> limitation of the alias part itself.

I haven't seen, or needed, one of the newer critters yet.  But I'll be 
interested in the details when it does jump the fence into my domain.

> But don't get me wrong: if it works for you with alias interfaces, I'm
> certainly not going to tell you to change that - because those also do
> work with the "ip" utility. The major issue I "ifconfig" has here is
> that it doesn't see the additional IP addresses of interfaces added by
> other tools - so that when you rely on ifconfig you _don't_ see the
> actual entire network configuration of the system, but only a part of
> it. So it's actually counter-productive when you're troubleshooting a
> system.
>
> >> (2) is really bad, especially the part where it does not show
> >> all of the IPs that were assigned by other tools, for example
> >
> > Huh? ifconfig doesn't even need a -a option to show me eth0:1 if ts
> > configured and up.
>
> Yes, for alias interfaces it does. For the additional IPs added to the
> interface itself it doesn't.
>
> >> NetworkManager, or Debian's own ifupdown via
> >> /etc/network/interfaces.
> >
> > Please don't equate those two.
>
> I was talking about how these configure multiple IPs when you use
> them. Both use the newer kernel interface that allows you to specify
> multiple IPs on the same interface, while ifconfig uses the old
> interface that assumes a single IP per interface. And I just used
> the most prominent programs in Debian as examples for this, but all
> other management tools I know of (conman, systemd-networkd, ...)
> also use the newer interface.
>
> I really didn't want to discuss the merits or problems of each
> individual software package.
>
> Regards,

Thank you, Christian

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig

2017-08-21 Thread Christian Seiler
On 08/21/2017 05:03 PM, Gene Heskett wrote:
> On Monday 21 August 2017 09:08:11 Christian Seiler wrote:
>> 2. Can't add multiple IP addresses to the same interface and
>> (worse) even if multiple IP addresses are assigned to the
>> same interfaces it only shows the primary address
> 
> I don't know as to how ifconfig sets it up, but its a piece of cake to 
> edit /etc/network/interfaces to do that. If I bring in a new router, I 
> uncomment this stanza in the interfaces file:
> 
> #auto eth0:1
> 
> # to access reset to 192.168.0.1 routers/switches on the 2nd cat5 port
> #iface eth0:1 inet static
> #address 192.168.0.3
> #netmask 255.255.255.0
> ==
> giving me an address I can use to talk to and configure the new router.

Yeah, that's the old way of doing this via an alias interface. I was
talking about the new-style way of doing so though.

For example:

auto eth0

iface eth0 inet static
  address 192.168.0.1/24
  address 192.168.0.42/24
  address 10.5.6.7/8

This will work, and it will assign all IPs to the interface (the first
one being the primary and the source IP of outgoing packets where the
program doesn't explicitly bind anything). And "ip a" will show all
three addresses, but "ifconfig -a" will only show the first.

Alias interfaes are kind of legacy, and while they still work, they do
have a couple of drawbacks: they aren't really an own interface because
they share options with the interface they are based on (which can be
confusing if you want to change interface options), there is no way to
automatically add a new IP to a given interface without probing first
which aliases have already been "used up", the alias namespace is
limited by both the max length of an interface name and the limitation
of the alias part itself.

But don't get me wrong: if it works for you with alias interfaces, I'm
certainly not going to tell you to change that - because those also do
work with the "ip" utility. The major issue I "ifconfig" has here is
that it doesn't see the additional IP addresses of interfaces added by
other tools - so that when you rely on ifconfig you _don't_ see the
actual entire network configuration of the system, but only a part of
it. So it's actually counter-productive when you're troubleshooting a
system.

>> (2) is really bad, especially the part where it does not show
>> all of the IPs that were assigned by other tools, for example
> 
> Huh? ifconfig doesn't even need a -a option to show me eth0:1 if ts 
> configured and up.

Yes, for alias interfaces it does. For the additional IPs added to the
interface itself it doesn't.

>> NetworkManager, or Debian's own ifupdown via
>> /etc/network/interfaces.
> 
> Please don't equate those two.

I was talking about how these configure multiple IPs when you use
them. Both use the newer kernel interface that allows you to specify
multiple IPs on the same interface, while ifconfig uses the old
interface that assumes a single IP per interface. And I just used
the most prominent programs in Debian as examples for this, but all
other management tools I know of (conman, systemd-networkd, ...)
also use the newer interface.

I really didn't want to discuss the merits or problems of each
individual software package.

Regards,
Christian



Re: No ifconfig

2017-08-21 Thread Eike Lantzsch
On Monday, 21 August 2017 15:08:11 -04 Christian Seiler wrote:
> Am 2017-08-21 14:50, schrieb Greg Wooledge:
> > [missing features in ifconfig]
> > (Like Gene, I don't even know what those featues *are*.)
> 
>  From my personal experience, the following two things are
> features I'm actually using regularly and that don't work
> with it:
> 
> 1. IPv6 doesn't really work properly (as explained elsewhere
> by other people in this thread)
> 2. Can't add multiple IP addresses to the same interface and
> (worse) even if multiple IP addresses are assigned to the
> same interfaces it only shows the primary address

Yes, I ask myself why this isn't possible on Linux:
ifconfig enp3s0 inet alias 192.168.12.206 netmask 255.255.255.0
while it is perfectly possible on OpenBSD (with the correct device of course).

I wonder which brainstorm resulted in writing ip instead of rewriting ifconfig 
- from scratch if necessary - with backwards compatibility.

I still can't decide for myself whether having same-name-tools with subtle 
differences between Linux and BSD is better or not than having different tools 
with different names altogether and deal with it.
> 
> (2) is really bad, especially the part where it does not show
> all of the IPs that were assigned by other tools, for example
> NetworkManager, or Debian's own ifupdown via
> /etc/network/interfaces.
Yes, and why can it not "ifconfig -A" as the BSD-ifconfig can?
> 
There was VMS and then WNT was made - better(?) but a totally different 
approach - unfortunately the tools coming with WNT were crippled and not very 
consistent and the concept of i-nodes was implemented but never really used - 
but I digress.
At least ip is more versatile than (Lin)-ifconfig - so there is an improvement.
Will Linux now be the CTE - a totally different approach than BSD?
or shall the "ux" be sacrificed by distributions and we keep the "Lin"?

Linux is just the kernel. The distributions took the Linux-kernel and built a 
Unix-like system around it.
Now it is more like they build a system according to their liking and fit it 
with the Linux-kernel or maybe any other in the future.
That seems to be similar to the path Apple took with the Mach kernel.

Kind regards,
Eike

-- 
Eike Lantzsch ZP6CGE



Re: No ifconfig

2017-08-21 Thread Curt
On 2017-08-21, Greg Wooledge <wool...@eeg.ccf.org> wrote:
> On Mon, Aug 21, 2017 at 05:58:43AM +0100, Jonathan de Boyne Pollard wrote:
>> van Smoorenburg init and systemd actually have nothing whatsoever to do with
>> it.  ifconfig uses one Linux API for sending information to and from the
>> kernel, ip uses a different Linux API.  Ironically, the net-tools package is
>> completely Linux-specific *anyway*, so the usual argument that ifconfig
>> couldn't be changed to use the other API, because it has to remain portable,
>> does not hold any water.
>
> The basic command-line syntax of ifconfig is pseudo-standardized across
> dozens of legacy Unix systems, as well as BSD.  *This* is what people
> are really complaining about here -- the divergence of Linux from the
> rest of the Unix-speaking world (in addition to breaking backward
> compatibility with itself).

I have a tenuous understanding of just about everything, but I was going
to mention the wiki, which seems to dilute whatever savory irony the
so-called complete Linux specificity of net-tools might contain:
 
 Take into account that the interfaces provided by net-tools, to some extent
 are the portable ones across OSes to configure and handle some network stuff.
 If net-tools is considered deprecated on GNU/Linux, please do not just remove
 the support as that will break GNU/kFreeBSD for example which is using the
 compatible freebsd-net-tools, or GNU/Hurd which can use the partial support
 from inetutils-tools. 

https://wiki.debian.org/NetToolsDeprecation

> E.g. Solaris 10: <http://docs.oracle.com/cd/E19253-01/816-5166/6mbb1kq31/>
> E.g. HP-UX 11i: <http://nixdoc.net/man-pages/HP-UX/ifconfig.1m.html>
> E.g. AIX 6.1: 
> <https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.cmds3/ifconfig.htm>
> E.g. OpenBSD 6.1: <http://man.openbsd.org/OpenBSD-6.1/ifconfig>
>
> I think updating net-tools to incorporate whatever new Linux network
> stack features it's currently not supporting would make a lot of
> people happy, so long as it doesn't break backward compatibility.
>
> (Like Gene, I don't even know what those featues *are*.)
>
>


-- 
Only the coward who has more fear of death than dignity can comfort himself 
with the fact that
his body will in time live again in the grass, in the stones, in the toad. To 
find one's
immortality in the transmutation of substances is as strange as to prophesy a 
brilliant future
for the case after a precious violin has been broken and becomes useless. — 
"Ward 6"




Re: No ifconfig

2017-08-21 Thread Gene Heskett
On Monday 21 August 2017 09:08:11 Christian Seiler wrote:

> Am 2017-08-21 14:50, schrieb Greg Wooledge:
> > [missing features in ifconfig]
> > (Like Gene, I don't even know what those featues *are*.)
>
>  From my personal experience, the following two things are
> features I'm actually using regularly and that don't work
> with it:
>
> 1. IPv6 doesn't really work properly (as explained elsewhere
> by other people in this thread)
> 2. Can't add multiple IP addresses to the same interface and
> (worse) even if multiple IP addresses are assigned to the
> same interfaces it only shows the primary address

I don't know as to how ifconfig sets it up, but its a piece of cake to 
edit /etc/network/interfaces to do that. If I bring in a new router, I 
uncomment this stanza in the interfaces file:

#auto eth0:1

# to access reset to 192.168.0.1 routers/switches on the 2nd cat5 port
#iface eth0:1 inet static
#address 192.168.0.3
#netmask 255.255.255.0
==
giving me an address I can use to talk to and configure the new router.

And I can recall doing it all with a nearly 20yo version of ifconfig the 
first time I needed to, following the instructions given to me over the 
phone from our network guy at the tv station.

But remembering the arcania of how I did it then, vs the quick edit shown 
above, followed by a sudo service networking restart, is for me, buckets 
easier.

> (2) is really bad, especially the part where it does not show
> all of the IPs that were assigned by other tools, for example

Huh? ifconfig doesn't even need a -a option to show me eth0:1 if ts 
configured and up. It does need the -a if the interface is configured 
but down.

> NetworkManager, or Debian's own ifupdown via
> /etc/network/interfaces.

Please don't equate those two. Despite having a dhcpd server configured 
in my router, and which my lappy and my kids telephones can use without 
any problems, it (N-M) has yet, at this location, to achieve a working 
connection for any of my machines. My lappy uses wicd IIRC. N-M will 
tear a working connection down and leave you sitting under a bush on a 
deserted, .2 acre island. So I long ago learned the usefullness of the 
sudo chattr +i filename command as it got done to the various network 
related files, in a race to beat N-M's blanking of /etc/resolv.conf.

Fortunately N-M had the great good sense to not load up the logs 
complaining about the loss of its access to those files.  Lately, its 
been made removable, which for me is a "Good Thing".

I agree with the concept of making networking just work, but the concept 
and the reality are not even in the same building here. That could even 
be my fault because I've never used the first 2 class D 192.168.x.x 
addresses for my home network. One more roadblock for the black hats to 
climb over, and in 20 years I've not been touched.

> Regards,
> Christian


Cheers Christian, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig

2017-08-21 Thread Fungi4All
From: ans...@debian.org

> To: Fungi4All 
> debian-user\@lists.debian.org 
>
> Fungi4All  writes:
>>> Never. Debian developers are not your lackeys.
>>
>> Unless you are willing to pay more than n s a sys tem d red hat and they can
>> become "your" lackeys.
>
> Could you take your crazy conspiracy theories somewhere else? I"m also
> very tempted to suggest contacting a mental health professional if you
> truly believe what you write and are not just trolling.

First of all this is a "users" list, I belong here.
I may be crazy, but crazy people can follow logical arguments despite of their
craziness.
Please explain to us this madness of spider-web neural network of universally
unique identifiers of every stinking little piece of hw item the system 
encounters?
Explain to me/us how these uu-identifiers are being blocked from being 
communicated.
What is the overall purpose?  Someone (Erik?) already posted the commonality
of transplanting your "system disk" into another machine and facing more madness
than I can be diagnosed with.

My crazy brain says:  "forensic science", relating and identifying an 
insignificant
piece of evidence with something else.  At least have the infrastructure that 
supports
such relational "madness", because for sure judges and attorneys can't 
understand.

Nobody is paying me to shut up!  And that is not so crazy.  And by the time this
message goes to the public archives you'd better come up with a logical 
explanation
that defeats my crazy mode of thought.

> Ansgar

Again. It is not personal, it is the hydra behind the matrix that is causing 
madness.

Re: No ifconfig

2017-08-21 Thread Christian Seiler

Am 2017-08-21 14:50, schrieb Greg Wooledge:

[missing features in ifconfig]
(Like Gene, I don't even know what those featues *are*.)


From my personal experience, the following two things are
features I'm actually using regularly and that don't work
with it:

1. IPv6 doesn't really work properly (as explained elsewhere
   by other people in this thread)
2. Can't add multiple IP addresses to the same interface and
   (worse) even if multiple IP addresses are assigned to the
   same interfaces it only shows the primary address

(2) is really bad, especially the part where it does not show
all of the IPs that were assigned by other tools, for example
NetworkManager, or Debian's own ifupdown via
/etc/network/interfaces.

Regards,
Christian



Re: No ifconfig

2017-08-21 Thread Greg Wooledge
On Mon, Aug 21, 2017 at 05:58:43AM +0100, Jonathan de Boyne Pollard wrote:
> van Smoorenburg init and systemd actually have nothing whatsoever to do with
> it.  ifconfig uses one Linux API for sending information to and from the
> kernel, ip uses a different Linux API.  Ironically, the net-tools package is
> completely Linux-specific *anyway*, so the usual argument that ifconfig
> couldn't be changed to use the other API, because it has to remain portable,
> does not hold any water.

The basic command-line syntax of ifconfig is pseudo-standardized across
dozens of legacy Unix systems, as well as BSD.  *This* is what people
are really complaining about here -- the divergence of Linux from the
rest of the Unix-speaking world (in addition to breaking backward
compatibility with itself).

E.g. Solaris 10: <http://docs.oracle.com/cd/E19253-01/816-5166/6mbb1kq31/>
E.g. HP-UX 11i: <http://nixdoc.net/man-pages/HP-UX/ifconfig.1m.html>
E.g. AIX 6.1: 
<https://www.ibm.com/support/knowledgecenter/en/ssw_aix_61/com.ibm.aix.cmds3/ifconfig.htm>
E.g. OpenBSD 6.1: <http://man.openbsd.org/OpenBSD-6.1/ifconfig>

I think updating net-tools to incorporate whatever new Linux network
stack features it's currently not supporting would make a lot of
people happy, so long as it doesn't break backward compatibility.

(Like Gene, I don't even know what those featues *are*.)



Re: No ifconfig

2017-08-20 Thread Jonathan de Boyne Pollard

Erik Christiansen:

Gene, ifconfig is SysV flavoured, so not favoured on the Systemd 
journey, AIUI.




van Smoorenburg init and systemd actually have nothing whatsoever to do 
with it.  ifconfig uses one Linux API for sending information to and 
from the kernel, ip uses a different Linux API.  Ironically, the 
net-tools package is completely Linux-specific *anyway*, so the usual 
argument that ifconfig couldn't be changed to use the other API, because 
it has to remain portable, does not hold any water.


That said, one of the things that in practice ifconfig falls down on in 
real world use, where most of the use cases are fairly conventional and 
humdrum, is in IPV6 support:



root # ifconfig lo inet6 ::1

Don't know how to set addresses for family 10.

root #



This is actually a fairly trivial oversight in a case statement in the 
code, rather than a fundamental design or implementation problem, 
though.  It doesn't even need the other API.




Re: No ifconfig

2017-08-20 Thread Gene Heskett
On Sunday 20 August 2017 23:14:06 Erik Christiansen wrote:

> On 20.08.17 11:41, Gene Heskett wrote:
> > Having a decent recipe for setting up my local network to ipv6, I'd
> > feel a lot more comfortable and capable of dealing with ipv6 when
> > ipv6 is the operating network on the other side of my router. 150
> > miles away is NOT on the other side of my router...
> >
> > Where is the tut for doing that?
>
> Dunno, gene. Still haven't migrated here, either. As long as we use
> unroutable addresses on the LAN, they have zero need to be anything
> other than IPv4. The modem/router can include the IPv4/IPv6 in its
> NAT, so who cares, when there's no problem to solve?
>
Precisely Erik.  So while it might be nice to know how, the bottom line 
is that no one in the last decade and change, has come past my router 
except to look at my web page which is on this machine. I've a one port 
number wide port forward that allows that.  And to my amazement, 
considering the oddness of that setup, I do log several hundred hits a 
month on it. 4 GB of downloads from it so far this month.

> Here in Oz we are adopting the country name of Slowvakia, as our
> internet speeds are slower than Slovakia, and IPv6 isn't busting the
> door down either.

;-)

Yeah, out here in the hicks, I'm stuck at 10 megabits/sec.  I can get 
more but what would I use it for?  If it was income producing, that of 
course would make a difference. But its not.

> Erik


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 



Re: No ifconfig

2017-08-20 Thread Erik Christiansen
On 20.08.17 11:41, Gene Heskett wrote:
> Having a decent recipe for setting up my local network to ipv6, I'd feel 
> a lot more comfortable and capable of dealing with ipv6 when ipv6 is the 
> operating network on the other side of my router. 150 miles away is NOT 
> on the other side of my router...
> 
> Where is the tut for doing that?

Dunno, gene. Still haven't migrated here, either. As long as we use
unroutable addresses on the LAN, they have zero need to be anything
other than IPv4. The modem/router can include the IPv4/IPv6 in its NAT,
so who cares, when there's no problem to solve?

Here in Oz we are adopting the country name of Slowvakia, as our
internet speeds are slower than Slovakia, and IPv6 isn't busting the
door down either.

Erik



Re: No ifconfig

2017-08-20 Thread Gene Heskett
On Sunday 20 August 2017 08:30:05 Erik Christiansen wrote:

> On 19.08.17 18:40, Brian wrote:
> > I know this thread has been a long, interesting and involved one but
> > it included this:
> >
> >  https://lists.debian.org/debian-user/2017/08/msg00798.html
> >
> > To remind ourselves (about why net-tools is not in the base system):
> >
> >  Indeed.  It shouldn't, and it doesn't anymore.  Maybe net-tools
> > should be part of the *standard* system, but it certainly does not
> > belong to the *base* system anymore.
> >
> > Continuing:
> >
> >  It is broken in that it just *can't* handle the Linux networking
> > stack except for the bare minimum functionality on IPv4 (no, it
> > doesn't meet even the bare minimum for IPv6), and the only reason we
> > had to keep it around by default (consistent output that some
> > scripts scrapped) was broken by GNU upstream when it took ifconfig
> > out of the bit-rot pit hell and started maintaining it again.
>
> Any reasonable reader of this thread accepts that it should not be in
> the base distro, I'm certain. It would be an act of generosity to old
> fogeys to include it in the standard distro. (They're probably not
> running IPv6, if Gene and I are any guide.)
>
> But it took only a moment to apt-get the package, giving me ifconfig
> on debian 9.0, and nullifying all reason to seek any default
> inclusions.
>
> Gene, if ya can make your own nipples for black powder longarms, then
> a bit of DIY debian isn't a show stopper, I figure.

Thats part of my if it ain't broke, don't fix it upbringing.  And the 
available nipples were very badly broken by design, incapable of 
igniteing the black substitute powder sold as Blackhorn 209, so I made 
one that would.  But I need to get some SS and do them again, regular 
steel gradually closes the #68 flashholes with the primer deposits. Hell 
to keep them clean. OTOH dirty still does a 1.25" group at 50 meters.  
And that _will_ put venison in the pot.

> I've nibbled on the skinny end of "ip" by using "ip route" in lieu of
> "netstat -rn" in the last few days, and could get used to some of it.
>
While I can't define that its busted, it does give the answer requested, 
but its specific and one must read the man page repeatedly in order to 
get/set all the data needed. ifconfig is a one size fits all, and 
preferable because it does give you everything.  I'll get used to it in 
due time even if it sounds like I'm kicking and screaming as I get 
sucked into the next generation of networking. IMO of course.  Old 
fogey? That too, one that has a lengthy list of BTDT's.

Having a decent recipe for setting up my local network to ipv6, I'd feel 
a lot more comfortable and capable of dealing with ipv6 when ipv6 is the 
operating network on the other side of my router. 150 miles away is NOT 
on the other side of my router...

Where is the tut for doing that?

What I've found seems to assume an ipv6 enabled dhcpd, which would IMO 
properly belong in the router/gateway box. Am I using the wrong search 
terms?  Dunno.

Thanks Erik

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig

2017-08-20 Thread Erik Christiansen
On 19.08.17 09:26, Gene Heskett wrote:
> On Saturday 19 August 2017 04:15:42 Jonathan de Boyne Pollard wrote:
> > That is, in fact, what the BSD people did.  On FreeBSD and OpenBSD,
> > for examples, modern ifconfig has fully functional IPv6 capability,
> > with parameters like (to pick just some at random) eui64, prefixlen,
> > auto_linklocal, autoconfprivacy, defaultif, and ifdisabled.
> 
> So when do we get that ported and into debian, replacing this gibberish 
> generator call ip, so we can just get back to doing the things we want 
> to do with a computer?

Gene, ifconfig is SysV flavoured, so not favoured on the Systemd
journey, AIUI.

I'll try Devuan on one of my machines when time permits, but FreeBSD has
a Linux compatibility layer, allowing it to run Linux binaries, IIUC.
It might be worth a try. There are big corporations relying on it on
their servers, so it seems pretty solid. It is more SysV flavoured, and
Systemd-free.

Erik



Re: No ifconfig

2017-08-20 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Sun, Aug 20, 2017 at 10:30:05PM +1000, Erik Christiansen wrote:

[...]

> Any reasonable reader of this thread accepts that it should not be in
> the base distro, I'm certain. It would be an act of generosity to old
> fogeys to include it in the standard distro. (They're probably not running
> IPv6, if Gene and I are any guide.)
> 
> But it took only a moment to apt-get the package, giving me ifconfig on
> debian 9.0, and nullifying all reason to seek any default inclusions.

Gosh. At last a reasonable standpoint, thanks. In the case of systemd I can
understand some excitement (I don't get all the bile on both sides, the
one patholigizing the other ("you're just change-averse" [1]), the other
criminalizing the one ("you're trying to kill Holy Unix").

But in this case, where ifconfig isn't going anywhere, well, apt-get
install it. It can coexist peacefully with ip (disclosure: I just have
both). And if you are keen on keeping it, just join the packager's
mailing list, lurk there for a while and see whether you can pick up
some task (buying the maintainer a pizza or a beer does count!).

> Gene, if ya can make your own nipples for black powder longarms, then a
> bit of DIY debian isn't a show stopper, I figure.

:-))

Cheers

[1] Or "It's 2017, ferchrissake!". As if history developed linearly
   and always new > old.

- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlmZgxEACgkQBcgs9XrR2kYcjwCfdGWMesjsK110eA7aOvCzOWAL
OfoAniVLGt4OnwpPgVC5w9HzmHomZ4v0
=bxF4
-END PGP SIGNATURE-



Re: No ifconfig

2017-08-20 Thread Erik Christiansen
On 19.08.17 18:40, Brian wrote:
> I know this thread has been a long, interesting and involved one but it
> included this:
> 
>  https://lists.debian.org/debian-user/2017/08/msg00798.html
> 
> To remind ourselves (about why net-tools is not in the base system):
> 
>  Indeed.  It shouldn't, and it doesn't anymore.  Maybe net-tools should
>  be part of the *standard* system, but it certainly does not belong to
>  the *base* system anymore.
> 
> Continuing:
> 
>  It is broken in that it just *can't* handle the Linux networking stack
>  except for the bare minimum functionality on IPv4 (no, it doesn't meet
>  even the bare minimum for IPv6), and the only reason we had to keep it
>  around by default (consistent output that some scripts scrapped) was
>  broken by GNU upstream when it took ifconfig out of the bit-rot pit hell
>  and started maintaining it again.

Any reasonable reader of this thread accepts that it should not be in
the base distro, I'm certain. It would be an act of generosity to old
fogeys to include it in the standard distro. (They're probably not running
IPv6, if Gene and I are any guide.)

But it took only a moment to apt-get the package, giving me ifconfig on
debian 9.0, and nullifying all reason to seek any default inclusions.

Gene, if ya can make your own nipples for black powder longarms, then a
bit of DIY debian isn't a show stopper, I figure.

I've nibbled on the skinny end of "ip" by using "ip route" in lieu of
"netstat -rn" in the last few days, and could get used to some of it.

Erik



Re: No ifconfig

2017-08-20 Thread Ansgar Burchardt
Fungi4All  writes:
>> Never. Debian developers are not your lackeys.
>
> Unless you are willing to pay more than n s a sys tem d red hat and they can
> become "your" lackeys.

Could you take your crazy conspiracy theories somewhere else?  I'm also
very tempted to suggest contacting a mental health professional if you
truly believe what you write and are not just trolling.

Ansgar



Re: No ifconfig

2017-08-19 Thread Liam O'Toole
On 2017-08-19, Gene Heskett <ghesk...@shentel.net> wrote:
> On Saturday 19 August 2017 04:15:42 Jonathan de Boyne Pollard wrote:
>
>> Glenn English:
>> > I've written many scripts over the years, using ifconfig and others,
>> > and having everything broken now is a major PITA.
>> >
>> > I very much agree that sysV init and those old commands were a mess,
>> > especially with the introduction of ipv6. But I'd have more inclined
>> > to fix what was there than to replace it with commands that return
>> > gibberish and kill so many scripts so many people have written.
>>
> +10
>
>> That is, in fact, what the BSD people did.  On FreeBSD and OpenBSD,
>> for examples, modern ifconfig has fully functional IPv6 capability,
>> with parameters like (to pick just some at random) eui64, prefixlen,
>> auto_linklocal, autoconfprivacy, defaultif, and ifdisabled.
>
> So when do we get that ported and into debian, replacing this gibberish 
> generator call ip, so we can just get back to doing the things we want 
> to do with a computer?

Please feel free to port those improvements. If you are unable or
unwilling to do that, you will need to persuade or pay someone else to
do it for you.

-- 

Liam



Re: No ifconfig

2017-08-19 Thread Liam O'Toole
On 2017-08-19, Brian  wrote:

(...)

> network-mangler? This demonstrates a disdain for the work put into
> making networking comfortable on Debian. It also probably infers a
> lack of any deep understanding of how the software works.

s/infers/implies

Other than that, +1

-- 

Liam



Re: No ifconfig

2017-08-19 Thread Zenaan Harkness
On Sat, Aug 19, 2017 at 10:23:37AM -0400, Gene Heskett wrote:
> On Saturday 19 August 2017 09:30:10 Nicolas George wrote:
> 
> > Le duodi 2 fructidor, an CCXXV, Gene Heskett a écrit :
> > > So when do we get that ported and into debian, replacing this
> > > gibberish generator called ip, so we can just get back to doing the
> > > things we want to do with a computer?
> >
> > Never. Debian developers are not your lackeys.
> 
> I (in the first person sense) do not expect them to be, but when a change 
> is made, and its not an improvement the users can see, as evidenced by 
> the level and tone of rhetoric seen here about it, whatever "it" might 
> be, something decent docs would tamp down, I'd expect some adjustments 
> to be made.

> Either in the docs,

It's just doco, even other genders can do that, so by all means ...
feel free to help out.


> or the code.

It's just codind, even other genders can do that, so by all means ...
feel free to help out.


> I don't believe for a 
> millisecond the writers are trying to make life for the average user 
> harder, "we understand it, why can't you", but we aren't you, we don't 
> understand why a useful tool has been deprecated.
> 
> Cheers, Gene Heskett
> -- 
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Genes Web page 
> 



Re: No ifconfig

2017-08-19 Thread Gene Heskett
On Saturday 19 August 2017 15:38:14 Brian wrote:

> On Sat 19 Aug 2017 at 15:26:02 -0400, Gene Heskett wrote:
> > On Saturday 19 August 2017 14:57:46 Brian wrote:
> > > /etc/hosts files advocated? What is wrong with using avahi-demon?
> > > This is 2017.
> >
> > For starters, it seems not to want to use 192.168 addresses very
> > well.  I run it, but no clue what it does except assign the wrong
> > address to what it discovers.
> >
> > But my curiosity bump needed scratching, so I looked at
> > /etc/avahi/hosts, and the only machine/address it discovered is
> > correct, for my brother MFC's scanner.local.  The tabloid capable
> > printer in it is also at that address.  I looked at the manpage for
> > daemon.conf but have not looked at the file.  It seems to me that if
> > its to be usefull, it should detect everything in my local class D
> > block. There are from 4 to 6 other machines here, 4 others minimum. 
> > Why did it not detect them also? If its to be OOTB a substitute for
> > /etc/hosts, its not doing at all well.
>
> Cannot help you with the 192.168 addresses thing. But, given your
> curiosity bent, I think you could sort this out if you look at what
> /etc/hosts and avahi do. I've never need to alter /etc/avahi/hosts.

I know what etc/hosts is, but the instant question is "do I 
add /etc/avahi/hosts as a 3rd place to look for this data?, and if so, 
the expected syntax to use in my /etc/resolv.conf?" Currently:

# Generated by Gene Heskett
nameserver 192.168.71.1
search host,dns
domain coyote.den

Thanks Brian.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 



Re: No ifconfig

2017-08-19 Thread Brian
On Sat 19 Aug 2017 at 15:26:02 -0400, Gene Heskett wrote:

> On Saturday 19 August 2017 14:57:46 Brian wrote:
> 
> > /etc/hosts files advocated? What is wrong with using avahi-demon?
> > This is 2017.
> 
> For starters, it seems not to want to use 192.168 addresses very well.  I 
> run it, but no clue what it does except assign the wrong address to what 
> it discovers.
> 
> But my curiosity bump needed scratching, so I looked at /etc/avahi/hosts, 
> and the only machine/address it discovered is correct, for my brother 
> MFC's scanner.local.  The tabloid capable printer in it is also at that 
> address.  I looked at the manpage for daemon.conf but have not looked at 
> the file.  It seems to me that if its to be usefull, it should detect 
> everything in my local class D block. There are from 4 to 6 other 
> machines here, 4 others minimum.  Why did it not detect them also? If 
> its to be OOTB a substitute for /etc/hosts, its not doing at all well.

Cannot help you with the 192.168 addresses thing. But, given your
curiosity bent, I think you could sort this out if you look at what
/etc/hosts and avahi do. I've never need to alter /etc/avahi/hosts.

-- 
Brian. 



Re: No ifconfig

2017-08-19 Thread Gene Heskett
On Saturday 19 August 2017 14:57:46 Brian wrote:

> On Sat 19 Aug 2017 at 14:38:57 -0400, Gene Heskett wrote:
> > On Saturday 19 August 2017 10:49:57 Nicolas George wrote:
> > > Le duodi 2 fructidor, an CCXXV, Fungi4All a écrit :
> > > > >> Unless you are willing to pay more than n s a sys tem d red
> > > > >> hat and they can become "your" lackeys.
> > > > >
> > > > > Suggesting that the Debian developers who chose to use systemd
> > > > > did so because they are corrupt and were payed by RedHat
> > > > > instead is libelous and deeply insulting to them. I suggest
> > > > > you retract and apologize immediately.
> > > >
> > > > I am at the stage of awaiting for jury for that one (as in
> > > > Gene's signature order). I am way beyond soap bubbles.  But
> > > > don't take it personally, it is only politics.
> > >
> > > As far as I am concerned, the jury has already given its
> > > conclusions about you both, and I have decided to never give you
> > > any help whatsoever, unless you change your attitude dramatically.
> > > I suspect most helpful contributors on this list have already
> > > silently decided the same, or will do so soon if you continue
> > > insulting the Debian developers.
> >
> > This has already affected my willingness to help people having
> > trouble with network-mangler.
> >
> > For folks with a small SOHO network setup that involves the maximum
> > of 253 or so maximum addresses, the most dependable intermachine
> > method is identical /etc/hosts files, combined with an identical
> > /etc/resolv.conf on all machines.  You then setup an eth0 stanza
> > in /etc/network/interfaces that matches the name assigned to that
> > machine. Interfaces will look something like this:
> > =
> > auto lo
> >
> > # The loopback network interface
> > iface lo inet loopback
> > address 127.0.0.1
> > netmask 255.255.255.0
> >
> > auto eth0
> >
> > # regular network for coyote.den
> > iface eth0 inet static
> > address 192.168.xx.xx
> > netmask 255.255.255.0
> > gateway 192.168.xx.xx
> > =
> >
> > Substituting that machines address in place of the xx.xx
> > Shut down dhcpd as its not needed, nor is network-mangler.
> >
> > And the best part? It Just Works(TM).
> >
> > But I've caught so much static over preaching about a
> > non-network-mangler solution that is 90% less trouble to setup that
> > I have given up speaking up when to me that solution is the ideal
> > solution to their problems.
> >
> > So you can ignore me, and I'll ignore you, until you contradict me,
> > thereby adding to the poor OP's confusion.  Where your expertise
> > exceeds mine, I'll do the same.  Fair?
>
> Which "poor OP" are you referring to? It has been a long thread.
>
Heck of a good question Brian, it has indeed been a long thread, and my 
short term memory fails me.

> > > Anyway, I have no hope that you will understand my position, I
> > > post it to make it clear for other readers. No doubt you will
> > > answer this mail with another useless stunt. Please go ahead.
>
> network-mangler? This demonstrates a disdain for the work put into
> making networking comfortable on Debian. It also probably infers a
> lack of any deep understanding of how the software works.
>
> /etc/hosts files advocated? What is wrong with using avahi-demon?
> This is 2017.

For starters, it seems not to want to use 192.168 addresses very well.  I 
run it, but no clue what it does except assign the wrong address to what 
it discovers.

But my curiosity bump needed scratching, so I looked at /etc/avahi/hosts, 
and the only machine/address it discovered is correct, for my brother 
MFC's scanner.local.  The tabloid capable printer in it is also at that 
address.  I looked at the manpage for daemon.conf but have not looked at 
the file.  It seems to me that if its to be usefull, it should detect 
everything in my local class D block. There are from 4 to 6 other 
machines here, 4 others minimum.  Why did it not detect them also? If 
its to be OOTB a substitute for /etc/hosts, its not doing at all well.

Thanks Brian.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 



Re: No ifconfig

2017-08-19 Thread Brian
On Sat 19 Aug 2017 at 14:38:57 -0400, Gene Heskett wrote:

> On Saturday 19 August 2017 10:49:57 Nicolas George wrote:
> 
> > Le duodi 2 fructidor, an CCXXV, Fungi4All a écrit :
> > > >> Unless you are willing to pay more than n s a sys tem d red hat
> > > >> and they can become "your" lackeys.
> > > >
> > > > Suggesting that the Debian developers who chose to use systemd did
> > > > so because they are corrupt and were payed by RedHat instead is
> > > > libelous and deeply insulting to them. I suggest you retract and
> > > > apologize immediately.
> > >
> > > I am at the stage of awaiting for jury for that one (as in Gene's
> > > signature order). I am way beyond soap bubbles.  But don't take it
> > > personally, it is only politics.
> >
> > As far as I am concerned, the jury has already given its conclusions
> > about you both, and I have decided to never give you any help
> > whatsoever, unless you change your attitude dramatically. I suspect
> > most helpful contributors on this list have already silently decided
> > the same, or will do so soon if you continue insulting the Debian
> > developers.
> 
> This has already affected my willingness to help people having trouble 
> with network-mangler.
> 
> For folks with a small SOHO network setup that involves the maximum of 
> 253 or so maximum addresses, the most dependable intermachine method is 
> identical /etc/hosts files, combined with an identical /etc/resolv.conf 
> on all machines.  You then setup an eth0 stanza 
> in /etc/network/interfaces that matches the name assigned to that 
> machine. Interfaces will look something like this:
> =
> auto lo
> 
> # The loopback network interface
> iface lo inet loopback
> address 127.0.0.1
> netmask 255.255.255.0
> 
> auto eth0
> 
> # regular network for coyote.den
> iface eth0 inet static
> address 192.168.xx.xx
> netmask 255.255.255.0
> gateway 192.168.xx.xx
> =
> 
> Substituting that machines address in place of the xx.xx
> Shut down dhcpd as its not needed, nor is network-mangler.
> 
> And the best part? It Just Works(TM).
> 
> But I've caught so much static over preaching about a non-network-mangler 
> solution that is 90% less trouble to setup that I have given up speaking 
> up when to me that solution is the ideal solution to their problems.
> 
> So you can ignore me, and I'll ignore you, until you contradict me, 
> thereby adding to the poor OP's confusion.  Where your expertise exceeds 
> mine, I'll do the same.  Fair?

Which "poor OP" are you referring to? It has been a long thread.
 
> > Anyway, I have no hope that you will understand my position, I post it
> > to make it clear for other readers. No doubt you will answer this mail
> > with another useless stunt. Please go ahead.

network-mangler? This demonstrates a disdain for the work put into
making networking comfortable on Debian. It also probably infers a
lack of any deep understanding of how the software works.

/etc/hosts files advocated? What is wrong with using avahi-demon?
This is 2017.

-- 
Brian.



Re: No ifconfig

2017-08-19 Thread Gene Heskett
On Saturday 19 August 2017 10:49:57 Nicolas George wrote:

> Le duodi 2 fructidor, an CCXXV, Fungi4All a écrit :
> > >> Unless you are willing to pay more than n s a sys tem d red hat
> > >> and they can become "your" lackeys.
> > >
> > > Suggesting that the Debian developers who chose to use systemd did
> > > so because they are corrupt and were payed by RedHat instead is
> > > libelous and deeply insulting to them. I suggest you retract and
> > > apologize immediately.
> >
> > I am at the stage of awaiting for jury for that one (as in Gene's
> > signature order). I am way beyond soap bubbles.  But don't take it
> > personally, it is only politics.
>
> As far as I am concerned, the jury has already given its conclusions
> about you both, and I have decided to never give you any help
> whatsoever, unless you change your attitude dramatically. I suspect
> most helpful contributors on this list have already silently decided
> the same, or will do so soon if you continue insulting the Debian
> developers.

This has already affected my willingness to help people having trouble 
with network-mangler.

For folks with a small SOHO network setup that involves the maximum of 
253 or so maximum addresses, the most dependable intermachine method is 
identical /etc/hosts files, combined with an identical /etc/resolv.conf 
on all machines.  You then setup an eth0 stanza 
in /etc/network/interfaces that matches the name assigned to that 
machine. Interfaces will look something like this:
=
auto lo

# The loopback network interface
iface lo inet loopback
address 127.0.0.1
netmask 255.255.255.0

auto eth0

# regular network for coyote.den
iface eth0 inet static
address 192.168.xx.xx
netmask 255.255.255.0
gateway 192.168.xx.xx
=

Substituting that machines address in place of the xx.xx
Shut down dhcpd as its not needed, nor is network-mangler.

And the best part? It Just Works(TM).

But I've caught so much static over preaching about a non-network-mangler 
solution that is 90% less trouble to setup that I have given up speaking 
up when to me that solution is the ideal solution to their problems.

So you can ignore me, and I'll ignore you, until you contradict me, 
thereby adding to the poor OP's confusion.  Where your expertise exceeds 
mine, I'll do the same.  Fair?

> Anyway, I have no hope that you will understand my position, I post it
> to make it clear for other readers. No doubt you will answer this mail
> with another useless stunt. Please go ahead.


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 



Re: No ifconfig

2017-08-19 Thread Brian
On Sat 19 Aug 2017 at 10:23:37 -0400, Gene Heskett wrote:

> On Saturday 19 August 2017 09:30:10 Nicolas George wrote:
> 
> > Le duodi 2 fructidor, an CCXXV, Gene Heskett a écrit :
> > > So when do we get that ported and into debian, replacing this
> > > gibberish generator called ip, so we can just get back to doing the
> > > things we want to do with a computer?
> >
> > Never. Debian developers are not your lackeys.
> 
> I (in the first person sense) do not expect them to be, but when a change 
> is made, and its not an improvement the users can see, as evidenced by 
> the level and tone of rhetoric seen here about it, whatever "it" might 
> be, something decent docs would tamp down, I'd expect some adjustments 
> to be made. Either in the docs, or the code.  I don't believe for a 
> millisecond the writers are trying to make life for the average user 
> harder, "we understand it, why can't you", but we aren't you, we don't 
> understand why a useful tool has been deprecated.

I know this thread has been a long, interesting and involved one but it
included this:

 https://lists.debian.org/debian-user/2017/08/msg00798.html

To remind ourselves (about why net-tools is not in the base system):

 Indeed.  It shouldn't, and it doesn't anymore.  Maybe net-tools should
 be part of the *standard* system, but it certainly does not belong to
 the *base* system anymore.

Continuing:

 It is broken in that it just *can't* handle the Linux networking stack
 except for the bare minimum functionality on IPv4 (no, it doesn't meet
 even the bare minimum for IPv6), and the only reason we had to keep it
 around by default (consistent output that some scripts scrapped) was
 broken by GNU upstream when it took ifconfig out of the bit-rot pit hell
 and started maintaining it again.

A minor effort in research comes up with a posting from 2009:

 https://lists.debian.org/debian-devel/2009/03/msg00780.html

 Luk Claes and me, as the current maintainers of net-tools, we've been
 thinking about it's future. Net-tools has been a core part of Debian and
 any other linux based distro for many years, but it's showing its age.

 It doesnt support many of the modern features of the linux kernel, the
 interface is far from optimal and difficult to use in automatisation,
 and also, it hasn't got much love in the last years.

The average user has to get their head round this (without invoking "I
have eated my potatos mashed for the past thirty years") to understand
why net-tools has been deprecated. And, of course, "deprecated" does not
bar a user from installing the net-tools package. You know what? Both
could be used. Ease yourself in!

Quality of documentation in the iproute2 package? File bugs. (With
patches).

HowILearnedtoStopWorryingandLovetheiproute2Package sounds like a decent
wiki title. It could have loads of examples and contrasts with ifconfig
based on the knowledgeable contributions in this thread. Any takers (he
says, not holding his breath).

-- 
Brian.



Re: No ifconfig

2017-08-19 Thread Nicolas George
Le duodi 2 fructidor, an CCXXV, Fungi4All a écrit :
> >> Unless you are willing to pay more than n s a sys tem d red hat and they 
> >> can
> >> become "your" lackeys.

> > Suggesting that the Debian developers who chose to use systemd did so
> > because they are corrupt and were payed by RedHat instead is libelous
> > and deeply insulting to them. I suggest you retract and apologize
> > immediately.

> I am at the stage of awaiting for jury for that one (as in Gene's signature 
> order).
> I am way beyond soap bubbles.  But don't take it personally, it is only 
> politics.

As far as I am concerned, the jury has already given its conclusions
about you both, and I have decided to never give you any help
whatsoever, unless you change your attitude dramatically. I suspect most
helpful contributors on this list have already silently decided the
same, or will do so soon if you continue insulting the Debian
developers.

Anyway, I have no hope that you will understand my position, I post it
to make it clear for other readers. No doubt you will answer this mail
with another useless stunt. Please go ahead.

-- 
  Nicolas George



Re: No ifconfig

2017-08-19 Thread Nicolas George
Le duodi 2 fructidor, an CCXXV, Fungi4All a écrit :
> Unless you are willing to pay more than n s a sys tem d red hat and they can
> become "your" lackeys.

Suggesting that the Debian developers who chose to use systemd did so
because they are corrupt and were payed by RedHat instead is libelous
and deeply insulting to them. I suggest you retract and apologize
immediately.

-- 
  Nicolas George



Re: No ifconfig

2017-08-19 Thread Fungi4All
> From: geo...@nsup.org
> To: Fungi4All 
> debian-user@lists.debian.org , Gene Heskett 
> 
>
> Le duodi 2 fructidor, an CCXXV, Fungi4All a écrit :
>> Unless you are willing to pay more than n s a sys tem d red hat and they can
>> become "your" lackeys.
>
> Suggesting that the Debian developers who chose to use systemd did so
> because they are corrupt and were payed by RedHat instead is libelous
> and deeply insulting to them. I suggest you retract and apologize
> immediately.

I am at the stage of awaiting for jury for that one (as in Gene's signature 
order).
I am way beyond soap bubbles.  But don't take it personally, it is only 
politics.

> --
> Nicolas George

Re: No ifconfig

2017-08-19 Thread Gene Heskett
On Saturday 19 August 2017 09:30:10 Nicolas George wrote:

> Le duodi 2 fructidor, an CCXXV, Gene Heskett a écrit :
> > So when do we get that ported and into debian, replacing this
> > gibberish generator called ip, so we can just get back to doing the
> > things we want to do with a computer?
>
> Never. Debian developers are not your lackeys.

I (in the first person sense) do not expect them to be, but when a change 
is made, and its not an improvement the users can see, as evidenced by 
the level and tone of rhetoric seen here about it, whatever "it" might 
be, something decent docs would tamp down, I'd expect some adjustments 
to be made. Either in the docs, or the code.  I don't believe for a 
millisecond the writers are trying to make life for the average user 
harder, "we understand it, why can't you", but we aren't you, we don't 
understand why a useful tool has been deprecated.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 



Re: No ifconfig

2017-08-19 Thread Fungi4All
> From: fungil...@protonmail.com
> To: debian-user@lists.debian.org 
> Gene Heskett 
>
>> From: geo...@nsup.org
>> To: Gene Heskett 
>> debian-user@lists.debian.org
>>
>> Le duodi 2 fructidor, an CCXXV, Gene Heskett a écrit :
>>> So when do we get that ported and into debian, replacing this gibberish
>>> generator call ip, so we can just get back to doing the things we want
>>> to do with a computer?
>>
>> Never. Debian developers are not your lackeys.
>
> Unless you are willing to pay more than n s a sys tem d red hat and they can
> become "your" lackeys.
>
>> Nicolas George

Or at least that is what this video says: 
[https://sysdfree.wordpress.com/113](https://sysdfree.wordpress.com/2017/08/17/113/)

Re: No ifconfig

2017-08-19 Thread Fungi4All
> From: geo...@nsup.org
> To: Gene Heskett 
> debian-user@lists.debian.org
>
> Le duodi 2 fructidor, an CCXXV, Gene Heskett a écrit :
>> So when do we get that ported and into debian, replacing this gibberish
>> generator call ip, so we can just get back to doing the things we want
>> to do with a computer?
>
> Never. Debian developers are not your lackeys.

Unless you are willing to pay more than n s a sys tem d red hat and they can
become "your" lackeys.

> Nicolas George

Re: No ifconfig

2017-08-19 Thread Nicolas George
Le duodi 2 fructidor, an CCXXV, Gene Heskett a écrit :
> So when do we get that ported and into debian, replacing this gibberish 
> generator call ip, so we can just get back to doing the things we want 
> to do with a computer?

Never. Debian developers are not your lackeys.

-- 
  Nicolas George



Re: No ifconfig

2017-08-19 Thread Gene Heskett
On Saturday 19 August 2017 04:15:42 Jonathan de Boyne Pollard wrote:

> Glenn English:
> > I've written many scripts over the years, using ifconfig and others,
> > and having everything broken now is a major PITA.
> >
> > I very much agree that sysV init and those old commands were a mess,
> > especially with the introduction of ipv6. But I'd have more inclined
> > to fix what was there than to replace it with commands that return
> > gibberish and kill so many scripts so many people have written.
>
+10

> That is, in fact, what the BSD people did.  On FreeBSD and OpenBSD,
> for examples, modern ifconfig has fully functional IPv6 capability,
> with parameters like (to pick just some at random) eui64, prefixlen,
> auto_linklocal, autoconfprivacy, defaultif, and ifdisabled.

So when do we get that ported and into debian, replacing this gibberish 
generator call ip, so we can just get back to doing the things we want 
to do with a computer?

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig

2017-08-19 Thread Henrique de Moraes Holschuh
On Sat, 19 Aug 2017, Jonathan de Boyne Pollard wrote:
> Henrique de Moraes Holschuh:
> > [...] and the only reason we had to keep it around by default [...] was
> > broken by GNU upstream when it took ifconfig out of the bit-rot pit hell
> > and started maintaining it again.
> 
> net-tools is not a GNU Software package.

Hmm, indeed it isn't.  I apologise for the mistake.

-- 
  Henrique Holschuh



Re: No ifconfig

2017-08-19 Thread Zenaan Harkness
On Sat, Aug 19, 2017 at 09:15:42AM +0100, Jonathan de Boyne Pollard wrote:
> Glenn English:
> 
> > I've written many scripts over the years, using ifconfig and others, and 
> > having everything broken now is a major
> > PITA.
> > 
> > I very much agree that sysV init and those old commands were a mess, 
> > especially with the introduction of ipv6. But
> > I'd have more inclined to fix what was there than to replace it with 
> > commands that return gibberish and kill so
> > many scripts so many people have written.
> > 
> 
> That is, in fact, what the BSD people did.  On FreeBSD and OpenBSD, for 
> examples, modern ifconfig has fully functional
> IPv6 capability, with parameters like (to pick just some at random) eui64, 
> prefixlen, auto_linklocal, autoconfprivacy,
> defaultif, and ifdisabled.

Perhaps Devuan would better suit you? - they keep sysvinit as
primary, saving you the hassle of updating/ rewriting your scripts
and/ or learning systemd.

Or as you mention, FreeBSD or OpenBSD?

There is no shortage of options.



Re: No ifconfig

2017-08-19 Thread Jonathan de Boyne Pollard

Glenn English:

I've written many scripts over the years, using ifconfig and others, 
and having everything broken now is a major PITA.


I very much agree that sysV init and those old commands were a mess, 
especially with the introduction of ipv6. But I'd have more inclined 
to fix what was there than to replace it with commands that return 
gibberish and kill so many scripts so many people have written.




That is, in fact, what the BSD people did.  On FreeBSD and OpenBSD, for 
examples, modern ifconfig has fully functional IPv6 capability, with 
parameters like (to pick just some at random) eui64, prefixlen, 
auto_linklocal, autoconfprivacy, defaultif, and ifdisabled.




No ifconfig

2017-08-19 Thread Jonathan de Boyne Pollard

Henrique de Moraes Holschuh:
[...] and the only reason we had to keep it around by default [...] 
was broken by GNU upstream when it took ifconfig out of the bit-rot 
pit hell and started maintaining it again.


net-tools is not a GNU Software package.

* https://sourceforge.net/projects/net-tools/

* https://www.gnu.org/software/software.html



Re: Re: Re: No ifconfig [Was: no /etc/inittab]

2017-08-16 Thread Clive Standbridge

>  Much less was I trying to criticize you,

Oh I didn't think you were :-)


> Just trying to raise awareness about (the few) shell variation idiosyncracies
> I know about, to help making people's lives easier.

Sounds good to me.

-- 
Cheers,
Clive



Re: Re: No ifconfig [Was: no /etc/inittab]

2017-08-16 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Aug 16, 2017 at 02:56:01PM +0100, Clive Standbridge wrote:
> 
> > The "declare", OTOH, is pretty Bashist. But it can be replaced by
> > a simple "echo":
> 
> True. It was just a convenient way of showing that the variable hadn't
> absorbed any white space. 

Understood. Please, don't get me wrong -- I'm not an anti-Bashist, by
far (on the contrary, I'm a fan of Bash and some of its features,
actually). Much less was I trying to criticize you, who provided that
nifty script in the first place.

Just trying to raise awareness about (the few) shell variation idiosyncracies
I know about, to help making people's lives easier.

> Besides, I was just picking up the "Bash can't do it" gauntlet. I'd
> often prefer awk in such a situation (like Erik and Greg have
> mentioned).

Uh, oh. Bash can do quite a lot of things :-)

Cheers
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlmUWSMACgkQBcgs9XrR2kbkGgCfZTPk07MqjQza0MCbS4KnWojp
VokAnjyBNWqZ0Jx5DSYwxK69vm5XRfhG
=juko
-END PGP SIGNATURE-



Re: Re: No ifconfig [Was: no /etc/inittab]

2017-08-16 Thread Clive Standbridge

> The "declare", OTOH, is pretty Bashist. But it can be replaced by
> a simple "echo":

True. It was just a convenient way of showing that the variable hadn't
absorbed any white space. 

Besides, I was just picking up the "Bash can't do it" gauntlet. I'd
often prefer awk in such a situation (like Erik and Greg have
mentioned).

-- 
Cheers,
Clive



Re: No ifconfig [Was: no /etc/inittab]

2017-08-16 Thread Greg Wooledge
On Wed, Aug 16, 2017 at 11:58:06AM +0200, to...@tuxteam.de wrote:
>   oldIFS="$IFS"; IFS=': '; ip -o link | while read num interface other;
> do echo "$interface"; done; IFS="$oldIFS" 

ip -o link | while IFS=' :' read -r _ i _; do echo "<$i>"; done

There's no need to set IFS globally and then attempt to restore it,
especially since "restoring" it fails if it was previously unset.
Just set it for the duration of the read command.

The alternative is to make IFS local, within a function:

foo() {
  local IFS=' :'
  ip -o link | while read -r _ i _; do echo "<$i>"; done
}
foo

But once again, this is overkill, when IFS only needs to be modified in
the execution environment of the read command.  (Also less portable,
because POSIX shell functions don't necessarily have "local".)



Re: No ifconfig [Was: no /etc/inittab]

2017-08-16 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wed, Aug 16, 2017 at 04:58:24AM -0400, Gene Heskett wrote:
> On Wednesday 16 August 2017 03:28:43 Clive Standbridge wrote:
> 
> > oldIFS="$IFS"; IFS=': '; ip -o link | while read num interface other;
> > do declare -p interface; done; IFS="$oldIFS"
> 
> Now thats an interesting bit of bashism, and deeper into it than I have 
> waded. But for this local network, I know what they are so I can't think 
> of a situation that would make me use it.  But it may well be useful in 
> the future, so the message is marked to protect it from the expiry 
> rules.

Nice idiomatic little script.

Changing the input field separator (IFS) to parse lines is actually a
shell classic and should work on most shells (I just tested with dash),

The "declare", OTOH, is pretty Bashist. But it can be replaced by
a simple "echo":

This should be more portable (at least across the Bourne family):

  oldIFS="$IFS"; IFS=': '; ip -o link | while read num interface other;
do echo "$interface"; done; IFS="$oldIFS" 

Cheers
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlmUFy4ACgkQBcgs9XrR2kaO0gCePvWrmGWeOv8KNGjLrrI2o2GO
cZ4An1lJ/2IVkGKF4Gc/nfyVa/0vV75M
=nic4
-END PGP SIGNATURE-



Re: No ifconfig [Was: no /etc/inittab]

2017-08-16 Thread Gene Heskett
On Wednesday 16 August 2017 03:28:43 Clive Standbridge wrote:

> oldIFS="$IFS"; IFS=': '; ip -o link | while read num interface other;
> do declare -p interface; done; IFS="$oldIFS"

Now thats an interesting bit of bashism, and deeper into it than I have 
waded. But for this local network, I know what they are so I can't think 
of a situation that would make me use it.  But it may well be useful in 
the future, so the message is marked to protect it from the expiry 
rules.

Thank you Clive.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 



Re: Re: No ifconfig [Was: no /etc/inittab]

2017-08-16 Thread Clive Standbridge

> wooledg:~$ ip -o link | awk -F": " '{print $2}'
> lo
> eth0
> 
> The only other scripting language I know that can do splitting with
> multi-character separators is perl.
> 
> wooledg:~$ ip -o link | perl -ne '@x=split(/: /); print $x[1], "\n"'
> lo
> eth0
> 
> Bash and Tcl can't do it, at least not with their native toolsets.

Bash can, e.g.

$ oldIFS="$IFS"; IFS=': '; ip -o link | while read num interface other; do 
declare -p interface; done; IFS="$oldIFS"
declare -- interface="lo"
declare -- interface="eth0"
declare -- interface="br0"
declare -- interface="vethJWC4DL"


-- 
Cheers,
Clive



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread David Wright
On Tue 15 Aug 2017 at 21:49:31 (-0400), Gene Heskett wrote:
> On Tuesday 15 August 2017 15:28:32 David Wright wrote:
> 
> > On Tue 15 Aug 2017 at 14:48:50 (-0400), Gene Heskett wrote:
> > > On Tuesday 15 August 2017 14:00:50 Brian wrote:
> > > > On Tue 15 Aug 2017 at 13:46:20 -0400, Gene Heskett wrote:
> > > > > On Tuesday 15 August 2017 13:07:38 David Wright wrote:
> > > > > > On Tue 15 Aug 2017 at 11:23:41 (-0400), Gene Heskett wrote:
> > > > > > > On Tuesday 15 August 2017 07:33:53 Nicolas George wrote:
> > > > > > > > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a 
> écrit :
> > > > > > > > > If it's no longer part of the base system, then perhaps
> > > > > > > > > the system is too base?
> > > > > > > >
> > > > > > > > Please ellaborate. Why should ifconfig be part of the base
> > > > > > > > system?
> > > > > > > >
> > > > > > > > Regards,
> > > > > > >
> > > > > > > Because ip is a pain in the ass to make it run, and still
> > > > > > > gives grossly incomplete information?
> > > > > > >
> > > > > > > In 2 years, I have yet to get a full network report out of
> > > > > > > ip such as ifconfig gives.
> > > > > >
> > > > > > Does   ip addr ; ip -s link   not work for you?
> > > > > >
> > > > > > Cheers,
> > > > > > David.
> > > > >
> > > > > It could I suppose, but thats also an extra 4" of useless fluff
> > > > > on my high res screen.
> > > >
> > > > You really wanted to say "yes" to your problem of two years
> > > > standing being solved, didn't you? But it goes against the grain.
> > > > :)
> > >
> > > I would not go out on that limb and saw it off behind me, but if it
> > > had more labels on the output, it could be helpfull.  For instance
> > > what does this line in its output for eth0 tell me, and where did it
> > > get those numbers?
> > >
> > >inet6 fe80::21f:c6ff:fe62:fcbb/64 scope link
> > >
> > > Compared to the ifconfig eth0 output, that looks to be derived from
> > > its MAC address, but how is such a determination thats its a
> > > globally unique address determined? Anyone can cause a MAC address
> > > to be spoofed. I am doing it myself so that I can change routers
> > > without loseing my ipv4 address, registered at namecheap.
> >
> > That's the ip6 address I just mentioned, which I use to connect
> > machines and short-circuit the wireless legs. As you have gathered,
> > it's just "there" for you to use, eg
> >
> >  scp -p  @[fe80::21f:c6ff:fe62:fcbb%eth0]:/tmp/
> >
> It worked after suitable customizations, but that does seem to be a 
> needlessly complex bit of cli magic to remember with all the years on my 
> wet ram.

Remember? No, I just edited a line out of one of my bash functions.
For host foo,foo files…   transfers files with scp to the same
point in foo's filesystem tree; given no files, it logs in to foo via
ssh instead;   foo-tmp files…   transfers files to foo's /tmp. All
this by the normal ip4 route.   6foo…   duplicates these functions
but over the ip6 link by replacing the usual hostname as above.

> > would transfer _to_ the machine mentioned above _from_ the
> > connected machine's eth0. Another advantage is that you don't have
> > to disturb your normal network configuration on a different
> > interface (ie wlan0 in my case, but it could be another nic).

Cheers,
David.



Re: No ifconfig

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 16:01:25 Curt wrote:

> On 2017-08-15, Gene Heskett <ghesk...@shentel.net> wrote:
> >> > > If this still isn't what you want, tell us what you *do* want.
> >> >
> >> > An ifconfig style output by default.
> >>
> >> Then why not use ifconfig?
> >
> > Of course I do, since ipv4 is the local method.
>
> But it's deprecated and is no longer provided in the b...
>
> Boys, I think we've come full circle and have dutifully arrived
> exactly where we started.
>
> As I bought a round-trip ticket I ain't complaining.
>
> Say good night, Gracie.

Good night, George.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 15:46:15 Brian wrote:

> On Tue 15 Aug 2017 at 14:53:39 -0400, Gene Heskett wrote:
> > On Tuesday 15 August 2017 14:19:37 David Wright wrote:
> > > On Tue 15 Aug 2017 at 13:24:56 (-0400), Gene Heskett wrote:
> > > > On Tuesday 15 August 2017 10:48:12 Nicolas George wrote:
> > > > > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > > > > > Around 30 years of familiarity across many *nix flavours.
> > > > >
> > > > > You said it: the only superiority of ifconfig over iproute2 is
> > > > > tradition and familiarity of long-time users. On the other
> > > > > hand, ifconfig is technically inferior on most if not all
> > > > > points.
> > > > >
> > > > > I hope you realize that traditions and familiarity of old
> > > > > geezers can only go so far to justify the evolution or
> > > > > non-evolution of a system. Otherwise, we still would have ed
> > > > > in the base system.
> > > > >
> > > > > Regards,
> > > >
> > > > Nicolas: The nearest ipv6 address to me is likely 150 miles
> > > > north, in Pittsburgh PA. Its all ipv4 here in WV AFAIK.
> > >
> > > Odd, the nearest to me is underneath the table. I use 6 a lot,
> > > as a cat5 cable is much faster than two legs of weak wireless
> > > to the router and back. And it requires no configuration—it's
> > > just there.
> > >
> > > Cheers,
> > > David.
> >
> > Thats a bridge I'll cross, if it gets here before I miss morning
> > roll call. :)
>
> If you do, you'll be on a charge. :)

Around here, the ovens only get lit for cash.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 15:28:32 David Wright wrote:

> On Tue 15 Aug 2017 at 14:48:50 (-0400), Gene Heskett wrote:
> > On Tuesday 15 August 2017 14:00:50 Brian wrote:
> > > On Tue 15 Aug 2017 at 13:46:20 -0400, Gene Heskett wrote:
> > > > On Tuesday 15 August 2017 13:07:38 David Wright wrote:
> > > > > On Tue 15 Aug 2017 at 11:23:41 (-0400), Gene Heskett wrote:
> > > > > > On Tuesday 15 August 2017 07:33:53 Nicolas George wrote:
> > > > > > > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a 
écrit :
> > > > > > > > If it's no longer part of the base system, then perhaps
> > > > > > > > the system is too base?
> > > > > > >
> > > > > > > Please ellaborate. Why should ifconfig be part of the base
> > > > > > > system?
> > > > > > >
> > > > > > > Regards,
> > > > > >
> > > > > > Because ip is a pain in the ass to make it run, and still
> > > > > > gives grossly incomplete information?
> > > > > >
> > > > > > In 2 years, I have yet to get a full network report out of
> > > > > > ip such as ifconfig gives.
> > > > >
> > > > > Does   ip addr ; ip -s link   not work for you?
> > > > >
> > > > > Cheers,
> > > > > David.
> > > >
> > > > It could I suppose, but thats also an extra 4" of useless fluff
> > > > on my high res screen.
> > >
> > > You really wanted to say "yes" to your problem of two years
> > > standing being solved, didn't you? But it goes against the grain.
> > > :)
> >
> > I would not go out on that limb and saw it off behind me, but if it
> > had more labels on the output, it could be helpfull.  For instance
> > what does this line in its output for eth0 tell me, and where did it
> > get those numbers?
> >
> >inet6 fe80::21f:c6ff:fe62:fcbb/64 scope link
> >
> > Compared to the ifconfig eth0 output, that looks to be derived from
> > its MAC address, but how is such a determination thats its a
> > globally unique address determined? Anyone can cause a MAC address
> > to be spoofed. I am doing it myself so that I can change routers
> > without loseing my ipv4 address, registered at namecheap.
>
> That's the ip6 address I just mentioned, which I use to connect
> machines and short-circuit the wireless legs. As you have gathered,
> it's just "there" for you to use, eg
>
>  scp -p  @[fe80::21f:c6ff:fe62:fcbb%eth0]:/tmp/
>
It worked after suitable customizations, but that does seem to be a 
needlessly complex bit of cli magic to remember with all the years on my 
wet ram.

> would transfer _to_ the machine mentioned above _from_ the
> connected machine's eth0. Another advantage is that you don't have
> to disturb your normal network configuration on a different
> interface (ie wlan0 in my case, but it could be another nic).
>
> Cheers,
> David.


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 15:23:44 Brian wrote:

> On Tue 15 Aug 2017 at 14:48:50 -0400, Gene Heskett wrote:
> > On Tuesday 15 August 2017 14:00:50 Brian wrote:
> > > On Tue 15 Aug 2017 at 13:46:20 -0400, Gene Heskett wrote:
> > > > On Tuesday 15 August 2017 13:07:38 David Wright wrote:
> > > > > On Tue 15 Aug 2017 at 11:23:41 (-0400), Gene Heskett wrote:
> > > > > > On Tuesday 15 August 2017 07:33:53 Nicolas George wrote:
> > > > > > > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a 
écrit :
> > > > > > > > If it's no longer part of the base system, then perhaps
> > > > > > > > the system is too base?
> > > > > > >
> > > > > > > Please ellaborate. Why should ifconfig be part of the base
> > > > > > > system?
> > > > > > >
> > > > > > > Regards,
> > > > > >
> > > > > > Because ip is a pain in the ass to make it run, and still
> > > > > > gives grossly incomplete information?
> > > > > >
> > > > > > In 2 years, I have yet to get a full network report out of
> > > > > > ip such as ifconfig gives.
> > > > >
> > > > > Does   ip addr ; ip -s link   not work for you?
> > > > >
> > > > > Cheers,
> > > > > David.
> > > >
> > > > It could I suppose, but thats also an extra 4" of useless fluff
> > > > on my high res screen.
> > >
> > > You really wanted to say "yes" to your problem of two years
> > > standing being solved, didn't you? But it goes against the grain.
> > > :)
> >
> > I would not go out on that limb and saw it off behind me,
>
> Deconstruction: I *can* get a full network report out of ip but am not
> going to admit it. Instead, I'll throw some chaff around as a
> diversion.
>
> > but if it
> > had more labels on the output, it could be helpfull.  For instance
> > what does this line in its output for eth0 tell me, and where did it
> > get those numbers?
> >
> >inet6 fe80::21f:c6ff:fe62:fcbb/64 scope link
>
> The same place ifconfig got them from,
>
> > Compared to the ifconfig eth0 output, that looks to be derived from
> > its MAC address, but how is such a determination thats its a
> > globally unique address determined? Anyone can cause a MAC address
> > to be spoofed. I am doing it myself so that I can change routers
> > without loseing my ipv4 address, registered at namecheap.
>
> Deconstruction: Look out! More chaff.

If you want to see it that way, I can't stop you, but I have a netgear 
router I can use as my gatekeeper since both are running dd-wrt, but the 
netgear is telling the whole world its a Buffalo NetFinity from the MAC 
address its using. So the possibility is there, whether you want to 
admit it or not is entirely up to you.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig

2017-08-15 Thread Curt
On 2017-08-15, Gene Heskett <ghesk...@shentel.net> wrote:
>> > >
>> > > If this still isn't what you want, tell us what you *do* want.
>> >
>> > An ifconfig style output by default.
>>
>> Then why not use ifconfig?
>
> Of course I do, since ipv4 is the local method.
>>

But it's deprecated and is no longer provided in the b...

Boys, I think we've come full circle and have dutifully arrived exactly where
we started. 

As I bought a round-trip ticket I ain't complaining.

Say good night, Gracie.

-- 
"Until the Lion learns to write, tales of the hunt shall always glorify the 
Hunter."
— African proverb





Re: No ifconfig

2017-08-15 Thread Brian
On Tue 15 Aug 2017 at 14:51:48 -0400, Gene Heskett wrote:

> On Tuesday 15 August 2017 14:16:15 David Wright wrote:
> 
> > On Tue 15 Aug 2017 at 13:49:23 (-0400), Gene Heskett wrote:
> > > On Tuesday 15 August 2017 13:46:37 Greg Wooledge wrote:
> > > > On Tue, Aug 15, 2017 at 01:41:16PM -0400, Gene Heskett wrote:
> > > > > While STILL not giving me the local ipv4 addresses and netmasks
> > > > > of those interfaces.
> > > >
> > > > If you want the IPv4 address, netmask, and transfer stats, try:
> > > >
> > > > ip -s addr
> > > >
> > > > Note that the netmask is shown in CIDR notation (e.g. /23) rather
> > > > than dotted quad notation (e.g. 255.255.254.0).
> > > >
> > > > If this still isn't what you want, tell us what you *do* want.
> > >
> > > An ifconfig style output by default.
> >
> > Then why not use ifconfig?
> 
> Of course I do, since ipv4 is the local method.

Style over content is the way to go.

-- 
Brian.



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Brian
On Tue 15 Aug 2017 at 14:53:39 -0400, Gene Heskett wrote:

> On Tuesday 15 August 2017 14:19:37 David Wright wrote:
> 
> > On Tue 15 Aug 2017 at 13:24:56 (-0400), Gene Heskett wrote:
> > > On Tuesday 15 August 2017 10:48:12 Nicolas George wrote:
> > > > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > > > > Around 30 years of familiarity across many *nix flavours.
> > > >
> > > > You said it: the only superiority of ifconfig over iproute2 is
> > > > tradition and familiarity of long-time users. On the other hand,
> > > > ifconfig is technically inferior on most if not all points.
> > > >
> > > > I hope you realize that traditions and familiarity of old geezers
> > > > can only go so far to justify the evolution or non-evolution of a
> > > > system. Otherwise, we still would have ed in the base system.
> > > >
> > > > Regards,
> > >
> > > Nicolas: The nearest ipv6 address to me is likely 150 miles north,
> > > in Pittsburgh PA. Its all ipv4 here in WV AFAIK.
> >
> > Odd, the nearest to me is underneath the table. I use 6 a lot,
> > as a cat5 cable is much faster than two legs of weak wireless
> > to the router and back. And it requires no configuration—it's
> > just there.
> >
> > Cheers,
> > David.
> 
> Thats a bridge I'll cross, if it gets here before I miss morning roll 
> call. :)

If you do, you'll be on a charge. :)

-- 
Brian.



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread David Wright
On Tue 15 Aug 2017 at 14:48:50 (-0400), Gene Heskett wrote:
> On Tuesday 15 August 2017 14:00:50 Brian wrote:
> 
> > On Tue 15 Aug 2017 at 13:46:20 -0400, Gene Heskett wrote:
> > > On Tuesday 15 August 2017 13:07:38 David Wright wrote:
> > > > On Tue 15 Aug 2017 at 11:23:41 (-0400), Gene Heskett wrote:
> > > > > On Tuesday 15 August 2017 07:33:53 Nicolas George wrote:
> > > > > > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > > > > > > If it's no longer part of the base system, then perhaps the
> > > > > > > system is too base?
> > > > > >
> > > > > > Please ellaborate. Why should ifconfig be part of the base
> > > > > > system?
> > > > > >
> > > > > > Regards,
> > > > >
> > > > > Because ip is a pain in the ass to make it run, and still gives
> > > > > grossly incomplete information?
> > > > >
> > > > > In 2 years, I have yet to get a full network report out of ip
> > > > > such as ifconfig gives.
> > > >
> > > > Does   ip addr ; ip -s link   not work for you?
> > > >
> > > > Cheers,
> > > > David.
> > >
> > > It could I suppose, but thats also an extra 4" of useless fluff on
> > > my high res screen.
> >
> > You really wanted to say "yes" to your problem of two years standing
> > being solved, didn't you? But it goes against the grain. :)
> 
> I would not go out on that limb and saw it off behind me, but if it had 
> more labels on the output, it could be helpfull.  For instance what does 
> this line in its output for eth0 tell me, and where did it get those 
> numbers?
> 
>inet6 fe80::21f:c6ff:fe62:fcbb/64 scope link 
> 
> Compared to the ifconfig eth0 output, that looks to be derived from its 
> MAC address, but how is such a determination thats its a globally unique 
> address determined? Anyone can cause a MAC address to be spoofed. I am 
> doing it myself so that I can change routers without loseing my ipv4 
> address, registered at namecheap.

That's the ip6 address I just mentioned, which I use to connect
machines and short-circuit the wireless legs. As you have gathered,
it's just "there" for you to use, eg

 scp -p  @[fe80::21f:c6ff:fe62:fcbb%eth0]:/tmp/

would transfer _to_ the machine mentioned above _from_ the
connected machine's eth0. Another advantage is that you don't have
to disturb your normal network configuration on a different
interface (ie wlan0 in my case, but it could be another nic).

Cheers,
David.



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Brian
On Tue 15 Aug 2017 at 14:48:50 -0400, Gene Heskett wrote:

> On Tuesday 15 August 2017 14:00:50 Brian wrote:
> 
> > On Tue 15 Aug 2017 at 13:46:20 -0400, Gene Heskett wrote:
> > > On Tuesday 15 August 2017 13:07:38 David Wright wrote:
> > > > On Tue 15 Aug 2017 at 11:23:41 (-0400), Gene Heskett wrote:
> > > > > On Tuesday 15 August 2017 07:33:53 Nicolas George wrote:
> > > > > > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > > > > > > If it's no longer part of the base system, then perhaps the
> > > > > > > system is too base?
> > > > > >
> > > > > > Please ellaborate. Why should ifconfig be part of the base
> > > > > > system?
> > > > > >
> > > > > > Regards,
> > > > >
> > > > > Because ip is a pain in the ass to make it run, and still gives
> > > > > grossly incomplete information?
> > > > >
> > > > > In 2 years, I have yet to get a full network report out of ip
> > > > > such as ifconfig gives.
> > > >
> > > > Does   ip addr ; ip -s link   not work for you?
> > > >
> > > > Cheers,
> > > > David.
> > >
> > > It could I suppose, but thats also an extra 4" of useless fluff on
> > > my high res screen.
> >
> > You really wanted to say "yes" to your problem of two years standing
> > being solved, didn't you? But it goes against the grain. :)
> 
> I would not go out on that limb and saw it off behind me,

Deconstruction: I *can* get a full network report out of ip but am not
going to admit it. Instead, I'll throw some chaff around as a diversion.

> but if it had 
> more labels on the output, it could be helpfull.  For instance what does 
> this line in its output for eth0 tell me, and where did it get those 
> numbers?
> 
>inet6 fe80::21f:c6ff:fe62:fcbb/64 scope link

The same place ifconfig got them from,

> Compared to the ifconfig eth0 output, that looks to be derived from its 
> MAC address, but how is such a determination thats its a globally unique 
> address determined? Anyone can cause a MAC address to be spoofed. I am 
> doing it myself so that I can change routers without loseing my ipv4 
> address, registered at namecheap.

Deconstruction: Look out! More chaff.

-- 
Brian.



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 14:19:37 David Wright wrote:

> On Tue 15 Aug 2017 at 13:24:56 (-0400), Gene Heskett wrote:
> > On Tuesday 15 August 2017 10:48:12 Nicolas George wrote:
> > > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > > > Around 30 years of familiarity across many *nix flavours.
> > >
> > > You said it: the only superiority of ifconfig over iproute2 is
> > > tradition and familiarity of long-time users. On the other hand,
> > > ifconfig is technically inferior on most if not all points.
> > >
> > > I hope you realize that traditions and familiarity of old geezers
> > > can only go so far to justify the evolution or non-evolution of a
> > > system. Otherwise, we still would have ed in the base system.
> > >
> > > Regards,
> >
> > Nicolas: The nearest ipv6 address to me is likely 150 miles north,
> > in Pittsburgh PA. Its all ipv4 here in WV AFAIK.
>
> Odd, the nearest to me is underneath the table. I use 6 a lot,
> as a cat5 cable is much faster than two legs of weak wireless
> to the router and back. And it requires no configuration—it's
> just there.
>
> Cheers,
> David.

Thats a bridge I'll cross, if it gets here before I miss morning roll 
call. :)

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 14:16:15 David Wright wrote:

> On Tue 15 Aug 2017 at 13:49:23 (-0400), Gene Heskett wrote:
> > On Tuesday 15 August 2017 13:46:37 Greg Wooledge wrote:
> > > On Tue, Aug 15, 2017 at 01:41:16PM -0400, Gene Heskett wrote:
> > > > While STILL not giving me the local ipv4 addresses and netmasks
> > > > of those interfaces.
> > >
> > > If you want the IPv4 address, netmask, and transfer stats, try:
> > >
> > > ip -s addr
> > >
> > > Note that the netmask is shown in CIDR notation (e.g. /23) rather
> > > than dotted quad notation (e.g. 255.255.254.0).
> > >
> > > If this still isn't what you want, tell us what you *do* want.
> >
> > An ifconfig style output by default.
>
> Then why not use ifconfig?

Of course I do, since ipv4 is the local method.
>
> Cheers,
> David.


Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 14:01:28 Nicolas George wrote:

> L'octidi 28 thermidor, an CCXXV, Gene Heskett a écrit :
> > Nicolas: The nearest ipv6 address to me is likely 150 miles north,
> > in Pittsburgh PA. Its all ipv4 here in WV AFAIK.
>
> You seem to be under the misapprehension that the policy of Debian
> development revolves around your personal perceived needs. It does
> not.
>
> Regards,

Not at all, Nicolas, but I do want to be prepared when it (ipv6) does 
arrive in these here hills.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 14:00:50 Brian wrote:

> On Tue 15 Aug 2017 at 13:46:20 -0400, Gene Heskett wrote:
> > On Tuesday 15 August 2017 13:07:38 David Wright wrote:
> > > On Tue 15 Aug 2017 at 11:23:41 (-0400), Gene Heskett wrote:
> > > > On Tuesday 15 August 2017 07:33:53 Nicolas George wrote:
> > > > > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > > > > > If it's no longer part of the base system, then perhaps the
> > > > > > system is too base?
> > > > >
> > > > > Please ellaborate. Why should ifconfig be part of the base
> > > > > system?
> > > > >
> > > > > Regards,
> > > >
> > > > Because ip is a pain in the ass to make it run, and still gives
> > > > grossly incomplete information?
> > > >
> > > > In 2 years, I have yet to get a full network report out of ip
> > > > such as ifconfig gives.
> > >
> > > Does   ip addr ; ip -s link   not work for you?
> > >
> > > Cheers,
> > > David.
> >
> > It could I suppose, but thats also an extra 4" of useless fluff on
> > my high res screen.
>
> You really wanted to say "yes" to your problem of two years standing
> being solved, didn't you? But it goes against the grain. :)

I would not go out on that limb and saw it off behind me, but if it had 
more labels on the output, it could be helpfull.  For instance what does 
this line in its output for eth0 tell me, and where did it get those 
numbers?

   inet6 fe80::21f:c6ff:fe62:fcbb/64 scope link 

Compared to the ifconfig eth0 output, that looks to be derived from its 
MAC address, but how is such a determination thats its a globally unique 
address determined? Anyone can cause a MAC address to be spoofed. I am 
doing it myself so that I can change routers without loseing my ipv4 
address, registered at namecheap.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig

2017-08-15 Thread David Wright
On Tue 15 Aug 2017 at 19:13:54 (+0200), Pierre Frenkiel wrote:
> On Tue, 15 Aug 2017, Greg Wooledge wrote:
> 
> >On Tue, Aug 15, 2017 at 06:24:42PM +0200, Pierre Frenkiel wrote:
> >>On Tue, 15 Aug 2017, Greg Wooledge wrote:
> >>
> >>>ip -o link | awk -F": " '{print $2}'
> >>
> >>  and even shorter:
> >>  ip -o link | cut -d : -f 2
> >
> >They are not equivalent.  Yours leaves extra whitespace.
> >
> >wooledg:~$ ip -o link | cut -d : -f 2 | hd
> >  20 6c 6f 0a 20 65 74 68  30 0a| lo. eth0.|
> >000a
> >wooledg:~$ ip -o link | awk -F": " '{print $2}' | hd
> >  6c 6f 0a 65 74 68 30 0a   |lo.eth0.|
> >0008
> >
> >So, to use the output of yours, an additional step would be needed
> >(whitespace trimming).
> >
> If it's to list the interface names, I don't see why the leading space is
> annoying.

I assume then that you wrote your recipe just for our
entertainment. An error like that can waste a lot of time
when a non-trivial script produces unexpected results.

Cheers,
David.



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread David Wright
On Tue 15 Aug 2017 at 13:24:56 (-0400), Gene Heskett wrote:
> On Tuesday 15 August 2017 10:48:12 Nicolas George wrote:
> 
> > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > > Around 30 years of familiarity across many *nix flavours.
> >
> > You said it: the only superiority of ifconfig over iproute2 is
> > tradition and familiarity of long-time users. On the other hand,
> > ifconfig is technically inferior on most if not all points.
> >
> > I hope you realize that traditions and familiarity of old geezers can
> > only go so far to justify the evolution or non-evolution of a system.
> > Otherwise, we still would have ed in the base system.
> >
> > Regards,
> 
> Nicolas: The nearest ipv6 address to me is likely 150 miles north, in 
> Pittsburgh PA. Its all ipv4 here in WV AFAIK.

Odd, the nearest to me is underneath the table. I use 6 a lot,
as a cat5 cable is much faster than two legs of weak wireless
to the router and back. And it requires no configuration—it's
just there.

Cheers,
David.



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Nicolas George
L'octidi 28 thermidor, an CCXXV, Gene Heskett a écrit :
> Nicolas: The nearest ipv6 address to me is likely 150 miles north, in 
> Pittsburgh PA. Its all ipv4 here in WV AFAIK.

You seem to be under the misapprehension that the policy of Debian
development revolves around your personal perceived needs. It does not.

Regards,

-- 
  Nicolas George



Re: No ifconfig

2017-08-15 Thread David Wright
On Tue 15 Aug 2017 at 13:49:23 (-0400), Gene Heskett wrote:
> On Tuesday 15 August 2017 13:46:37 Greg Wooledge wrote:
> 
> > On Tue, Aug 15, 2017 at 01:41:16PM -0400, Gene Heskett wrote:
> > > While STILL not giving me the local ipv4 addresses and netmasks of
> > > those interfaces.
> >
> > If you want the IPv4 address, netmask, and transfer stats, try:
> >
> > ip -s addr
> >
> > Note that the netmask is shown in CIDR notation (e.g. /23) rather
> > than dotted quad notation (e.g. 255.255.254.0).
> >
> > If this still isn't what you want, tell us what you *do* want.
> 
> An ifconfig style output by default.

Then why not use ifconfig?

Cheers,
David.



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Brian
On Tue 15 Aug 2017 at 13:46:20 -0400, Gene Heskett wrote:

> On Tuesday 15 August 2017 13:07:38 David Wright wrote:
> 
> > On Tue 15 Aug 2017 at 11:23:41 (-0400), Gene Heskett wrote:
> > > On Tuesday 15 August 2017 07:33:53 Nicolas George wrote:
> > > > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > > > > If it's no longer part of the base system, then perhaps the
> > > > > system is too base?
> > > >
> > > > Please ellaborate. Why should ifconfig be part of the base system?
> > > >
> > > > Regards,
> > >
> > > Because ip is a pain in the ass to make it run, and still gives
> > > grossly incomplete information?
> > >
> > > In 2 years, I have yet to get a full network report out of ip such
> > > as ifconfig gives.
> >
> > Does   ip addr ; ip -s link   not work for you?
> >
> > Cheers,
> > David.
> 
> It could I suppose, but thats also an extra 4" of useless fluff on my 
> high res screen.

You really wanted to say "yes" to your problem of two years standing
being solved, didn't you? But it goes against the grain. :)

-- 
Brian.



Re: No ifconfig

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 13:46:37 Greg Wooledge wrote:

> On Tue, Aug 15, 2017 at 01:41:16PM -0400, Gene Heskett wrote:
> > While STILL not giving me the local ipv4 addresses and netmasks of
> > those interfaces.
>
> If you want the IPv4 address, netmask, and transfer stats, try:
>
> ip -s addr
>
> Note that the netmask is shown in CIDR notation (e.g. /23) rather
> than dotted quad notation (e.g. 255.255.254.0).
>
> If this still isn't what you want, tell us what you *do* want.

An ifconfig style output by default.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 13:07:38 David Wright wrote:

> On Tue 15 Aug 2017 at 11:23:41 (-0400), Gene Heskett wrote:
> > On Tuesday 15 August 2017 07:33:53 Nicolas George wrote:
> > > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > > > If it's no longer part of the base system, then perhaps the
> > > > system is too base?
> > >
> > > Please ellaborate. Why should ifconfig be part of the base system?
> > >
> > > Regards,
> >
> > Because ip is a pain in the ass to make it run, and still gives
> > grossly incomplete information?
> >
> > In 2 years, I have yet to get a full network report out of ip such
> > as ifconfig gives.
>
> Does   ip addr ; ip -s link   not work for you?
>
> Cheers,
> David.

It could I suppose, but thats also an extra 4" of useless fluff on my 
high res screen.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig

2017-08-15 Thread Greg Wooledge
On Tue, Aug 15, 2017 at 01:41:16PM -0400, Gene Heskett wrote:
> While STILL not giving me the local ipv4 addresses and netmasks of those 
> interfaces.

If you want the IPv4 address, netmask, and transfer stats, try:

ip -s addr

Note that the netmask is shown in CIDR notation (e.g. /23) rather
than dotted quad notation (e.g. 255.255.254.0).

If this still isn't what you want, tell us what you *do* want.



Re: No ifconfig

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 12:38:49 Pierre Frenkiel wrote:

> On Tue, 15 Aug 2017, Greg Wooledge wrote:
> > wooledg:~$ netstat -in
> > Kernel Interface table
> > Iface  MTURX-OK RX-ERR RX-DRP RX-OVRTX-OK TX-ERR TX-DRP
> > TX-OVR Flg eth0  1500  8254258  0  0 0   7682795
> >  0  0  0 BMRU lo   65536   579959  0  0 0   
> > 579959  0  0  0 LRU
>
>   you have hte same information with:
>   ==>  ip -s link
>   1: lo:  mtu 65536 qdisc noqueue state UNKNOWN
> mode DEFAULT group default qlen 1 link/loopback 00:00:00:00:00:00 brd
> 00:00:00:00:00:00
>  RX: bytes  packets  errors  dropped overrun mcast
>  21288167293 0   0   0   0
>  TX: bytes  packets  errors  dropped carrier collsns
>  21288167293 0   0   0   0
>   2: enp0s31f6:  mtu 1500 qdisc
> pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether
> 2c:4d:54:d0:58:06 brd ff:ff:ff:ff:ff:ff
>  RX: bytes  packets  errors  dropped overrun mcast
>  323815150  423300   0   4   0   55708
>  TX: bytes  packets  errors  dropped carrier collsns
>  41867187   302742   0   0   0   0

Thats a step towards understandable output, but how to deal with the 
stuff it shows that isn't "up". That doubles the size of the output on 
my pi running jessie:

pi@picncsheldon:~ $ ip -s link
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode 
DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
RX: bytes  packets  errors  dropped overrun mcast   
59379736   989318   0   0   0   0  
TX: bytes  packets  errors  dropped carrier collsns 
59379736   989318   0   0   0   0  
2: sit0@NONE:  mtu 1480 qdisc noop state DOWN mode DEFAULT group 
default qlen 1
link/sit 0.0.0.0 brd 0.0.0.0
RX: bytes  packets  errors  dropped overrun mcast   
0  00   0   0   0  
TX: bytes  packets  errors  dropped carrier collsns 
0  00   0   0   0  
3: eth0:  mtu 1500 qdisc pfifo_fast 
state UP mode DEFAULT group default qlen 1000
link/ether b8:27:eb:d3:47:2d brd ff:ff:ff:ff:ff:ff
RX: bytes  packets  errors  dropped overrun mcast   
224779355  3598076  0   0   0   0  
TX: bytes  packets  errors  dropped carrier collsns 
1223076242 12292111 0   0   0   0  
4: wlan0:  mtu 1500 qdisc noop state DOWN mode 
DEFAULT group default qlen 1000
link/ether b8:27:eb:86:12:78 brd ff:ff:ff:ff:ff:ff
RX: bytes  packets  errors  dropped overrun mcast   
0  00   0   0   0  
TX: bytes  packets  errors  dropped carrier collsns 
0  00   0   0   0  

While STILL not giving me the local ipv4 addresses and netmasks of those 
interfaces. I have disabled the radio as I've a neighbor that will use 
about 100Gb of my 300Gb monthly if the radios are enabled. But what the 
heck is sit0?

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 10:48:12 Nicolas George wrote:

> L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > Around 30 years of familiarity across many *nix flavours.
>
> You said it: the only superiority of ifconfig over iproute2 is
> tradition and familiarity of long-time users. On the other hand,
> ifconfig is technically inferior on most if not all points.
>
> I hope you realize that traditions and familiarity of old geezers can
> only go so far to justify the evolution or non-evolution of a system.
> Otherwise, we still would have ed in the base system.
>
> Regards,

Nicolas: The nearest ipv6 address to me is likely 150 miles north, in 
Pittsburgh PA. Its all ipv4 here in WV AFAIK.

However, so far I have not been made aware of a traceroute like utility 
that can tell me where any ipv6 blockage might exist, so I haven't a 
clue how far a dns query might get. I don't have it setup here that I 
know of, and there's little or no documentation on how to do it 
available to us mear mortals.  So here at least, anybody that knows how 
to cope with it when it does become a fact of life, can likely leverage 
some sheckles out of that knowledge. For instance, after perusing the 
manpage for traceroute, my ISP is shentel.net, but

gene@GO704:/etc$ traceroute -6 shentel.net
shentel.net: Name or service not known
Cannot handle "host" cmdline arg `shentel.net' on position 1 (argc 2)

But where does the failure occur? Someplace in the chain To or From their 
dns server(s), which probably encompasses at least a dozen hops to get 
to the server to query them.

And uncommenting the ipv6 related lines in the hosts file makes no 
difference. I didn't think it would because /etc/network/interfaces has 
no ipv6 setup in it.  So for starters, what would I add to the 
interfaces file to enable that since I've no clue what to put in it for 
an ipv6 address.

With reference to my hosts file based home network with about 20 names in 
the /etc/hosts file, please give me/us a cli command that shows how 
ifconfig gets it wrong, and ip gets it right in an ipv4 environment. I 
don't think it prudent to just pick some numbers out of "that" 
place. ;-)

Cheers Nicolas, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



Re: No ifconfig

2017-08-15 Thread Pierre Frenkiel

On Tue, 15 Aug 2017, Greg Wooledge wrote:


On Tue, Aug 15, 2017 at 06:24:42PM +0200, Pierre Frenkiel wrote:

On Tue, 15 Aug 2017, Greg Wooledge wrote:


ip -o link | awk -F": " '{print $2}'


  and even shorter:
  ip -o link | cut -d : -f 2


They are not equivalent.  Yours leaves extra whitespace.

wooledg:~$ ip -o link | cut -d : -f 2 | hd
  20 6c 6f 0a 20 65 74 68  30 0a| lo. eth0.|
000a
wooledg:~$ ip -o link | awk -F": " '{print $2}' | hd
  6c 6f 0a 65 74 68 30 0a   |lo.eth0.|
0008

So, to use the output of yours, an additional step would be needed
(whitespace trimming).


If it's to list the interface names, I don't see why the leading space is
annoying.



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread David Wright
On Tue 15 Aug 2017 at 11:23:41 (-0400), Gene Heskett wrote:
> On Tuesday 15 August 2017 07:33:53 Nicolas George wrote:
> 
> > L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > > If it's no longer part of the base system, then perhaps the system
> > > is too base?
> >
> > Please ellaborate. Why should ifconfig be part of the base system?
> >
> > Regards,
> 
> Because ip is a pain in the ass to make it run, and still gives grossly 
> incomplete information?
> 
> In 2 years, I have yet to get a full network report out of ip such as 
> ifconfig gives.

Does   ip addr ; ip -s link   not work for you?

Cheers,
David.



Re: No ifconfig

2017-08-15 Thread Greg Wooledge
On Tue, Aug 15, 2017 at 06:24:42PM +0200, Pierre Frenkiel wrote:
> On Tue, 15 Aug 2017, Greg Wooledge wrote:
> 
> > ip -o link | awk -F": " '{print $2}'
> 
>   and even shorter:
>   ip -o link | cut -d : -f 2

They are not equivalent.  Yours leaves extra whitespace.

wooledg:~$ ip -o link | cut -d : -f 2 | hd
  20 6c 6f 0a 20 65 74 68  30 0a| lo. eth0.|
000a
wooledg:~$ ip -o link | awk -F": " '{print $2}' | hd
  6c 6f 0a 65 74 68 30 0a   |lo.eth0.|
0008

So, to use the output of yours, an additional step would be needed
(whitespace trimming).



Re: No ifconfig

2017-08-15 Thread Pierre Frenkiel

On Tue, 15 Aug 2017, Greg Wooledge wrote:


wooledg:~$ netstat -in
Kernel Interface table
Iface  MTURX-OK RX-ERR RX-DRP RX-OVRTX-OK TX-ERR TX-DRP TX-OVR Flg
eth0  1500  8254258  0  0 0   7682795  0  0  0 BMRU
lo   65536   579959  0  0 0579959  0  0  0 LRU


 you have hte same information with:
 ==>  ip -s link
 1: lo:  mtu 65536 qdisc noqueue state UNKNOWN mode 
DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
RX: bytes  packets  errors  dropped overrun mcast
21288167293 0   0   0   0
TX: bytes  packets  errors  dropped carrier collsns
21288167293 0   0   0   0
 2: enp0s31f6:  mtu 1500 qdisc pfifo_fast 
state UP mode DEFAULT group default qlen 1000
link/ether 2c:4d:54:d0:58:06 brd ff:ff:ff:ff:ff:ff
RX: bytes  packets  errors  dropped overrun mcast
323815150  423300   0   4   0   55708
TX: bytes  packets  errors  dropped carrier collsns
41867187   302742   0   0   0   0



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Glenn English
On Tue, Aug 15, 2017 at 3:23 PM, Gene Heskett <ghesk...@shentel.net> wrote:

> Because ip is a pain in the ass to make it run, and still gives grossly
> incomplete information?
>
> In 2 years, I have yet to get a full network report out of ip such as
> ifconfig gives.

How about fixing ip? Like 'ip --config'? Or just 'ip -h'?

I've written many scripts over the years, using ifconfig and others,
and having everything broken now is a major PITA.

I very much agree that sysV init and those old commands were a mess,
especially with the introduction of ipv6. But I'd have more inclined
to fix what was there than to replace it with commands that return
gibberish and kill so many scripts so many people have written.

One of the benefits, to me anyway, of Debian, Linux, and GNU was that
things were very often designed to output text, for the benefit of
humans. For the benefit of computers, that info could easily be parsed
by other commands.

--
Glenn English



Re: No ifconfig

2017-08-15 Thread Pierre Frenkiel

On Tue, 15 Aug 2017, Greg Wooledge wrote:


ip -o link | awk -F": " '{print $2}'


  and even shorter:
  ip -o link | cut -d : -f 2

  BTW, I suggest to abandon, in the subject, the reference to the
  OP's subject ("was ..."), as this thread has really
  nothing to do with inittab stuff



Re: No ifconfig [Was: no /etc/inittab]

2017-08-15 Thread Gene Heskett
On Tuesday 15 August 2017 07:33:53 Nicolas George wrote:

> L'octidi 28 thermidor, an CCXXV, Erik Christiansen a écrit :
> > If it's no longer part of the base system, then perhaps the system
> > is too base?
>
> Please ellaborate. Why should ifconfig be part of the base system?
>
> Regards,

Because ip is a pain in the ass to make it run, and still gives grossly 
incomplete information?

In 2 years, I have yet to get a full network report out of ip such as 
ifconfig gives.

Cheers, Gene Heskett
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>



  1   2   3   4   5   6   >