Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Gentoo Development (http://www.linux-archive.org/gentoo-development/)
-   -   rfc: openrc: use iproute2 for all network handling in linux (http://www.linux-archive.org/gentoo-development/597279-rfc-openrc-use-iproute2-all-network-handling-linux.html)

William Hubbs 11-11-2011 08:53 PM

rfc: openrc: use iproute2 for all network handling in linux
 
Hi all,

http://bugs.gentoo.org/show_bug.cgi?id=389437

has prompted a discussion of whether or not we should use ifconfig in
openrc to configure networking on linux systems.

I'm not asking that we consider removing net-tools from systems, because
there are tools there that we still need. In my view though, two of
these tools (ifconfig and route), have been surpassed in functionality
by iproute2's ip tool. So, what I am considering doing is dropping the
ifconfig module from openrc and using iproute2 for all network
configuration on linux systems.

The other side of the discussion seems to be that openrc needs to work
on minimal installations, so we need to continue supporting using ifconfig.

I realize there would be a trade-off if I stop supporting linux's
ifconfig and route in openrc, but how much of a trade-off? Would the
benefits of iproute2 outweigh the down side of not supporting ifconfig
and route on linux?

What does everyone think?

William

Matt Thode 11-11-2011 09:10 PM

rfc: openrc: use iproute2 for all network handling in linux
 
On Nov 11, 2011, at 4:01 PM, Ch*-Thanh Christopher Nguyễn wrote:

> William Hubbs schrieb:
>> I realize there would be a trade-off if I stop supporting linux's
>> ifconfig and route in openrc, but how much of a trade-off? Would the
>> benefits of iproute2 outweigh the down side of not supporting ifconfig
>> and route on linux?
>>
>> What does everyone think?
>
> +1
> Do you need iproute2 at all? I think you could fall back to busybox if
> iproute2 is not installed.
>
> While you are at it, please also switch from wireless-tools to iw :)
> https://bugs.gentoo.org/show_bug.cgi?id=261655
>
>
> Best regards,
> Ch*-Thanh Christopher Nguyễn
>

I think that we should be using the new tools by now, it's been in development for the last ten years. There would have to be some sort of migration path for people to use though.

-- Matthew Thode

William Hubbs 11-11-2011 09:11 PM

rfc: openrc: use iproute2 for all network handling in linux
 
On Fri, Nov 11, 2011 at 11:01:43PM +0100, Ch*-Thanh Christopher Nguyễn wrote:
> William Hubbs schrieb:
> > I realize there would be a trade-off if I stop supporting linux's
> > ifconfig and route in openrc, but how much of a trade-off? Would the
> > benefits of iproute2 outweigh the down side of not supporting ifconfig
> > and route on linux?
> >
> > What does everyone think?
>
> +1
> Do you need iproute2 at all? I think you could fall back to busybox if
> iproute2 is not installed.

I haven't looked at busybox that much yet, but I know that ip is part
of it, so that may be a possibility.

> While you are at it, please also switch from wireless-tools to iw :)
> https://bugs.gentoo.org/show_bug.cgi?id=261655

Yeah I know about that bug. :-) I want to get 0.9.5 out the door and
make that a stable candidate, then after that, I will look into both of
these.

William

William Hubbs 11-11-2011 09:26 PM

rfc: openrc: use iproute2 for all network handling in linux
 
On Fri, Nov 11, 2011 at 04:10:50PM -0600, Matt Thode wrote:
> I think that we should be using the new tools by now, it's been in development for the last ten years. There would have to be some sort of migration path for people to use though.

If you have iproute2 installed, and you do not have a line like the
following in your /etc/conf.d/net file:

modules="!ifconfig"

or

modules_ifname="!ifconfig"

you are already using iproute2 to configure your routes and static
addresses, so the only thing that would need to change, and this doesn't
have to happen now, is that you would have to change over to using cidr
addresses,, for example:

config_ethx="x.x.x.x/24"

instead of

config_ifname="x.x.x.x netmask 255.255.255.0"

But, because of the way the network scripts are written, this is a
separate issue from dropping support for ifconfig, so it could be
handled with a migration path later.

William

Joshua Saddler 11-12-2011 05:25 AM

rfc: openrc: use iproute2 for all network handling in linux
 
On Fri, 11 Nov 2011 15:53:44 -0600
William Hubbs <williamh@gentoo.org> wrote:

> Hi all,
>
> http://bugs.gentoo.org/show_bug.cgi?id=389437
>
> has prompted a discussion of whether or not we should use ifconfig
> in openrc to configure networking on linux systems.
>
> I'm not asking that we consider removing net-tools from systems,
> because there are tools there that we still need. In my view
> though, two of these tools (ifconfig and route), have been
> surpassed in functionality by iproute2's ip tool. So, what I am
> considering doing is dropping the ifconfig module from openrc and
> using iproute2 for all network configuration on linux systems.
>
> The other side of the discussion seems to be that openrc needs to
> work on minimal installations, so we need to continue supporting
> using ifconfig.
>
> I realize there would be a trade-off if I stop supporting linux's
> ifconfig and route in openrc, but how much of a trade-off? Would the
> benefits of iproute2 outweigh the down side of not supporting
> ifconfig and route on linux?
>
> What does everyone think?
>
> William
>

i'm in favor of whatever doesn't force me and our users to install
Yet Another Tool besides what's in the system set, and whatever
doesn't result in a LOT of work for the GDP to update all of our
documentation. there are dozens of places in all the docs that refer
to ifconfig and the other utilities installed with
sys-apps/net-tools.

i'd really prefer it if i didn't have to learn a whole new set of
tools & syntax, and then had to rewrite all of our docs for them.
ifconfig and net-tools work as-is; i've yet to see a compelling case
for installing & learning iproute.

if net-tools isn't being dropped from the system set, don't force our
users to install redundant utilities.

Mike Frysinger 11-13-2011 03:47 AM

rfc: openrc: use iproute2 for all network handling in linux
 
On Saturday 12 November 2011 20:26:54 Ch*-Thanh Christopher Nguyễn wrote:
> Joshua Saddler schrieb:
> > if net-tools isn't being dropped from the system set, don't force our
> > users to install redundant utilities.
>
> ip is not redundant. You need it for e.g. GRE tunnels.

for basic setups, it is completely redundant. which is the only case we're
talking about here.

> net-tools uses the old /proc/net/dev interface, while iproute uses
> netlink. This is very much like wireless extensions vs. cfg80211, where
> the old interface is still around for legacy compatibility but won't
> receive updates for new features. Eventually, you want to get rid of all
> /proc/net/dev and wext stuff in order to have a legacy-free system.

considering the tools work fine for the use cases we're talking about, and
there are no plans i know of to ever have these interfaces go away, and there
are no significant (or any at all?) efforts to replace all of net-tools.

> I would be very much in favour of not installing net-tools by default as
> soon as openrc switches to iproute. However I think this would make many
> users unhappy so has to be carefully prepared and users educated first.
> Debian has set this goal in 2007[1] and they have not reached it yet.

you keep saying "net-tools" when you actually mean "ifconfig". the net-tools
package provides quite a bit more than the common ifconfig/route/iptunnel tools
which ip replaces and for which there are no replacements.
-mike

Mike Frysinger 11-13-2011 03:50 AM

rfc: openrc: use iproute2 for all network handling in linux
 
On Friday 11 November 2011 16:53:44 William Hubbs wrote:
> has prompted a discussion of whether or not we should use ifconfig in
> openrc to configure networking on linux systems.

no, the discussion is whether we should continue to have ifconfig be an option
at all, not "always use ifconfig". as long as we need net-tools in the system,
openrc should support ifconfig as an option for basic configuration.

defaulting to iproute when it's available, and requiring it for more
complicated stuff is fine by me. but adding static ip addresses and static
routes is trivial to support.
-mike

Mike Frysinger 11-13-2011 03:50 AM

rfc: openrc: use iproute2 for all network handling in linux
 
On Friday 11 November 2011 17:01:43 Ch*-Thanh Christopher Nguyễn wrote:
> Do you need iproute2 at all? I think you could fall back to busybox if
> iproute2 is not installed.

that introduces an unnecessary level of instability for us to worry about imo.
if we want iproute, we should execute `ip` only.
-mike

Mike Frysinger 11-13-2011 04:24 PM

rfc: openrc: use iproute2 for all network handling in linux
 
On Sunday 13 November 2011 10:16:31 Ch*-Thanh Christopher Nguyễn wrote:
> Mike Frysinger schrieb:
> > for basic setups, it is completely redundant. which is the only case
> > we're talking about here.
> [...]
> > you keep saying "net-tools" when you actually mean "ifconfig". the
> > net-tools package provides quite a bit more than the common
> > ifconfig/route/iptunnel tools which ip replaces and for which there are
> > no replacements.
>
> If we talk about basic setups, then iproute2 provides everything too.

no one said otherwise. i did however say requiring iproute2 for static
ip/route setups is redundant. i see you agree.

> for some reason the user prefers to use ifconfig over ip, or needs
> functions not covered by iproute2 (are you referring to netstat?), then
> he can install net-tools.

we aren't talking about removing net-tools from system. until we have
replacement for all of its tools, it's always going to be there. the
host/domain related tools are required by openrc to set/get the
hostname/etc... i don't think splitting it makes sense as we're talking about
a package here that takes up less than 2MiB in total.

netstat should be replaced by iproute2's ss tool.

i'd also suspect that many scripts (packages/users) execute ifconfig to get
network information. obviously hard to quantify, but that's what you get for
having a util that has existed for ~30 years, and for ~20 years more than
iproute2.

> There is indeed no compelling reason to use ip over ifconfig presently,
> however if the cf80211 vs. wext situation is an indicator (where things
> like wireless regulatory support are only supported by iw and will never
> be by iwconfig), then at some point the migration will be inevitable.

funny thing about this analogy:
- ifconfig/ip long existed before the wireless tree ... while the latter
has moved on, the former still exists
- the wireless tools did not have years of built up logic around ifconfig

> >> Do you need iproute2 at all? I think you could fall back to busybox if
> >> iproute2 is not installed.
> >
> > that introduces an unnecessary level of instability for us to worry
> > about imo. if we want iproute, we should execute `ip` only.
>
> It was only meant as a fallback, if the user needs to uninstall
> iproute2. Having some potential instability may be preferable to not
> working at all.

... which is why we have the ifconfig module

> openrc can already use busybox udhcpc instead of dhcpcd, so there is a
> precedent.

that's not the same thing at all. `udhcpc` is not intended to be a drop-in
replacement for `dhcpcd`. we have a dedicated module to work with udhcpc, and
we have another dedicated module to work with dhcpcd.

to be clear, my problem is with dropping the ifconfig module completely. i
don't have a problem with requiring iproute2 for more complicated things, or
even for making it part of the Linux system set. but these are orthogonal
issues imo to the question "should openrc contain support for ifconfig/route".
-mike

Mike Frysinger 11-13-2011 05:33 PM

rfc: openrc: use iproute2 for all network handling in linux
 
On Sunday 13 November 2011 13:04:57 Ch*-Thanh Christopher Nguyễn wrote:
> Mike Frysinger schrieb:
> > until we have replacement for all of its tools, it's always going to be
> > there.
>
> After net-tools is no longer needed for basic setups (which I understand
> will be still the case after the proposed changes), why should it remain
> in the system set?

you snipped the following sentence where i explained why net-tools can't be
removed. iproute2 replaces *most* of net-tools, not *all*.

> >> openrc can already use busybox udhcpc instead of dhcpcd, so there is a
> >> precedent.
> >
> > that's not the same thing at all. `udhcpc` is not intended to be a
> > drop-in replacement for `dhcpcd`. we have a dedicated module to work
> > with udhcpc, and we have another dedicated module to work with dhcpcd.
>
> So if someone creates a "busybox_ip" module (which would essentially be
> a copy of the iproute2 module) then it will suddenly become the same thing?

no. i don't know why you're trying to force fit an analogy that makes no
sense. for busybox/embedded users, they'll have a system where `ip` is a
symlink to `busybox`, and so the existing iproute module will be used
unchanged. if there are problems, they can report. but that is a system
where we know up front is drastically different vs an otherwise "normal" Linux
system silently switching between the standard iproute2 and the simplified
busybox replacement.

the only way we could drop back to busybox's iproute2 is if we have the module
issue quite a bit of verbose warnings, but even then i'm not sure. if people
are creating network setups that need iproute2, and then then unmerge
iproute2, then i'm not terribly sympathetic to their plight.
-mike


All times are GMT. The time now is 06:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.