1
sudo /etc/init.d/networking restart
 * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
 * Reconfiguring network interfaces...                                                                                                                                  ssh stop/waiting
ssh start/running, process 20418
RTNETLINK answers: File exists
Failed to bring up eth0:0.
RTNETLINK answers: File exists
Failed to bring up eth0:1.
RTNETLINK answers: File exists
Failed to bring up eth0:2.

I am not able to access my network from outside. But locally there is no problem accessing it. I am able to ping the ip address that I am using to access remotely.

Here is my etc/network/interfaces

auto eth0
iface eth0 inet static
      address 192.168.1.200
      netmask 255.255.255.0
      network 192.168.1.0
      broadcast 192.168.1.255
      gateway 192.168.1.1

auto eth0:0
iface eth0:0 inet static
      address 192.168.2.200
      netmask 255.255.255.0
      network 192.168.2.0
      broadcast 192.168.2.255
      gateway 192.168.2.1

auto eth0:1
iface eth0:1 inet static
      address 192.168.3.200
      netmask 255.255.255.0
      network 192.168.3.0
      broadcast 192.168.3.255
      gateway 192.168.3.1


auto eth0:2
iface eth0:2 inet static
      address 192.168.4.200
      netmask 255.255.255.0
      network 192.168.4.0
      broadcast 192.168.4.255
      gateway 192.168.4.1
3
  • Show us your /etc/network/interfaces? Obviously something is broken in it. But we can make suggestions without seeing the file. My guess is have done something silly like try to define multiple default gateways. IE you are doing something wrong.
    – Zoredache
    Sep 18, 2013 at 6:59
  • Updated the question Sep 18, 2013 at 7:16
  • You can't just add multiple default gateways like that. You should only have one default gateway.
    – Zoredache
    Sep 18, 2013 at 7:18

2 Answers 2

2

net-tools is evil and cryptic (I have been saying that a lot lately). It is also ancient, and its obsolete naming conventions have confused you.

The "subinterface" 0 (they're not really subinterfaces) is an alias for the root interface, so when you set the interface for eth0:0, it conflicts with the settings for eth0. This is not the cause of your error but it will bring you pain later as it silently replaces 192.168.1.200/24 with 192.168.2.200/24.

I suspect the error you are seeing is happening when the autoconfig script attempts to add multiple default routes that differ only in gateway. You do not need all these default routes. However, if you were wanting them, you would need to somehow specify (at least) a metric, which you can't using this file. A route on dev eth0 will be added for each of your subnets automatically; you only need one default route to send other traffic through. One reason the routes are identical is that they are all associated with eth0 because the subinterfaces are not really subinterfaces.

2
  • So what am I supposed to do now?? Sep 18, 2013 at 8:04
  • Specify the gateway directive in only one block (it's optional), and increment each of the subinterface numbers (count from 1). Sep 18, 2013 at 8:37
0

I had the same issue in Ubuntu 12.04
I use the command below to find my network interface
When setting up your network you will need to know the network interface cards on your computer. The interface name of cards for different vendors may be different, which is why this step is needed.

ls /sys/class/net

then you can edit /etc/network/interface according to above result with your organization network information after that you can bring you network interface up using below command

ifconfig eth1 down && ifconfig eth1 up

or

/etc/init.d/networking/restart

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .