LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 10-30-2004, 11:05 AM   #1
tomap
Member
 
Registered: Jul 2004
Location: Southern NJ
Posts: 44

Rep: Reputation: 15
dhcpcd / dhclient problems


I’m a newbie and I’ve been posting here in an attempt to get my wireless working, using ndiswrapper, in Linux (mandy 9.1 - 2.4.1 lernel). Thanks to the many replies to my posts, I’ve been inching my way forward on this quest. I’ve been successful using “Linuxant”, prior to rebuilding my system – and – I will use it again (purchase it) should ndiswrapper refuse to function correctly, for whatever reason. I do not have the expertise to make that determination, at present, and would like assistance in making that determination. I have now invested 40-50 hours on this issue over the last several weeks and now it’s become a, “to the death”, battle of wills.

I (believe) have “ndis” configured properly, my problem is aquiring a dhcp address. I’ve tried using both “dhclient” and “dhcpcd” deamons (?):

“dhclient” which responds with; (output follows)
/sbin/dhclient-script: configuration for wlan0 not found.
> And I’m not sure how to proceede.

“dhcpcd” which I’ve tried to configure but responds with; (output follows)
[root@localhost tom]# /etc/dhcpc/dhcpcd.exe: line 27: ${/etc/dhcpc/dhcpcd-wlan0.info}: bad substitution
dhcpcd.exe: wrong interface name ""
> Again, I’m not sure how to proceede.

> > > > >Here’s my output from this mornings attempt.

[tom@localhost tom]$ su
Password:
[root@localhost tom]# ifconfig eth0 down
[root@localhost tom]# ifconfig wlan0 up

configuring "wlan0" for ndiswrapper

[root@localhost tom]# iwconfig wlan0 essid my-AP's-name
[root@localhost tom]# iwconfig wlan0 mode Managed
[root@localhost tom]# iwconfig wlan0 channel 11
[root@localhost tom]# iwconfig wlan0 key xxxxxxx

[rot@localhost tom]# iwconfig wlan0
wlan0 IEEE 802.11g ESSID:"my-AP's-name"
Mode:Managed Frequency:2.462GHz Access Point: 00:09:5B:F5:03:1E
Bit Rate:54Mb/s Tx-Power:84 dBm
RTS thr:2347 B Fragment thr:2346 B
Encryption key:xxxxxxx Encryption mode:restricted
Power Managementff
Link Quality:100/100 Signal level:-75 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:2026 Missed beacon:0

[root@localhost tom]# iwlist wlan0 scan
wlan0 Scan completed :
Cell 01 - Address: 00:09:5B:F5:03:1E
ESSID:"my-AP's-name"
(Unknown Wireless Token 0x8B01)
Mode:Managed
Frequency:2.462GHz
Quality:0/100 Signal level:-75 dBm Noise level:-256 dBm
Encryption keyn
Bit Rate:1Mb/s
Bit Rate:2Mb/s
Bit Rate:5.5Mb/s
Bit Rate:11Mb/s
Bit Rate:6Mb/s
Bit Rate:9Mb/s
Bit Rate:12Mb/s
Bit Rate:18Mb/s
Bit Rate:24Mb/s
Bit Rate:36Mb/s
Bit Rate:48Mb/s
Bit Rate:54Mb/s
Extra:bcn_int=100
Extra:atim=0


here I try the "dhclient" deamon

[root@localhost tom]# dhclient wlan0
Internet Software Consortium DHCP Client V3.0pl2
Copyright 1995-2001 Internet Software Consortium.
All rights reserved.
For info, please visit http://www.isc.org/products/DHCP

? Don't what to do here ?
/sbin/dhclient-script: configuration for wlan0 not found.
Listening on LPF/wlan0/00:90:96:a1:bc:f0
Sending on LPF/wlan0/00:90:96:a1:bc:f0
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 12
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8

here I try the "dhcpcd" deamon

[root@localhost tom]# dhcpcd wlan0

[root@localhost tom]# /etc/dhcpc/dhcpcd.exe: line 27: .: filename argument required.: usage: . Filename

here I create the "dhcpcd-wlan0.info" file
(??? per dhcpcd.exe directions ???)

[root@localhost tom]# cat > /etc/dhcpc/dhcpcd-wlan0.info
essid my-AP's-name
channel 11
mode Managed
key xxxxxxx
[root@localhost tom]# cd /etc/dhcpc
[root@localhost dhcpc]# ls
dhcpcd.exe* dhcpcd-wlan0.info

[root@localhost dhcpc]# more dhcpcd-wlan0.info
essid my-AP's-name
channel 11
mode Managed
key xxxxxxx

here I modify the "dhcpcd.exe" file
(I am not a programmer, just trying to follow the directions)

[root@localhost dhcpc]# vi dhcpcd.exe
[root@localhost dhcpc]# more dhcpcd.exe
#!/bin/sh
#
# This is a sample /etc/dhcpc/dhcpcd.exe script.
# /etc/dhcpc/dhcpcd.exe script is executed by dhcpcd daemon
# any time it configures or shuts down interface.
# The following parameters are passed to dhcpcd.exe script:
# $1 = HostInfoFilePath, e.g "/etc/dhcpc/dhcpcd-eth0.info"
# $2 = "up" if interface has been configured with the same
# IP address as before reboot;
# $2 = "down" if interface has been shut down;
# $2 = "new" if interface has been configured with new IP address;
# $3 (optional) = "-d" debug flag passed if dhcpcd daemon has been
# invoked with "-d" flag
#
# Sanity checks

if [ $# -lt 2 ]; then
logger -s -p local0.err -t dhcpcd.exe "wrong usage"
exit 1
fi

hostinfo="$1"
state="$2"
debug="$3"

# Reading HostInfo file for configuration parameters
#~#~#~#(this was " .${hostinfo}" I changed it to what's below)#~#~#~#
. ${/etc/dhcpc/dhcpcd-wlan0.info}

case ${INTERFACE} in
#~#~#~#(this was "eth*)" I changed it to what's below)#~#~#~#
wlan*) ;;
*) logger -s -p local0.err -t dhcpcd.exe "wrong interface name \"${INTERFACE}
\""
exit 1
;;
esac

case ${state} in
up) logger -s -p local0.info -t dhcpcd.exe "interface ${INTERFACE} has been confi
gured with old IP=${IPADDR}"
# ==== Put your code for the case interface has been brought up with old IP addre
ss here




# ==== End
;;
new) logger -s -p local0.info -t dhcpcd.exe "interface ${INTERFACE} has been conf
igured with new IP=${IPADDR}"
# ==== Put your code for the case interface has been brought up with new IP addre
ss here




# ==== End
;;
down) logger -s -p local0.info -t dhcpcd.exe "interface ${INTERFACE} has been bro
ught down"
# ==== Put your code for the case interface has been shut down here




# ==== End
;;
esac
exit 0

here I run the dhcpcd deamon again

[root@localhost tom]# dhcpcd wlan0
[root@localhost tom]# /etc/dhcpc/dhcpcd.exe: line 27: ${/etc/dhcpc/dhcpcd-wlan0.info}: bad substitution
dhcpcd.exe: wrong interface name ""

Any help or direction would be greatly appreciated.

Regards,
tomap
 
Old 11-01-2004, 03:49 PM   #2
snecklifter
Member
 
Registered: Mar 2004
Location: UK/West Yorkshire/Huddersfield
Distribution: Fedora 7
Posts: 982

Rep: Reputation: 30
Hey tomap,

Wow, you must be kicking things, I know I would be by now. This would appear to stem from the .exe file extension which is not one that linux uses. Thats a windows executable.

You are not acquring a DHCP address, you are acquiring an IP address through a DHCP server which is usually your access point/router.

Now, on mine, to obtain an IP address, I simply make sure I'm root (it might not matter) and type

Code:
dhclient wlan0
and it obtains an IP address.

Now in my etc folder I do have a file called dhclient-wlan0.conf

which contains just the one line

Code:
send host-name "MDK10";  # temporary ifup addition
MDK10 is the nickname.

You say yours outputs...

Code:
“dhclient” which responds with; (output follows)
/sbin/dhclient-script: configuration for wlan0 not found.
This simply means it cant find the conf file for wlan0. Place one in the /etc folder and see what happens, modifying my line with whatever name you have given your computer at setup.
You certainly dont need to start playing around with you dhcpcd daemon.
If all this fails post back but I suspect what with .exe files and the possibilty of renaming stuff, you may have messed things up a bit.
Good luck,
Chris
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dhclient (or maybe madwifi?) problems jbuckley2004 Linux - Wireless Networking 2 07-30-2005 12:01 PM
dhclient v. dhcpcd biojayc Linux - Wireless Networking 5 04-29-2005 07:34 PM
Toss dhcpcd in favor of dhclient tisource SUSE / openSUSE 3 03-15-2005 03:23 PM
dhcpcd + dhclient issues.. Digital_Err0r Linux - Software 1 04-04-2004 07:09 PM
Mandrake Users: no dhcpcd command? Try dhclient lostlyre Linux - Networking 0 04-02-2004 02:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 11:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration