Bug 1042572 - ifcfg as a replacement to ifconfig - but regression in functionality
Summary: ifcfg as a replacement to ifconfig - but regression in functionality
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: iproute
Version: 20
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Pavel Šimerda (pavlix)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-13 00:23 UTC by Peter
Modified: 2016-10-19 10:50 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-16 10:33:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter 2013-12-13 00:23:36 UTC
Description of problem:

From the MAN pages:

NAME
       ifcfg - simplistic script which replaces ifconfig IP managment


How reproducible:

Steps to Reproduce:
1. run ifcfg with no arguments

Actual results:
Usage: ifcfg DEV [[add|del [ADDR[/LEN]] [PEER] | stop]
       add - add new address
       del - delete address
       stop - completely disable IP

Expected results:
Display list of all network devices - perhaps having this run 'ip addr show' if no arguments are supplied to ifcfg.

Additional info:

The output of ifconfig with no arguments is to display a list of network devices and summary for each device:

em1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.10.150.3  netmask 255.255.255.240  broadcast 0.0.0.0
        inet6 fe80::288:88ff:fe00:8  prefixlen 64  scopeid 0x20<link>
        ether 00:88:88:00:00:08  txqueuelen 1000  (Ethernet)
        RX packets 18993  bytes 21335809 (20.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16019  bytes 1595924 (1.5 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  memory 0xf6100000-f6120000  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 23  bytes 2080 (2.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 23  bytes 2080 (2.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

If ifcfg is replacing ifconfig as stated in the man pages then it should at least provide the same or similar functionality, or is the plan to keep both tools indefinitely?

If so the man doco should be updated to reflect this.

It's like the route and ip route command (iproute2 tools) that replaced it (a loooong time ago) ... why is route still there? Get rid of it or alias route to ip route by default, so people start getting the idea of using the new command sets, and update man to reflect that.

in fact most of the iproute2 tool set suffers from these issues.

Comment 1 Peter 2013-12-13 00:26:24 UTC
I can help out if the package maintainers for these tools are either not interested or too busy to update them...

Comment 2 Jiri Popelka 2013-12-13 12:02:12 UTC
(In reply to Peter from comment #0)
> Usage: ifcfg DEV [[add|del [ADDR[/LEN]] [PEER] | stop]

> Expected results:
> Display list of all network devices - perhaps having this run 'ip addr show'
> if no arguments are supplied to ifcfg.

IMHO expected results are to show help, because DEV is mandatory, not optional.

> It's like the route and ip route command (iproute2 tools) that replaced it
> (a loooong time ago) ... why is route still there? Get rid of it or alias
> route to ip route by default, so people start getting the idea of using the
> new command sets, and update man to reflect that.

Plan (bug #687920, comment #1) was to remove net-tools (package with route & ifconfig) from default installation so lot of people would finally notice there's something else then route/ifconfig. We got there in some point but then people complained so it's been added (bug #868643, comment #5) back (which I'm not quite happy with).

Alias route to 'ip route' or ifconfig to 'ip addr' is not a solution as the syntax is totally different.

Comment 3 Petr Šabata 2013-12-13 13:32:04 UTC
I guess you're right and showing the list of all interfaces when no arguments are supplied is the way to go.

However, I'd suggest using the 'ip' command directly as this is just a simple wrapper resembling ifconfig.

We've managed to drop vconfig and bridge-utils so far.  Hopefully people will forget about net-tools one day, too...

Comment 4 Peter 2013-12-13 16:08:55 UTC
(In reply to Jiri Popelka from comment #2)
> (In reply to Peter from comment #0)
> > Usage: ifcfg DEV [[add|del [ADDR[/LEN]] [PEER] | stop]
> 
> > Expected results:
> > Display list of all network devices - perhaps having this run 'ip addr show'
> > if no arguments are supplied to ifcfg.
> 
> IMHO expected results are to show help, because DEV is mandatory, not
> optional.
> 
> > It's like the route and ip route command (iproute2 tools) that replaced it
> > (a loooong time ago) ... why is route still there? Get rid of it or alias
> > route to ip route by default, so people start getting the idea of using the
> > new command sets, and update man to reflect that.
> 
> Plan (bug #687920, comment #1) was to remove net-tools (package with route &
> ifconfig) from default installation so lot of people would finally notice
> there's something else then route/ifconfig. We got there in some point but
> then people complained so it's been added (bug #868643, comment #5) back
> (which I'm not quite happy with).
> 
> Alias route to 'ip route' or ifconfig to 'ip addr' is not a solution as the
> syntax is totally different.

Wow I didn't see those bugs - that's like 3 years ago now, and then a year after you removed it you added it back in?

I couldn't see exactly the time frame from those two bugs, but that's the general idea I get from reading through them... and in the first bug you mentioned, comment 6 with the reply from Martín Ferrari, is quite interesting, and that takes us back to 2007. 

So 7 years later and we're still being confused about what we should and shouldn't be using.

The reason I raised this bug as an issue is because I kept seeing deprecated through the man pages for various net-tools apps, yet seeing forums, blogs, wiki's, 3rd party apps etc all pointing at net-tools to setup routes, interfaces, diagnose connectivity issues etc.

'route add ...', 'netstat -l' or 'ifconfig ... ' etc instead of 'ip route add', 'ss -l' or 'ip addr', and so on.

The clear message I'm getting out there is use net-tools apps, not the iproute2 apps... 

It's almost like no one knows about the iproute2 tools at all, and I agree with you writing wrappers to point to iproute2 tools, so they look and feel similar to net-tools apps, is not the way to go. Not just from the syntax point of view but from the obvious confusion they are causing, it's not helping to get iproute2 tools established and moving people away from net-tools.

My only gripe with the iproute2 tools is the formatting of the output, and the vagueness of the man pages. They are faster, more advanced, and sophisticated than their net-tools counterparts, but they look ugly, and less polished, and the man pages are really detailed, yet completely unhelpful... quite possibly this could also be impacting peoples adoption of iproute2 over net-tools.

By way of example:

netstat -lep vs ss -lep
http://pastebin.com/UDiHxKPh

You can see from this post ss is really ugly, when shown on screen it takes up the entire width of the terminal, so it looks ugly onscreen as well, but that paste shows you what it looks like in a small terminal window. It's almost unreadale, being spread out of 3 or 4 lines. Whereas netstat is formatted in a much nicer way, so on a fullscreen terminal it doesn't look ugly and handles much nice on a small terminal window than ss does. Also ss doesn't group active services, and doesn't mention udp, of course it shows the udp sockets, but it doesn't mention 'udp' anywhere in the output.

The output from netstat and again I say purely by way of example, is much more intuitive, - easier to read, locate information, and understand what's happening, where and by whom. 

This is true of a lot of the other tools as well. The output is just nicer in net-tools than the iproute2 equivalents.

The man pages for 'ip route add' vs 'route add':
http://pastebin.com/akEeX6Z1

You can see clearly here, route add give's many examples, the info is formatted in a much easier to understand way, the synopsis is clear, the options are clear and easy to follow, but with ip route add it's like magic if you manage to get a working syntax to add anything beyond the SINGLE example they give you.


Are these two gripes something the creators of iproute2 can address perhaps? Because I really think that would help with adoption more than worrying about whether there is a wrapper in place...

I think you took the right approach though in removing net-tools, and you should have stuck with that, giving people the option to install net-tools IF they really wanted to use those instead of the iproute2 apps, perhaps with a warning that the net-tools package would no longer be developed/packaged, and phased out completely by the following release?

Fedora 19 to Fedora 20 had a few big steps that jolted me a little, pulling out iptables and ip6tables services (to name but one), and going straight up with the fairewalld service. I had to look up what happened to them, wondering if I'd lost something and ensuring that the world was still safe and things were working the way they should etc... but I got over it in about 5 minutes and moved on.

Back to the wrappers - you could create a separate package for those, ie iproute2-scripts for example, that include net-tools 'like' wrappers for their iproute2 counterparts, if people REEEEALLY need them... but then again why bother, if the man pages are cleaned up for the iproute tools and the formatting is cleaned up and made more presentable, then people will ease into them with much more grace and ease of acceptance... 

This is just my 2cents worth :)

Comment 5 Peter 2013-12-13 16:36:26 UTC
When I say a lot of the other tools it's those 2 that are the main offenders

The man pages of the ip route command

and the output from ss

The other tools man pages and output are on par with net-tools

Comment 6 Fedora Admin XMLRPC Client 2014-08-20 08:54:04 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Pavel Šimerda (pavlix) 2014-08-20 19:46:42 UTC
Hi Peter,

feel like recovering the discussion about net-tools versus iproute? On bugzilla or off bugzilla.

Pavel

Comment 8 Pavel Šimerda (pavlix) 2015-03-16 10:33:45 UTC
When available for new discussion or with new information, please either reopen this umbrella bug or start individual bug reports for individual issues.


Note You need to log in before you can comment on or make changes to this bug.