DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 5th May 2008
andycapp andycapp is offline
New User
 
Join Date: May 2008
Posts: 5
Default wep 128bit

Hi guys,

I've installed FreeBSD 7.0 RELEASE on my laptop, configured all, video, sound, samba and networks. I wrote different scripts for various wlan environment (I want to use it for work).
I use a pcmcia wireless card.
In my home wlan environment I can associate with ssid and obtain IP form the router and it works fine (wpa mode).
When I try wep128 mode I can associate with my ssid but I can't obtain IP (by dhclient), and also giving IP manually I can't ping.
Ifconfig tells me that wlan is associated.
this is the script:

#!/bin/sh
ifconfig ral0 up
wpa_supplicant -B -iral0 -c/root/wlan/wep128.conf
dhclient ral0

and this is the .conf file

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
ssid="3Com"
key_mgmt=NONE
wep_tx_keyidx=1
wep_key1=98402d9b0f57f4bbc2d6d3206b
}

any suggestions ?
Reply With Quote
  #2   (View Single Post)  
Old 5th May 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

For wep (please dont use any kind of wep) configuration could be done through ifconfig like this (not through wpa_supplicant, probably wpa_supplicant is not compiled with wep support in ):

Code:
ifconfig ral0 ssid 3Com weptxkey 1 wepmode on wepkey 98402d9b0f57f4bbc2d6d3206b

Last edited by richardpl; 5th May 2008 at 12:42 PM.
Reply With Quote
  #3   (View Single Post)  
Old 5th May 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

wpa_supplicant includes WEP support by default. Personally, I find using wpa_supplicant to be preferable, as you can keep *all* the details for all the networks you connect to in one spot, your rc.conf becomes a simple ifconfig_ath0="WPA DHCP", and you can "roam" around without mucking around with ifconfig commands.

In your /etc/wpa_supplicant.conf, hex keys are written with 0x as the prefix. Otherwise it's considered a decimal number or a string.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #4   (View Single Post)  
Old 5th May 2008
andycapp andycapp is offline
New User
 
Join Date: May 2008
Posts: 5
Default same mulfunction

the code gave me richardpl works like my script that use wpa_supplicant and I still can't obtain IP address from router by dhclient.

In my rc.conf I don't have ifconfig_ral0="WPA DHCP" and my script for wpa mode works fine

here is the code :

#!/bin/sh
ifconfig ral0 up
wpa_supplicant -B -iral0 -c/root/wlan/wpa.conf
dhclient ral0

and this is the .conf file :

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
network={
ssid="3Com"
psk="veryverysecretpassword"
}

so the question is the same : why in wpa mode I can obtain IP and when in wep mode not ?
I remember you that I can associate with ssid but also giving an IP manually I can't ping. dhclient fails

Last edited by andycapp; 5th May 2008 at 07:09 PM. Reason: ortography...
Reply With Quote
  #5   (View Single Post)  
Old 5th May 2008
phoenix's Avatar
phoenix phoenix is offline
Risen from the ashes
 
Join Date: May 2008
Posts: 696
Default

Use your original script (or write a proper /etc/wpa_supplicant.conf and use a proper /etc/rc.conf) but prefix your key with 0x. Without that, it's not being treated as a hex key, and the key set on your NIC will not be the same as the key in your router.
__________________
Freddie

Help for FreeBSD: Handbook, FAQ, man pages, mailing lists.
Reply With Quote
  #6   (View Single Post)  
Old 5th May 2008
richardpl richardpl is offline
Spam Deminer
 
Join Date: May 2008
Location: Croatia
Posts: 284
Default

YEAH, I somehow (dont shot me because of this ) overlooked fact that 0x is not given. It must be given otherwise key will be considered in ASCII - meaning it will be incorrect key in most situations.

Hate such mistakes
Reply With Quote
  #7   (View Single Post)  
Old 6th May 2008
andycapp andycapp is offline
New User
 
Join Date: May 2008
Posts: 5
Default fails again...

I tryed to give 0x but in this case it reports an error.
I can associate with my ssid without 0x, so I guess my syntax is correct
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:21 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick