# Wireless Lan: Help with WEP and DHCP

## shawk

Hi all

I set up my wireless NIC using pcmcia-cs and wireless-tools.

In /etc/conf.d/net I added a second NIC eth1 and set it to DHCP.

Configuring my AccessPoint to distribute IP addresses but not using WEP resulted in a working system:

The notebook boots and the pcmcia stuff is loaded in default runlevel. cardmgr complains about eth1 already being started, but doing an ifconfig afterward reveals that the wireless card has indeed recvieved an IP address from the AP.

So far so great. Using iwconfig does show the AP of course.

As soon as I enable WEP on my AP, the DHCP stuff doesn't work anymore. The accesspoint is listed under iwconfig, but my wireless card does not get an IP Address. I edited /etc/pcmcia/wireless.opts and enabled the orinoco scheme. I also set key="s:xxx" there, where I used the same word I entered as my WEP key on the AP.

Doing an iwconfig reveals that a key is indeed used, but still my wireless card does not get a DHCP address. /etc/init.d/net.eth1 restart does not work. Just hangs there and I kill it after 30 secs.

I am assuming the problem is that the WEP stuff is not working right, a wrong key is transmitted or something. Has anyone here ever got his wireless card and WEP working with DHCP being used to get the IP for his NIC? And I mean pcmcia-cs users, not wlan-ng.

I'd really appreciate any comments, hints or help you can offer.

--

Shawk

----------

## Ethernal

did you try to restart the pcmcia service instead? it's in the same directory, just type pcmcia restart. (sorry, can't remember the exact filename right now)

----------

## dittigas

Would appriciate seening how you've set it up. Been trying for a while but with no luck.

Thanks,

----------

## Ethernal

only problem is I have a prism2 card and I'm using the linux-wlan drivers, 

personally I never got the drivers included in the kernel to work   :Shocked: 

----------

## shawk

 *Ethernal wrote:*   

> did you try to restart the pcmcia service instead? it's in the same directory, just type pcmcia restart. (sorry, can't remember the exact filename right now)

 

Yup I did. Results in my eth1 having only a MAC address but no IP address.

As for my setup:

I compiled my kernel with the following:

General Setup / No PCMCIA support

Network Interfaces / No PCMCIA stuff (no Wireless Lan either I believe)

compile it, make all modules and stuff, boot the new kernel and then:

emerge pcmcia-cs

It installs all drivers. After emerging you need to add the following lines to your /etc/modules.autoload

pcmcia_core

i82365

ds

Following this, do

"rc-update add pcmcia default"

Adjust your /etc/conf.d/net to have another network card (e.g. unquote the dhcp line for eth0 and rename it to eth1). Next step is to create a /etc/init.d/net.eth1 (simply copy net.eth0 to net.eth1).

Thats it, reboot and you should be fine.

DHCP works like a charm. If you get it setup, see if you can get WEP and DHCP to work together hehe.

--

Shawk

----------

## shawk

I got it to work, not sure what the real cause was. Maybe it was plain impatience on my side.

I edited wireless.opts and between the first entry ( the one that the file tells you to remove/comment out if you want to use the others) I added KEY="s:xxx".

After that my eth1 came up, and after about 20-30 secs got a DHCP lease. Not sure if I was just way too fast the first times I tried, while I had no IP address yet. It could also be that I messed around with an wireless.opts setting that was designed for other MAC addresses and I didn't notice, so it could never really work.

Well, it works now. Just thought I'd let you know.

--

Shawk

----------

## dittigas

btw why do you need to define a 2nd nic?

----------

## shawk

Because my Notebook has a build in NIC as well.

So a wireless card is the 2nd nic. Without defining it in the /etc/conf.d/net you cannot use it.

--

Shawk

----------

