_______ Feed on Posts or Comments

english & linux Franchu on 20 Sep 2008 08:35 pm

Gigabit Ethernet network card setup in Ubuntu 8.04 Server

Today I bought a new network interface for my new server: Conceptronic Gigabit Ethernet card (10€) that has a Realtek RTL8169SC chipset.

I knew that it was compatible with the Ubuntu 8.04 Server that I had installed, so I was a little bit surprised when I plugged it in and it didn’t work :(

First I checked and saw that I only had the old card (I knew that by the MAC address :)

$ ifconfig
eth1 Link encap:Ethernet HWaddr 00:80:5a:69:b2:d2
inet addr:192.168.0.23 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:fcff:fe2d:d7ba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:119 errors:0 dropped:0 overruns:0 frame:0
TX packets:110 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15165 (14.8 KB) TX bytes:16769 (16.3 KB)
Interrupt:11 Base address:0×4000

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:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14345 (14.0 KB) TX bytes:14345 (14.0 KB)

Next I wanted to see if the system had recognised the card or not so I ran..

$ sudo lshw -C network
*-network:0 DISABLED
description: Ethernet interface
product: RTL-8169 Gigabit Ethernet
vendor: Realtek Semiconductor Co., Ltd.
physical id: b
bus info: pci@0000:00:0b.0
logical name: eth0
version: 10
serial: 00:80:5a:69:b2:d2
size: 1GB/s
capacity: 1GB/s
width: 32 bits
clock: 66MHz
capabilities: pm bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.2LK duplex=full ip=192.168.0.250 latency=64 link=yes maxlatency=64 mingnt=32 module=r8169 multicast=yes port=twisted pair speed=1GB/s
*-network:1
description: Ethernet interface
product: RTL-8139/8139C/8139C+
vendor: Realtek Semiconductor Co., Ltd.
physical id: 11
bus info: pci@0000:00:11.0
logical name: eth1
version: 10
serial: 00:50:fc:2d:d7:ba
size: 100MB/s
capacity: 100MB/s
width: 32 bits
clock: 33MHz
capabilities: bus_master ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=8139too driverversion=0.9.28 duplex=full latency=32 link=yes maxlatency=64 mingnt=32 module=8139too multicast=yes port=MII speed=100MB/s

Good news! the system recognizes the card but somehow has not managed to bring it up. Let’s help it to know what module to load and under which device name. For that we assign to each network MAC address the module to be loaded in the DRIVERS attribute and assign it a device name in the NAME attribute :)

$ sudo vim /etc/udev/rules.d/70-persistent-net.rules

SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”r8169″, ATTR{address}==”00:80:5a:69:b2:d2″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”8139too”, ATTR{address}==”00:50:fc:2d:d7:ba”, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth1″

I also updated the configuration for the interfaces in the /etc/network/interfaces file:

$ sudo vim /etc/network/interfaces
# 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 192.168.0.250
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

auto eth1
iface eth1 inet dhcp

Now we restart the system to get the changes reloaded… I guess there is a less dramatic way to bring the changes life but didn’t feel like thinking much about it and anyway, I’m the only one in the server without anything critical running on it… yet :)

$ sudo shutdown -r now

And when the system goes back online…

$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:80:5a:69:b2:d2
inet addr:192.168.0.250 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::280:5aff:fe69:b2d2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:185 errors:0 dropped:0 overruns:0 frame:0
TX packets:175 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19020 (18.5 KB) TX bytes:24911 (24.3 KB)
Interrupt:11 Base address:0×4000

eth1 Link encap:Ethernet HWaddr 00:50:fc:2d:d7:ba
inet addr:192.168.0.23 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::250:fcff:fe2d:d7ba/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:49 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6220 (6.0 KB) TX bytes:1494 (1.4 KB)
Interrupt:10 Base address:0xc400

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:30 errors:0 dropped:0 overruns:0 frame:0
TX packets:30 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:14345 (14.0 KB) TX bytes:14345 (14.0 KB)

Everything looks great! :D and finally the server is ready to use the new Gigabit Ethernet connection :D

Related posts:

  1. Recovering GRUB in Ubuntu

Trackback This Post | Subscribe to the comments through RSS Feed

Leave a Reply