# Why gentoo cannot access the Internet on my laptops?

## shanehou

Here is the thing. I firstly used the minimal CD to install Gentoo, but I stuck at the beginning of the handbook, because 'ifconfig -a' only showed 'lo'. So I searched the Internet and the forum, and somebody suggested to use 'lspci', and 'lspci' showed the right network devices on my computer (My computer is Acer 4738G, with Broadcom 57780). Then I tried 'modprobe -r tg3' and 'modprobe tg3', then 'ifconfig -a' showed 'enp2s0'. But I still couldn't access the Internet after setting IP, netmask and gateway (I could access the Internet this way on any other OS). I tried to ping the gateway, and it showed something like 'destination unreachable'.

So I figured out two ways to solve it: to download everything the installation needs, or the change a livecd. Obviously I chose the latter. I made an Ubuntu LiveCD to continue my installation. Everything went well, until I finished the installation and 'reboot' to enter my Gentoo: 'ifconfig -a' still only showed 'lo' (I had selected some related drivers and support in kernel), and 'tg3' was built in so I was unable to remove and load it. Then I tried to use 'genkernel', and things went back to the situation where the minimal CD was. I am still unable the access the Internet.

Can anybody help? I really want to use Gentoo, but it seems not so friendly to the laptop, for I have faced the same problem on my another laptop Lenovo Y460, and I faced no problem on my desktop computer when installing and using Gentoo.

----------

## NeddySeagoon

shanehou,

Welcome to Gentoo.

Do you intend to use a static network setup or do you want to use something like dhcpcd to assign your settings?

Your post did not mention the file /etc/resolv.conf  which needs to contain a line of the form 

```
nameserver <ip_address>
```

or site names won't work but IP addresses will.

If your tg3 support is made as a module, you will need to list in /etc/conf.d/modules or modprobe it by hand.  Network drivers are one of the few things not auto loaded.

Your wired interface should appear in 

```
ifconfig -a
```

even if its not up.

----------

## The Doctor

 *shanehou wrote:*   

> I could access the Internet this way on any other OS

 

Have you tried installing linux-firmware? I have experienced exactly this kind of problem when I properly set up my kernel but neglected the firmware. Other Linux distros tend to bundle it so you don't even notice you used it.

You could probably find the exact package if you wanted to be minimalistic about it.

EDIT: I would also like to add that this oversight on my part took me about 3 months to figure out the first time I tried to install Gentoo. I know first hand how frustrating it is to have all the components but somehow it still won't work.

----------

## NeddySeagoon

The Doctor,

linux-firmware can be configured to install only the firmware you want but you get the config stuff with linux-firmware, so you can't set up the config until its installed, if you see what I mean.

----------

## The Doctor

 *NeddySeagoon wrote:*   

> linux-firmware can be configured to install only the firmware you want but you get the config stuff with linux-firmware, so you can't set up the config until its installed, if you see what I mean.

 I think so. You install it and then you can tell it what features you would like to add or remove, like busybox.

----------

## shanehou

 *NeddySeagoon wrote:*   

> shanehou,
> 
> Welcome to Gentoo.
> 
> Do you intend to use a static network setup or do you want to use something like dhcpcd to assign your settings?
> ...

 

Thanks Neddy.

My Internet connection needs a static setup, and I have set my IP, netmask and gateway. As for DNS server, I also have set it in /etc/resolv.conf, but it doesn't matter, because I still cannot reach the gateway at all.

Now using genkernel, tg3 is a module, and like I said, everything goes back to the minimal CD situation - I can see the right network device through 'ifconfig -a' after I manually 'modprobe -r tg3' and 'modprobe tg3', but it's useless.

----------

## shanehou

 *The Doctor wrote:*   

>  *shanehou wrote:*   I could access the Internet this way on any other OS 
> 
> Have you tried installing linux-firmware? I have experienced exactly this kind of problem when I properly set up my kernel but neglected the firmware. Other Linux distros tend to bundle it so you don't even notice you used it.
> 
> You could probably find the exact package if you wanted to be minimalistic about it.
> ...

 

Thanks, I later found a great solution: http://archives.gentoo.org/gentoo-user/msg_0660911392cb23b34dd2bc859827ff0c.xml, and it works!

----------

