LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   dhcp says "wrong interface name: "ath0" (https://www.linuxquestions.org/questions/linux-networking-3/dhcp-says-wrong-interface-name-ath0-506365/)

Quakeboy02 11-30-2006 07:50 PM

dhcp says "wrong interface name: "ath0"
 
Is this normal when you don't use "eth0" as your interface, or have I got something wrong? It works, but I'm not comfortable seeing an error from dhcp.

I have configured a Netgear WG311T wireless card on my Debian 2.6.8 system a bit differently from what I found in the documentation; mainly because I was having a lot of problems getting the thing to connect to my router. And since I wound up with a script that worked, I used it. I never got wpa_supplicant working, and removed it from my system. I'm using madwifi. Here's what I wound up with in my config files:

/etc/network/interfaces: (relevant lines)
auto ath0
iface ath0 inet dhcp
pre-up sh /etc/network/ath0/ath0.sh

/etc/network/ath0/ath0.sh:
#!/bin/sh
/sbin/iwconfig ath0 essid OurHouse channel 8 ap any key FFFFFFFFFF restricted
/sbin/iwconfig ath0 mode Managed txpower auto rate 11M auto sens -80 commit
/sbin/iwpriv ath0 authmode 2
/sbin/ifconfig ath0 up
echo "ath0 configured"
exit 0

/etc/dhcp/config: (relevant lines)
case ${INTERFACE} in
eth0 | ath0)


Thanks for any comments and help clearing this error/warning(?) message.

Quakeboy02 12-01-2006 09:04 AM

After more digging, this was pretty easy to fix. I simply added one line to the script dhcpcd.exe as follows:

/etc/dhcpc/dhcpcd.exe:
case ${INTERFACE} in
eth*) ;;
wlan*) ;;
ath*) ;; <<<<<======= added this line
*) logger -s -p local0.err -t dhcpcd.exe "wrong interface name \"${INTERFACE}\""
exit 1
;;
esac

archtoad6 12-07-2006 01:05 PM

Good job!

Thanks for posting your solution -- it's the way LQ is supposed to work.

nuxrl 12-07-2006 01:14 PM

Quote:

Originally Posted by Quakeboy02
/etc/dhcpc/dhcpcd.exe:

dhcpcd.EXE? :)

Quakeboy02 12-07-2006 01:36 PM

>>dhcpcd.EXE? <<<

You might try actually looking at the file, mate.

nuxrl 12-07-2006 01:43 PM

I know that file. Just thought it's funny to see an .exe file in /etc directory.

Quakeboy02 12-07-2006 02:02 PM

I thought it was strange, too. I didn't know it was a script file until I grepped for the error message and saw a script response. I had just assumed that a .exe was a compiled program of some sort.

nuxrl 12-07-2006 02:39 PM

.exe usually is used in Windoze world.

Quakeboy02 12-17-2006 09:11 PM

I finally revisited using wpa_supplicant on my system. It's a lot easier now that I've done this stuff a few times. I think my original problem was in getting a working wpa_supplicant.conf file created. This works better. Note, this will overwrite any existing wpa_supplicant.conf

Code:

/usr/bin/wpa_passphrase "MySSID"  "MyPassphrase" > /etc/wpa_supplicant.conf
After that, it's just a matter of changing the /etc/network/interfaces file by adding the following.

Code:

auto ath0
iface ath0 inet dhcp
        pre-up /sbin/wpa_supplicant -Bw -Dwext -c/etc/wpa_supplicant.conf -iath0

Hope this helps someone out there.

>>BLACKHOLE<< 12-19-2006 07:03 PM

[B]Thanks for the suggestion Qboy-
---------------------------------

QUESTION: I've just installed the wpa_supplicant and the the file is /etc/wpa_supplicant.conf but it shows a change in the file as /etc/wpa_supplicant.conf.rpmnew which one should I use??
_______________________________________________________________

CHANGES:

-network={
psk=xxxxxxxxx
scan_ssid=1
ssid="my network"
}

-network={
psk=xxxxxxxxxx
scan_ssid=1
ssid="Cell2network"
}

-network={
psk=xxxxxxxxxx
scan_ssid=1
ssid="linksud"
}

-network={
psk=xxxxxxxxxxxxxxxxxxxxxxx
scan_ssid=1
ssid="My network"
}
____________________________________________________________
>>BLACKHOLE<<

Quakeboy02 12-19-2006 07:14 PM

I'm not sure what rpmnew is all about, but the file is denoted by the command that you use to run wpa_supplicant. Note the "-c" option.

"/sbin/wpa_supplicant -Bw -Dwext -c/etc/wpa_supplicant.conf -iath0"

Do you really have 4 access points (routers) that you want to connect to? Use the "wpa_passphrase" command that I posted above. If you like, send it to a different file and run wpa_supplicant with the "-c" pointing to that other file. Here is a config I just generated for a pretend AP, along with the command I actually used to generate it.

Code:

bob@wendy:~$ /usr/bin/wpa_passphrase "fooessid"  "foo passphrase"
network={
        ssid="fooessid"
        #psk="foo passphrase"
        psk=114e5a1f013d25156013a1f52b3d23cec338e95a8bccfba12a6e58537a45bd36
}



All times are GMT -5. The time now is 10:38 AM.