# wireless dhcpcd problem

## corck

Hi,

after 3 days of trying I hope to find some help here.

I try to get a connection through my pcmcia wireless controller (netgear  ma521, with ndiswrapper rtl8180 driver.

Everything seems to work except the dhcpcd connection,

here my configs and dmesg

dmesg:

```
ndiswrapper: using irq 11

wlan0: ndiswrapper ethernet device 00:0f:b5:05:72:82 using driver net8180

wlan0: encryption modes supported: WEP, WPA with TKIP, WPA with AES/CCMP

```

net.wlan0 start

```
* Starting wlan0

 *    Loading networking modules for wlan0

 *       modules: iwconfig essidnet iptunnel ifconfig dhcpcd apipa

 *          iwconfig provides wireless

 *          ifconfig provides interface

 *          dhcpcd provides dhcp

 *    Configuring wireless network for wlan0

 *    Scanning for access points

 *       Found "VIEuVAU" at 00:0F:B5:1A:7B:9A (WEP required)

 *    Connecting to "VIEuVAU" (WEP enabled - open) ...                    [ ok ]

 *       wlan0 connected to "VIEuVAU" at 00:0F:B5:1A:7B:9A

 *       in managed mode (WEP enabled - open)

 *    Configuring wlan0 for "VIEuVAU" ...                                 [ ok ]

 *    Bringing up wlan0

 *       dhcp

 *          Running dhcpcd ...                                            [ !! ]

```

etc/conf.d/wireless

```
key_VIEuVAU="s:ba5450218f enc open"

preferred_aps=( "VIEuVAU" )

channel_wlan0="11"

config_VIEuVAU=( "dhcp" )

dhcpcd_VIEuVAU="-t 5"

```

etc/conf.d/net

```
iface_wlan0="dhcp"

gateway="wlan0/192.168.0.1"

iface_eth0="dhcp"

gateway="eth0/192.168.0.1"
```

someone knows where the problem lies,

thanks for any suggestions

----------

## cazze

i'm not sure but i think if you use dhcp you don't need to set the gateway as it is set by dhcp too.

kammicazze

----------

## corck

thanks,

removed it, but still no connection, any other suggestions??

----------

## cazze

what do you get if you run dhcpd wlan0?

----------

## corck

here's the output of 

dhcpd wlan0

```

Listening on LPF/wlan0/00:0f:b5:05:72:82

Sending on   LPF/wlan0/00:0f:b5:05:72:82

Sending on   Socket/fallback

DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7

DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12

DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10

DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 20

DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12

No DHCPOFFERS received.

No working leases in persistent database - sleeping.

```

----------

## cazze

are you sure you got a working dhcp server on your network? Do you have another station wich works with dhcp?

Seems like your dhcp server isn't working.

kammicazze

----------

## corck

it works seemlessly if i start up windows,

at the moment I am connected through eth0 which is connected to the wlan-router, does this make any problem??

----------

## cazze

what is the ip address you received on the windows host? is it a 169.*.*.* address?

----------

## corck

its 192.168.0.2 on windows, my eth0 gets the same 192.168.0.1,

could it be a firewall problem:...???

----------

## cazze

 *Quote:*   

> its 192.168.0.2 on windows, my eth0 gets the same 192.168.0.1

 

sorry, i can't follow your last statement. 

So you receive the dhcp address 192.168.0.2 from a dhcp server. What if you do a ipconfig /renew on the windowsbox? do you receive the same?

if you are trying to get a dhcp address from the wlan, are you connected with the ethernet port too?

----------

## corck

I get 192.168.0.2 on windows, as the other adresses are not used at the moment I get same if I do ipconfig -renew

on linux, I am connected by ethernet to the wireless router, I got the adress 192.168.0.4 at the moment

yes, I try to connect to the wlan router at the same time while I am connected by ethernet (eth0) to the wlan router.

also tried to shut down eth0 and connect afterwards, didn#t make any differences

----------

## BillSmith

can you ping the internal network i.e. 192.168.0.1? if so it might have something to do with your dns check /etc/resolv.conf and see if theres an ip in the file

----------

## kenwih

seems easier just to set static gateway, address, netmask, broadcast, and dns servers than to fight to get dhcpcd working, at least imo.

----------

## fritzonline

I'm having exactly the same problem. It all works fine if I set the config manually, but I'd prefer to have it set by dhcp.

The dhcp server is good, dhcp works on eth0, and dhcp works on all windows machines, wireless and ethernet.

----------

## ExElNeT

exactly the same problem. My dhcp setup is correct and I get an ip if I boot windows. I even have the log of the dhcpd.

----------

## hardcore

Figured I'd throw in my 8 cents.  I have a very similar problem.  I can connect to my wireless router at home that has open wep enabled.  However I can't ever seem to get a dhcp lease from any unencrypted ap's.  I am using dhcpcd btw.  I'm going to try using other dhcp clients and see how they fare...

----------

## niltonvolpato

Same problem here. No dhcp lease in another access point. In home it works ok, and in windows also.

I have absolutely no clue about this, tryed many dhcp client with no success. 

And no solution yet...   :Sad: 

-- Nilton

----------

## Bad Penguin

 *corck wrote:*   

> it works seemlessly if i start up windows,
> 
> at the moment I am connected through eth0 which is connected to the wlan-router, does this make any problem??

 

Is the wireless router set up to hand out dhcp address to wireless connections also?

----------

## paluszak

 *corck wrote:*   

> I try to get a connection through my pcmcia wireless controller (netgear  ma521, with ndiswrapper rtl8180 driver.

 

Check out the opensource rtl8180 driver (it's in the portage). Many ndiswrapper binary drivers seem to work fine, but some functions often don't work as they are supposed to, one of the legion of examples is multicasting. If the opensource driver doesn't fix the problem, you can try using a different binary driver with ndiswrapper.

J.

----------

## ExElNeT

anyone found a solution for this problem? its seems a lot of people have this problem... maybe we should fill in a bug report?

----------

## paluszak

 *ExElNeT wrote:*   

> anyone found a solution for this problem? its seems a lot of people have this problem... maybe we should fill in a bug report?

 

I had exactly the same problem and I fixed it by using the opensource rtl8180 driver. If, because of some obscure reasons, you don't want to use the opensource driver, try some other binary driver available. IMHO ndiswrapper is a kind of hack-job, it's cool cause you can use some functions of some windows binary drivers, but it's far from perfect and if you have a choice go for an opensource driver.

J.

----------

## bendy

I'm having a similar problem with the hermes/orinoco kernel driver.  The modules get loaded and the eth1 interface is activated, but I just don't automatically get a dynamic ip address.  If I manually run dhcpcd eth1, I do eventually get an ip address, but it seems very slow.  I have checked my /etc/conf.d/net, and net.eth1 is symlinked to net.lo, so I can't find a config problem.

Also, I have an on-board wired interface (eth0) and this gets an address automatically via dhcpcd, so the problem is limited to my wireless card.

----------

