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.

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.

|improve this answer|||||
  • i don't need static, i need dhcp because i don't know other data and wireless connection often changed. i make update to file: take.ms/yzXPs but no lucky — not connected :( – klierik Sep 11 '15 at 15:10
  • Are there any clues in the log? dmesg | grep wlan – chili555 Sep 11 '15 at 18:12
  • i don`t found any way to fix it, so i make next: 1) re-install ubuntu server with connected enternet connection; 2) check do not install update automatically; 3) after ubuntu was installed i add configuration (as i wrote in my first question) to /etc/network/interfaces file; 4) reboot server with disconnected eth0; 5) profit — after reboot server connected to WiFi Router automatically – klierik Sep 12 '15 at 12:21
  • I'm glad it's working by whatever means. – chili555 Sep 12 '15 at 12:35
  • thanks you for help, chili555 :) but it is wired why i was need to re-install OS for correct wlan/eth working. Maybe via installation ubuntu configure ethernet automatically more correctly then later :( – klierik Sep 14 '15 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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