On 04/03/2013 03:21:17 PM, Bastian Bittorf wrote:
* Rob Landley <[email protected]> [03.04.2013 21:44]:
> >it's totally obsolete since nearly 10 years. nobody uses it anymore,
>
> *shrug* I use it. So did the people who submitted their
> implementation of it. It's in the $PATH on ubuntu LTS without me
> having to install a package to get it.

8-) ofcourse i overdraw and provoked.

> >even the manpage of 'ifconfig' shows this in
> >big letters, it's so much restricted and doesnt know much about
> >networking,
>
> Are you saying it's simple and minimal, just enough to get the job done?
>
> This is a bad thing?

if it _would_ be simple, minimal and useful then nobody would use 'ip'

> >it's a relict if the 1990's and must die.
>
> Um, "cat" and "ls" are relics of the 1970's, are they on the hit list
> too?

cat makes sense, ls is useful enough that we all can live with it's
errors. (i dont know a better tool to do this job).

> >better make a stub of 'ip' and implement:
> >
> >ip link add/del/show
> >ip address add/del/show
> >ip route add/del/show
> >ip neigh add/del/show
>
> What can you do with ip that you can't do with ifconfig/route?

- all the IPv6 stuff

Toolbox ifconfig does that.

- CIDR-notation

I dunno what that is. Google...

http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing

Oh, you mean being able to say /30 at the end of an address without it being a class A/B/C address? I think that started working in ifconfig around... Red Hat 7? In 2000 or so? (I used it in the administration scripts for the WebOffice "iLand gateway", that can't have been later than 2002.) I'm pretty sure I did that on Red Hat 9 in 2003...

Yup, just pulled up my old Red Hat 9 image under qemu and did ifconfig eth0 10.0.2.15/31 and it worked fine.

Heh, it's still up at http://busybox.net/downloads/qemu/ if you'd like to try that yourself.

- aliases + multiple IP's on one interface

I did aliases with ifconfig in 2002, there's a colon number syntax or some such...

- correct output of aliases

Define "correct".

sudo ifconfig lo:0 10.255.255.1/31
ifconfig

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:5708561 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5708561 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3736486922 (3.7 GB)  TX bytes:3736486922 (3.7 GB)

lo:0      Link encap:Local Loopback
          inet addr:10.255.255.1  Mask:255.255.255.254
          UP LOOPBACK RUNNING  MTU:16436  Metric:1

- tunnels

There's an iptunnel command in net-tools.

- more than one routing table ("policy routing")

Never tried, but I've done some fun stuff with iptables and some other fun stuff with containers. http://landley.net/lxc/

- preparing traffic control

man tc

- better readable scripts (!)

Matter of opinion.

  e.g. get the default route: 'ip route list exact 0/0'

There's probably a cleaner way than "route -n | grep UG | awk '{print $2}'" but I didn't bother to check the man page because I know that one off the top of my head.

- better parseable output (if needed, e.g. ip -oneline link show tun0)

Look, I'm not saying that providing an alternate interface to the same functionality for people who are used to and expect the other interface is a bad thing, especially if it's easy to do. But that cuts _against_ your complaints about ifconfig. You're claiming ifconfig is an incapable relic, and so far not showing things that actually require ip. The point of this thread is you said that we should NOT implement ifconfig and friends.

- you can rename interfaces

man nameif

- multicast working

I'm fairly certain multicast was around in the 90's. I remember people bemoaning its failure even then. (How is the mbone doing? Netflix streaming making extensive use of that, then? Skype? Youtube?)

- fine control over all netlink-params (e.g. txqueuelen)

There's a txqueuelen option the ubuntu 12.04 ifconfig man page.

- http://inai.de/2008/02/19

Somebody in germany had an opinion in a blog post 5 years ago.

- http://www.reddit.com/r/networking/comments/1a7z6z/the_missing_man_page_for_ifconfig_xpost_from/

The page this points to disproves your own arguments about ipv6 and txqueuelen, it documents how ifconfig supports modern features, did you bother to read...

Oh, I see, you wanted me to see the reddit comments where somebody posted a good ifconfig resource and youtube commenters attacked them saying that systemd is the one true way and resistance is futile.

Look, I asked "What can you do with ip that you can't do with ifconfig/route?" You didn't come up with anything actually _requiring_ ip yet, that I've noticed.

ofcourse i'am fine with both implementations,

I... hnh... whaaaa...?

Let me quote your first message in this thread:

http://lists.landley.net/pipermail/toybox-landley.net/2013-April/000825.html

dont implement 'ifconfig'. it's totally obsolete since nearly 10 years.
nobody uses it anymore, even the manpage of 'ifconfig' shows this in
big letters, it's so much restricted and doesnt know much about networking,
it's a relict if the 1990's and must die.
...
ifconfig is so fundamentally wrong in architecture, thats
not worth the work. for greybeards you can add a wrapper
which translates every call to ifconfig/route/arp with a
stderr output of "deprecated: use 'ip address show blabla...'".

sorry for the hard words, but someone must say it 8-)

So of course you're fine with both implementations.

I've lost the plot here.

but IMHO

The H in that acronym is like the word "Terrific", which used to mean inspiring terror. Or the way "bombed a test" original meant "blew it away", I.E. did really well. Words reverse meaning, ala Michael Jackson's use of the word "bad".

Lose the H.

it's better to let 'ifconfig' die, than to enforce people
to learn the syntax for 4 tools (ifconfig, route, arp,
netstat - which are doing the same (manipulating network-stack) but
inconsitently), instead of 1 tool which has the same clean
syntax everywhere.

One tool whose man page is longer than the man page of all those other tools put together. From an implementation standpoint, this is a downside.

"Do one thing and do it well" is kind of basic to the unix philosophy:

  http://www.faqs.org/docs/artu/ch01s06.html

Right, let's get back to the current 1.0 goal of toybox, which is making android self-hosting, which involves replacing android toolbox, which has ifconfig but does not have ip. We _cannot_ replace toolbox without implementing ifconfig. We can do so without implementing ip.

I do not have a strong personal opinion on the matter, but I have yet to find anything you've said in this thread that _isn't_ a statement of your opinion combined with misinformation about the alternatives to your preferred tool.

I'm still willing to be convinced. That wasn't it. What am I missing?

Rob
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net

Reply via email to