1

Good day. I have fresh Ubuntu Server 14 installed (with updates). I already tried this solutions w/o result:

Setting up wireless (WPA2) on ubuntu server 14.04

Automatically connect to a wireless network using CLI

Here is my /etc/network/interfaces file:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# Ethernet
auto eth0
iface eth0 inet dhcp

# Wireless
auto wlan0
iface wlan0 inet dhcp
wpa-ssid network_name
wpa-psk network_password

So after reboot it doesn't connect to wireless connection automatically. Only after run command:

sudo ifdown wlan0 && sudo ifup -v wlan0

system connect to wireless network.

Can you please tell me how to fix it or where i make mistake? Thanks.

klierik
  • 11

1 Answers1

0

Your interfaces file asks both ethernet and wireless to start automatically. If the ethernet cable is detached, obviously it can't.

Moreover, in a server, which usually runs headless, it is preferable to set a static IP address so that you can easily ssh and ftp into it. Therefor, I suggest that your interfaces file be set up like this:

auto lo
iface lo inet loopback

#auto eth0
iface eth0 inet dhcp

auto wlan0
iface wlan0 inet static
address 192.168.1.150
netmask 255.255.255.0
gateway 192.168.1.1
wpa-ssid <your_router>
wpa-psk <your_wpa_key>
dns-nameservers 8.8.8.8 192.168.1.1

Be sure to select a static address outside the range used by the DHCP server in the router, switch or other access point. Of course, substitute your details here.

chili555
  • 61,330