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

Re: ifconfig <interface_name> stats ??? Wrong behavior OR BUG ?



Hi Kanto,

On Fri, Jun 11, 2021 at 02:01:02PM +0000, 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


Reply to: