# [SOLVED] Ethernet interface not working

## Kawagen

hello, I just finished gentoo installation today but cant seem to connect to the internet now. I followed the handbook very closely. I tried to ping gnu.org, gentoo.org, 8.8.8.8 but got "Temporary failure in name resolution". I added DNS to /etc/resolv.conf, no change. ifconfig doesnt show the enp5s0 I listed when installing from liveCD.

I've been up and down the internet looking for an answer (mostly results on this forum) and found problems almost identical to mine. but haven't found an explanation/solution.

I'll try and list the steps I've gone through already, along with the info.

#1

ifconfig -a just shows lo: and sit)

#2

dmesg | grep enp5s0 gives nothing

#3

rc-service net.enp5s0 start

*caching service dependencies ...

*Bringing up interface enp5s0

*     ERROR: interface enp5s0 does not exist

*     Ensure that you have loaded the correct kernel module for your hardware

*ERROR: net.enp5s0 failed to start[/list]

#4

lspci -k | grep -A5 Ether

05:00:0 Ethernet Controller: Broadcom Inc. and subsidiaries NetLink BCM57780 Gigabit Ethernet PCIe (rev 01)

             sub system: Dell NetLink BCM57780 Gigabit Ethernet PCIe

             Kernel modules: tg3

(I've seen on other posts that "Kernel driver in use: tg3" is also listed but not for me?)

#5

/etc/conf.d/net and /etc/init.d/net.enp5s0 are as they should be

I've tried more than those listed, cant seem to think of all of them. tg3 appears to be loaded just fine, so im confused what the problem is.

I'm very new to Gentoo and excited to start but its been a headache just getting there.

I would GREATLY appreciate any help, thank you.Last edited by Kawagen on Wed Jun 03, 2020 12:28 am; edited 1 time in total

----------

## Jaglover

Welcome to Gentoo, Kawagen

Your #1 is the key to your problem. For some reason kernel driver does not load properly. You could pipe your dmesg to less and inspect it closely, the hint why your NIC is not initialized is there. Perhaps it requires firmware?

----------

## depontius

Let's check one basic, I agree that failing to list anything other than lo and sit is key.  What does "lsmod" say, and in particular does it list "tg3".  Next I would look in dmesg or /var/log/messages for anything about tg3 or BCM57780.  (case-insensitive, of course).  Finally I would also make sure that you've selected the tg3 in your kernel config, either built-in or as a module.

----------

## Kawagen

lsmod lists nothing. I remember using some other command today to try and load the module and it said it was already loaded.

and yes tg3 is selected in the kernel it was by default. i switched it module and rebuilt, rebooted. no luck

using nano and "Where is" in /var/log/messages

tg3.c:v3.137 (May 11, 2014)

libphy: tg3 mdio bus: probed

tg3 0000:05:00.0: No PHY devices

BCM57780 not found

not sure if that really says anything, maybe theres a better way to navigate than nano  :Razz: 

----------

## NeddySeagoon

Kawagen,

What does 

```
grep -i CONFIG_BROADCOM_PHY /usr/src/linux/.config
```

tell?

The driver for your ethernet interface is in two pieces.

The tg3 kernel driver takes care of the PCIe end of the device.

The other end, close to the wires has its own driver. Its probably BROADCOM_PHY.

The hint here is your 

```
No PHY devices 
```

```
$ grep -i CONFIG_BROADCOM_PHY /usr/src/linux/.config

# CONFIG_BROADCOM_PHY is not set
```

That's the wrong answer for you.

----------

## Kawagen

fell asleep...

but as you said "CONFIG_BROADCOM_PHY is not set"

what should i do now? change it?

should i figure out what motherboard i have?

----------

## NeddySeagoon

Kawagen,

You need to rebuild and reinstall your kernel with that option enabled.

Then reboot to use the new kernel.

The exact steps depend on how your build your kernels.

Knowing the motherboard doesn't help a great deal. Electrical component suppliers design and manufacture 'interchangable' parts that all have the same electrical connections (hence 'interchangable') but need different software drivers.

lspci helps a lot. As these parts are 'interchangable' motherboard manufactures haggle with component suppliers and fit whatever is the lowest cost at the time.

That means nobody knows exactly what parts you have on your individual motherboard. 

Sound cards are like this too. They have a PCIe driver and a CODEC driver. Users are quite picky about their CODECS, so its less oy a problem.

----------

## Kawagen

I got it working thanks for all your help  :Smile: 

it appeared to be a BCM specific driver in the kernel

----------

## gonzaleznelson

I never thought this problem would be related to the kernel. I write this aside, thank you very much.

----------

