On 22 Dec 2016 6:39 pm, "Rick Stevens" <ricks@alldigital.com> wrote:
On 12/22/2016 10:15 AM, Earl Ramirez wrote:
> On Wed, 2016-12-21 at 13:10 +0100, François Patte wrote:
>> Bonjour,
>>
>> I want to set a static IP adress for a laptop on my local network. So
>> I
>> wrote a file
>>
>> /etc/sysconfig/network-scripts/ifcfg-wlp3s0
>
> I believe that you will have to modify the file for your local SSID and
> not create the file, e.g. if your SSID is my_wifi you will have to
> edit /etc/sysconfig/network-scripts/ifcfg-my_wifi and use the settings
> below.
>
>>
>> like this:
>>
>> DEVICE=wlp3s0
>> HWADDR=c4:d9:87:a6:67:33
>> TYPE=Wireless
>> BOOTPROTO=none
>> ONBOOT=yes
>> USERCTL=yes
>>
>> IPADDR=192.168.1.29
>> GATEWAY=192.168.1.1
>> NETMASK=255.255.255.0
>>
>> MODE=Managed
>> ESSID=Meenakshi
>>
>> DNS1=192.168.1.1

That will only work if he disables NetworkManager (NM) and enables
netscripts (e.g. "network.service") in its place. NM doesn't use those
scripts and you either use NM or netscripts--not both. They don't play
nicely with each other.


NM does indeed use the ifcfg files in network-scripts and wi-fi is handled much better through NM than network.service shell scripts so this advice is not that useful. 

Back to the OP's issue it is indeed BOOTPROTO none required to disable dhcp.

I'm curious if he reloaded NM after changing this. 

A better way overall is to use nmcli to change it at the terminal. 

From my notes here: 

https://www.hogarthuk.com/?q=node/8

nmcli conection modify  <connection-name> connection.autoconnect yes ipv4.method manual ipv4.addr "10.0.0.1/24" ipv4.dns "10.0.1.1, 10.0.1.2" ipv4.gateway 10.0.0.254

Obviously replace the IP addresses and so on as required. 

This has the benefit as well of changing the current and the persistent configuration at the same time.