# Network card suddenly appears broken? Need help.

## arnvidr

I was working on upgrading my kernel from an ancient 2.6.33 or something to a 3.2 kernel, and after rebooting, I can never get online through my usual network card.

Not even with a live cd.

I am now tethered through my phone which is connected to my wireless network. My computer is wired to the wireless router, but doesn't seem to be able to connect. I tried connecting the computer directly to the regular router that's on the outside of the wireless router, to see if I had somehow managed to lock myself out, but dhcpcd simply reports "time out" every time I try to get a connection.

Need help diagnosing the problem. Could my card be fried? I am now running on an old systemrescuecd and ifconfig reports

```
eth0      Link encap:Ethernet  HWaddr 3D:00:00:00:D0:00  

          inet addr:169.254.10.231  Bcast:169.254.255.255  Mask:255.255.0.0

          inet6 addr: fe80::3f00:ff:fe00:d000/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:2906 errors:0 dropped:0 overruns:0 frame:0

          TX packets:3143 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:519715 (507.5 Kb)  TX bytes:572772 (559.3 Kb)

          Interrupt:17 Base address:0x2000
```

I get no errors that I have been able to find so far, besides

```
root@sysresccd /root % dhcpcd eth0   

Error, eth0: timed out
```

Ideas are very welcome.

----------

## NeddySeagoon

arnvidr,

You are getting a link local IP assigned, possibly because you have an agressive -t option in /etc/conf.d/net or possibky because you don't have all the bits for your kernel or as you say, some hardware has died.

What does dmesg show ?

What does 

```
lspci -k
```

 show when the interface works. Actually, that would be useful anyway.

Some Gigabit cards now need two modules loaded, a PHY driver and the normal driver.  The PHY driver must be loaded first or the interface won't work.

----------

## arnvidr

I will look over my kernel config before trying to boot back into my main install, I had lots of other troubles with the kernel upgrade (udev and whatnot) so I'm still on sysrescuecd for now.

The weird thing is that the net seemed to work "out of the box" with this same livecd many times in the past. It could be that it could work if it was directly connected to the outer router on boot, since that is new since the last time I needed to use it, I'm not familiar with enough to know if this would make any difference.

Which is to say, the interface never works, and I can't boot into my old kernel because various system upgrades seems to have made it unbootable. But maybe this will give some more info.

```
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 01)

        Subsystem: Micro-Star International Co., Ltd. Device 360c
```

dmesg didn't seem to give any special info, loading lots of drivers, seemed ok, then this

```
r8169: eth0: link up

r8169: eth0: link up

-----

NET: Registered protocol family 10

lo: Disabled Privacy Extensions

eth0: no IPv6 routers present

----

r8169: eth0: link down

r8169: eth0: link up

r8169: eth0: link down

r8169: eth0: link up

r8169: eth0: link down

r8169: eth0: link up
```

which frankly I'm not sure how to interpret. Complete dmesg from sysrescuecd here: http://pastebin.com/PH961gmf

----------

## NeddySeagoon

arnvidr,

That recurring link up/link down means that both ends of the link failed to auto negiotiate a onre or more elemets of the link setup.

Use ethertool to force the settings. 100Mb full duplex should be safe and fast enough to get you going.

----------

## arnvidr

ethtool reports the settings are fine

```
root@sysresccd /root % ethtool eth0

Settings for eth0:

        Supported ports: [ TP ]

        Supported link modes:   10baseT/Half 10baseT/Full 

                                100baseT/Half 100baseT/Full 

                                1000baseT/Full 

        Supports auto-negotiation: Yes

        Advertised link modes:  10baseT/Half 10baseT/Full 

                                100baseT/Half 100baseT/Full 

                                1000baseT/Full 

        Advertised auto-negotiation: Yes

        Speed: 100Mb/s

        Duplex: Full

        Port: Twisted Pair

        PHYAD: 0

        Transceiver: internal

        Auto-negotiation: on

        Supports Wake-on: pumbg

        Wake-on: g

        Current message level: 0x00000033 (51)

        Link detected: no
```

That last line was yes the first time I ran that command, but I suppose I messed it up with a

```
dhcpcd -x eth0
```

although I have done that many times previously since the last boot. Then the same timeout message when I try to bring it back.

This is weird though

```
root@sysresccd /root % ethtool -r eth0

Cannot restart autonegotiation: Operation not supported
```

The info certainly indicates that this should be supported...

I don't suppose you have any other ideas?

----------

## NeddySeagoon

arnvidr,

The setting looked fine when you looked.  If they were fine, it would work.

Please try forcing 100Mbit Full duplex, ao autonegioation can't mess things up.

----------

## arnvidr

I tried running

```
ethtool -s eth0 speed 100 duplex full autoneg off
```

and each time it resulted in

```
r8169: eth0: link down

r8169: eth0: link up
```

in dmesg, but no working connection. ethtool also still reports

```
Auto-negotiation: on
```

A lot of commands from ethtool result in 'Operation not supported' messages, not sure how I'm to interpret that...

----------

