Bug 5784 - linuxconf created ip aliases do not function
linuxconf created ip aliases do not function
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: linuxconf (Show other bugs)
6.1
i386 Linux
high Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
:
: 5778 5976 6069 6162 6777 6825 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-10-09 14:48 EDT by hannu.laurila
Modified: 2008-05-01 11:37 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-02-23 12:59:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description hannu.laurila 1999-10-09 14:48:08 EDT
If you set up an IP alias from linuxconf, the initscripts
won't bring the interface up.

linuxconf creates an alias file in this format:

/etc/sysconfig/network-scripts/ifcfg-eth0:0   :
IPADDR="10.100.190.13"
NETMASK="255.255.255.128"

I found out that if I add an DEVICE="eth0:0" line to the
file above things get done better but I don't know if
it is a good solution as we also have interface
configuration files (which worked in previous release of red
hat) of format:

IPADDR="10.100.190.80-126"
NETMASK=255.255.255.128
Comment 1 Bill Nottingham 1999-10-11 10:26:59 EDT
*** Bug 5778 has been marked as a duplicate of this bug. ***

Any ipalias values set in Linuxconf have no effect.

------- Additional Comments From jrimmer@irth.net  10/09/99 12:29 -------
From syslog (note: number replaced with '#'):
Oct  9 12:06:54 meany ifup-aliases:
/etc/sysconfig/network-scripts/ifup-aliases:
 ###.##.##.#: command not found
Oct  9 12:06:54 meany ifup-aliases:
/etc/sysconfig/network-scripts/ifup-aliases:
 ipseen_###_##_##_##: command not found
Oct  9 12:27:11 meany ifup-aliases: error in ifcfg-eth0:0: didn't
specify device
 or ipaddr
Oct  9 12:27:11 meany network: Briging up alias eth0 succeeded
Comment 2 Mike Bird 1999-10-13 04:42:59 EDT
This patch makes aliases work provided that, in linuxconf, you:
(a) specify only one IP address (not hostname) per line
(b) include an explicit netmask for each alias on the next line

Note that the broadcast address will be bogus if you are not
classful but, for aliases, this seldom matters.

This is obviously only intended as a quick workaround until
RedHat can provide a comprehensive solution.

--- /etc/sysconfig/network-scripts/ifup-aliases.SAFE
+++ /etc/sysconfig/network-scripts/ifup-aliases
@@ -159,7 +159,7 @@
                eval `/bin/ipcalc --netmask ${IPADDR}`
        fi

-       if [ -z "$BROADCAST" ]; then
+       if false; then #[ -z "$BROADCAST" ]; then
                eval `/bin/ipcalc --broadcast ${IPADDR} ${NETMASK}`
                nma=$NETMASK; nmb=${nma#*.}; nmc=${nmb#*.};
                NMGLOP="${nma%%.*}_${nmb%%.*}_${nmc%%.*}_${nmc#*.}";
@@ -293,6 +293,7 @@

        ini_env;
        . $FILE;
+       DEVICE="${FILE##ifcfg-}"
        new_interface;

 done
Comment 3 Bill Nottingham 1999-10-13 12:52:59 EDT
This is fixed in initscripts-4.53-1, which is in the current Raw Hide
release. It currently is relying on the fact that linuxconf
does *not* write a "DEVICE" field to parse the files properly.

Please re-open if this doesn't work for you.
Comment 4 Bill Nottingham 1999-10-16 00:00:59 EDT
*** Bug 5976 has been marked as a duplicate of this bug. ***

[root@goliath /root]# /sbin/ifup
eth0:0
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
192.168.2.252: unknown interface: No such device
Usage: inet_route [-vF] del {-host|-net} Target[/prefix] [gw
Gw] [metric M] [[dev] If]
       inet_route [-vF] add {-host|-net} Target[/prefix] [gw
Gw] [metric M]
                              [netmask N] [mss Mss] [window
W] [irtt I]
                              [mod] [dyn] [reinstate] [[dev]
If]
       inet_route [-vF] add {-host|-net} Target[/prefix]
[metric M] reject
       inet_route [-FC] flush      NOT supported
usage: /etc/sysconfig/network-scripts/ifup-aliases
<net-device>
usage: /etc/sysconfig/network-scripts/ifup-routes
<net-device>


------- Additional Comments From notting@redhat.com  10/15/99 11:38 -------
What does ifcfg-eth0:0 look like?

------- Additional Comments From alan@linuxfan.com  10/15/99 18:59 -------
Here is some script output indicative of the problem.  If you scan
through it you will notice that nowhere does the DEVICE variable ever
get set.  This, in turn, causes the DEVICETYPE and REALDEVICE
variables to be null..... resulting chaos insues.


Script started on Fri Oct 15 17:56:09 1999
[root@hudson network-scripts]# set -x
[root@hudson network-scripts]# . /sbin/ifup eth0:0
+ . /sbin/ifup eth0:0
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ cd /etc/sysconfig/network-scripts
++ . network-functions
++ need_hostname
+++ hostname
+++ hostname
+++ hostname
++ [ hudson.wild.prv = (none) -o hudson.wild.prv = localhost -o
hudson.wild.prv = localhost.localdomain ]
++ unset NEEDHOSTNAME
++ CONFIG=eth0:0
++ [ -z eth0:0 ]
++ [ -f eth0:0 ]
++ CONFIG=ifcfg-eth0:0
++ [ -f ifcfg-eth0:0 ]
++ [ 0 != 0 ]
++ source_config
+++ basename ifcfg-eth0:0
+++ sed s/^ifcfg-//g
++ DEVNAME=eth0:0
++ basename ifcfg-eth0:0
++ grep [^g]-
++ . ifcfg-eth0:0
+++ IPADDR=192.168.2.254
+++ NETMASK=255.255.0.0
++ [ foo = fooboot -a  = no ]
++ IPSETUP=no
+++ echo
+++ sed s/[0-9]*$//
++ DEVICETYPE=
+++ echo
+++ sed s/:.*//g
++ REALDEVICE=
++ echo
++ grep -q :
++ ISALIAS=no
++ [  = yes ]
++ [  = bootp -o  = dhcp ]
++ OTHERSCRIPT=/etc/sysconfig/network-scripts/ifup-
++ [ -x /etc/sysconfig/network-scripts/ifup- ]
++ /sbin/ifconfig
++ grep -s not found
++ [ 1 = 0 ]
++ [  = yes -a no = no -a  !=  -a -x /sbin/ifenslave ]
++ [ -n  ]
++ [ -n  ]
++ [ -z 255.255.0.0 ]
++ [ -z  ]
+++ /bin/ipcalc --broadcast 192.168.2.254 255.255.0.0
++ eval BROADCAST=192.168.255.255
+++ BROADCAST=192.168.255.255
++ [ -z  ]
+++ /bin/ipcalc --network 192.168.2.254 255.255.0.0
++ eval NETWORK=192.168.0.0
+++ NETWORK=192.168.0.0
++ ifconfig 192.168.2.254 netmask 255.255.0.0 broadcast
192.168.255.255
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
192.168.2.254: unknown interface: No such device
++ [ no = no ]
+++ route -n
+++ sed s/ .*//
+++ grep 192.168.0.0
++ [ -z 192.168.0.0 ]
++ route add -host 192.168.2.254
SIOCADDRT: No such device
++ [  !=  -a  != none ]
++ . /etc/sysconfig/network
+++ NETWORKING=yes
+++ FORWARD_IPV4=no
+++ HOSTNAME=hudson.wild.prv
+++ GATEWAY=192.168.2.51
+++ GATEWAYDEV=eth0
++ [ 192.168.2.51 !=  ]
++ [ eth0 =  -o eth0 =  ]
++ [  = yes ]
++ exec /etc/sysconfig/network-scripts/ifup-post ifcfg-eth0:0
usage: /etc/sysconfig/network-scripts/ifup-aliases <net-device>
usage: /etc/sysconfig/network-scripts/ifup-routes <net-device>

Script done on Fri Oct 15 17:56:20 1999


------- Additional Comments From alan@linuxfan.com  10/15/99 19:46 -------
Here is some script output indicative of the problem.  If you scan
through it you will notice that nowhere does the DEVICE variable ever
get set.  This, in turn, causes the DEVICETYPE and REALDEVICE
variables to be null..... resulting chaos insues.


Script started on Fri Oct 15 17:56:09 1999
[root@hudson network-scripts]# set -x
[root@hudson network-scripts]# . /sbin/ifup eth0:0
+ . /sbin/ifup eth0:0
++ PATH=/sbin:/usr/sbin:/bin:/usr/bin
++ cd /etc/sysconfig/network-scripts
++ . network-functions
++ need_hostname
+++ hostname
+++ hostname
+++ hostname
++ [ hudson.wild.prv = (none) -o hudson.wild.prv = localhost -o
hudson.wild.prv = localhost.localdomain ]
++ unset NEEDHOSTNAME
++ CONFIG=eth0:0
++ [ -z eth0:0 ]
++ [ -f eth0:0 ]
++ CONFIG=ifcfg-eth0:0
++ [ -f ifcfg-eth0:0 ]
++ [ 0 != 0 ]
++ source_config
+++ basename ifcfg-eth0:0
+++ sed s/^ifcfg-//g
++ DEVNAME=eth0:0
++ basename ifcfg-eth0:0
++ grep [^g]-
++ . ifcfg-eth0:0
+++ IPADDR=192.168.2.254
+++ NETMASK=255.255.0.0
++ [ foo = fooboot -a  = no ]
++ IPSETUP=no
+++ echo
+++ sed s/[0-9]*$//
++ DEVICETYPE=
+++ echo
+++ sed s/:.*//g
++ REALDEVICE=
++ echo
++ grep -q :
++ ISALIAS=no
++ [  = yes ]
++ [  = bootp -o  = dhcp ]
++ OTHERSCRIPT=/etc/sysconfig/network-scripts/ifup-
++ [ -x /etc/sysconfig/network-scripts/ifup- ]
++ /sbin/ifconfig
++ grep -s not found
++ [ 1 = 0 ]
++ [  = yes -a no = no -a  !=  -a -x /sbin/ifenslave ]
++ [ -n  ]
++ [ -n  ]
++ [ -z 255.255.0.0 ]
++ [ -z  ]
+++ /bin/ipcalc --broadcast 192.168.2.254 255.255.0.0
++ eval BROADCAST=192.168.255.255
+++ BROADCAST=192.168.255.255
++ [ -z  ]
+++ /bin/ipcalc --network 192.168.2.254 255.255.0.0
++ eval NETWORK=192.168.0.0
+++ NETWORK=192.168.0.0
++ ifconfig 192.168.2.254 netmask 255.255.0.0 broadcast
192.168.255.255
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
192.168.2.254: unknown interface: No such device
++ [ no = no ]
+++ route -n
+++ sed s/ .*//
+++ grep 192.168.0.0
++ [ -z 192.168.0.0 ]
++ route add -host 192.168.2.254
SIOCADDRT: No such device
++ [  !=  -a  != none ]
++ . /etc/sysconfig/network
+++ NETWORKING=yes
+++ FORWARD_IPV4=no
+++ HOSTNAME=hudson.wild.prv
+++ GATEWAY=192.168.2.51
+++ GATEWAYDEV=eth0
++ [ 192.168.2.51 !=  ]
++ [ eth0 =  -o eth0 =  ]
++ [  = yes ]
++ exec /etc/sysconfig/network-scripts/ifup-post ifcfg-eth0:0
usage: /etc/sysconfig/network-scripts/ifup-aliases <net-device>
usage: /etc/sysconfig/network-scripts/ifup-routes <net-device>

Script done on Fri Oct 15 17:56:20 1999


------- Additional Comments From webguy@cco.net  10/15/99 21:57 -------
Had the same problem. ifcfg-eth0:0 says:

IPADDR="10.200.7.44"
NETMASK="255.255.0.0"
Comment 5 Bill Nottingham 1999-10-18 17:10:59 EDT
*** Bug 6069 has been marked as a duplicate of this bug. ***

If you use linuxconf/config/networking/server tasks/IP
aliases for virutal hosts the virtual hosts do not work.
linuxconf makes some files in
/etc/sysconfig/network-scripts like ifcfg-eth0:? and if you
try and run ifup-aliases you get errors like the following:

ipseen_130_37_129_65-74=ifcfg-eth0:0: command not found
ifup-aliases: error in ifcfg-eth0:0: already seen ipaddr\
   130.37.129.65-74 in -74

The ifup-aliases script has some documentation regarding
IPADDR_START, IPADDR_END, but the files created by linuxconf
don't seem to follow this and use IPADDR.

If you undo some of the debugging comments in ifup-aliases,
the device (in the script as $DEVICE) does not appear to be
defined correctly. But, if you change it to $device, other
parts seem not to work.
Comment 6 Bill Nottingham 1999-10-20 18:52:59 EDT
*** Bug 6162 has been marked as a duplicate of this bug. ***

The following is an error with the ifup-aliases script in
/etc/sysconfig/network-scripts

If I add an ip range in ifcfg-eth0:0 like x.x.x.90-100, the
following happens error shows up in /var/log/messages:

ifup-aliases: /etc/sysconfig/network-scripts/ifup-aliases:
ipseen_x_x_x_90-100=ifcfg-eth0:0: command not found
ifup-aliases: error in ifcfg-eth0:0: already seen ipaddr
x.x.x.90-100 in -100

This worked in RedHat 6.0. I got around the problem by
replacing the ifup-aliases script in 6.1 with the script in
6.0, and it worked...

--vt
Comment 7 Bill Nottingham 1999-11-08 10:44:59 EST
*** Bug 6777 has been marked as a duplicate of this bug. ***

After installing redhat 6.1 on one of our web servers we
noticed that it was not responding to requests correctly,
after checking, the ip aliases for our server had not been
initialized.  A clean install on another system produced the
same effect (after configuring the aliases using
linuxconf).  The quick solution for us was to copy
ifup-aliases from the package that came with 6.0 (this fixed
both machines)

I checked to see if this had been submitted as a bug, and it
doesn't seem so... which is kind of surprising... hopefully
I'm not bothering you all with something that has already
been brought up.

------- Additional Comments From mlewis@cjp.com  11/06/99 11:20 -------
nevermind, after searching on initscripts instead of ipup-aliases I
found the old bug report... sorry
Comment 8 Bill Nottingham 1999-11-08 13:51:59 EST
*** Bug 6825 has been marked as a duplicate of this bug. ***

I noticed your name in the new 6.1 ifup-aliases script.  I
had problems bring up virtual interfaces and with a little
bugging noticed that the following line seemed to be
missing.

	DEVICE="`echo $FILE | sed -e 's/ifcfg\-//'`"

I placed this line in the function new_interface().  Just
below the assignment line that starts with IPGLOP and above
line that starts wtih DEVNUM.  Around line 133 in the file.

I am not sure if this is where you intended the assignment
to be made, but it seems to work correctly.

I added the line because at line 156 with the compare of

      if [ -z "$DEVICE" -o -z "$IPADDR" ]; then
      	echo "error in $FILE: didn't specify device or
ipaddr" >&2 ; exit 0
      fi

$DEVICE is empty and causes script to fail.


------- Additional Comments From byrum@northwall.net  11/08/99 12:40 -------
Sorry about the strange context, I send this also in an email to Bill
Nottingham who is in the header of the file as the last person to
modify ifup-aliases.
Comment 9 Tim Waugh 2000-02-23 07:12:59 EST
This is still not fixed in the latest tree.
Comment 10 Tim Waugh 2000-02-23 07:13:59 EST
Or rather, eth0:0 is indeed brought up but linuxconf cannot edit its
configuration.
Comment 11 Bill Nottingham 2000-02-23 12:59:59 EST
Then it's no longer an initscripts problem, but a linuxconf problem.
Comment 12 Brent Fox 2002-06-05 00:20:53 EDT
Closing since we don't ship linuxconf anymore.

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