1

I have used Ubuntu desktop for a while and I'm now trying to set up a server. I'm using a wireless PCI adapter which works fine with Ubuntu Live CD.

On installing the server it found the adapter and (once I had entered the SSID and WPA key) connected to the network almost immediately. However, after installation on booting for the first time it failed to connect during startup. At this point I'm not sure quite where to go from here. I've read the Server Guide but there is nothing about wireless networking in the networking chapter.

I'm used to the desktop gui so the commandline interface is a bit daunting. Please be gentle ...

Just for the record the wireless adapter is a TP-Link TL-WN781ND


My interfaces file looks much simpler -

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
    wpa-ssid RunnymedeData
    wpa-psk <my_key>

The system won't start the network connection on bootup however it starts almost immediately I set the SSID explicitly on logging in. I don't have to do anything else. The IP address is correctly assigned by the dhcp server (my router) and the machine then shows in the router's list of connections. I'll give the static route a try and see how we get on. Back soon.


This problem has to do with the fact that the SSID is hidden on my wireless network. In my view this is a bug.

With SSID hidden : system takes a long time to boot (waiting unsuccessfully for network to start). Once I have logged in then explicitly setting essid with iwconfig enables networking within a few seconds; nothing else needs to be done.

With SSID not hidden : system boots up quickly and networking is immediately up and running.

In summary, nothing to do with the specific adapter and nothing to do with the interfaces file.

Thanks to @chilli555 for taking the time to help.

0

1 Answer 1

5

The usual way to configure a server is to fill in your details in the file /etc/network/interfaces. First, confirm you have a working wireless interface:

iwconfig

Do you have an interface, ideally wlan0? Next confirm it is working as expected:

sudo iwlist wlan0 scan

Do you see your network, among others? If so, edit the file with the editor vim:

sudo vim /etc/network/interfaces

Add your details so it looks something like:

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static  <--you want to be able to reach your server by ssh and ftp
address 192.168.1.100  <--an address outside the DHCP range in the router
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 192.168.1.1 8.8.8.8
wpa-ssid <your_network>
wpa-psk <your_key>

Save your changes and close vim with :wq. Now get the interface to see and use the new settings:

sudo ifdown wlan0 && sudo ifup wlan0

Confirm you got the new address:

ifconfig

And that you can reach the internet:

ping -c3 www.google.com

Of course, substitute your details above.

4
  • Thanks for the help. The SSID had been set in the interfaces file during installation so that was OK. iwconfig confirmed the interface but showed the SSID as 'off/any'. I reset this using iwconfig with the essid option and, after a few moments, the network sprung to life. My question now is why doesn't the SSID in the interfaces file 'stick'?
    – user142006
    Mar 22, 2013 at 8:57
  • The interface may not be coming up because of some other issue in /etc/network/interfaces. Does it look like mine above, especially the 'auto' part? Do you want to post it here so we can troubleshoot it? Of course,disguise your password.
    – chili555
    Mar 22, 2013 at 16:43
  • Mine looks much simplerauto lo iface lo inet loopback auto wlan0 iface wlan0 inet static <--you want to be able to reach your server by ssh and ftp address 192.168.1.100 <--an address outside the DHCP range in the router netmask 255.255.255.0 gateway 192.168.1.1 dns-nameservers 192.168.1.1 8.8.8.8 wpa-ssid <your_network> wpa-psk <your_key>
    – user142006
    Mar 22, 2013 at 18:25
  • Need to do this as another answer because of the lack of any formatting in comments.
    – user142006
    Mar 22, 2013 at 18:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .