LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Does wpa_supplicant work with static ip. (https://www.linuxquestions.org/questions/fedora-35/does-wpa_supplicant-work-with-static-ip-510913/)

gimmee 12-15-2006 08:30 PM

Does wpa_supplicant work with static ip.
 
Hi all

Just wondering if wpasupplicant can be setup to use static ip address.

At the moment i have my computers set for static ip adresses as I use port forwarding on the router. Also I have the router totally open at the moment but wanted to try wpa psk on the linksys router.

Wireless works fine otherwise. Sitting by the pool at the moment trying to find the answer to this question but most people seem to use dhcp.

At the moment i am getting the following:

root@Evo6:/home/gimmee# wpa_supplicant -ieth1 -c/etc/wpa_supplicant.conf
Failed to read read or parse configuration '/etc/wpa_supplicant.conf'.

My simple wpa_supplicant.conf has the following

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel


network={
ssid=Gimmee
key_mgmt=NONE

}

and my simple network file has the following

auto lo

iface lo inet loopback

iface eth1 inet static
address 192.168.1.102
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1
wireless-essid Gimmee

auto eth1


Slowly getting a handle on my simple homenetwork but still a ways to go yet.

Thanks in advance to any help.

Gimmee :):)

jschiwal 12-15-2006 10:06 PM

I believe that the dhcp negotiation occurs after authentication. So configure dhcp or static a static IP address outside of the wpa_supplicant.conf and then you get static IP's.
My desktop has a static address using wireless.
Code:

BOOTPROTO='static'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR='192.168.1.101'
MTU=''
NAME=''
NETMASK='255.255.255.128'

This is a part of my /etc/sysconfig/network/ifcfg-wlan0 file.
In SuSE, the wpa info is contained in the ifcfg-wlan0 file and these values used to create /var/run/wpa_supplicant.conf dynamically. Your setup is different. Remember however that when you connect to other networks, you probably have to use dhcp to get an IP address.

If you connect to other networks, you can launch an action script from wpa_cli which could contain iwconfig statements.


All times are GMT -5. The time now is 09:23 AM.