Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I got a "RTNETLINK answers: File exists Failed to bring up eth0:1" on "ifup eth0:1".

I suspect it happens because i assigned a new mac adress in my VM's network adapter.

Can you tell me how to fix the issue?

My configuration looks like this:

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
allow-hotplug eth0
iface eth0 inet static
    address 192.168.1.80
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-nameservers 192.168.1.1

# Alias being connected to 192.168.10.x Network
auto eth0:1
allow-hotplug eth0:1
iface eth0:1 inet static
    address 192.168.10.83
    netmask 255.255.255.0
    gateway 192.168.10.10
    dns-nameservers 192.168.10.1

Why do I get "RTNETLINK answer: File exists.." suddenly? I worked with this configuration before without problems. All i did in the past is to renew the adapters mac adress.

At the moment I am connected to the 192.168.10.x Network and if I do

/etc/init.d/networking stop
/etc/init.d/networking start

then i got "RTNETLINK [...] falied to bring up eth0:1" but the strage thing is that i am able to connect to 192.168.10.83 via ssh from my host machine. But I cannot reach the internet from the debian client.

I hope it is clear what my problem is, now.

update

if i change my /etc/network/interfaces like this then "ifup eth0" fails, too with the same error!

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
allow-hotplug eth0
iface eth0 inet static
    address 192.168.10.83
    netmask 255.255.255.0
    gateway 192.168.10.10
    dns-nameservers 192.168.10.1

with verbose option enabled i got:

Configuring interfache eth0=eth0 (inet) 
run-parts --verbose /etc/network/if-pre-up.d 
ip addr add 192.168.10.83/255.255.255.0 broadcast 192.168.10.255 dev eth0 label eth0   
RTNETLINK answers: File exists Failed to bring up eth0.

same if i type this manually:

ip addr add 192.168.10.83/255.255.255.0 broadcast 192.168.10.255 dev eth0 label eth0
share|improve this question

migrated from serverfault.com Jul 11 '13 at 11:02

This question came from our site for professional system and network administrators.

    
How did you do that on Debian? It's Red Hat and its derivatives that use that sort of configuration, not Debian. –  Michael Hampton Jul 11 '13 at 5:56
    
i am not shure. Its some months ago. I remember that I deleted a special config file so that on ifup debian was able to create it new. I thought is was the ifcfg-eth* file but its possible that I am wrong. –  steven Jul 11 '13 at 6:01
    
@lain sorry, you are right I am a little bit confused. I updated my question and hope it is clearer now –  steven Jul 11 '13 at 7:14
    
check here, it may be helpful? linuxquestions.org/questions/linux-networking-3/… –  angs Jul 18 '13 at 11:10
    
if you type /sbin/ip link show what do you get? Most likely is that @lornix got the answer why it does not work. –  Manwe Jul 22 '13 at 17:58

2 Answers 2

Have a look at /etc/udev/rules.d/70-persistent-net.rules

This is mine: (appropriately munged)

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x10de:/sys/devices/pci0000:00/0000:00:0a.0 (forcedeth)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="11:22:33:44:55:66", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x168c:/sys/devices/pci0000:00/0000:00:14.0/0000:07:00.0 (ath5k)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="77:88:99:aa:bb:cc", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

I imagine you've got an entry for eth0 there, remove the whole line, then stop/start networking, or just reboot. The file should be recreated as the system (re)discovers the network devices.

This file is what maps a network device (by MAC) to a network device NAME. As an example, my "11:22:33:44:55:66" device, is called /dev/eth0.

This is how the system keeps from swapping eth0 and eth1 around each boot, if you were to have multiple NIC's, or multiple Wifi devices, and so on.

The file next to this one, 70-persistent-cd.rules, does the same for your CD/DVD/BD/laserdisc players, keeping them straight name-wise. (I'd love to see a usb laserdisc unit!)

share|improve this answer
    
thank you very much, I will check it out as far as possible. By the way.. it is possible to accept an answer after the bounty ends? –  steven Jul 24 '13 at 5:29

You have set two default gateways with the same metric. (https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1043244/comments/8)

Try to delete one gateway line which you don't want to use.

Also I'm not shure if allow-hotplug eth0:1 is correct. Try to delete it.

share|improve this answer

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.