Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to configure two web servers for a load balancing server. The load balancing aspect works fine (it sees both server, kills 'em if it needs to, and seems to direct traffic fine). The only issue is with the servers looping:

/etc/sysconfig/network-scripts/ifcfg-lo:0

DEVICE=lo:0
IPADDR=<Virtual IP>
NETMASK=255.255.255.255
ONBOOT=yes
NAME=loopback

Everytime I try a "service network restart" I get a SIOCADDRT: No such process when loading the loopback interface.

Anyone have an idea what's causing this?

share|improve this question
    
How many interfaces on the system? If it's just a primary interface and lo, can you show us the ifcfg-eth0 file, too? It would be useful if you could include addresses in the file; if they both share the same first two octets, just replace them with "10.10" or something. The error you're getting often comes from route, so it would help to see the complete network configuration. –  larsks Feb 12 '11 at 1:33
    
Forgot about this question... I resolved it by @larsks's answer, but ended up throwing in the towel when it decided to stop working (after it was working fine for an hour). I appreciate your comments though! Sorry for wasting your time! –  Steve Rolfe Feb 12 '11 at 4:08

3 Answers 3

up vote 0 down vote accepted

Everytime I try a "service network restart" I get a SIOCADDRT: No such process when loading the loopback interface.

This typically comes from the route command, and means that you're trying to set up a route via an invalid gateway. For example, if I have:

# ip addr list
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether b8:ac:6f:a6:bf:a6 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.10/24 brd 192.168.1.255 scope global external

And then I try to add a route to 192.168.3.0 via 192.168.1.1, but accidentally make a typo and enter the wrong gateway address:

# route add 192.168.3.0/24 gw 192.168.2.1

Then I get this:

SIOCADDRT: No such process

If instead of doing a service network restart, what happens if you just use ifup lo:0? Do you still get the same error?

share|improve this answer

Add NO_ALIASROUTING=yes in your alias config, or in your parent device confg if you don't need routing for any alias. Check your ifup-aliases if it supports NO_ALIASROUTING. If not, setting GATEWAY="" in your alias config could do the trick.

share|improve this answer

Note that /usr/share/doc/initscripts-*/sysconfig.txt says that the alias devices should not duplicate the information contained in the parent device.

/etc/sysconfig/network-scripts/ifcfg-<interface-name> and
/etc/sysconfig/network-scripts/ifcfg-<interface-name>:<alias-name>:

  The first defines an interface, and the second contains
  only the parts of the definition that are different in a
  "alias" (or alternative) interface.  For example, the
  network numbers might be different, but everything else
  might be the same, so only the network numbers would be
  in the alias file, but all the device information would
  be in the base ifcfg file.

It also says use ONPARENT instead of ONBOOT:

ONBOOT=yes|no (not valid for alias devices; use ONPARENT)

ONPARENT=yes|no
  Whether to bring up the device when the parent device is brought
  up.
  Default: yes

This makes me think that ONBOOT=yes is incorrect. What happens if you use ONPARENT instead?

DEVICE=lo:0
IPADDR=<Virtual IP>
NETMASK=255.255.255.255
ONBOOT=yes

Update:

Turns out this doesn't really matter. As larsks says, /etc/sysconfig/network-scripts/ifup-aliases only checks for ONPARENT=no:

for FILE in ifcfg-${parent_device}:* ; do
   is_ignored_file "$FILE" && continue
   ini_env;
   . $FILE;
   [ -z "$DEVICE" ] && DEVICE=${FILE##ifcfg-}
   [ "$ONPARENT" != "no" -a "$ONPARENT" != "NO" ] && new_interface;
   unset DEVICE
done
share|improve this answer
1  
ONBOOT=yes works just fine for alias interfaces, regardless of the documentation. In fact, if you look at the ifup-aliases script, you'll see that it only checks for ONPARENT=no, so not setting it is the same as ONPARENT=yes. Use the source! –  larsks Feb 12 '11 at 1:30

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.