Bug 65114 - RFE: ifup-aliases iproute support, ifup/ifup-aliases scope support
RFE: ifup-aliases iproute support, ifup/ifup-aliases scope support
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
: FutureFeature
: 132925 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-17 14:34 EDT by jbowman
Modified: 2014-03-16 22:27 EDT (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-04-26 12:10:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch ifup-aliases to remove ifconfig and use /sbin/ip instead (9.55 KB, patch)
2010-03-17 21:45 EDT, Dale Stimson
no flags Details | Diff
Entire file (not just a patch) showing removal of ifconfig in favor of /sbin/ip (13.32 KB, text/plain)
2010-03-17 21:47 EDT, Dale Stimson
no flags Details

  None (edit)
Description jbowman 2002-05-17 14:34:39 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0+) Gecko/20020514

Description of problem:
/etc/sysconfig/network-scripts/ifup for 7.2 and 7.3 use the 'ip' command to
build network devices instead of the older 'ifconfig'. Unfortutunately,
/etc/sysconfig/network-scripts/ifup-aliases is still building alias interfaces
using 'ifconfig'. Could ifup-aliases get upgraded to match the main ifup script?

Also in that vein, /etc/sysconfig/network-scripts/ifup doesn't support the
concept of a configurable scope for an address. Being able to specify a
"SCOPE=local" directive in ifcfg-eth0:x alias files, for example, would be of
great use when configuring a server with a large number of aliased interfaces
that you don't want to be part of the normal address pool that can be bound to
with 'ANY' on an outgoing connection.
Comment 1 jbowman 2002-05-17 14:37:49 EDT
Err, that should be 'SCOPE=host' in my example, but you get the idea...
Comment 2 Dr. Stephan Wonczak 2002-10-17 09:51:24 EDT
Also, it would be really useful to be able to specify ONBOOT=no for the aliased
interfaces. This would allow you to preconfigure aliases identically on multiple
machines to be brought up when necessary (for migrating services for example)
Comment 3 iarly selbir 2009-10-26 13:44:52 EDT
It's so old... still issue persists??

--
Fedora Bugzappers Team Member
Comment 4 Bill Nottingham 2009-10-26 15:08:38 EDT
Yes.
Comment 5 Dale Stimson 2010-03-17 21:43:44 EDT
I found this bug because I ran into a situation where ifconfig (with respect to an infiniband interface) said:

--------------------------------------------------
$ ifconfig ib0
Ifconfig uses the ioctl access method to get the full address information, which limits hardware addresses to 8 bytes.
Because Infiniband address has 20 bytes, only the first 8 bytes are displayed correctly.
Ifconfig is obsolete! For replacement check ip.
...
--------------------------------------------------

And that motivated me to rewrite ifup-aliases to use /sbin/ip instead of ifconfig.  I have *lightly* tested the new file.  (It brings up the aliases OK on my system, but I am sure there are untested code paths).

Besides the changes directly related to changing from ifconfig to /sbin/ip, I have also done some variable initialization and changed some "${xxx}" to "${xxx:-}".  This is because (just for testing) I had a "set -u" present to detect undefined variables.

For a "freshen" I replaced a single invocation of
    /sbin/ifconfig $DEVICE netmask $NETMASK broadcast $BROADCAST;
with /sbin/ip calls to flush the address and then re-add it as there seemed to be no directly corresponding /sbin/ip functionality.


The base version of ifup-aliases came from initscripts-9.02.1-1.i686 as is current for Fedora 12.

File to be attached to this bug: ifup-aliases.patch

I will also attach a straight-up version of ifup-aliases for easy reference.
Comment 6 Dale Stimson 2010-03-17 21:45:54 EDT
Created attachment 400930 [details]
Patch ifup-aliases to remove ifconfig and use /sbin/ip instead
Comment 7 Dale Stimson 2010-03-17 21:47:09 EDT
Created attachment 400931 [details]
Entire file (not just a patch) showing removal of ifconfig in favor of /sbin/ip
Comment 8 Bill Nottingham 2010-10-27 12:07:51 EDT
*** Bug 132925 has been marked as a duplicate of this bug. ***
Comment 9 Michael Shigorin 2011-02-22 14:22:01 EST
While readin up on bug #195365 and bug #195353, I've grepped through initscripts-9.20.1-1.fc14 -- lots of ifconfig in ifup-*

See also https://www.linuxfoundation.org/collaborate/workgroups/networking/etcnet -- maybe let's go with innovation instead of age-old crap which isn't easily fixable due to ifconfig-era design decisions wrt ifcfg-* format?
Comment 10 Account closed by user 2011-03-15 15:26:22 EDT
/etc/net represents a new approach to Linux network configuration tasks.

Inspired by the limitations of traditional network configuration subsystems,
/etc/net provides builtin support for configuration profiles, interface name
management, removable devices, full iproute2 command set, interface
dependencies resolution, QoS and firewall configuration frameworks.

/etc/net provides support for the following interface types: Ethernet, WiFi
(WEP), IPv4/IPv6 tunnels, PSK IPSec tunnels, VLAN, PLIP, Ethernet bonding and
bridging, traffic equalizer, Pent@NET, Pent@VALUE, SkyStar-2, TUN/TAP,
OpenVPN TUN/TAP, OpenSSH TUN/TAP, usbnet and PPP. 

Due to its modular structure, support for new interface types can be added without overall design changes.


http://git.altlinux.org/people/sbolshakov/packages/?p=etcnet.git

It's used by ALTLinux since aug-2004
Comment 11 Robert Scheck 2011-03-15 16:08:32 EDT
Nevertheless, /etc/net is not a drop-in replacement for what we have now.
Comment 12 Michael Shigorin 2011-03-16 03:46:14 EDT
Definitely.  It's not maintaining bug compatibility like ifcfg-* (doing multiple IPs per interface with numbered variables is a syntax/parser horror), but this clearly has a price to pay in docs, habits, 3rd party tools and archived advice.

/etc/net was successfully introduced as an alternative networking configuration subsystem in ALT Linux and for a release or so there both net-scripts (distilled from initscripts) and etcnet were available (though conflicting over /etc/rc.d/init.d/network, of course).
Comment 13 Albert Strasheim 2011-09-05 04:38:16 EDT
Any chance we could get this fixed? This bug is headed for it's 10th birthday.
Comment 14 joshua 2012-04-25 19:00:02 EDT
Yes please... even if need a big overhaul, let's do it!
Comment 15 Bill Nottingham 2012-04-26 12:10:30 EDT
ifup-aliases uses ip as of a F-16 update.
See git commit 59a9d2b792ff218f5ccd8e4e8c0ffe6f76efb13a.

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