Network Adapter not working after HW upgrade

Asked by Wesley Michael

I am running Ubuntu 12.04 LTS. I upgraded the hardware of my machine (i.e. I took the hard drives out of my old machine, which no longer works and put them into a new machine). I am having a problem getting the Network Adapter to function.

I have a Gigabyte 990FXA-UD3 motherboard and I have read that Ubuntu has a problen with the Realtek chip on board. I downloaded the r8186-8.035.00 driver from the Realtek website and installed it into the kernel. I can see that the module is loaded and the system now sees the network adapter.

I edited the /etc/udev/rules.d/70-persistent-net.rules file and removed the eth0 line (from the old hardware) and renamed the eth1 entry to eth0.

Here is my /etc/network/interfaces file:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
 address 192.168.1.2
 netmask 255.255.255.0
 gateway 192.168.1.1

after rebooting here is the output of ifconfig -a

eth0 Link encap:Ethernet HWaddr 94:de:80:0b:93:2a
          inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
          inet6 addr: fe80::96de:80ff:fe0b:932a/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:1006 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1929 (1.9 KB) TX bytes:0 (0.0 B)
          Interrupt:75 Base address:0xa000

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

But, I can't ping anything outside of the machine. Any idea what I missed?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Wesley Michael
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Can you ping the internal IP of your router?

Revision history for this message
Wesley Michael (wam-zoominternet) said :
#2

No, the only thing I can ping is the loopback (I can ping the machine itself).

Revision history for this message
daniel CURTIS (anoda) said :
#3

Hi Wesley. I see, that you are using static IP, right? So, I think that 'auto eth0' option in '/etc/network/interfaces' file is not needed, because next you are define inet static. Maybe try to remove 'auto eth0' option, restart network etc.;

,-----[ network reload ]
| sudo /etc/init.d/networking restart
| sudo service resolvconf restart`
`-----

Cheers.

Revision history for this message
daniel CURTIS (anoda) said :
#4

Arrrgh! Sorry, but I forgot about one thing about changes in '/etc/network/interfaces' file. You could also try to add (of course 'auto eth0' option removed) information about DNS after gateway section;

,-----[ DNS settings example ]
| (...)
| dns-nameservers 8.8.8.8 192.168.1.1
`-----

Best regards and sorry one more time.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

Or add the nameserver lines /etc/resolvconf.d/resolvconf/head

I forget the exact file but the head file is used to generate resolv.conf :-)

Revision history for this message
daniel CURTIS (anoda) said :
#6

Hi Andrew. Maybe you're right about 'head' file, but this file cannot be edited by hand - changes will be overwritten. In my opinion, a better solution is to add 'nameserver' values to the '/etc/resolv.conf' file.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

You have that the wrong way around. The head file is static. It is the top text in resolv.conf which is generated. If you add to the head file and reboot, the text is added each time you boot and will appear before even the name setvers gained via DHCP. You can test this with:

echo "#actionparsnip was right" | sudo tee -a /etc/resolvconf/resolv.conf.d/head

reboot to test. You will see the text and then the DNS servers gained via DHCP. This is a good way to manually add DNS servers if you don't want to mess with slow GUI apps or want to remotely manage desktop systems via SSH.

Revision history for this message
Wesley Michael (wam-zoominternet) said :
#8

Thanks for the extra information. Sorry that I forgot to include that I have my DNS servers set up in the /etc/resolvconf/resolv.conf.d/base file:

nameserver 24.154.1.6
nameserver 24.154.1.7

The head file I leave unchanged. I specify the DNS servers here because I do not wish to use the ones that DCHP will provide. I have those set up to filter access to web-site that I don't want children to visit. I, however, get to go wherever I want.

I don't believe that DNS is my issue as I cannot ping anything on my side of my router, including the router itself. All I get is Destination Host Unreachable when I try.

I have another machine that is also running 12.04 and is set up the same way with static IP and the DNS nameservers in the base file. These files are unchanged after I switched the hardware for this machine. All I have done is modify the /etc/udev/rules.d/70-persistent-net.rules file to remove the old eth0 and change eth1 to eth0.

The switch that this machine is attached to is showing that the link is up, but nothing goes out.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#9

What is the output of:

sudo lshw -C network; lsb_release -a; uname -a

Thanks

Revision history for this message
daniel CURTIS (anoda) said :
#10

Hi Andrew. Okay I understood what you mean. I thought, that 'head' file can not be edited, because of this message on the top of this file;

,-----[ head file ]
| DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
`-----

Wesley if you want to protect your childer, then I suggest OpenDNS. Really, it is very easy to implement and offer a lot of interesting options, such as; filtering webpages content (nudity, pornography etc.), anti spoofing etc. Just create an account and that's all.

I understand, that you still have a problem with slow internet?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#11

Try:

clear; echo "head:"; cat /etc/resolvconf/resolv.conf.d/head; echo; echo "resolv.conf:"; head -n 2 /etc/resolv.conf

The similarity is not accidental.

Revision history for this message
Wesley Michael (wam-zoominternet) said :
#12

Daniel -- Thanks, actually, I do use OpenDNS and I find that it works really well. The problem isn't that it is slow, the problem is that it is nonresistant. No communication outside of the machine itself.

Andrew, here is the output from the commands:

matrix# lshw -C network; lsb_release -a; uname -a
  *-network
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: eth0
       version: 06
       serial: 94:de:80:0b:93:2a
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.035.00-NAPI duplex=full ip=192.168.1.2 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:75 ioport:b000(size=256) memory:dc104000-dc104fff memory:dc100000-dc103fff
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise
Linux matrix 3.2.0-39-generic #62-Ubuntu SMP Thu Feb 28 00:28:53 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
matrix# lshw -C network; lsb_release -a; uname -a > /media/ext4a/network
  *-network
       description: Ethernet interface
       product: RTL8111/8168B PCI Express Gigabit Ethernet controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: eth0
       version: 06
       serial: 94:de:80:0b:93:2a
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.035.00-NAPI duplex=full ip=192.168.1.2 latency=0 link=yes multicast=yes port=twisted pair speed=1Gbit/s
       resources: irq:75 ioport:b000(size=256) memory:dc104000-dc104fff memory:dc100000-dc103fff
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.2 LTS
Release: 12.04
Codename: precise

Revision history for this message
Wesley Michael (wam-zoominternet) said :
#13

Sorry about the duplicate information in my last post. I have to cut and paste onto a file on my flash drive and then take it over to another machine so I can post it here. Couldn't tell where to stop and start with my cutting and pasting.

Anyway, I've done some more digging this morning. Still don't have it working, but I really believe that it is some sort of configuration problem.

When I unplug the ethernet cable, I get the message (from dmesg):

[ 3240.514246] r8168: eth0: link down
[ 3241.120081] r8168: eth0: link down

Then after I plug the cable back in:

[ 3244.385740] r8168: eth0: link up
[ 3245.121022] r8168: eth0: link up

So, It would appear that the driver (r8168) in the kernel is able to see the hardware and is able to detect the link level. But, as I move up in the TCP stack, something is breaking down.

Revision history for this message
Wesley Michael (wam-zoominternet) said :
#14

So, this is not getting any better.

Thinking that perhaps the Realtek chip on the motherboard might be the problem, I put in a seperate PCI 10/100 Enternet card. It's a Hynix Semiconductor NC100 Network Everywhere Fast Enternet card using the tulip driver.

The system recognized it as eth1 and modified the /etc/network/interfaces and changed my entry for eth0 to eth1 and rebooted.

The same thing is happening with this new interface as the one on the motherboard. The link level is up, but nothing more.

I even tried booting off a 12.10 live CD and the eth1 interface was not able to set up using DCHP.

Revision history for this message
Wesley Michael (wam-zoominternet) said :
#15

Well, it would appear that the problem was hardware.

I went into the BIOS as disabled the onboard ethernet adapter. I was then able to boot up with the separate PCI card in the machine and after updating the /etc/udev/rules.d/70-persistent-net.rules file the network came up and worked fine. If I enabled the onboard ethernet again, I could not get the network to come up.

I took the motherboard back to Microcenter (they are really good about exchanging things) and got another one. The onboard ethernet adapter is working fine on this new one.

Thanks for helping me out.