LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (http://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   wifi connection down is Slackware (http://www.linuxquestions.org/questions/linux-wireless-networking-41/wifi-connection-down-is-slackware-639686/)

lucmove 05-03-2008 06:34 PM

wifi connection down in Slackware
 
Thank God this forum works on my phone. It's all I have to talk to the outside world now.

The wifi in my Slack box stopped working mysteriously. In the end, it seems that my ISP was having a glitch. But meanwhile, I tinkered a little with my network and tweaked net mask and default gateway a little - trying to switch to cable/Ethernet. It didn't work - probably because the ISP was down anyway.

Then I talked to. Support, booted into Windows (gotta have it around, they refuse support to Linux users) and wifi works in Windows. It also works in my phone (wifi). Wifi won't work in my Slack box though. I thought I might have misconfigured something, but I never edited any file, I just ran ifconfig and route add in the command line. Even after rebooting, connection is dead.

The wifi interface seems to work. 'iwlist scan' shows all APs around me including mine. 'ifconfig -a' shows that wifi0 is connected to my router. I can even access the router with the browser at 192.168.0.1. But I can't reach the Internet at all. No browsing, no mail, nothing. I guess I messed the gateway or routing or something like that. "Something like that" is a bit out of my league to say the truth. Does anyone know what I can do to makke everything work again?

Many thanks.

LordAnta 05-03-2008 06:54 PM

try this in a terminal as root:

Code:

route add default gw 192.168.0.1
 echo "nameserver 192.168.0.1" > /etc/resolv.conf

So you won't have any other problems, set the router to give you an IP through DHCP and set your wifi card to receive the ip through dhcp. It saves a lot of headaches! :D

lucmove 05-03-2008 07:04 PM

YAY, it worked! Back on my desktop again. :cool:

I was trying this instead:

Code:

ifconfig ath0 192.168.0.1 netmask 255.255.255.0
ifconfig ath0 192.168.0.2 netmask 255.255.255.0
route add -net default gw 192.168.0.1 dev ath0

Someone's told me it's wrong before, but it has worked more than once. I really have to learn these things one day!

How do I set my wifi card to receive the IP through DHCP? Where is that configuration?

LordAnta 05-03-2008 08:59 PM

Edit with your favorite text editor as root:
Code:

/etc/rc.d/rc.inet1.conf
Replace USE_DHCP[4]="" with USE_DHCP[4]="yes"

Also uncomment everything you need so that your wifi card will get his ip from the router.

Also you can try to configure wpa_supplicant. You have a How To on Alien Bob's website (don't know it at this moment: it's 5 am at me and I most go and catch a train :d I'll post it later or someone else will do it for me)

lucmove 07-07-2008 08:50 PM

I'm still struggling with this problem. I thought I wouldn't mention it here again and try to solve it some other way, but I can't find some other way except format and reinstall, but heck! this is Linux, I shouldn't have to reinstall, and I've been too busy and need the machine, I can't afford the time and effort right now.

I gave up on the wifi entirely and have been using my DSL connection with an Ethernet cable. Which I hate because the cable, kept strictly for emergencies, now has been winding around a corner in my office to keep the PC tethered to the router. Messy.

So the problem still stands, except that with the Ethernet cable I've discovered that I can restablish my Internet connection instantly every time by simpling disconnecting the cable and hooking it up again to the Ethernet port a couple of seconds later. Something I could not do with my PCI wifi card.

Does that shed any light? Does anyone have any idea what this could be?

Incidentally, I still have the problem I have described in another topic, although that occurs a lot less frequently now. I hope that someone can help me with that too.

Thank you.

LordAnta 07-08-2008 03:23 AM

Post the contents of /etc/rc.d/rc.inet1.conf

lucmove 07-08-2008 08:39 AM

Code:

# /etc/rc.d/rc.inet1.conf
# comments, blah blah blah
# =============================================================================

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]=""
DHCP_HOSTNAME[1]=""

# Config information for eth2:
IPADDR[2]=""
NETMASK[2]=""
USE_DHCP[2]=""
DHCP_HOSTNAME[2]=""

# Config information for eth3:
IPADDR[3]=""
NETMASK[3]=""
USE_DHCP[3]=""
DHCP_HOSTNAME[3]=""

# Default gateway IP address:
GATEWAY=""

# Change this to "yes" for debugging output to stdout.  Unfortunately,
# /sbin/hotplug seems to disable stdout so you'll only see debugging output
# when rc.inet1 is called directly.
DEBUG_ETH_UP="no"

## Example config information for wlan0.  Uncomment the lines you need and fill
## in your info.  (You may not need all of these for your wireless network)
IFNAME[4]="wifi0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
#WLAN_ESSID[4]=BARRIER05
#WLAN_MODE[4]=Managed
##WLAN_RATE[4]="54M auto"
##WLAN_CHANNEL[4]="auto"
##WLAN_KEY[4]="D5AD1F04...(elided)"
##WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=7B1ABEEB5...(elided) TxRate=0"
#WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="ndiswrapper"

## Some examples of additional network parameters that you can use.
## Config information for wlan0:
#IFNAME[4]="wlan0"              # Use a different interface name nstead of
                                # the default 'eth4'
#HWADDR[4]="00:01:23:45:67:89"  # Overrule the card's hardware MAC address
#MTU[4]=""                      # The default MTU is 1500, but you might need
                                # 1360 when you use NAT'ed IPSec traffic.
#DHCP_KEEPRESOLV[4]="yes"      # If you dont want /etc/resolv.conf overwritten
#DHCP_KEEPNTP[4]="yes"          # If you don't want ntp.conf overwritten
#DHCP_KEEPGW[4]="yes"          # If you don't want the DHCP server to change
                                # your default gateway
#DHCP_IPADDR[4]=""              # Request a specific IP address from the DHCP
                                # server
#WLAN_ESSID[4]=DARKSTAR        # Here, you can override _any_ parameter
                                # defined in rc.wireless.conf, by prepending
                                # 'WLAN_' to the parameter's name. Useful for
                                # those with multiple wireless interfaces.
#WLAN_IWPRIV[4]="AuthMode=WPAPSK EncrypType=TKIP WPAPSK=thekey TxRate=0"
                                # Some drivers require a private ioctl to be
                                # set through the iwpriv command. If more than
                                # one is required, you can place them in the
                                # IWPRIV parameter (space-separated, see the
                                # example).


lucmove 07-22-2008 06:32 PM

I guess posting my /etc/rc.d/rc.inet1.conf didn't help much. But I could add a couple of facts that seem to be very relevant, although I am not sure why:

1) I don't lose my connection if I keep it in constant use, i.e. downloading something, polling my POP3 mailbox every minute or simply leaving an instant messaging program running. I can keep the connection alive for days doing that.

2) Whenever I lose it, there is a very "easy" (annoying) way to fix it: stand up, reach behind the desktop, disconnect the ethernet cable, count to 2 or 3 and connect it again.

Does that help? Does anyone know why I keep losing my connection?


All times are GMT -5. The time now is 03:29 PM.