[Toybox] complaining about 'ifconfig' - better use 'ip'

Bastian Bittorf bittorf at bluebottle.com
Thu Apr 4 02:25:03 PDT 2013


* Rob Landley <rob at landley.net> [04.04.2013 10:03]:
> 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.

you are right, shame on me.

> 
> 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...

ip address add 9.8.7.6/32 dev lo label lo:commentXY
are labels supported via ifconfig?

> >- 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

this is wrong:
lo:0 is no interface, so why does it show an extra interface?

> >- more than one routing table ("policy routing")
> 
> Never tried, but I've done some fun stuff with iptables and some

so, because you never tried - it's not needed? 8-)

> other fun stuff with containers. http://landley.net/lxc/

> >- preparing traffic control
> 
> man tc

tc belongs to 'ip'.
so how to you set up an 'ip rule' with ifconfig. 8-)

> >- 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.

the idea behind it is:
dont encourage people to use such old, incomplete, inconsistent tools.

especially if you make something new, this is the chance to enforce
people to use/learn the new interface. sooner or later they need to
learn "ip" anyway, so why not doing it right? is there any distro
not shipping 'ip' (iproutw2)?

> >- 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?)

multicast makes more sense in the ipv6 world

> 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.

you negated a lot of arguments, but there are some left.
but the killer-arg is the existing ifconfig in androids toolbox,
so ifconfig is needed, ip is optional 8-(

hopefully the person which implements 'ifconfig' will also do:

arp
ipmaddr
iptunnel
route
nameif
netstat

bye, bastian

 1365067503.0


More information about the Toybox mailing list