# Cant seem to use the Internet

## Killey

My box is connected to a Linksys router, both set to automatically use DHCP. What I'm wondering is, why won't it let me get on the network? I need the internet to install ALSA all the way, but it's not working for whatever reason. Whenever I start up Mozilla, an error msg will pop up saying "Mozilla was unable to locate [homepage]" or something like that, and I can't connect directly to the router, either. Any ideas?

----------

## alec

Perhaps you need to set the gateway variable in /etc/conf.d/net to the IP address of your router.

----------

## Killey

I'll try that, and see if it works.

BTW, nice avatar. "We gotta move!"

----------

## Killey

Sorry, no such luck.

----------

## alec

Okee... well, I assume you've got your ethernet card set to DHCP and it's activated on boot.  What's the output of 'ifconfig'?

----------

## Killey

*Waves the n00b flag* Output of ifconfig? Sorry, don't know how to get it. Could you be kind enough to tell me?

----------

## alec

Open up a terminal or console as root (or as your user and then type 'su -') and type in 'ifconfig'.

----------

## Killey

Output of ifconfig is as follows:

```
lo (tab)

Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

inet6 addr: ::1/128 Scope:Host

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:100 errors:0 dropped:0 overruns:0 frame:0

TX packets:100 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:5000 ( 4.8 kb ) TX bytes:5000 ( 4.8 kb )

```

----------

## alec

It doesn't look like you've started up your internet.  I'm assuming you have a regular network card and you have the proper drivers for the kernel.  As root, type '/etc/init.d/net.eth0 start' - hopefully that'll get you on the net.  If it does, type 'rc-update add net.eth0 default' to have it start automatically each boot.

You may want to re-read the install documentation - it appears you missed a few steps.

----------

## Killey

After doing /eth/init.d/net.eth0 start, it says 

```
Failed to bring eth0 up
```

 which makes me think I did indeed miss something...

I'm going to go ahead and try 

```
net-setup eth0
```

 now.

Hmm, it says net-setup isn't recognized as a command, so I just did dhcpcd eth0 now

----------

## alec

As root, do a 'nano -w /etc/conf.d/net' and adjust the options as you need to.   If you can use DHCP with the card, then you have all the drivers in the right places.  Net-setup probably is an install-cd-thing only.

----------

## Killey

Is net-setup on the first CD or the second?

----------

## alec

I assume it's on the first CD.  As I recall, you still need to set options in /etc/conf.d/net manually - it's just there to help you get up and running.

----------

## Killey

net-setup, whenever I use it, says command not found in Bash, and I did set the options in that file. Before, when I didn't even have a cable plugged into the ethernet port, every time I started up the Gnome window manager, it would give me a message saying it couldn't log into something or other, but now with a cable going from it to the router, it doesn't give me that message.

----------

## pheelay

The Gnome error message may be unrelated.

You need to forget about net-setup.  Its really only for the LiveCD.

The next thing to check would be if you have the require module (driver) loaded for your network card.

How you you configure your kernel (genkernel or by hand)?

What type of network card have you got?

What is the output of '/sbin/lsmod' (again on bash prompt)?

This part of the setup is also covered in the Gentoo Installation guide.

----------

## Killey

 *Quote:*   

> How did you configure your kernel?

 

I did this by genkernel

The network card I have is integrated into the mobo, do a search for the Compaq 6310us, because that's the model I have, and it should tell you what my network card is.

Output is this (the spacing may look bad, if you see the post looking bad, I'm working on making it better):

```
Module              Size  Used by:     Tainted: GF

nls_iso8859-1       2780   1  (autoclean)

floppy             47004   0  (autoclean)

8139too            14152   0

mii                 2128   0  [8139too]

usb-storage        55608   0  (unused)

hid                12468   0  (unused)

uhci               23008   0  (unused)

usbcore            55456   1  [usb-storage hid uhci]
```

----------

## pheelay

Ok, looks like its using the 8139too module for you NIC

Try: 

```
# /sbin/ifconfig -a
```

If this doesn't show eth0, then boot the LiveCD, do  'lsmod' and see what module it uses for your NIC.

----------

## Killey

It shows eql, eth0, lo, sit0, and tap0, but I still don't know why I can't get to the internet...

----------

## Killey

Maybe I need to set the mask as something else?

I also did just the ifconfig -a command, not having to do the lsmod from the Live CD

----------

## pheelay

please post the relevant parts of /etc/conf.d/net (what u have uncommented)

Have you tried assigning an ip address in /etc/conf.d/net and seeing if that brings up the NIC?

Maybe a problem with DHCP.

----------

## Killey

Relevant parts are as follows:

```
Global config file for net* rc-scripts

iface_eth0="dhcp"

iface_eth1="dhcp"

dhcpcd_eth0="..."

```

I might try just assinging it an IP next.

Nope, didn't work either.   :Rolling Eyes: 

----------

