Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I issue the command

iwconfig wlan0 essid NAME

it sometimes takes a really long time to actually be able to view any webpages through a browser. I don't know why that is. Right now the /etc/network/interfaces file contains the following:

allow-hotplug wlan0
iface wlan0 inet dhcp
    # wireless-* options are implemented by the wireless-tools package
    wireless-mode managed
    wireless-essid NAME2

when I boot, there's never any issue like this. I never have to wait. So I tried changing NAME2 to NAME and the same problem remained. What can I do about this?

What I really want is for debian to just connect automatically to either NAME or NAME2 or any open wireless connection. I'm not sure whether this requires configuration in /etc/network/interfaces or /etc/NetworkManager/NetworkManager.conf. I'm currently trying to find examples of how to configure the files. So my questions are

  1. how do I make the appropriate configuration?
  2. do I even need the network-manager to do this?
share|improve this question
    
My guess would be that the DHCP takes a while... how long exactly is "a really long time"? –  tdammers Jun 22 '12 at 7:34
    
More than 5 minutes? –  anonymous Jun 22 '12 at 7:53
add comment

2 Answers

Try this:

/etc/init.d/networking force-reload

This command reboot the network service when you changed any parameter of the current configuration.

Later the changes on the interface configuration can be applied whitout any waiting time.

share|improve this answer
add comment

See my answer here for details on how to configure multiple wireless networks. The delay you're seeing is DHCP, because there's no mechanism to trigger the DHCP client when the wireless connection is actually established. You probably just need to do ifdown wlan0 and ifup wlan0 when you want to connect.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.