LinuxQuestions.org
Review your favorite Linux distribution.
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 09-12-2005, 01:01 PM   #1
Calltor
Member
 
Registered: Aug 2005
Location: Jerusalem, Israel
Distribution: Slackware 10.1
Posts: 42

Rep: Reputation: 15
Connecting to a DHCP wireless network


hi all,

I have KDE 3.4.2 on Slackware 10.1 kernel 2.6.10. I just installed IPW2100 and it seems to work fine - when a wireless network is nearby the signal meter goes up, and when I scan for networks using KWifiManager I find their right names.

However, in several cases I need to connect to a DHCP wireless network, when I don't know anything about it, just it's name (from scanning), for example in the cafe Now, when I try to connect using Wireless Assistant tool or KWifiManager, it returns "connection failed" Why is that? how can I auto-connect without configuring anything I don't know?

* I preffer to use shell commands than K tools, so if it's possiable doing it with IWCONFIG or somehow else, I will be happy.

* This is my current IWCONFIG output:
Code:
bash-3.00# iwconfig
lo        no wireless extensions.

eth0      unassociated  ESSID:off/any  Nickname:"darkstar"
          Mode:Managed  Channel:0  Access Point: 00:00:00:00:00:00
          Bit Rate=0kb/s   Tx-Power:off
          Retry:on   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

eth1      no wireless extensions.

sit0      no wireless extensions.

ppp0      no wireless extensions.
--- Thanks in advance
 
Old 09-12-2005, 01:11 PM   #2
kelvinlo
LQ Newbie
 
Registered: Sep 2005
Distribution: Gentoo 2005.0
Posts: 4

Rep: Reputation: 0
Your iwconfig output was taken when you're trying to connect to the "unknown" network in the cafe? "ESSIDff/any" indicates that it's not connecting properly. Perhaps that unknown network uses a WEP key?
 
Old 09-12-2005, 01:23 PM   #3
Calltor
Member
 
Registered: Aug 2005
Location: Jerusalem, Israel
Distribution: Slackware 10.1
Posts: 42

Original Poster
Rep: Reputation: 15
no... the IWCONFIG is when there is no network nearby... When I try to connect It says it is connecting, but it takes a long time and doesn't connect...
 
Old 09-12-2005, 01:38 PM   #4
kelvinlo
LQ Newbie
 
Registered: Sep 2005
Distribution: Gentoo 2005.0
Posts: 4

Rep: Reputation: 0
If the network has encription, you'll have to set it up to be able to connect. You'll have to find out whether the requires encription before trying to connect.
 
Old 09-12-2005, 01:44 PM   #5
Calltor
Member
 
Registered: Aug 2005
Location: Jerusalem, Israel
Distribution: Slackware 10.1
Posts: 42

Original Poster
Rep: Reputation: 15
I'm sure there is no WEP encryption there - I tried connecting using windowz and had no problem
 
Old 09-13-2005, 11:25 AM   #6
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Rep: Reputation: 98
Hi,
The first thing to do is to run the command iwlist scan.
The results will give you the name of the wireless network you are trying to connect to, assuming of course that the essid is being broadcast.
Then do:- ifconfig wlan0 (or whatever your interface is called) up,
then iwconfig wlan0 essid "essid of wireless net here"
then dhcpcd wlan0.

If you now do an ifconfig, you should see your i.p. If so, you should then be able to use the net, if not, then it may well be that you require a key from the owners of the wireless net. If so, and they are willing to give it, then issue the command iwconfig wlan0 key "key here" before the dhcpcd command.

Refer to man iwconfig to get the full idea how to use the key function.
 
Old 09-23-2005, 04:07 PM   #7
towsonu2003
Member
 
Registered: May 2005
Distribution: Ubuntu 6.06
Posts: 129

Rep: Reputation: 15
I love this forum...
 
Old 09-23-2005, 11:16 PM   #8
towsonu2003
Member
 
Registered: May 2005
Distribution: Ubuntu 6.06
Posts: 129

Rep: Reputation: 15
spoke too early -as always-
dhcpcd works but I could not actually connect to the internet. Browser is not aware that I'm connected.
Calltor: did you manage to log on to web pages after the
dhcpcd wlan0
command?
 
Old 09-24-2005, 04:11 AM   #9
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Rep: Reputation: 98
Ooops,
Sorry fellas, my mistake. You should of course use the commands in the following order.
iwconfig interface_name essid "essid_here"
Then ifconfig interface_name up
then the dhcpcd command.
If your interface is up before this, then issue an ifconfig iterface_name down first.

Afterwards, make sure you have everything running by issuing the ifconfig command as is. You should get info telling you your ip address, netmask etc if it all works.
 
Old 09-24-2005, 01:09 PM   #10
towsonu2003
Member
 
Registered: May 2005
Distribution: Ubuntu 6.06
Posts: 129

Rep: Reputation: 15
Commands in the following order did not help either:

iwconfig interface_name essid "essid_here"
Then ifconfig interface_name up
then the dhcpcd command

I am attaching some output here, hoping that someone can help.

------------
cat /etc/resolv.conf
nameserver 192.168.0.1
------------
ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:460 errors:0 dropped:0 overruns:0 frame:0
TX packets:460 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:34916 (34.0 Kb) TX bytes:34916 (34.0 Kb)

wlan0 Link encap:Ethernet HWaddr 00:90:4B:4F:EC:67
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::290:4bff:fe4f:ec67/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:100 errors:0 dropped:0 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:32878 (32.1 Kb) TX bytes:2646 (2.5 Kb)
Memory:d0200000-d0201fff
---------------
iwconfig
lo no wireless extensions.

wlan0 IEEE 802.11g ESSID:"essid" Nickname:"MOVINGSYSTEM"
Mode:Managed Frequency:2.437 GHz Access Point: 00:11:95:0A:98:34
Bit Rate=36 Mb/s Tx-Power:25 dBm
RTS thr=2347 B Fragment thr=2346 B
Encryption keyff
Power Managementff
Link Quality:99/100 Signal level:-84 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:28 Invalid misc:6699 Missed beacon:0

eth0 no wireless extensions.

sit0 no wireless extensions.
------------------
 
Old 09-24-2005, 02:52 PM   #11
vdemuth
Member
 
Registered: Oct 2003
Location: West Midlands, UK
Distribution: Slackware 14 (Server),OpenSuse 13.2 (Laptop & Desktop),, OpenSuse 13.2 on the wifes lappy
Posts: 781

Rep: Reputation: 98
Your info looks to be OK, but you might want to disable inet6 services with the following command, then restart your network services.


echo "alias net-pf-10 off" >> /etc/modprobe.conf
modprobe -r ipv6

Just copy and paste (as root)
 
Old 09-24-2005, 09:44 PM   #12
towsonu2003
Member
 
Registered: May 2005
Distribution: Ubuntu 6.06
Posts: 129

Rep: Reputation: 15
Just tried that but did not work. Here is the current output (I also included output to route commands I know a little bit about):

root@MOVINGSYSTEM:/home/mehmet# cat /etc/resolv.conf
nameserver 192.168.0.1
root@MOVINGSYSTEM:/home/mehmet# route add default gw 192.168.0.1
SIOCADDRT: Network is down
root@MOVINGSYSTEM:/home/mehmet# route add netmask 255.255.255.0
netmask: Host name lookup failure
root@MOVINGSYSTEM:/home/mehmet# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3520 (3.4 Kb) TX bytes:3520 (3.4 Kb)

wlan0 Link encap:Ethernet HWaddr 00:90:4B:4F:EC:67
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:111 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:35056 (34.2 Kb) TX bytes:1282 (1.2 Kb)
Memory:d0200000-d0201fff

root@MOVINGSYSTEM:/home/mehmet# iwconfig
lo no wireless extensions.

wlan0 IEEE 802.11g ESSID:"default" Nickname:"MOVINGSYSTEM"
Mode:Managed Frequency:2.437 GHz Access Point: 00:11:95:0A:98:34
Bit Rate=54 Mb/s Tx-Power:25 dBm
RTS thr=2347 B Fragment thr=2346 B
Encryption keyff
Power Managementff
Link Quality:100/100 Signal level:-83 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:8 Invalid misc:11364 Missed beacon:0

eth0 no wireless extensions.
 
Old 09-25-2005, 01:43 AM   #13
short101
Member
 
Registered: May 2004
Location: Aust.
Distribution: Debian
Posts: 424

Rep: Reputation: 30
that looks fine, whats the output of route? try pinging the router, and then outside the network. then by hostname to see if its a resolving problem. make sure no firewalls... blah might as well post the output of interfaces file..
 
Old 09-25-2005, 11:09 AM   #14
towsonu2003
Member
 
Registered: May 2005
Distribution: Ubuntu 6.06
Posts: 129

Rep: Reputation: 15
how do I ping the router (don't know its ip)?
what do you mean by "then outside the network" and by "by hostname" (i.e. what is the difference btw pinging the router and pinging the router by its hostname)?
where is (or what is the name of) the "interfaces file"?

Last edited by towsonu2003; 09-25-2005 at 02:06 PM.
 
Old 09-28-2005, 04:17 AM   #15
short101
Member
 
Registered: May 2004
Location: Aust.
Distribution: Debian
Posts: 424

Rep: Reputation: 30
the output of 'route' will give you the ip of your router (gateway) it is what you set in ifconfig and route, and it is also the ip in resolv.conf.. pinging outside the network, i mean as in the internet. so first ping your router (almost certainly will work) then try any other machines on the network, then try an internet host by ip, such as google, 66.102.7.147, then if succesful, try pinging by hostname, so ping www.google.com. i dont know where the interfaces file is on slack, but debian is /etc/network/interfaces man interfaces, man ifupdown, /usr/share/doc/ifupdown/examples/interfaces.gz (in debian anyway)

Last edited by short101; 09-28-2005 at 04:20 AM.
 
  


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
wireless network not connecting jburford Linux - Wireless Networking 11 07-08-2005 08:14 AM
Home network: connecting to a Linksys router for DHCP IP address - no ping gunther Linux - Networking 28 05-20-2005 10:14 PM
Connecting to a wireless network death_au Linux - Newbie 3 03-06-2005 06:38 AM
Connecting to Wireless network ms82xp Linux - Wireless Networking 1 02-06-2005 08:44 PM
need help connecting to my wireless network skiguy Linux - Wireless Networking 6 11-05-2003 10:04 PM

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

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