# [SOLVED] Network  wont work for the first time

## groovy12

Hello,

When I load ipw2200 and try starting my wireless network on t43, it hangs  while running DHCP. If I stop eth1 and start it again it works fine. this happens all the time, I am really confused what to do.

 Are there any debug flags or anything else that I can use to figure out what is the problem? dmesg doesnt show much either.

Thanks a lot for any lead!!

```

(Newton:~) # modprobe ipw2200

(Newton:~) # /etc/init.d/net.eth1 start

 * Starting eth1

 *   Loading networking modules for eth1

 *     modules: wpa_supplicant essidnet iptunnel ifconfig dhcpcd apipa

 *       wpa_supplicant provides wireless

 *       ifconfig provides interface

 *       dhcpcd provides dhcp

 *   Starting wpa_supplicant on eth1 ...

 *     Waiting for association                                                                                         [ ok ]

 *     dhcp

 *       Running dhcpcd ...                                                                                            [ !! ]

(Newton:~) # /etc/init.d/net.eth1 stop

 * ERROR:  "net.eth1" has not yet been started.

(Newton:~) # /etc/init.d/net.eth1 start

 * Starting eth1

.......

 *     dhcp

 *       Running dhcpcd ...                                                                                            [ ok ]

```

Last edited by groovy12 on Wed Mar 22, 2006 7:36 pm; edited 1 time in total

----------

## unclecharlie

groovy12,

what version of the ipw2200 driver are you on? There is a known bug with dhcp that has been resolved as of version 1.1.0...

Charlie

----------

## groovy12

I upgraded to 1.1.0 but seeing same problem.. what else can I try? thanks for your help.. 

 *Quote:*   

> 
> 
> > modprobe ipw2200
> 
> ~> /etc/init.d/net.eth1 start
> ...

 

----------

## unclecharlie

groovy12,

There's a couple of things you can try-

1. try a different dhcp client- there are several available. I'd try dhclient or udhcp. For dhclient do emerge dhcp then add the following to your /etc/conf.d/net file

```

modules=( "dhclient" )

```

for udhcpc do emerge udhcp and add this to /etc/conf.d/net

```

modules=( "udhcpc" )

```

2. increase the dhcp timeout. The default is already 60 sceonds though so try the above first...

hope this helps,

Charlie

----------

## groovy12

thanks. How do I setup the password and ssid for dhclient.

for example, i had following for wpa_supplicant in my /etc/wpa_supplicant.conf:

 *Quote:*   

> 
> 
> # Shared WEP key connection (no WPA, no IEEE 802.1X)
> 
> network={
> ...

 

also I needed to give following in my conf.d/net because wpa_supplicant needed this flag for ipw2200 chips, where do i supply equivalnt information for dhcpclient?

 *Quote:*   

> 
> 
> #wpa_supplicant_eth1="-Dwext"
> 
> 

 

----------

## unclecharlie

groovy12,

You don't need to change any of that... dhclient just gets an ip address. (alternative to dhcpcd) You still use wpa_supplicant and such and other than the modules=( "udhcpc" )  line you can leave /etc/conf.d/net unchanged...

hope this helps,

Charlie

----------

## groovy12

I tried that but this is what i am seeing:

 *Quote:*   

> ~> vi /etc/conf.d/net
> 
> ~> more /etc/conf.d/net
> 
> config_eth1=( "dhcp" )
> ...

 

Am i missing something? thanks.

----------

## unclecharlie

try this-

```
modules=( "wpa_supplicant" "dhclient" )
```

otherwise you are writing over the dhclient module to get the wpa_supplicant module up...

Charlie

----------

## groovy12

thanks Charlie.. i am able to connect to net using dhclient now.. but my original problem still persists.. just after modprob'ing ipw2200 module or reboot it fails.. but if i try again after some time, i am able to connect..  

 *Quote:*   

> 
> 
> ~> modprobe ipw2200
> 
> ~> lsmod
> ...

 

Does the errors trigger anything.. 

may be its something to do with my router..

----------

## unclecharlie

groovy12,

Have you tried the 1.1.1 driver yet?

Charlie

----------

## GaardenZwerch

 *unclecharlie wrote:*   

> groovy12,
> 
> Have you tried the 1.1.1 driver yet?
> 
> Charlie

 

ipw2200 1.1.1  doesn't improve things   :Crying or Very sad: 

----------

## unclecharlie

groovy12,

have you tried-

```

wpa_supplicant_eth1="-Dipw" 

```

in your /etc/conf.d/net file? 

Also I notice that it seems to be failing because the key isn't being set.-

```

* Scanning for access points

* Found "Burfi" at 00:11:24:08:45:A7 (WEP required)

* WEP key is not set for "Burfi" - not connecting

* Couldn't associate with any access points on eth1

* Failed to configure wireless for eth1 [ !! ] 
```

But it is set correctly on the second try... weird. Could you post your wpa_supplicant.conf (minus the wep key  :Wink:  )?

Charlie

----------

## groovy12

The WEP error came when I was trying dhclient without wpa_supplicant_eth1 set.  So thats not the problem.

This is the problem I am seeing now with correct config, note that it accepts WEP

 *Quote:*   

> * Starting wpa_supplicant on eth1 ...
> 
> * Waiting for association [ ok ]
> 
> * eth1 connected to "Burfi" at 00:11:24:08:45:A7
> ...

 

Here is wpa_supplicant.conf file:

```

~> more /etc/wpa_supplicant.conf | grep -v -e "^#"

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

fast_reauth=1

network={

        ssid="Burfi"

        key_mgmt=NONE

        wep_key0="mykey"

        priority=5

}

```

My conf.d/net contains -dWext otherwise ipw2200 fails to load.. 

thanks.

----------

## unclecharlie

groovy12,

what is the output of iwconfig eth1 right after the timeout?

Charlie

----------

## groovy12

When it times out

 *Quote:*   

> ~> iwconfig eth1
> 
> eth1      IEEE 802.11g  ESSID:"Burfi"
> 
>           Mode:Managed  Frequency:2.462 GHz  Access Point: 00:11:24:08:45:A7
> ...

 

when it works

 *Quote:*   

> ~> iwconfig eth1
> 
> eth1      IEEE 802.11g  ESSID:"Burfi"
> 
>           Mode:Managed  Frequency:2.462 GHz  Access Point: 00:11:24:08:45:A7
> ...

 

Only thing i see is Encryption off when it fails. Does that ring a bell?

----------

## amaroc

 *groovy12 wrote:*   

> When it times out
> 
>  *Quote:*   ~> iwconfig eth1
> 
> eth1      IEEE 802.11g  ESSID:"Burfi"
> ...

 

Hi,

I had _exactly_ the same problem on my Inspiron6000. 

Upgrading to wpa_supplicant-0.5.2 solved the issue. Maybe it's worth to try.

Note: - ipw2200-1.1.1, ipw2200-firmware-3.0 - don't know if needed.

Cheers

----------

## groovy12

thanks a lot!

upgrading wpa_supplicant to 0.5.2 fixed the issue! no need to go to ipw1.1.1

also just as a datapoint wpa_supplicant 0.5.1 doesnt fix the issue.

thanks again.

----------

