You are not logged in.

#1 2011-11-12 20:38:16

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Odd problem when setting wireless to static ip instead of dhcp

I might be doing something wrong, but for some reason when I set my wireless to a static ip it tried auto connecting to some other wireless network even before I ran wpa_supplicant. I decided to go with static instead of dhcp because I couldn't figure out the best method of making dhcp run after wpa_supplicant associated with an access point, but in the end had to go back to dhcp because it was connecting to the wrong wireless.

Offline

#2 2011-11-14 22:30:53

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,489

Re: Odd problem when setting wireless to static ip instead of dhcp

One thing you might check, if you have considered / tried: https://wiki.archlinux.org/index.php/Netcfg#wifi-select
or https://wiki.archlinux.org/index.php/Ne … connecting

Which commands do you run to bring the connection up (with or without static entry)?

Offline

#3 2011-11-17 04:24:37

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Re: Odd problem when setting wireless to static ip instead of dhcp

With DHCP set I run wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf and then I manually wait for a little bit and then run the DHCP client. With the static ip, I just did the first step, but before I even ran that it was trying to connect to some other random wireless network that happens to be close by.

Offline

#4 2011-11-17 19:12:45

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,489

Re: Odd problem when setting wireless to static ip instead of dhcp

Ok, fine. With respect to the random connects: have you tried the suggestions in the wiki above?

Now before you run the wpa_supplicant, try:

ip link set down dev wlan0                #brings down the wifi connect
iwconfig wlan0 ESSID "Your Wireless"         #The one you have access to 
ip link set up dev wlan0  
iwconfig                                  # Check here, if the correct wifi is associated 
wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf   
dhcpcd wlan0 

What does that do?

Offline

#5 2011-11-18 01:59:14

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Re: Odd problem when setting wireless to static ip instead of dhcp

Well, I don't have a problem when I use dhcp. It only occurs when it is set to static.

Offline

#6 2011-11-18 20:53:13

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,489

Re: Odd problem when setting wireless to static ip instead of dhcp

Then you arrived at step 4 of the wiki (https://wiki.archlinux.org/index.php/Wi … nual_setup) and can substitute the dhcp by an old-fashioned

ifconfig wlan0 192.168.6.6/24 #<-replace by your static ip/netmask

run iwconfig and then ping your router to check.

Offline

#7 2011-11-19 03:02:09

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Re: Odd problem when setting wireless to static ip instead of dhcp

Nevermind, I think we are miscommunicating here. I'm sorry if I was vague or hard to understand and I'm not all that worried about the issue at the moment. I'm leisurely taking my time on this one because I'm able to get by the other way for now.

Offline

#8 2011-11-19 12:41:00

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,489

Re: Odd problem when setting wireless to static ip instead of dhcp

No worries. Given that have a leisurely look at the wiki links again.  It does not sound like your system has a peculiarity that makes the issue happen.

Offline

#9 2011-12-21 03:46:30

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Re: Odd problem when setting wireless to static ip instead of dhcp

Sadly, I've been too lazy to really dig into this issue, but I also discovered something similar. When I unplug my wireless usb (DWA-140 for anyone curious) after it has been connected and I have internet, upon replugging it in, it seems to try to connect to random wireless networks. I would like to know how to prevent my wireless from trying to connect to anything other than what I have specified. Maybe its because I only have the wireless network I want to connect to in my wpa_supplicant.conf file and it needs to be elsewhere in order to prevent connecting to other non-listed networks.

Offline

#10 2011-12-22 17:50:54

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,489

Re: Odd problem when setting wireless to static ip instead of dhcp

There is a number of ways to do that described in the wiki quoted above. Also this one: 
https://wiki.archlinux.org/index.php/Ne … connecting
If they don't work, please state which you have tried and also post your daemon array.

Offline

#11 2011-12-23 18:29:29

brandon88tube
Member
Registered: 2009-11-06
Posts: 84

Re: Odd problem when setting wireless to static ip instead of dhcp

I've read through the wireless networking wiki many times and didn't really see anything regarding what I'm referring to. Maybe its there and I just don't fully understand. I'm not really looking at using netcfg because I was hoping to just do it manually instead of installing another program to do it for me. If I do that, I don't think I'll learn as much. I've also read over the wpa_supplicant wiki many times in order to try and get a better understanding.

Last edited by brandon88tube (2011-12-23 18:30:53)

Offline

#12 2011-12-24 12:25:21

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,489

Re: Odd problem when setting wireless to static ip instead of dhcp

Ok, well the ways I was referring to and quoting were to do with netcfg. You actually never gave exact information how you connect with that device, where you set your IP, etc.. Maybe you can pass on your ESSID there as an option. Another thing you can do is to create a udev rule for the usb stick that is triggered upon plug in (like there is one which probably makes it link to the strongest wifi now).

Offline

Board footer

Powered by FluxBB