static IP WIFI not working

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Zardoz777

static IP WIFI not working

Post by Zardoz777 »

I'm trying to set a statip IP address to in my linux mint 14 system. After doing some changes my /etc/network/interfaces reads this way:
--------------------------------------------------------------
auto lo
iface lo inet loopback

auto wlan0
allow-hotplug
iface wlan0 inet static
address 192.168.1.66
netmask 255.255.255.0
getaway 192.168.1.1
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
---------------------------------------------------------------------

When I booted after editing the file, the network does not function. Indeed, the network controls on the right bottom of the desktop are not even there.
Also I wanted to set an static eth0 address to conect to my raspberry pi. So I have tried to add to the file:

------------------------------------------------------------------------------------------------------------
auto eth0
iface eth0 inet static
address 192.168.1.66
netmask 255.255.255.0
gateway 192.168.1.1
------------------------------------------------------------------------------------------------------------
When I do this the computer has problems to boot because says a drive with an UUID which does not exist is not ready; "disk drive UUID=... is not ready yet or not present". Afer complaining it boots but network does not work. I have read in the Ubuntu forum that people get this message for other kind of reasons. Not for editing the /etc/networ/interfaces file.

Anybody knows what is happening? I'm very novice with network configurations so probably I have messed up something.

Thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
mads

Re: static IP WIFI not working

Post by mads »

This is what I did some years ago. Might help, I hope.

1) Add DNS nameservers to /etc/resolv.conf

Code: Select all

sudo echo "nameserver x.x.x.x" > /etc/resolv.conf
sudo echo "nameserver y.y.y.y" >> /etc/resolv.conf
2) Open /etc/network/interfaces and define appropriate stanzas for wireless interface. Run:
gksudo gedit /etc/network/interfaces
Add the following lines, save and exit

Code: Select all

# The primary network interface
allow-hotplug eth0
#iface eth0 inet dhcp

# The wireless interface
auto wlan0
iface wlan0 inet static
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
address 192.168.1.66
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
3) Stop wpa_supplicant daemon, make and edit wpa_supplicant.conf. Run:
sudo killall -q wpa_supplicant
sudo touch /etc/wpa_supplicant/wpa_supplicant.conf
gksudo gedit /etc/wpa_supplicant/wpa_supplicant.conf
Add the following lines, save and exit

Code: Select all

# WPA2-PSK/AES for wlan0 interface
ctrl_interface=/var/run/wpa_supplicant
#ap_scan=2

network={
scan_ssid=1
ssid="PUT_SSID_HERE"
key_mgmt=WPA-PSK
proto=RSN
pairwise=CCMP
group=CCMP
psk="PUT_PASSWORD_HERE"
}
Notes:
A. proto=WPA for WPA, proto=RSN for WPA2.
B. When connecting to hidden ssid, explicit security policy should be given with ap_scan=2 being setted.

4) Bring the wifi interface up and try to connect manually. Run:
sudo /etc/init.d/network-manager stop
sudo iwconfig
sudo ifconfig wlan0 up
sudo wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
sudo /etc/init.d/networking start
Locked

Return to “Networking”