Re: how to disable dhcp on a fedora client?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 22 Dec 2016 7:48 pm, "James Hogarth" <james.hogarth@xxxxxxxxx> wrote:


On 22 Dec 2016 6:39 pm, "Rick Stevens" <ricks@xxxxxxxxxxxxxx> 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: 


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.

Oh and also don't mask network.service ... NM and network at this time do work together and network IIRC still sets up lo for instance. 

They should both be enabled, and if there is an interface for some reason you do want NM to ignore add NM_CONTROLLED=no which will then mark it as unmanaged by NM and the network service will process it via the legacy shell scripts.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]
  Powered by Linux