Ubuntu: Setting up Static IP Address for Wireless in Ubuntu 14.04



Question:

I've attempted to set up a static ip address for my home computer (Ubuntu 14.04 LTS), and have followed a few online instructions to no avail.

my interfaces file was :

auto l0  iface lo inet loopback    allow-hotplug wlan0  iface wlan0 inet static  address 192.168.1.151  netmask 255.255.255.0  gateway 192.168.1.1  dns-nameservers 8.8.8.8  

when I reboot the machine and type ifconfig in the terminal my wlan0 ipv4 was successfully changed to 192.168.1.151 but there is no wireless connection detected. i did the same process with an other linux(debian) machine and it's works fine. thank you for your help !


Solution:1

The issue with Wireless Networks is that they are not managed correctly by /etc/network/interfaces unless you configure all the WPA2 items. This poses a problem - it will always try and configure itself then for that Wireless Network, and then you won't have a working wifi if you need to do another network, until you reconfigure the item in /etc/network/interfaces, and then reboot or restart the wifi card.

The correct way to handle Wireless Networks is to use Network Manager, on a default Ubuntu installation, and then have all the configuration done in the network profile that is stored inside Network Manager.

In a typical setup of Ubuntu 14.04, you will have to configure Network Manager to connect to a wireless network. Inside Network Manager, it will have different connection profiles for each Wireless network. Start by connecting to the network as you normally would - this will then give you a dynamically-assigned Wireless address, and create the profile.

Click the network manager icon in the indicator bar. Hit "Edit Connections", and select the network you want to edit. Then hit "Edit"; this type of screen shows up:

Editing A Network Window

You can then go to the IPv4 tab, and hit "Manual". In the box for IP addresses, network data, etc. you will then put your configuration items there, such that 192.168.1.151 is the address, 24 is the NetMask you enter (you can also put 255.255.255.0 if you want, but 24 is identified the same way), and 192.168.1.1 is the gateway.

Another box is for DNS servers - there you would put 8.8.8.8.

It'd look something like this when you're done:

Editing a Network - IPv4

Hit "Save". Then, tell Network Manager to disconnect and then connect to the network again. You then have static-IP addressing for that wireless network.

You can also configure different settings for different Wireless networks in this way, if multiple networks need different static IP addresses or network settings set on your device.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »