# Associated and can't Ping Router! Appreciate your help :cry:

## bebobero

Hello Everybody

I succesfully associated and connected to my Access Point (Wep Encrypted and DHCP enabled) using Wpa_Supplicant and my ipw3945ABG.

But i can't connect, here is my configuration:

Lspci shows 

```
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 0

00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)

00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)

00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)

00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)

00:1c.1 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 2 (rev 01)

00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01)

00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 (rev 01)

00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 (rev 01)

00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 (rev 01)

00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 (rev 01)

00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)

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

00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)

00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01)

00:1f.2 SATA controller: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA AHCI Controller (rev 01)

00:1f.3 SMBus: Intel Corporation 82801G (ICH7 Family) SMBus Controller (rev 01)

06:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)

08:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller

08:06.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller

08:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)

08:06.3 SD Host controller: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller

08:08.0 Ethernet controller: Intel Corporation PRO/100 VE Network Connection (rev 01)

```

Ifconfig -a shows:

```

eth1      Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx  

          inet6 addr: fe80::213:2ff:fe69:3ff6/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:10 errors:3520 dropped:3528 overruns:0 frame:0

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

          collisions:0 txqueuelen:1000 

          RX bytes:234096 (228.6 Kb)  TX bytes:4047 (3.9 Kb)

          Interrupt:18 Base address:0xa000 Memory:6c000000-6c000fff 

lo        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:182 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0 

          RX bytes:13598 (13.2 Kb)  TX bytes:13598 (13.2 Kb)

```

dhclient eth1

```
option_space_encapsulate: option space agent does not exist, but is configured.

DHCPREQUEST on eth1 to 255.255.255.255 port 67

DHCPREQUEST on eth1 to 255.255.255.255 port 67

option_space_encapsulate: option space agent does not exist, but is configured.

DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 5

DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 8

DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 15

```

Also here is my conf.d/net

```
modules=( "wpa_supplicant" )

config_MyNet=( "192.168.0.162/24" )

routes_MyNet=( "default via 192.168.0.2" )

wpa_supplicant_eth1="-Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf"

associate_timeout_eth1="10"
```

I will really really appreciate your Help.  :Confused: 

Thanks in Advance

Best Regards,

BeboBeroLast edited by bebobero on Sat Jan 12, 2008 8:26 pm; edited 7 times in total

----------

## bebobero

Can Anybody help?

----------

## Dagger

check /etc/conf.d/net.example

You can find something similar to

#config_wlan0=( "dhcp" )

(where wlan0 is the name of your interface)

----------

## bebobero

Thankx for your reply 

I did that :config_eth1=( "dhcp" )

and i get onlu APIPA

When i choose config_eth1=( "192.168.0.100" ) I get the IP but i cannot even Ping the router!

I need help As soon as poosible please!

Best regards,

BeboBero

----------

## Dagger

can you please post your:

lspci

ifconfig -a

cat /etc/conf.d/net

also the result of dhclient eth1

----------

## bebobero

Ok i posted them aboveLast edited by bebobero on Fri Jan 11, 2008 6:31 pm; edited 1 time in total

----------

## bebobero

Any help?

----------

## overkll

You should post the output of "iwconfig" as well.

----------

## bebobero

here you are

```
eth1      IEEE 802.11g  ESSID:"MyNet"  

          Mode:Managed  Frequency:2.437 GHz  Access Point: xx:xx:xx:xx:xx:xx  

          Bit Rate:54 Mb/s   Tx-Power:15 dBm   

          Retry limit:15   RTS thr:off   Fragment thr:off

          Encryption key:off ??????

          Power Management:off

          Link Quality=88/100  Signal level=-44 dBm  Noise level=-45 dBm

          Rx invalid nwid:0  Rx invalid crypt:170  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
```

----------

## overkll

Before I offer up any advice, what are your goals?

Is this a laptop or a non-mobile box?

Will you be the only user?

Do you want a static ip or do you want to use DHCP.

Seems you want to use wpa_supplicant.  Do you want to use the wpa_supplicant gui as well?

----------

## bebobero

This is a Laptop I am the only User it doesn't matter if i use static or DHCp because my router supports it

My WPA_supplicant doesn't have WPA_gui only CLI.  :Confused:   :Sad:   :Crying or Very sad: 

Best regards,

BeboBero

----------

## overkll

 *Quote:*   

> When i choose config_eth1=( "192.168.0.100" ) I get the IP but i cannot even Ping the router! 

 

Try config_eth1=( "192.168.0.100/24" )

With a laptop, you probably want to have the gui if you plan on connecting to other networks/access points besides your own.

If you have KDE install, the gui should be available.

If your are using Gnome, then you probably need to enable the "qt3" USE flag for wpa_suppicant and reinstall wpa_supplicant.  That would pull in qt3 then reinstall wpa_supplicant.  qt3 compilation takes a while...

```
# echo "net-wireless/wpa_supplicant qt3" >> /etc/portage/package.use

# emerge -av wpa_supplicant
```

----------

## overkll

Reread your post.

Is eth0 up?  That can interfere with routing with two interfaces up.

Post output of:

/etc/init.d/eth0 status

ifconfig (don't add -a or any interface - post full output )

route

You were also trying to do WEP?  Where's the key?

From your iwconfig:

```
...

Encryption key:off ??????

...
```

I'd suggest turning off any encryption on the Access Point and just try to get it working in open mode first, then proceed with encryption - preferably WPA, not WEP.Last edited by overkll on Fri Jan 11, 2008 8:39 pm; edited 1 time in total

----------

## bebobero

IP is now configured but i can't even ping the router

Wpa_cli gives me associated with XX:XX:xx:xx:xx 

Then connected and authentication complete 

But after that i dont know why i can't ping router?

----------

## overkll

We posted at the same time.  See my comments above your last post.

----------

## NeddySeagoon

bebobero,

I have never tried wpa_supplicant but I do need to.  Anyway from the top.

```
config_MyNet=( "192.168.0.162/24" )

routes_MyNet=( "default via 192.168.0.2" ) 
```

is not correct.

These configuration options are used by ifconfig so need to be 

```
config_eth1=( "192.168.0.162/24" )

routes_eth1=( "default via 192.168.0.2" ) 
```

as thats what your interface is called.

If you want to start eth1, you will need a symlink in /etc/init.d/ for it, to link it to net.lo

The configuration sequence of events is that wpa_supplicant or iwconfig sets up the wireless parameters and associates with your AP.

The interface then behaves as any other interface and is configured using ifconfig in the normal way.

Since you are associated, the hard part is done but you can't get assign an IP to MyNet because thats not the interface name.

----------

## overkll

good catch Neddy, as usual.

----------

## bebobero

Thanks all for your reply

I changed (MyNet) to (eth1) now i see that i get an IP and the route table shows that the gateway is set correctly but i still Can't even Ping the router!!

What could this be??

i turned off encryption and using wpa_supplicant i can connect and using my static IP everything is fine but i don't want to use no encryption!! 

By the way, i found soemthing in my router called Authentication WPA-PSK when choosing it i have to enter a passphrase twice can anyone tell me how to type this in my wpa_supplicant.conf? 

Best regards, 

BeboBero

----------

## Dagger

if your access point supports WPA that's much better option than WEP. Change it in access point/router configuration to wpa and adjust your /etc/wpa_supplicant/wpa_supplicant.conf as follows:

```

network={

       ssid="YOUR_SSID"

       proto=WPA

       key_mgmt=WPA-PSK        # WPA-PSK is for WPA/WPA2 Personal preshared key

       pairwise=CCMP TKIP         # TKIP is for WPA and CCMP is for WPA2

       group=CCMP TKIP             # same as above

       psk="YOUR_WPA_KEY"      # alternatively you may want to replace it with encrypted key. Check out wpa_passphrase command!

       priority=2

}

```

i hope that helps

----------

## bebobero

I tried somethink like the following:

```

network={

  ssid="example"

  proto=WPA

  key_mgmt=WPA-PSK

  pairwise=TKIP

  group=TKIP

  psk=06b4be19da289f475aa46a33cb793029d4ab3db7a23ee92382eb0106c72ac7bb---> I get this by typing WpA_Passphrase myssid mykey

  priority=2

}
```

What i get is association and then After Group_Handshake I get disconnect-remove keys ..then Association occurs and in a second i get Group_Handshake then disconnect remove keys!!!

It doesn't want to get stable

Also there is something is strange running Wpa_supplicant shows:

```
Added BSSID xx:xx:xx:xx:xx to Blacklist
```

I will appreciate any help

Best regards,

BeboBeroLast edited by bebobero on Sat Jan 12, 2008 11:15 am; edited 1 time in total

----------

## NeddySeagoon

bebobero,

Do not use a pass phrase, or if you do, enter it for one device than copy the hex key it generated to all the others.

I have seen the same pass phrase generate different keys in different equipment, which of course fails.

----------

## bebobero

Iam sorry but I don't understand how to do this can you clarify ?

How can i connect using WPA-PSK without a passphrase!!!!

I used WPa_Passphrase Mynet Mykey and took the output and put it in my wpa_supplicant.conf

 :Crying or Very sad: 

Regards,

BeboBerO

----------

## NeddySeagoon

bebobero,

Put a pass phrase into your router if you wish.  The router will convert it to a hex key, which you should be able to see.

Copy this hex key to your PC.  That way you have used a pass phrase once to generate a key that you use everywhere.

Now you *know* that the key is the same at both ends of the link.

thats what it appears you have done.

Copy the format exactly. 06b4be1... <> 06B4BE1...  you may want to try both formats. *NIX is nomally but not always, case sensitive.

----------

## bebobero

My Dlink router does not show me the hex key generated only the passphrase!

I have another laptop connected and running windows can i use it to know the hex key?

----------

## NeddySeagoon

bebobero,

If the other connected laptop works over wireless - yes.

It does not matter how you get the hex key.

Can you enter the hex key directly into your Dlink router?

It doesn't matter how you generate the hex key, as long as you only do it once.

----------

## bebobero

Yes my other laptop works over wireless so how can i use it to know the hexkey generated by the router

My Dlink router allows me only to enter a passphrase

Any information is really appreciated

----------

## NeddySeagoon

bebobero,

I don't know Windows. I've not used it for over 3 years. 

Poke about in the network setup for the Windows wireless interface to see if its there.

----------

## bebobero

:cry:It doesnot show me the hex key just the passphrase and the router also asks for passphrase only so i typed the passphrase in the router and typed it in the network settings in windows and it works fine but when it comes to my Gentoo Laptop i tried using wpa_passphrase but it gives me a passphrase that doesnot work.!!

Any help!

I am beginning to lose hope in my wireless Adapter!

----------

## overkll

I also have a Dlink AP.  The passphrase is not visible as text, only as asterisks.  One needs to enter the passphrase twice, once then a second time to confirm the phrases match.

Back to the connection issue.  I just set up 9 laptops with Gentoo and wireless.  They all had the new Atheros chip (AR5007EG).  I had to troubleshoot some issues so I commented out the wireless portions /etc/conf.d/net, and kept /etc/wpa_supplicant/wpa_supplicant.conf, using a similar config to yours with WPAPSK set.  Then I issued all manual commands and used wpa_supplicant with debuging.  After success, I adjusted the net file accordingly

The steps I took:

1.  Made sure module was loaded

```
# lsmod | grep <module>
```

2.  Checked dmesg for any errors on modules loading

```
# dmesg
```

3.  Confirm iwconfig lists the interface 

```
# iwconfig
```

4.  Is the wireless interface up?  If it's not, that's ok, it can be brought up manually when needed

```
# ifconfig
```

5.  Confirm the interface is recognized if it is not up

```
# ifconfig <interface>
```

IF all is well, continue.  If not, troubleshoot any issues before proceeding and repeat until all is working.  I experienced some issues when manually unloading and reloading the modules.  Rebooting took care of it.

6.  Manually set the essid

```
# iwconfig <interface> essid "youressid"
```

7.  Confirm command worked.  ESSID should be set now.

```
# iwconfig
```

8.  Bring up interface manually.  Not always necessary, but make sure it didn't reset the ESSID to "" (blank) using iwconfig again.

```
# ifconfig <interface> up
```

9.  Manually start association with wpa_supplicant

```
# wpa_supplicant -dd -Dwext -ieth1 -c/etc/wpa_supplicant/wpa_supplicant.conf
```

-dd = verbose debuging switch that will pump the debugging info to ones terminal.

-D = Driver/module.  In this case wireless extensions from the kernel

-i = interface

-c = config file

At this point you should be able to see the success or failure.  Bring up another terminal session and check iwconfig.  If it's successfully associated, then proceed, otherwise troubleshoot.

10.  Assign an IP, either static or dynamic

Static

```
# ifconfig <interface> <ip.add.re.ss>
```

Dynamic (if you use a different dhcp client, then use it's proper command and syntax)

```
# dhcpcd eth1
```

11.  Confirm ipaddress is set

```
# ifconfig <interface>
```

12.  Check the routing table.  There should be a route for wireless interface.  If eth0 was up before the wireless interface, its route metric will be lower than that of the wireless route and will be the default.  Stopping eth0 should clear the route for eth0.

```
# route
```

13.  ping google or something.

If everything works as planned adjust the net file to use the values/commands you need.  If it doesn't one should be able to isolate the error with such a step by step walk though.

----------

## overkll

IF you do not know the correct passphrase that the router/AP is using, that's a problem.  You can reset the passphrase on the router/AP, then change the passphrase on the wireless clients to match the router/AP passphrase.

----------

## bebobero

I have a very specifc problem

I set the passphrase on my router to pass123400 then i set the same one on my Windows Laptop.

On my Gentoo Laptop i set psk in wpa_supplicant as the output of Wpa_passphrase MyNet pass123400.

But it doesn't work!!!!  :Confused: 

Anyways i gave up WPA and i am back to My wep at least i can associate

So my Problem now is that i associate and can't get an IP via DHCP  When i set it manually i get the IP but ican't ping even the router

Also, My router status page tells me that the MAC address i use is connected!!

Best regards,

BeboBero

----------

## Dagger

have you tried without hex passphrase in your config file?

do you have the same error message when you try

```

psk="YOUR_WPA_KEY" # <- plaintext pass in ""

```

also can u post us some logs

----------

## bebobero

Here is the requested information:

IFconfig gives:

```
eth1      Link encap:Ethernet  HWaddr FF:FF:FF:FF:FF:FF  

          inet addr:192.168.0.106  Bcast:192.168.0.255  Mask:255.255.255.0

          inet6 addr: fe80::213:2ff:fe69:3ff6/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000 

          RX bytes:26816 (26.1 Kb)  TX bytes:3815 (3.7 Kb)

          Interrupt:18 Base address:0x8000 Memory:6c000000-6c000fff 

lo        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:49 errors:0 dropped:0 overruns:0 frame:0

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

          collisions:0 txqueuelen:0 

          RX bytes:3578 (3.4 Kb)  TX bytes:3578 (3.4 Kb)
```

Route gives:

```
Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

192.168.0.0     *               255.255.255.0   U     0      0        0 eth1

loopback        *               255.0.0.0       U     0      0        0 lo

default         192.168.0.2     0.0.0.0         UG    2000   0        0 eth1
```

Iwconfig gives:

```
eth1      IEEE 802.11g  ESSID:"MyNetwork"  

          Mode:Managed  Frequency:2.437 GHz  Access Point: 00:FF:FF:FF:FF:FF   

          Bit Rate:54 Mb/s   Tx-Power:15 dBm   

          Retry limit:15   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=95/100  Signal level=-35 dBm  Noise level=-36 dBm

          Rx invalid nwid:0  Rx invalid crypt:279  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:484   Missed beacon:0
```

Here is My conf.d/net

```
modules=( "wpa_supplicant" )

config_eth1=( "192.168.0.106/24" )

routes_eth1=( "default via 192.168.0.2" )

wpa_supplicant_eth1="-Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf"
```

Here is my WPA_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

        key_mgmt=NONE

        priority=-9999999

}

# Shared WEP key connection (no WPA, no IEEE 802.1X) using Shared Key

# IEEE 802.11 authentication

network={

  ssid="MySSID"

  key_mgmt=NONE

  wep_key0=(MyKey 128 bits 26Digits)

  wep_tx_keyidx=0

  priority=5

  auth_alg=SHARED

}
```

I will really appreciate your help in Advance   :Sad: 

Best Regards,

BeboBero

----------

## bebobero

Any reply on this?  :Confused: 

----------

## Dagger

well from what we can see here it _should_ work. Unless there is a problem on decrypting the packages. Could you please post your /vag/log/messages (few lines so we can see what's going on with auth)

----------

## overkll

bebobero IM'd me on 1/12/2008.  We determined that there were module conflict issues.  Both iwl3945 and ipw3945 (going from memory) were being loaded and dmesg was spewing errors about ieee80211 modules, especially the "crypt" module dependencies.  So it makes sense that WEP or WPA didn't work.

Since I'm unfamilar with the intel driver(s), I couldn't be of much help.  bebobero also couldn't tell me how he installed the modules, whether they were emerged or installed from source.  I suggested he sort out the module issues and make sure they load without errors before continuing.

If anyone can help with that....

----------

