# [Solved]Unable to configure ethernet/wireless on new install

## Aeons

Hello, this is my first post and I am having trouble getting my network up on a new Gentoo system. I have used Mint/Ubuntu for the last 4 years but my terminal skills are limited.

Networking worked fine from live usb, the installation went smoothly (3rd attempt), I used genkernel to set everything up and installed every Realtek module I could find in the network section ( lspci gave me: Ethernet controller: Realtek Semiconductor Co., Ltd. TRL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 07)).

The network settings did not carry over post-install despite following the handbook closely. Also I don't seem to have any tools - no lspci, no net-setup, etc which is making it hard to follow advice I am finding online.

I followed this thread :[/url]http://superuser.com/questions/734021/configuring-network-after-initial-install-of-gentoo[url] to chroot into the environment with the network setup from the live usb, reconfigure/compile the kernel and install the tools I was missing but the configuration didn't stick when I rebooted or the modules I added for the Realtek did not get loaded.

Anyway, I've been at this for 3 days before I posted here to try and work it out on my own but I'm missing something. I would post the outputs of what I've tried but I don't know how to do that from links on the live usb (I'm using another laptop to write this and use the wiki) and my head is swimming so I can't remember all the stuff I've tried anyway..

I was not sure if I should put this under the newbie section or not but I thought it was applicable here.

Any help is greatly appreciated.Last edited by Aeons on Mon Nov 30, 2015 11:04 pm; edited 1 time in total

----------

## khayyam

Aeons ... welcome to gentoo.

I've not looked at the handbook for some time so I'm not sure if any mention of sys-apps/pciutils (of which lspci belongs) is provided, anyhow, I assume that this package is among the "tools [you were] missing" that were subsequently installed. That being the case you can provide the output of following:

```
# lspci -v | awk -v RS= '/(Ether|Network)/{print $0 "\n"}'

# ifconfig -a
```

I'll assume at this time that you in fact have everything needed to have one or other interface working, and that its simply a matter of configuring it. So, provide the above and we should be able to offer you further instructions. It might be worth mentioning if ethernet, or wireless, is the prefered method ... and if the latter whether you installed net-wireless/wpa_supplicant or not.

best ... khay

----------

## Hu

First, we need to identify why your Gentoo system does not have network.  You focus extensively on whether you prepared the right network driver.  Loading the right driver is necessary, but not sufficient.  You might have a working network driver, but if the network device is not configured with a usable address and route, then being able to control your network card does not let you talk to the Internet.

You can use wgetpaste to send content to a pastebin, then link to it here.  Pastebin URLs are usually short, so you can retype them if necessary.  If you have a spare USB key, you could place the content on that key, then use your working laptop to upload or paste it, as needed.  Please start by providing us with the output of ifconfig -a as run from the non-working environment.  If posting this full output is difficult, then please examine that output and report how many interfaces you have and which ones have an IP address.  Please also post the output of route -n.  If you cannot post it, check whether you have a line which has a Genmask of 0.0.0.0 and a Gateway set to the internal IP address of your router.

----------

## Aeons

From installed environment:

```
ifconfig enp9s0

enp9s0:flags=4098<BROADCAST,MULTICAST> mtu 1500

             ether 08:9e:01:d0:38:be txqueuelen 1000 (Ethernet)

             RX packets 0   bytes 0 (0.0 B)

             RX errors 0   dropped 0  overruns 0  frame 0

             TX packets 0 bytes 0 (0.0 B)

             TX errors 0  dropped  0  overruns 0  carrier 0  collisions 0
```

```
ls /sys/class/net

enp9s0 lo
```

```
net-setup enp9s0

bash: net-setup: command not found
```

----------

## Aeons

 *Hu wrote:*   

> First, we need to identify why your Gentoo system does not have network.  You focus extensively on whether you prepared the right network driver.  Loading the right driver is necessary, but not sufficient.  You might have a working network driver, but if the network device is not configured with a usable address and route, then being able to control your network card does not let you talk to the Internet.
> 
> You can use wgetpaste to send content to a pastebin, then link to it here.  Pastebin URLs are usually short, so you can retype them if necessary.  If you have a spare USB key, you could place the content on that key, then use your working laptop to upload or paste it, as needed.  Please start by providing us with the output of ifconfig -a as run from the non-working environment.  If posting this full output is difficult, then please examine that output and report how many interfaces you have and which ones have an IP address.  Please also post the output of route -n.  If you cannot post it, check whether you have a line which has a Genmask of 0.0.0.0 and a Gateway set to the internal IP address of your router.

 

Thank you for responding.

should I be doing this from the live usb? I tried the wgetpaste command from the installed environment and its gave me a command not found error.

----------

## Aeons

 *khayyam wrote:*   

> Aeons ... welcome to gentoo.
> 
> I've not looked at the handbook for some time so I'm not sure if any mention of sys-apps/pciutils (of which lspci belongs) is provided, anyhow, I assume that this package is among the "tools [you were] missing" that were subsequently installed. That being the case you can provide the output of following:
> 
> ```
> ...

 

Thanks for responding - I learned how to use wgetpaste (kinda) enough to get an output https://bpaste.net/show/c1e2bbcb422a . However, lspci -v | awk -v RS= '/(Ether|Network)/{print $0 "\n"}' gives me a "No input to read. Nothing to paste. Aborting." error from wgetpaste. I did 

```
lspci -v | awk -v RS= '/(Ether|Network)/{print $0 "\n"}' | wgetpaste
```

.

I was focused on setting up the ethernet first because I thought it would be simpler since I used it during installation. I prefer wireless however.

https://bpaste.net/show/e50e73f52491 just lspci -v.

However this information is coming from teh liveusb environment because I can't seem to figure out how to output wgetpaste to some type of text file to transfer it from the networkless machine to here.

Now I can ACTUALLY post meaningful system information :0)Last edited by Aeons on Thu Nov 26, 2015 12:51 am; edited 1 time in total

----------

## Aeons

 *Hu wrote:*   

> First, we need to identify why your Gentoo system does not have network.  You focus extensively on whether you prepared the right network driver.  Loading the right driver is necessary, but not sufficient.  You might have a working network driver, but if the network device is not configured with a usable address and route, then being able to control your network card does not let you talk to the Internet.
> 
> You can use wgetpaste to send content to a pastebin, then link to it here.  Pastebin URLs are usually short, so you can retype them if necessary.  If you have a spare USB key, you could place the content on that key, then use your working laptop to upload or paste it, as needed.  Please start by providing us with the output of ifconfig -a as run from the non-working environment.  If posting this full output is difficult, then please examine that output and report how many interfaces you have and which ones have an IP address.  Please also post the output of route -n.  If you cannot post it, check whether you have a line which has a Genmask of 0.0.0.0 and a Gateway set to the internal IP address of your router.

 

I am having trouble figuring out how to get wgetpaste to output to a file I can transfer on usb to this computer to give you those outputs. I only see two interfaces when I run ifconfig -a - enp9s0 and lo. lo has inet of 127.0.0.1 and I don't see anything tht looks like an ip for enp9s0. Route -n gives me destination 127.0.0.0, gateway 0.0.0.0 genmask 255.0.0.0 flags U metric 0 ref 0 use 0 iface lo

----------

## Hu

Use wgetpaste to send the content directly to a pastebin.  If you want to save to a local file, use shell redirection instead.

You have already provided enough output to confirm my suspicion.  You have correctly loaded your network card driver and your card has been assigned the systemd predictable interface name of enp9s0.  However, according to your first response, there is no IP address assigned.  This indicates that either you did not configure DHCP or your DHCP client failed to configure an address.  Either way, you do not need to worry further about kernel support for your network card.  The output also suggests that your wireless card is not currently usable.  You may be missing firmware for it or it may require a driver you have not yet built.  You can debug this after you have working wired support, or you can switch to debugging wireless now and ignore wired support.

I will assume that your network cable is plugged in and works correctly, since you had fully working ethernet support during the install.  Please post or pastebin the contents of /etc/conf.d/net so that we can see how you configured your network card.  If this file is blank, the system would attempt to use DHCP by default.  If you have not installed a DHCP client, this would fail.  Since your network card is functional, you could temporarily assign an address and route by hand, which would get you working network support until your next reboot.  That may ease the process of providing information about the system and would let you continue installing other packages while you debug this issue.

----------

## khayyam

 *Aeons wrote:*   

> I am having trouble figuring out how to get wgetpaste to output to a file I can transfer on usb to this computer to give you those outputs.

 

Aeons ... you don't need wgetpaste for this, you use 'redirection (of stdout)' ... 'command > file', so for example:

```
# ifconfig -a > ifconfig-output
```

wgetpaste is simply a method of sending 'stdout' (standard output) to an online paste service.

 *Aeons wrote:*   

> I only see two interfaces when I run ifconfig -a - enp9s0 and lo.

 

'lo' is the 'loopback' interface, it provides for TCP/IP networking internally (ie, interprocess rather than interhost). enp9s0 is the ethernet device. 

 *Aeons wrote:*   

> [...] don't see anything tht looks like an ip for enp9s0.

 

In the pastbin output from 'ifconfig -a' provided above it shows enp9s0 as having '10.0.0.4' as an ip, this was probably provided by your router via dhcp, unless you configured this yourself.

 *Aeons wrote:*   

> Route -n gives me destination 127.0.0.0, gateway 0.0.0.0 genmask 255.0.0.0 flags U metric 0 ref 0 use 0 iface lo

 

OK, so there is no route/gateway for enp9s0. How did you bring up the interface, did you configure /etc/conf.d/net ... and/or did you emerge dhcpcd (or some other dhcp client)?

Even if you haven't emerged some dhcp client you should still be able to do the following:

```
# ln -s /etc/init.d/net.lo /etc/init.d/net.enp9s0

# /etc/init.d/net.enp9s0 start

# ping -c 1 forums.gentoo.org
```

If this fails for some reason, please provide the content of /etc/resolv.conf, and the output of 'ifconfig enp9s0' and 'route -n'

best ... khay

ps. once ethernet is working it'll be easier to setup wireless.

----------

## khayyam

 *Hu wrote:*   

> If you have not installed a DHCP client, this would fail.

 

Hu ... it use to be the case that in the absence of a dhcp client netifrc would use 'udhcpc' from busybox ... that may nolonger be the case, as I've not had the occasion when I've not had a client installed, and so see it use udhcpc.

best ... khay

----------

## Aeons

 *khayyam wrote:*   

>  *Aeons wrote:*   I am having trouble figuring out how to get wgetpaste to output to a file I can transfer on usb to this computer to give you those outputs. 
> 
> Aeons ... you don't need wgetpaste for this, you use 'redirection (of stdout)' ... 'command > file', so for example:
> 
> ```
> ...

 

Ok so I ran 

```
# ln -s /etc/init.d/net.lo /etc/init.d/net.enp9s0

# /etc/init.d/net.enp9s0 start

# ping -c 1 forums.gentoo.org
```

 and this brought up a working connection of sorts - I can connect to the web through links and post to pastebin now but the ping command returned a "ping: bad number of packets to transmit." error.

----------

## Aeons

ifconfig -a https://bpaste.net/show/6fb6c1fab6e7

ifconfig enp9s0 https://bpaste.net/show/6712449250ec

route -n https://bpaste.net/show/2168f89e4539

resolv.conf https://bpaste.net/show/cfd50e0e4f2e

----------

## khayyam

 *Aeons wrote:*   

> I can connect to the web through links and post to pastebin now but the ping command returned a "ping: bad number of packets to transmit." error.

 

Aeons ... are you sure you provided '1' (the numeral 'one') and not 'l' (the lowercase letter "L")? Anyhow, that's unimportant, you have networking and can continue with getting wireless working. BTW, there is no need to quote the entire post, or provide two post (the second 6 minutes after the first) when one would have sufficed, you can edit down the quote to whatever it is you're responding to ... doing so, makes it easier for us to read, and follow (I very nearly missed the second post).   

As Hu notes, you're missing some component for the wireless card driver ... your chipset is Broadcom BCM43228, which is supported by net-wireless/broadcom-sta (wl) ... though it may be supported by other (in kernel) drivers. I'm not familiar with this chipset, and so I'll let others offer advice on which driver is best ... if in fact there is an option. That said you're probably safe to try net-wireless/broadcom-sta (emerge, and attempt to 'modprobe wl'). If successful you should then see the wireless interface (wlpxxx) in the output of 'ifconfig -a', and so can then configure /etc/conf.d/net and /etc/wpa_supplicant/wpa_supplicant.conf to connect to your AP (I'll leave this for another post ... focus on getting the kernel driver installed and working).

best ... khay

----------

## krinn

127.0.0.0 should use 127.0.0.1 and not default (0.0.0.0)

You'll not make friend with your provider.

----------

## khayyam

 *krinn wrote:*   

> 127.0.0.0 should use 127.0.0.1 and not default (0.0.0.0) You'll not make friend with your provider.

 

krinn ... which, if true, would be a netifrc bug, and not a user configuration issue (this being the setup you get "by default" with net.lo). I'm not sure you are correct, the 'G' (use gateway) flag is missing. Anyhow, I don't have route (sys-apps/net-tools) installed, so I can't compare, but the following seems correct to me given the 'scope'.

```
# ip route show dev lo

127.0.0.0/8  scope host
```

... please explain why I'm wrong ... in three jokes or less ;)

EDIT: forgot I have busybox

```
# busybox route -n

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

0.0.0.0         192.168.2.254   0.0.0.0         UG    2003   0        0 wlan0

127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo

192.168.2.0     0.0.0.0         255.255.255.0   U     2003   0        0 wlan0
```

best ... khay

----------

## krinn

I have just tried to see, and it looks like kernel is not following any rule when destination is loopback, and find its way itself.

```
route del -net 127.0.0.0 netmask 255.0.0.0 lo

ping -c1 127.0.0.12

64 bytes from 127.0.0.12: icmp_seq=1 ttl=64 time=0.019 ms

```

So your right it works, but it doesn't mean it's correct to try routing something for loopback to anything that is not loopback.

----------

## Aeons

 *Quote:*   

> BTW, there is no need to quote the entire post, or provide two post (the second 6 minutes after the first) when one would have sufficed, you can edit down the quote to whatever it is you're responding to ... doing so, makes it easier for us to read, and follow (I very nearly missed the second post).

 

True, my bad - I'm new to forums, it never even occurred to me.

Happy Thanksgiving everyone, if you celebrate it.

So I was able to follow the wireless wiki for the most part - ifconfig -a: https://bpaste.net/show/0ff838034bae . I'm still working my way through the WPA section... Now that I have ethernet access wireless has taken a bit of a back seat to getting Xorg up and running. 

@krinn - Should I change something?

Thanks

-Aeons

----------

## khayyam

 *Aeons wrote:*   

> So I was able to follow the wireless wiki for the most part - ifconfig -a: https://bpaste.net/show/0ff838034bae . I'm still working my way through the WPA section... Now that I have ethernet access wireless has taken a bit of a back seat to getting Xorg up and running.

 

Aeons ... based on the 'ifconfig -a' you should be able to get wireless working with the following:

```
modules_wlp3s0b1="!plug wpa_supplicant dhcpcd"

wpa_supplicant_wlp3s0b1="-Dnl80211 -qq"

# or for wpa_supplicant debugging:

# wpa_supplicant_wlp3s0b1="-Dnl80211 -dd -f /var/log/wpa_supplicant.log"

config_wlp3s0b1="dhcp"
```

```
ctrl_interface=DIR=/run/wpa_supplicant GROUP=wheel

update_config=1

fast_reauth=1

network={

    ssid="yourAP"

    psk="yourPASSWORD"

}
```

```
# ln -s /etc/init.d/net.lo /etc/init.d/net.wlp3s0b1

# /etc/init.d/net.wlp3s0b1 start
```

... if for any reason it fails, enable wpa_supplicant debugging (comment the one line above and uncomment the other), retry, pastebin the log and provide the output of 'wpa_cli status'.

 *Aeons wrote:*   

> @krinn - Should I change something?

 

No, its not something you need to worry about.

EDIT: corrected '-Dnl80211', doh

best ... khayLast edited by khayyam on Mon Nov 30, 2015 7:09 am; edited 1 time in total

----------

## krinn

 *khayyam wrote:*   

>  *Aeons wrote:*   @krinn - Should I change something? 
> 
> No, its not something you need to worry about.

 

I've read that since kernel 2.2 the kernel handle loopback itself with its own rule.

So no, nothing to worry about.

And if you want to know where it comes from, it's because you use ip

 */etc/init.d/loopback wrote:*   

> 		if command -v ip > /dev/null 2>&1; then
> 
> 			ip route add 127.0.0.0/8 dev lo scope host
> 
> 		else
> ...

 

----------

## Aeons

 *khayyam wrote:*   

> 
> 
> ... if for any reason it fails, enable wpa_supplicant debugging (comment the one line above and uncomment the other), retry, pastebin the log and provide the output of 'wpa_cli status'.
> 
> 

 

http://pastebin.com/zeTDuy85

wpa_cli status returned: Failed to connect to non-global ctrl_ifname: (nil) error: No such file or directory.

I copied the text you wrote to another text editor to make sure I got the difference between L and 1 - I seem to be having a hard time telling between the two, is that a common problem?

Regardless, the l80211 driver seems to be the issue.

----------

## Hu

Some fonts make one and capital l look very similar.  Others make one and little L look very similar.  Good fonts make all three distinct.

----------

## khayyam

 *Aeons wrote:*   

> 
> 
> ```
> wlp3s0b1: Unsupported driver 'l80211'
> ```
> ...

 

Aeons ... that is a typo on my part, it should be '-Dnl80211' ... corrected above. Try again replacing '-Dl80211' with '-Dnl80211'.

 *Aeons wrote:*   

> I copied the text you wrote to another text editor to make sure I got the difference between L and 1 - I seem to be having a hard time telling between the two, is that a common problem?
> 
> Regardless, the l80211 driver seems to be the issue.

 

As Hu points out, its the font, you should select a font that makes 1 (one) and l (lower case L) clearly distinct ... also 0 (zero), and O (uppercase ohh) need to be distinguishable. 

best ... khay

----------

## Aeons

 *khayyam wrote:*   

> it should be '-Dnl80211' ... corrected above. Try again replacing '-Dl80211' with '-Dnl80211'.

 

Yup that definitely worked :0) 

Also corrected the font issue so thats going to cut down on future headaches!

Thanks again for the help (and everyone else as well).

-Aeons

----------

