# [Solved] Ethernet not working, despite module functioning

## chix4mat

Hi all: 

Last night, I upgraded my PC, which involved replacing the entire motherboard and processor. The boards are based on slightly different chipsets (P35 > X58), but because the on-board components are so similar, Gentoo booted up just fine after the upgrade. The graphics, Internet, audio and everything else worked fine. After I saw that things were fine, I rebooted into Windows and played a game for a bit. After I booted back into Gentoo, though, the Ethernet no longer worked, despite the kernel module being in use (r8169) and the configuration file (net) looking fine. 

If I boot up with either the Gentoo LiveCD or Ubuntu, the Internet works fine. The motherboard has two LAN ports, but only one seems to be detected fine in either of these, so that's where I am leaving it. Plugged in to this particular port, both Gentoo LiveCD and Ubuntu configure net.eth1 to work online. If I boot into my actual Gentoo install, the net configuration just doesn't work, and if I manually try to activate it, I get an error:

```
localhost rwilliams # /etc/init.d/net.eth1 restart

 * Starting eth1

 *   Configuration not set for eth1 - assuming DHCP

 *   Bringing up eth1

 *     dhcp

 *       Running dhcpcd ...

eth1: dhcpcd 4.0.15 starting

eth1: waiting for carrier

eth1: timed out
```

I also tried setting a manual IP address in the 'net' file, and then restart the service. That seemingly works, but there's still no Internet access afterward. If I try to configure net.eth0, it will tell me that I need to make sure I have the proper kernel module, but I do. lspci -vv shows that for both ports, the same kernel module is in use, and this is the same thing I see if I boot up with Gentoo LiveCD or Ubuntu where the Ethernet does function.

I am not sure what I could include to help my case, but I've uploaded a couple of outputs from the Gentoo LiveCD:

ifconfig

lspci -vv

lsmod

dmesg

Here's what I see in my native install if I try to use a dhcp connection: 

```
localhost rwilliams # ifconfig

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:36 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0

          RX bytes:2088 (2.0 KiB)  TX bytes:2088 (2.0 KiB)

localhost rwilliams # /etc/init.d/net.eth0 start

 * Starting eth0

 *   Bringing up eth0

 *     dhcp

 *       network interface eth0 does not exist

 *       Please verify hardware or kernel module (driver)                                                                                                                                                                              [ !! ]

localhost rwilliams # /etc/init.d/net.eth1 start

 * Starting eth1

 *   Bringing up eth1

 *     dhcp

 *       Running dhcpcd ...

eth1: dhcpcd 4.0.15 starting

eth1: waiting for carrier

eth1: timed out
```

Here's what I see if I try to specify an IP: 

```

localhost rwilliams # /etc/init.d/net.eth0 start

 * Starting eth0

 *   Configuration not set for eth0 - assuming DHCP

 *   Bringing up eth0

 *     dhcp

 *       network interface eth0 does not exist

 *       Please verify hardware or kernel module (driver)                                                                                                                                                                              [ !! ]

localhost rwilliams # /etc/init.d/net.eth1 start

 * Starting eth1

 *   Bringing up eth1

 *     192.168.1.5                                                                                                                                                                                                                     [ ok ]

 *   Adding routes

 *     default via 192.168.1.1 ...                                                                                                                                                                                                     [ ok ]

localhost rwilliams # ping google.com

ping: unknown host google.com
```

Here are the two different configurations I've used:

```
config_eth0=( "dhcp" )

dhcp_eth0="nodns nontp nonis"

config_eth1=( "dhcp" )

dhcp_eth1="nodns nontp nonis"

config_eth1=( "192.168.1.5 netmask 255.255.255.0 brd 192.168.1.255" )

routes_eth1=( "default via 192.168.1.1" )
```

Thanks in advance for any help!

----------

## Hu

To clarify, the card works in Linux until you exit Windows.  After you exit Windows, the card does not work in Linux until the system is cold-booted.  For those times when the card works in Linux, it works equally well under Ubuntu, a Gentoo LiveCD, and your Gentoo normal install.  For those times when the card does not work in Linux, it is completely non-functional for the duration of that Linux bootup (as opposed to working for some period of time, then failing), and there is no remedy other than to cold-boot the machine.  Are all these statements correct?  Are there any scenarios where it fails that do not match this description, or any scenarios where it works despite matching this description?

----------

## chix4mat

Hi Hu: 

I should have been more clear. The Ethernet in my native install of Gentoo oddly only worked the very first time I logged in. After I had the machine built, I boot up and it worked fine, so it was at that point I decided to go play a game in Windows. Since then, I've never had the Ethernet work again in my actual install. If I boot up with a LiveCD of either Gentoo or Ubuntu, it works just fine, along with it working fine in Windows. 

I am stumped as to how it would work in my actual Gentoo install on the first boot and then never again. I don't remember touching a single piece of configuration after I booted up, since everything worked from the get-go. 

Thanks!

----------

## krinn

Have a look, that might help https://forums.gentoo.org/viewtopic-t-776522-highlight-udev.html

----------

## chix4mat

 *krinn wrote:*   

> Have a look, that might help https://forums.gentoo.org/viewtopic-t-776522-highlight-udev.html

 

Wow, that worked, thanks a ton! I can't believe I spent hours upon hours tweaking when all it took was the deletion of a file *slaps head*. 

So glad it's fixed  :Very Happy: 

----------

## krinn

Glad it work, as you seen, it's pretty common.

You should edit your title to add [solved] to help others users find your thread for a solution.

----------

