I recently installed a Ubuntu 8.04 server in a computer with two phisical network cards. During the installation process the installer asked me which of these two interfaces should be used as primary and he refered to them as eth0 (a 3Com) and eth1 (a Realtek). I chose the 3Com eth0 to be used as the primary network interface.
This is my first time trying to set up a linux box with two network interfaces.
I assumed that having detected both interfaces, then both of them would be configured somewhow, at least with DHCP. But after the installation ended I only have one network interface configured. I go to /etc/network/interfaces and there's only the eth0 (fixed IP address) and the loopback configuration. No eth1.
This is the original /etc/network/interfaces file
Code:
# 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
auto eth0
iface eth0 inet static
address 172.16.5.5
netmask 255.255.0.0
network 172.16.0.0
broadcast 172.16.255.255
gateway 172.16.5.82
And this is what I added by hand to try to see if I could get eth1 working
Code:
# The secondary network interface
auto eth1
iface eth1 inet static
address 192.168.2.7
netmask 255.255.255.0
network 192.168.2.0
broadcast 192.168.2.255
gateway 192.168.2.2
But when I restart networking this is what I get
Code:
$ sudo /etc/init.d/networking restart
* Reconfiguring network interfaces... SIOCSIFFLAGS: Invalid argument
SIOCSIFFLAGS: Invalid argument
SIOCSIFFLAGS: Invalid argument
Failed to bring up eth1.
I suspected that the secondary interface was not being physically recognized as a hardware component, but then why did the installer actually asked me for the primary interface? That means the it was able to determine that there were two network interfaces, isn't it? What's happening here?
Before you ask, this is the output of the command ifconfig -a
Code:
eth0 Link encap:Ethernet HWaddr 00:01:02:05:f2:a0
inet addr:172.16.5.5 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::201:2ff:fe05:f2a0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:394371 errors:0 dropped:0 overruns:31 frame:0
TX packets:156982 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:187449172 (178.7 MB) TX bytes:43155042 (41.1 MB)
Interrupt:16 Base address:0x8800
eth1 Link encap:Ethernet HWaddr ff:ff:ff:ff:ff:ff
inet addr:192.168.2.7 Bcast:192.168.2.255 Mask:255.255.255.0
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:17 Base address:0xec00
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:364 errors:0 dropped:0 overruns:0 frame:0
TX packets:364 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:28739 (28.0 KB) TX bytes:28739 (28.0 KB)
Note the invalid hardware address of eth1.