# First time Gentoo user - Need help connecting to my network

## The Fire Snake

Hello everybody,

This is my first post on this board and my first time installing Gentoo.  I have been using Kubuntu for the last 3+ years and have tried various other Linux distros in the past.  I figured I would try Gentoo now to get a better understanding of the inner working of Linux and I like the whole compiling thing since my machine is pretty powerful and can handle it.

With that said I am starting to install Gentoo now.  I have downloaded and burned the Minimal CD ISO for AMD64, as I want to use a 64 bit version for my machine.  I also have the AMD 64 Gentoo install guide printed out.  I have checked the ISO to make sure the checksum was ok, and it was.

So I went to install Gentoo and am stuck on the part where I configure my NIC cards.  I have a Thinkpad T61p with a Gibabit ethernet card and a Intel 4965N Wifi card.  I am trying to configure the Wireless NIC card and am having problems.  When I run ifconfig it shows me the eth0 and loopback devices, but not the intel 4965.  I ran net-setup wlan0 and it recommended to load the 4965 module and I chose yes.  It also asked if I have an encrypted network and asked me to enter a WEP password.  I am using WPA2 encryption, but I entered my password anyways.  Once this was all done it created a wlan0 device, since I could now see it with the ifconfig command.  iwconfig also showed me the device.  But when I go to ping www.gentoo.org I get a message that the host is unknown.

Can anybody give me some guidance on what I need to do to get my Wifi card working?  Thanks.

Edit: I am using Gentoo 2008.0Last edited by The Fire Snake on Tue Sep 16, 2008 2:01 am; edited 1 time in total

----------

## NathanZachary

Hi there,

Firstly, a big welcome to the Gentoo community!  Secondly, with regards to your WNIC, it might be easiest to use a wired connection to get Gentoo installed, and then after the initial installation we can get your wifi working.  As long as you are able to connect using your wired connection, I would recommend giving that a go.  If that isn't an option, a better choice would be to get a LiveCD of any other distribution in which your wifi works "out of the box."  From within that live environment, you can install Gentoo via the terminal emulator.  If you need any further assistance with the installation, please don't hesitate to ask.

Again, welcome to Gentoo!

----------

## The Fire Snake

Thanks for the warm welcome!  I have heard great things about the gentoo community and this forum, from my travels around the web.

I wanted to get the wireless working as I thought if I didn't I would be giving up too early.  I did however take your take your suggestion and focused on the wired connection first.  So far no go, still having problems.  Below is some information that might help you help me..

The results of lspci:

```

00:00.0 Host bridge: Intel Corporation Mobile PM965/GM965/GL960 Memory Controller Hub (rev 0c)

00:01.0 PCI bridge: Intel Corporation Mobile PM965/GM965/GL960 PCI Express Root Port (rev 0c)

[b]00:19.0 Ethernet controller: Intel Corporation 82566MM Gigabit Network Connection (rev 03)[/b]

00:1a.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #4 (rev 03)

00:1a.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #5 (rev 03)

00:1a.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #2 (rev 03)

00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 03)

00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 03)

00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 03)

00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 03)

00:1c.3 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 4 (rev 03)

00:1c.4 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 5 (rev 03)

00:1d.0 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #1 (rev 03)

00:1d.1 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #2 (rev 03)

00:1d.2 USB Controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller #3 (rev 03)

00:1d.7 USB Controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller #1 (rev 03)

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev f3)

00:1f.0 ISA bridge: Intel Corporation 82801HBM (ICH8M-E) LPC Interface Controller (rev 03)

00:1f.1 IDE interface: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller (rev 03)

00:1f.2 SATA controller: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller (rev 03)

00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 03)

01:00.0 VGA compatible controller: nVidia Corporation Quadro FX 570M (rev a1)

[b]03:00.0 Network controller: Intel Corporation PRO/Wireless 4965 AG or AGN Network Connection (rev 61)[/b]

15:00.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ba)

15:00.1 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller (rev 04)

15:00.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 21)

15:00.3 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 11)

15:00.4 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 11)

15:00.5 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 11)

```

What I tried:

1.)  Tried to see if my wired ethernet connection works out of the box

- After booting from the Minimal CD I issue a ifconfig command and recived a couple of lines, one for eth0 and one for l0.

- I tried the command ping -c 3 www.gentoo.org and received the result "ping - unknown host www.gentoo.org"

- I also found that the file /etc/resolv.conf is completely empty.  This doesn't seem good, but I don't know the full details of this file or its purpose

2.)  Tried the command net-setup etho

- The utility told me that it would load the e1000 driver for the wired ethernet card.

- I accepted all the defaults and it exited without error

- I tried the ping command from above again and again received the same result

3.)  Issued the following commands based on comments I read on the web about the e1000e module working better than the e1000 one:

```
modprobe -r e1000

modprobe e1000e
```

- When I run ifconfig now, the eth0 device doesn't even show up anymore.  Seems like it made it worse.   :Shocked: 

----------

## NathanZachary

Right when you boot up the minimal installation disc, and type ifconfig, it should notice your NIC.  It might not have an address, but it should show eth0.  If it doesn't, and only says information about lo, THEN you would need to modprobe.  Otherwise, if it sees eth0, your problem lies with the connection itself, not the module.  How do you connect to the internet?  Are you behind a router?  Do you use PPPoE?  Please provide as much information as possible and we can surely work through the problem.  :Smile: 

----------

## d2_racing

When you will have a working box, I can help you with your Wireless configuration.

The driver Iwl4965 works like the Iwl3945, so in time we will configure your Wifi card like you want.

----------

## The Fire Snake

 *kalos wrote:*   

> Right when you boot up the minimal installation disc, and type ifconfig, it should notice your NIC.  It might not have an address, but it should show eth0.  If it doesn't, and only says information about lo, THEN you would need to modprobe.  Otherwise, if it sees eth0, your problem lies with the connection itself, not the module.

 

Ok, I do see eth0 when I boot up the disc and type ifconfig, so it isn't a module problem from your statement above.  

 *kalos wrote:*   

> How do you connect to the internet?  Are you behind a router?  Do you use PPPoE?  Please provide as much information as possible and we can surely work through the problem. 

 

I am using a pretty basic home network.  I have Verizon DSL(the basic plan) as my ISP.  I have a Westel model 6100 modem hooked up to a Trendnet TEW-432BRP wireless g router, which are both hooked up to my 1 desktop machine.  Other than that I don't have a firewall box or any proxy stuff to worry about.  In order to install gentoo I am just unplugging the wired Cat -5 cable from the back of my desktop and putting it into my laptop, very simple.  Just to double check, I just plugged in the Cat-5 cable back into my desktop and the router and modem seem fine, I am typing this message from my wired NIC in my desktop.  I am sorry I am not really sure what PPPoE is, though I have heard of the term in the past.  Please let me know what other information I can provide for you.

Edit - I have changed the title of the thread to more accurately reflect the problem I have.Last edited by The Fire Snake on Tue Sep 16, 2008 2:02 am; edited 1 time in total

----------

## The Fire Snake

 *d2_racing wrote:*   

> When you will have a working box, I can help you with your Wireless configuration.
> 
> The driver Iwl4965 works like the Iwl3945, so in time we will configure your Wifi card like you want.

 

Thank you so much, I am sure I will probably have to take you up on your offer once I get though this stage.   :Smile: 

----------

## NathanZachary

Okay, so you have your ethernet cable plugged into your ethernet (RJ45) jack on your desktop.  The cable runs from the desktop to the router, and the router connecting it to the DSL modem.  If that is all correct, the only other thing should be whether or not your router is setup with DHCP or to use static IPs.  The easiest method of installing Gentoo is to use DHCP because it shouldn't require any further configuration.  Are you currently using DHCP through your router?  The easiest way to tell would be to login to your router's administration panel (usually by going to an IP address like 192.168.1.1 and entering a username and password).  In the administration panel you should be able to find out if you are using DHCP or static IPs.

----------

## vuakko

Try running these

ping 192.168.1.1

ping localhost

ping 127.0.0.1Results of these will help in finding the den of evil. If first succeeds, fine, then you just need to fix DNS. If the latters fail,

there's a problem with the device/kernel/eth0 configuration. Running 'ifconfig eth0' should also output your IP address

and other stuff. If there is no IP address, once again it's a configuration problem. If the IP is 169.x.y.z, then DHCP fails.

It doesn't make sense to expand all the paths here now, so try the stuff suggested in the thread and post the results.

Especially dump the whole output of ifconfig here.

Btw, e1000 is the right module for you.

----------

## nyowe

This is slightly beside the point (forgive me) but i just wanted to say thanks to Kalos, , d2_racing, Vuakko, for doing all you have to make The Fire Snake feel welcome... you have restored my hope in linux community relations.

----------

## The Fire Snake

@kalos - I went into the router's config page and found the following...

- I am using DHCP i.e. DHCP Server = enabled

- WAN connection type = PPPoE

- WAN IP = Obtain IP Automatically

- Dynamic DNS = Disabled

- DNS Primary = 0.0.0.0

- DNS Secondary = 0.0.0.0

@vuakko - Here is the info you asked for...

ifconfig result when the CD first loads...

```

eth0   Link encap: Ethernet HWaddr <some address>

         UPBROADCAST MULTICAST MTU: 1500  metric: 1

         Rx packets: 0  errors:0  dropped:0  overruns: 0  frame:0

         Tx packets: 0  errors:0  dropped:0  overruns: 0  frame:0

         collisions: 0  txqueuelen: 1000

         Rx Bytes: 0 (0.0b)  Tx Bytes: 0 (0.0b)

         Base address: 0x1840  Memory: fe200000-fe220000

lo      Link encap: Local Loopback

         inet addr: 127.0.0.1  Mask: 255.0.0.0

         UP LOOPBACK RUNNING MTU: 16436  Metric: 1

         Rx packets: 0  errors:0  dropped:0  overruns: 0  frame:0

         Tx packets: 0  errors:0  dropped:0  overruns: 0  frame:0  carrier: 0

         collisions: 0  txqueuelen: 0

         Rx Bytes: 0 (0.0b)  Tx Bytes: 0 (0.0b)

```

1.)  ping 192.168.1.1

connect:  Network is unreachable

2.)  ping localhost

PING livecd.gentoo(127.0.0.1) 56(84) bytes of data

64 bytes from livecd.gentoo(127.0.0.1): icmp_seq=1  ttl=64  time=0.016ms

--livecd.gentoo ping statistics --

1 packets transmitted, 1 recieved, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.014/0.014/0.014/0.000ms

3.)  ping 127.0.0.1

PING livecd.gentoo(127.0.0.1) 56(84) bytes of data

64 bytes from livecd.gentoo(127.0.0.1): icmp_seq=1  ttl=64  time=0.016ms

--livecd.gentoo ping statistics --

1 packets transmitted, 1 recieved, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.014/0.014/0.014/0.000ms

----------

## vuakko

Ok, so the problem is in acquiring an IP address. First try

```
dhcpcd eth0
```

which should bring up DHCP, but give it some time to get the lease. It shouldn't give any errors (if it does, post it here)

and after a while 'ifconfig eth0' should give you also an IP address most probably of the form 192.168.1.x.

Could you ensure that the router really is in address 192.168.1.1? This is the most common case, but I've seen a router

use also 10.x.y.z (talk about overkill...). The router's configuration page should say it or you can use the desktop machine

for it. In linux it should be shown with

```
route
```

or by running

```
grep GATEWAY /var/lib/dhcpcd/dhcpcd-eth0.info
```

(or against some other file in the directory). In Windows you can check the 'Default Gateway' with

```
ipconfig /all
```

If DHCP doesn't go up even after the 'dhcpcd eth0', you can at least temporarily use static IPs. It should work for sure, but for that you have to know the router address first.

----------

## The Fire Snake

@ vuakko -

Yes, I checked.  My routers IP address is 192.168.1.1.

The command dhcpcd etho gave me the following error:

```

Error, eth0: dhcpcd already running on pid 18292 (/var/run/dhcpcd-eth0.pid)

```

Its weird, it seems that Gentoo is seeing my ethernet card ok.  My router is fine and has the standard IP address.  But my laptop just can't acquire any info from the router.

What do you think is going on?

----------

## NathanZachary

Try booting into any LiveCD that you might have (Ubuntu, Mint, PCLOS, et cetera) and check to see if you have a working internet connection.  It is possible (and quite easy) to install Gentoo from within a live environment like that, via the terminal.

----------

## vuakko

Have you tried all the stuff in the installation docs for network?

Using it you should try at least assigning a static IP or restarting dhcpcd. In your case the static IP would be taken into use with

```
dhcpcd -r eth0

ifconfig eth0 192.168.1.63 broadcast 192.168.1.255 netmask 255.255.255.0 up

# just a random suffix that shouldn't collide

route add default gw 192.168.1.1

```

This should at least give you a static IP no matter what and pinging your router and other IP addresses should work after this.

----------

## The Fire Snake

 *kalos wrote:*   

> Try booting into any LiveCD that you might have (Ubuntu, Mint, PCLOS, et cetera) and check to see if you have a working internet connection.  It is possible (and quite easy) to install Gentoo from within a live environment like that, via the terminal.

 

I booted into the Kubuntu AMDx64 8.04.1 Live CD that I have.  I plugged in my ethernet cable from the desktop to my laptop and Kubuntu saw I had plugged in my cable(very nice) but I still did not get an ip address.  Knetwork manager showed all zeros for my IP address and I tried to get out to the web using Konqueror an had no luck.  I also typed in ifconfig to see what I would get back.  Among the other entries I have, I have 2 entries, one for eth0 and one for eth0: avahi.  I have no clue what eth0: avahi is, but in any event I still was not able to get an IP from the router  :Sad: 

----------

## The Fire Snake

@ vuakko -

I did as you asked.  I read over the gentoo handbook documentation and decided to do the manual network config.  I used the ifconfig and route commands you mentioned and was able to get them to execute successfully, thereby giving my ethernet card an IP address, broadcast address and mask.  Using the route command I was able to specify the IP address of the router.  I however am still having a problem, I still cannot ping my router  :Crying or Very sad:    When I go to ping my router, the ping command executes and reports 100% loss of packets.  This has been the most difficult setup of my network I have ever had to do, really weird   :Crying or Very sad: 

In the documentation it mentions that I should edit the /etc/resolv.conf file and enter data for the nameserver1 and nameserver2.  Your last post did not mention this and I did not do it.  I don't know their addresses.  Could this be causing my problem pinging the router?    What should I do?

----------

## vuakko

Are you absolutely sure that the router doesn't have MAC filtering on? Right now it sounds like this is the only sensible problem there might be.

If you have windows in the machine, you can try if it can connect/ping the router. If it does, then it's a linux driver problem (a very weird one), otherwise the router

is simply dropping everything from your address. You can also test it by asking one of your friends to come by and see if he can connect to the router at all.

MAC filtering is a nice security feature so you should maybe just add your laptop's MAC addresses (remember both: ethernet and wlan!) to the whitelist.

Another possibility is that the router may not answer some ICMP packets such as ping. If you usually configure the router from a web interface,

try doing that with a browser (http://192.168.1.1).

Third idea I have is to check if there was some weird corruption in ARP that the checksums didn't catch. You can check the MAC address of the router from

its bottom (or a sticker in the manual maybe). Then the output of

```
arp -a
```

should contain a line (the only line)

```
192.168.1.1 <iface type> <router's MAC>
```

at this point. If such a line is there, then make sure that the MAC is correct. Even if it is, try flushing the ARP table with

```
arp -d 192.168.1.1
```

and try again. If the line isn't there, then either you have MAC filtering, your device is bad/dead or the driver is seriously messed up.

Don't worry too much, there's still stuff to try out after this   :Smile:  Just triple-check the MAC filtering, it really sounds like the cause here.

----------

## vuakko

 *The Fire Snake wrote:*   

> Kubuntu saw I had plugged in my cable

 This means that the device cannot be totally dead and the driver works at least minimally (there is electricity in the port and it gets relayed to the kernel).

 *The Fire Snake wrote:*   

> In the documentation it mentions that I should edit the /etc/resolv.conf file and enter data for the nameserver1 and nameserver2.

 This will be handled later if needed (shouldn't be). /etc/resolv.conf is practically just a DNS cache. It's not needed now, but only when you start crying how

it sucks to type 209.177.148.228 to your browser when www.gentoo.org is much easier to remember. Usually (especially in home LANs) the DHCP server (your router)

also handles the relay of DNS from your ISP's servers to you so that your DNS server is actually the same as your DHCP server. This however should happen

automagically as part of getting the DHCP lease, so you don't have to care about it unless there are obvious DNS problems.

----------

## nixnut

Moved from Installing Gentoo to Networking & Security.

networking problem, so moved here

----------

## nemectic

Going back to using DHCP:

```
Error, eth0: dhcpcd already running on pid 18292 (/var/run/dhcpcd-eth0.pid) 
```

Did you try:

```
pkill dhcpcd

dhcpcd eth0
```

I occasionally have to kill a running dhcp, then start a new one before it will successfully work.

----------

## The Fire Snake

@ vuakko - Thanks so much, you helped me solve my problem!   :Very Happy:    My issue was with MAC address filtering.  I didn't even think about it till you mentioned it in your last post.  My router had gone down a few months ago and I forgot to enter the MAC address of the laptop's ethernet card as allowable again.  Once I did this I received an IP address and Broadcast address.  I am able to ping www.gentoo.org now and get out to the Internet.

Right now I am at the point where I am downloading the stage 3 tarball.  My download speeds are horrible.  I am using the links browser, per the handbook instructions.  I get a 4.8Kb/s second download speed on my Gigabit ethernet card in my laptop.  Not only do I get this slow speed, but it downloads data at this speed for a little while then there is a pause of about 45 secs where nothing happens.  Then it downloads at this speed again and pauses.  Do you know why it is pausing?  Why the horrible download rate?  I should be getting like 80-90 Kb/s download speeds.

Thanks to Kalos and other for helping me as well.

----------

## vuakko

Make sure that you use the biggest and closest mirror to you for fetching the stage. Try out also different mirrors.

You can also try downloading it straight with wget:

```
wget <tarball url>
```

You should put up a new thread if this persists.

----------

