# Unable to connect to Internet during Gentoo installation

## Joakitex

Hello, I'm new to the forums and to the Linux world in general. I've finally decided to give Linux a try, so I downloaded the AMD64 Gentoo Minimal Install CD and booted from it, but even though I've been following the handbook step by step it seems impossible to get my computer connected to Internet.

This is what I've got (I don't know how to take a screenshot there, so I used my camera):

eth0 is being detected:

http://i.imgur.com/fZldk.jpg

ifconfig right after booting (the device is lo):

http://imgur.com/mpAcs

ifconfig -a (also after booting, device on top: eth0; at the bottom: lo):

http://imgur.com/Vgbvr

At this point, I am unable to ping anything

ifconfig after doing a net-setup eth0

http://imgur.com/GJZfP

Still unable to ping

dhcpcd:

http://imgur.com/Q74zJ

Still unable to ping

pppoe-setup and pppoe-start:

http://imgur.com/eoK8f

ping errors:

http://imgur.com/kupqB

http://imgur.com/tuvvu

This is basically my network setup:

http://i.imgur.com/yI8HF.jpg

And this is the info I've got on my router:

Removed as a precautionary measure. @Joakitex, if you decide to re-post, please obscure your public IP address. — JRG

As I stated before, I'm really new to Linux so please bare with my ignorance. Thank you.

----------

## The Doctor

Welcome to Gentoo!

I hope we can make you linux experience informative, although I should warn you Gentoo is a rather advanced distro. But don't worry. We try to be as friendly and helpful as we can.

first off, net.lo is a local thing that never goes to the net.

So your device is eth0. You should be able to just run netsetup on eth0 and then use ping -c 3 www.gentoo.org.

If this does not work, you might want to use the  system rescue cd to install. It will not change anything but it will give you a GUI network interface. I would guess that most of us use it.

You do NOT need to mess around with pppoe. Your router does that for you.

----------

## The Doctor

After looking at your eth0 after net-setup, it looks like it should work. Can you ping your router (I mean before you try using the pppoe-* commands)? Use this command ping -c 3 192.168.2.1 the command you were using will not terminate on its own. You would need to stop it using ctr+c

If that works but websites fail that it is just name resolution problems. You can fix those by using this: echo nameserver 8.8.4.4 >> /etc/resolv.conf.head This will tell the install environment to use the Google name server.

----------

## Joakitex

After messing around with the net-setup and dhcpcd commands for a while, I got it working.

http://i.imgur.com/eAUc0.jpg

After this huge success for me, I rebooted and tried to do that again. As I was expecting, I failed. I have absolutely no clue what could have happened so it started working, but I guess I'll have to keep trying until I get it right.

This is the output for ping 192.168.2.1

```
ping 192.168.2.1

connect: Network is unreachable
```

----------

## The Doctor

Well, hopefully you can repeat your success. One thing to note is the command you want to use to kill something in your terminal is ctr+c. ctr+z keeps the process running and puts it in the background. For something like ping, you really don't want to leave it running as it will just drain your resources without providing any benefit.

----------

## wcg

What is the inside ip address of the router? 192.168.2.1?

That should be your default gateway, and on my system,

I direct dns queries there, too (the router proxies them

to whatever it gets from the ISP for a default nameserver).

After you do net-setup eth0 (and exit the little dialog

thing), do this:

```

route

grep nameserver /etc/resolv.conf

```

Post the results.

----------

## Joakitex

 *wcg wrote:*   

> What is the inside ip address of the router? 192.168.2.1?
> 
> That should be your default gateway, and on my system,
> 
> I direct dns queries there, too (the router proxies them
> ...

 

Thanks, that helped me solve the problem. I wasn't setting up the gateway correctly (I was using the one that appeared on my router's config). 

I solved it by doing this:

```
net-setup eth0

Manual setup

IP: 192.168.2.2

Broadcast: 192.168.2.255

Mask: 255.255.255.0

Gateway: 192.168.2.1

Nameserver: 200.63.155.91
```

Again, thanks a lot.

----------

## wcg

De nada.

/etc/conf.d/ has configuration files that will be used by setup

scripts in /etc/init.d/ that run at boot. You can create a confguration

file /etc/conf.d/net that will by read by a boot script that sets up

your ip address on eth0, netmask, broadcast address, and

default gateway.

For example, on my current (ipv4-only, not using dhcp) desktop I have this

in /etc/conf.d/net:

```

modules=ifconfig

config_eth0="192.168.1.3 netmask 255.255.255.0 broadcast 192.168.1.255"

routes_eth0="default via 192.168.1.1"

```

192.168.1.1 is the lan-side ip address of the router.

----------

