Web lists-archives.com

Re: ifconfig network resolution




Hi Joel,

On Sun, Jun 11, 2017 at 07:55:50AM +0900, Joel Rees wrote:
> # If the address to be assigned is given first, which I think everyone
> # pretty much does:
> 
> myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1 down
> myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1
> 10.19.201.198 netmask 255.255.255.224 broadcast 10.19.201.223
> myadm@mycomp:~$ env LANG=en_US.UTF-8 sudo ifconfig eth0:1
> eth0:1    Link encap:Ethernet  HWaddr 53:bc:81:02:21:bb
>           inet addr:10.19.201.198  Bcast:10.19.201.223  Mask:255.255.255.224
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           Interrupt:42 Base address:0xa000
> 
> # it seems to see the address first and set things as intended in one pass.
> ---------------------------------
> 
> Which is confusing to my middle-aged brain.

Have you considered just using "ip"?

# ip address add 10.19.201.198/27 dev eth0

You don't need to specify the broadcast address as it will by
default be the top-most address (10.19.201.233 for
10.19.201.192/27).

> So I could suggest editing the man page, something along the lines
> of the following…

The binaries provided by the net-tools package are considered
obsolete on Linux, and from stretch onwards the package is not
marked essential. It would only be installed if a dependency pulled
it in (which is admittedly still very likely at this point).

I'm not trying to start an ip vs. ifconfig debate, but it is a fact
that development of net-tools has stagnated and already doesn't
support some kernel features.

It seems likely that eventually net-tools will not be in a default
Debian install and you would have to go out of your way to install
it.

So, I am not sure that anyone would be willing to keep the relevant
net-tools manpages up to date.

Even the net-tools maintainers in Debian have wanted it removed from
the base install for more than 8 years now. I'm not saying they
would refuse to fix documentation bugs, but the motivation may be
very low at this point.

Some more info:

    https://lwn.net/Articles/710533/

Cheers,
Andy

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