# no network

## fbe2

Hello,

  I'm just installing Gentoo for the first time. I have it all installed with the exception of the network. I have gone through the wifi networking pages on the gentoo.org handbook. First some specific questions:

  There are two states that my installation has:  the first is the LiveCD and the second is the root I created with the harddrive on my computer. The LiveCD had a networking setup that works fine. The second is not working. If I run ifconfig on the second it says that I only have the "lo" interface. So: what are the files that need to be setup so that the wifi is working.  Do I need the eth0 to be installed first? Why isn't the handbook working?

Thanks

----------

## The Doctor

Welcome to Gentoo!

Networking is one of the hardest things to understand because they have a steep learning curve. First, try ifconfig -a as the command you used only returns active interfaces which isn't necessarily helpful here.

Networking requires 2 or 3 things. First, a kernel driver. You may have missed this step, ifconfig -a will tell. Second, you may need firmware. Not all cards require this, but some do and it will keep networking from working. Third, you need the appropriate network tools. This is usually dhcpcd for wired and additionally wpa_supplicant for wireless.

I would check the kernel first (using ifconfig) and install linux-firmware if the kernel checks out. You may need to repeat the chroot steps on the live CD to do this. You do NOT need to reinstall.

Just repeat the mounting, network setup, copying reslov.conf, and chrooting steps and you should be able to use emerge.

If you need help finding the right kernel options, we can help with that too.

----------

## fbe2

Thanks Doctor. a few questions.  What will ifconfig -a reveal? I noticed that it will repeat the variables in /sys/class/net.  ifconfig -a says there are two variables: "lo" and "sit0". Does this mean that wlan0 is not in the kernel? If so, how do I get itin there? I don't think that info is in the handbook. 

Thanks

 *The Doctor wrote:*   

> Welcome to Gentoo!
> 
> Networking is one of the hardest things to understand because they have a steep learning curve. First, try ifconfig -a as the command you used only returns active interfaces which isn't necessarily helpful here.
> 
> Networking requires 2 or 3 things. First, a kernel driver. You may have missed this step, ifconfig -a will tell. Second, you may need firmware. Not all cards require this, but some do and it will keep networking from working. Third, you need the appropriate network tools. This is usually dhcpcd for wired and additionally wpa_supplicant for wireless.
> ...

 

----------

## krinn

 *fbe2 wrote:*   

> What will ifconfig -a reveal? I noticed that it will repeat the variables in /sys/class/net.

 

It will shown your interfaces, answering if drivers are loaded or not and how the cards are configure

 *fbe2 wrote:*   

>  I noticed that it will repeat the variables in /sys/class/net.

 

You notice good.

 *fbe2 wrote:*   

> Does this mean that wlan0 is not in the kernel?

 

wlan0 is classic interface name for wireless, so yes it mean you have no wireless interface ready (no drivers or no hw).

 *fbe2 wrote:*   

>  If so, how do I get itin there?

 

https://forums.gentoo.org/viewtopic-p-7746228.html#7746228

You can see at 1. howto get the driver name you need. But the handbook have a section for wireless https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Networking#Preparing_for_wireless_access

----------

## fbe2

Krinn,

Thanks for the reply and the help. Your first  link: I'm a 1d. My OP is:

01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 7)

Subsystem : Dell Device 05ec

02:00.0 Network controller: Intel Corporation Wireless 7260 (rev 73)

Subsystem: Intel Corporation Wireless-N 7260

 I went through the rest of the "for Dummies" just to see if it worked, but I think my problem was 1d. (incidentally, in my system there is  a /etc/init.d/net.lo instead of "net")

As for your second link there is no "iwconfig" . I  think I  have that figured out, so I thought I'd ask you how to get eth0 into the kernel. I have a driver cause it works (the network) with the LiveCD. 

Thanks

----------

## fbe2

Krinn,

I went back over the kenel install and I found the line, "Don't forget to include support in the kernel for the network cards."

I must have missed this the first time. 

So I'm assuming that the reason I don't have a wireless up is I don't have the wireless card listed.

Right now I just have the ethernet.

Thanks 

Bev

----------

## charles17

 *fbe2 wrote:*   

> So I'm assuming that the reason I don't have a wireless up is I don't have the wireless card listed.

 

For your wireless adapter, search this forum for 7260.  There is confusion as driver and firmware both seem to depend on which kernel version you have installed, see also https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi?s[]=7260 (scroll down to the table with Device Kernels Module Firmware).

----------

## krinn

 *fbe2 wrote:*   

> So I'm assuming that the reason I don't have a wireless up is I don't have the wireless card listed.
> 
> Right now I just have the ethernet.
> 
> 

 

Like i said to the other user in the post i have link upper. If you don't see the driver name to use with lspci -k it is because your kernel doesn't have it. You can do lspci -k with a kernel that have the driver and you will get the driver name.

And (hehe again to you like i said to him): where can you get such kernel? Any livecd have many drivers because of their usage, so that's sure bet to do it with one, and as your card is working on the installation cd you have used, it mean its kernel have it, so asking lspci on that installation cd will answer you.

but charles17 might offer a better help with his search for 7260, as not only you will find the driver name for your card, but more about it (firmware need...) from users using it.

----------

## fbe2

charles17 and krinn,

So the problem is that my kernel doesn't have the  proper driver. Now, do I look for another kernel or try to download the driver? I'm a little confused on that point.

Here's a related problem that I have. I thought I fixed it, but Id didn't. The only way that I have the network running is to use the LiveCD. When  I chroot to my harddrive I can't "emerge --ask blah...". It fails to resolve the DNS. I have the google DNS in the proper resolv.conf, so I don't know what the problem is. If I try and get the firmware stuff or the net-tools stuff via the network in the original root of the LiveCD it doesn't go to the proper place on my hd.

Thanks

Bev

----------

## charles17

 *fbe2 wrote:*   

> So the problem is that my kernel doesn't have the  proper driver. Now, do I look for another kernel or try to download the driver? I'm a little confused on that point.

 

As I understand https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi?s[]=7260#supported_devices the 7260 is supported by kernel since 3.10.

Did you try 

```
cd /usr/src/linux-<your kernel>

# make menuconfig

Then type / for getting the search mode

Enter iwlwifi and press enter

and it should show you where to find iwlwifi with hotkey  (1)

Press the hotkey (1) and you'll see highlighted

< >   Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwif

Then press the h button for more info and it will tell you which hardware is supported by iwlwifi.
```

See https://wiki.gentoo.org/wiki/Wifi#Device_Drivers telling you to activate

```
            <M> Intel Wireless WiFi Next Gen AGN - Wireless-N/Advanced-N/Ultimate-N (iwlwifi)

            <M>    Intel Wireless WiFi DVM Firmware support                             

            <M>    Intel Wireless WiFi MVM Firmware support
```

Then rebuild the kernel

```
# mount /boot && make && make install modules_install && grub2-mkconfig -o /boot/grub/grub.cfg && reboot
```

----------

## krinn

That user (you know the one from the thread i have point you to twice time, well, ok third now) was having similar problem with you, and of course his next questions were the same as you ; and you didn't think it could had help you to read the whole thread?

----------

## fbe2

Charles17,

Thanks. I followed  your instructions and got some interesting results. First, ifconfig had all the  proper interfaces listed (lo, wlp2s0, enp3s0). This was a big step. Next, from inside the LiveCD I was able to download the necessary net-tools and firmware by rewriting the resolv.conf. That was a big step too as I was then able to use iwconfig etc. 

Now it seems like everything is working except one thing. There is the wrong IP. For some reason it is overwriting resolv.conf every time it boots, and it is assigning the IP 10.0.1.?? to the interface. This last time it also overwrote wpa_supplicant.conf and assigned it two network (similar) variables. 

Right now I'm trying to figure out  which scripts are responsible for overwriting those scripts,and any help would be appreciated.

Thanks again

Bev

----------

## fbe2

 *krinn wrote:*   

> That user (you know the one from the thread i have point you to twice time, well, ok third now) was having similar problem with you, and of course his next questions were the same as you ; and you didn't think it could had help you to read the whole thread?

 

Krinn,

 You're right, I should have read the whole thread. That person's problem was very similar to my own. Thanks for all your help.

Bev

----------

## charles17

 *fbe2 wrote:*   

> There is the wrong IP. For some reason it is overwriting resolv.conf every time it boots, and it is assigning the IP 10.0.1.?? to the interface. This last time it also overwrote wpa_supplicant.conf and assigned it two network (similar) variables. 

 

Are you using a static IP adress or dhcp?  And does that happen only for wireless or also for ethernet?  

What I might have forgot to tell you is to use dhcpcd instead of the Gentoo net.* scripts.  Should make things much easier ...

----------

