OpenWrt Forum Archive

Topic: Including iproute2 within busybox by default.

The content of this topic has been archived on 29 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi developers.

As Linux is now using iproute2 for network configuration, it's better for OpenWRT to use iproute2 for it. I don't mean to replace OpenWRT netifd automated network configuration. Here is my explanation.

Busybox compiled within default makefile is still using ifconfig for manual network configuration. Net-tools (ifconfig) has become obsolete and no longer works on modern network interface, for example some Android phone.

I wonder if Busybox will include minimal version of iproute2 instead of the legacy ifconfig. Ifconfig should be dropped from busybox and replaced by minimal version of iproute2.

I know for sure. To install iproute2, package ip need to be selected from OpenWRT build configuration (menuconfig).
This standalone iproute costs a lot of disk usage, around 150 kB in my case with OpenWRT trunk compiled for TP Link MR3220 which only has 4MB of flash.

If minimal version of iproute2 could be part of busybox, this will greatly save disk space and will adhere to Linux networking standard.

I think more developers are reading the mailing list.
Afaik that problem is known to devs - since there is already an ip-tiny packet without some exotic features but your post need some improvements.

Some things need further clarifications and possibly corrections; issues with your statements:

- ifconfig might be technically obsolete - thats not a reason to stop its use ("bad" example: Kernel 3.3.x in AA is EOL and OpenWrt does not even provide possible security backports)
- OpenWrt is not running on Android
- What makes the network interface "modern" - can you clarify?

- iproute2 proposal was rejected in 2013, see for example:
http://patchwork.openwrt.org/patch/4035/ for arguments
- there is already an iproute2 tiny patch:https://dev.openwrt.org/changeset/39119
- afaik some busybox ip syntax is incompatible with iproute2

Please note that the discussion contains hard numbers comparing these scenarios down to a single bytes. (you dont provide new numbers)

Afaik netifd is responsible for up/down of interfaces - the same role ifconfig/ip plays in some scripts so there is some overlap. And netifd will not go away.

The patchwork debate changes my mind.
It's better to not include ifconfig or ip on network interface setup scripts at all and optimize netifd implementation for those functions.

I can't provide any explanation about modern interface. As far as I know, modern interfaces use netlink for its configuration backend, and iproute2 seems to have a better handling for netlink.

I think it's better to stay with ip-tiny package to provide iproute2 functionality and ip-tiny package should be added to base system in addition to busybox ifconfig.

(Last edited by alive4ever on 9 Jul 2014, 09:21)

The discussion might have continued from here.