Results 1 to 5 of 5

Thread: 12.04 wont connect to wireless network on startup

  1. #1
    Join Date
    Sep 2013
    Beans
    23

    12.04 wont connect to wireless network on startup

    I've been doing a bit of amateur networking (giving my machines static IPs to allow for easy print servers and the like), and everything seemed to be going fine until my Dell shut down for the first time. It seems the system was not configured to connect on start-up, and I have yet to find anyone with the same problem on these or other forums (although admittedly I am not an expert).

    Entering these lines manually upon start-up resolves the issue, but each time the computer goes to sleep or restarts they have to be reentered (obviously not acceptable in the long run):
    sudo iwconfig wlan0 essid "mynetwork essid"

    I am not using the network manager but rather the network interfaces file. Here is a copy of what mine looks like:
    auto lo
    iface lo inet loopback

    auto wlan0
    iface wlan0 inet static
    address 192.168.0.179
    gateway 192.168.0.1
    netmask 255.255.255.0
    dns-nameservers 8.8.8.8

    Not sure if its a related problem, but cat /etc/resolv.conf returns these lines (which seems odd to me seeing as I have not included my gateway in the interfaces file and it did not insert itself on my other machines):
    nameserver 192.168.0.1
    nameserver 8.8.8.8

    I imagine the solution might be rather simple, but I am at my wits end.

    Thanks in advance,
    Michael

  2. #2
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    26,047
    Distro
    Ubuntu Development Release

    Re: 12.04 wont connect to wireless network on startup

    I am going to ask a counter-question first. Where is your wireless security? I strongly suggest you change the router to WPA2-AES encryption.

    The answer to your original question is that your wireless won't connect on boot exactly because the interfaces file doesn't declare the essid you want to connect to. As soon as you supply it manually, it connects. I suggest you amend your file to:
    Code:
    auto lo
    iface lo inet loopback
    
    auto wlan0
    iface wlan0 inet static
    address 192.168.0.179
    netmask 255.255.255.0
    gateway 192.168.0.1
    wpa-ssid  "mynetwork essid"
    wpa-psk mysecretpassword
    dns-nameservers 8.8.8.8 192.168.0.1
    I assume your essid is not two words separated with a space. If not, quotation marks are not needed.

    Reboot and enjoy.
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, B.Sc., M.Sc., M.A., Ph.D., Sc.D.

  3. #3
    Join Date
    Sep 2013
    Beans
    23

    Re: 12.04 wont connect to wireless network on startup

    Thank you chili555. I had a feeling it had to be something silly like that. As for your concerns about network security they are duely noted.

  4. #4
    Join Date
    Aug 2005
    Location
    South Carolina, USA
    Beans
    26,047
    Distro
    Ubuntu Development Release

    Re: 12.04 wont connect to wireless network on startup

    By the way, if you decide not to use encryption, the essid declaration will be a bit different in the interfaces file. I am purposely not telling because I think it's very dangerous. Even if you live 40 miles from the nearest neighbor, it's just too easy to check the box in the router's administration pages and make up a password.
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, B.Sc., M.Sc., M.A., Ph.D., Sc.D.

  5. #5
    Join Date
    Sep 2013
    Beans
    23

    Re: 12.04 wont connect to wireless network on startup

    I noticed your omission, and I took it as a sign I should really get to setting up some security. I didn't even want to ask what the declaration would be otherwise haha.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •