LinuxQuestions.org
Help answer threads with 0 replies.
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 03-11-2007, 06:22 AM   #1
funkymunky
Member
 
Registered: Jun 2003
Location: Austin, Texas
Distribution: Fedora Core 8, 32-bit
Posts: 126

Rep: Reputation: 15
Angry keep getting disconnected, keep having to invoke dhclient


Hi,

Im running Fedora Core 6 on my AMD64 laptop, which has the notorious Broadcome 4318 wireless card. Im using ndiswrapper to get the card going.

1) How do i configure Linux to automatically logon to a wireless network? Right now, ive setup "Wireless Networks" in KDE->Control Center to logon automatically to my univ's unsecured network, which proceeds fine. ive also filled in my home network's essid and key in an alternate config here, but linux does not seem to be able to connect to that../sbin/iwconfig eth1 shows im connected to my home network, but doesnt show the key, and i cant access the net.

2)so what i do is /sbin/iwconfig essid <mynet> key <mykey>, followed by /sbin/dhclient
this works, and i can access the Internet. But as soon as i close the console window, or restart firefox, im unable to access the net again..it only works when i do /sbin/dhclient -r and then /sbin/dhclient again..and this behaviour is repeated if i close my browser or konsole again.
Also, i noticed once that i had ssh'd to my univ's server, and had restarted my browser, so that i could'nt open any webpage through the browser..but i had still connected to my univ's server...but as soon as i logged out of the server and tried to relogin, i got a "Temporary failure in name resolution"..and firefox says "cannot open web page" after a while (And all this while, gaim remained connected..whats going on )

Your help is really appreciated, thanks in advance..
-Mayank
 
Old 04-01-2007, 10:36 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
You can try this, create a file in your home/bin directory called something like home which looks something like;

#!/bin/bash
/sbin/ifdown wlan0
/sbin/iwconfig wlan0 essid <mynet> key <mykey>
/sbin/dhclient wlan0
exit 0

After saving the file make it executable; chmod u+x home

Your /etc/sysconfig/network-scripts/ifcfg-wlan0 file should look something like;

TYPE=Wireless
DEVICE=wlan0
HWADDR=
BOOTPROTO=dhcp
DHCP_HOSTNAME=
IPADDR=
DOMAIN=
ONBOOT=no
ONHOTPLUG=yes
USERCTL=yes
IPV6INIT=no
PEERDNS=no

If desired you can do something similar (a bin/school file) for university's unsecured network, then all you need to do is call the file wanted. Since you said KDE you can create a link on the desktop to each of the two files (if desired).
 
  


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
sudo or awk? how to invoke? jon23d Linux - General 3 07-09-2006 09:18 PM
How to manually invoke screensaver? bjw122 Linux - Newbie 8 04-19-2006 02:03 PM
how to invoke passwd phoenix_fei Programming 2 06-03-2005 02:44 AM
vim invoke noir911 Programming 1 01-29-2005 07:15 PM
invoke makefile: make invasian Linux - Newbie 2 08-08-2004 01:52 AM

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

All times are GMT -5. The time now is 08:45 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