Hello. My wireless is successfully installed, however I have run into a sort of problem. Around the web, I see people just using
To change SSID's however, whenever I do that it keeps the previous inet and also gets a new one from the new SSID, the problem is then I have 2 inet addresses, I would of thought since there on different subnets this wouldn't of mattered but apparently it does (and I can't connect to the new SSID unless all other inet addresses are cleared).
The only way I can connect to the internet through the new different SSID, is to clear all my inet and only have a single inet present, and restart networking.. But this code below is not very good I'm sure, as it only work sometimes (at least some times is better than no times). The problem with the below is, (the inet issues is sorted out, and I clear inet before changing SSID, however the below script I created sometimes can't find the channel for the SSID and will continue jumping even when it does land on it..
- Also if I just clear inet (without network restart) and leave it as that, then it doesn't get any new inet from any new SSID I join..
Thus I have 2 questions:
(Q) Is there any better method for switching between wireless [SSIDs] and wired.
(Q) Also how do I disable autoselect network, when I enable wlan0. I'd rather manually connect to which ever SSID, when I enable it.
myCrappyScript [I haven't automated it because I'm still testing]
Code:
ifconfig wlan0 ssid "bla bla bla"
To change SSID's however, whenever I do that it keeps the previous inet and also gets a new one from the new SSID, the problem is then I have 2 inet addresses, I would of thought since there on different subnets this wouldn't of mattered but apparently it does (and I can't connect to the new SSID unless all other inet addresses are cleared).
Code:
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:24:2c:01:39:bd
[B]inet 192.168.2.3 netmask 0xffffff00 broadcast 192.168.2.255
inet 192.168.1.14 netmask 0xffffff00 broadcast 192.168.1.255[/B]
media: IEEE 802.11 Wireless Ethernet OFDM/36Mbps mode 11g
status: associated
ssid xxxxx channel 3 (2422 MHz 11g) bssid 00:21:27:dc:10:08
regdomain 106 indoor ecm authmode WPA2/802.11i privacy OFF txpower 20
bmiss 7 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
roam:rate 5 protmode CTS wme burst
The only way I can connect to the internet through the new different SSID, is to clear all my inet and only have a single inet present, and restart networking.. But this code below is not very good I'm sure, as it only work sometimes (at least some times is better than no times). The problem with the below is, (the inet issues is sorted out, and I clear inet before changing SSID, however the below script I created sometimes can't find the channel for the SSID and will continue jumping even when it does land on it..
- Also if I just clear inet (without network restart) and leave it as that, then it doesn't get any new inet from any new SSID I join..
Thus I have 2 questions:
(Q) Is there any better method for switching between wireless [SSIDs] and wired.
(Q) Also how do I disable autoselect network, when I enable wlan0. I'd rather manually connect to which ever SSID, when I enable it.
myCrappyScript [I haven't automated it because I'm still testing]
Code:
-- eth0 [To use wired..]
/etc/rc.d/wpa_supplicant stop wlan0
ifconfig wlan0 down
/etc/rc.d/netif restart
ifconfig wlan0 down
-- wlan [UNPLUG wire]
ifconfig wlan0 up [color="DarkRed"]#for when I first start, I need to bring wlan0 up[/color]
ifconfig wlan0 inet -alias [color="DarkRed"]#clear inet addresses[/color]
/etc/rc.d/netif restart [color="DarkRed"]#restart networking, without eth, since wire not in[/color]
/etc/rc.d/wpa_supplicant stop wlan0 [color="DarkRed"]#stop it in case it's already running[/color]
/etc/rc.d/wpa_supplicant start wlan0 [color="DarkRed"]#start it[/color]
ifconfig wlan0 down [color="DarkRed"]#bring it down, before it auto connects >:([/color]
ifconfig wlan0 ssid "SSIDnameblabla" [color="DarkRed"]#choose SSID[/color]
ifconfig wlan0 up [color="DarkRed"]#bring it UP[/color]
dhclient wlan0 [color="DarkRed"]#request IP[/color]