LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-16-2008, 03:56 PM   #1
mcnalu
Member
 
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware current
Posts: 423

Rep: Reputation: 73
rc.inet1 wireless problem


I've got my rt2860 wireless working on my new asus 1000h running slackware 12.1. With static IP it works without a problem, but if I use dhcp then it fails - no ip gets assigned to it.

Here's the output with LOGGER messages:

Code:
bash-3.1# ./rc.inet1 start
./rc.inet1: /sbin/ifconfig ra0 up
./rc.inet1:  ra0 information: 'Any ESSID'
./rc.inet1:  /sbin/iwconfig ra0 nick mynick
./rc.inet1:  /sbin/iwconfig ra0 essid "myessid"
./rc.inet1:  '/sbin/iwpriv ra0 set AuthMode=WPAPSK'
./rc.inet1:  '/sbin/iwpriv ra0 set EncrypType=TKIP'
./rc.inet1:  '/sbin/iwpriv ra0 set WPAPSK=myhexkey'
./rc.inet1:  /sbin/iwconfig ra0 essid "myessid"
Polling for DHCP server on interface ra0:
/etc/rc.d/rc.inet1:  /sbin/dhcpcd -d -t 30 -h myhostname ra0
dhcpcd: MAC address = 00:22:43:43:63:7f
/etc/rc.d/rc.inet1:  eth5 interface does not exist (yet)
/etc/rc.d/rc.inet1:  /sbin/route add default gw 192.168.1.1 metric 1
SIOCADDRT: No such process
All the config is in rc.inet1.conf, here's the relevant stuff:
Code:
IFNAME[4]="ra0"
#IPADDR[4]="192.168.1.104"
#NETMASK[4]="255.255.255.0"
USE_DHCP[4]="yes"
DHCP_HOSTNAME[4]="myhostname"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""

WLAN_ESSID[4]=myessid
WLAN_IWPRIV[4]="set AuthMode=WPAPSK | set EncrypType=TKIP | set 
WPAPSK=myhexkey"
After looking at rc.inet1 and rc.wireless and the log messages above, I created this script:
Code:
#!/bin/bash
ifconfig ra0 up
sleep 3
iwconfig ra0 nick mynick
iwconfig ra0 essid "myessid"
iwpriv ra0 set AuthMode=WPAPSK
iwpriv ra0 set EncrypType=TKIP
iwpriv ra0 set WPAPSK=myhexkey
iwconfig ra0 essid "myessid"
dhcpcd -d -t 5 -h myhostname ra0
This works, but I can't see why rc.inet1 is failing.

Any ideas?
Edit: it seems to be related to the ifconfig up then down in rc.inet1.conf which tests for a connection when DHCP_TIMEOUT isn't set.

Last edited by mcnalu; 11-16-2008 at 04:05 PM. Reason: last minute realisation!
 
Old 11-16-2008, 04:15 PM   #2
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
Yes, this DHCP_TIMEOUT issue came up in several other cases too (you can search for the threads). Set a timeout in inet1.conf, that will probably solve the problem.
 
Old 11-16-2008, 04:57 PM   #3
mcnalu
Member
 
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware current
Posts: 423

Original Poster
Rep: Reputation: 73
Thanks Ilgar - didn't spot those posts.

I don't think it's the timeout that's the problem, but the code that tests the connection and decides the timeout.

Here's the relevant bit of rc.inet1:
Code:
        if [ "${DHCP_TIMEOUT[$i]}" = "" ]; then
          ifconfig ${1} up && sleep 1
          CONNSTATUS="$(cat /sys/class/net/${1}/carrier 2> /dev/
null)" 
          ifconfig ${1} down
          if [ "$CONNSTATUS" = "0" ]; then
            # The kernel has just told us the cable isn't even p
lugged in, but we will
            # give any DHCP server a short chance to reply anywa
y:
            echo "No carrier detected on ${1}.  Reducing DHCP ti
meout to 10 seconds."
            DHCP_TIMEOUT[$i]=10
          fi
        fi
If DHCP_TIMEOUT isn't set then this code is executed and the problem occurs. If DHCP_TIMEOUT is set to anything then it won't be executed and so the problem doesn't occur.
 
Old 11-17-2008, 05:26 AM   #4
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
Your post brings back some memories :

http://www.linuxquestions.org/questi...ml#post3135298
 
Old 11-18-2008, 03:26 PM   #5
mcnalu
Member
 
Registered: Dec 2006
Location: Glasgow, UK
Distribution: Slackware current
Posts: 423

Original Poster
Rep: Reputation: 73
Nice to know I'm not alone

I think this problem is caused by dhcpcd failing to bring the interface up after the "is the cable connected" ifconfig up/down test.
 
  


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
Can't start wireless from rc.inet1 on Slackware 12.0 Ilgar Slackware 19 04-28-2008 04:23 AM
slow startup because of rc.inet1 / wireless pmdkh Slackware 7 04-02-2008 06:20 PM
configuring rt61 wireless in rc.inet1 Widgeteye Slackware 2 09-26-2007 04:28 AM
How to configure wireless with rc.inet1.conf Murkhadh Linux - Wireless Networking 2 02-17-2007 10:28 AM
rc.inet1 and rc.inet1.conf edafe Slackware 0 02-16-2005 09:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:05 AM.

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