Ubuntu – Trying to configure two ethernet adapters – Failed to bring up eth1

12.04

Gurus of the internet please help. I am trying to configure 2 network adapters, one for local traffic (eth0) and the other for a T1 line to handle incoming requests to apache from the outside world. I am running 12.04 LTS Server.

Here is my /etc/network/interfaces ( I am using x to hide actual addresses )

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface for local traffic

auto eth0
iface eth0 inet static
address 192.168.1.201
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1

# Second NIC for T1

auto eth1
iface eth1 inet static
address x.x.x.x
netmask x.x.x.x
gateway x.x.x.x
dns-nameservers x.x.x.x x.x.x.x

if i run ifconfig -a i get

eth0      Link encap:Ethernet  HWaddr 00:13:3b:0c:1b:12  
          inet addr:192.168.1.201  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::213:3bff:fe0c:1b12/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:13716 errors:0 dropped:146 overruns:0 frame:0
          TX packets:1064 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1077933 (1.0 MB)  TX bytes:147855 (147.8 KB)
          Interrupt:46 Base address:0x2000 

eth1      Link encap:Ethernet  HWaddr 00:16:76:c2:81:b9  
          inet addr:x.x.x.x  Bcast:x.x.x.x  Mask:x.x.x.x
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20 Memory:90400000-90420000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:450 errors:0 dropped:0 overruns:0 frame:0
          TX packets:450 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:40004 (40.0 KB)  TX bytes:40004 (40.0 KB)

When I restart the network or reboot I get

ssh start/running, process 2853
RTNETLINK answers: File exists
Failed to bring up eth1.

Please help!

Best Answer

You have a default route on both interfaces. This is probally not what you want. Try to remove the gataway statement from your LAN interface eth0.

If that doesn't work, in a terminal bring down your interfaces with

sudo ifdown eth0 eth1

and bring up only one with

sudo ifup -v eth0

then

sudo ifup -v eth1

The option v gives you a lot of information whats going on and whats going wrong!