Raspberry Pi 3 – Change from dhcpcd to NetworkManager configuration
Disable the following service for dhcpcd:
sudo update-rc.d dhcpcd disable
Empty the file “interfaces” in:
sudo nano /etc/network/interfaces
Install NetworkManager:
sudo apt-get install network-manager
Enable NetworkManager:
Edit the /etc/NetworkManager/NetworkManager.conf file
sudo nano /etc/NetworkManager/NetworkManager.conf
make sure: managed=true
[ifupdown]
managed=true
Enable Ethernet and wifi examples
Wifi: (static not dhcp)
Add:
sudo nmcli -p connection add type wifi ifname wlan0 ssid “WIFI SSID”
Modify:
sudo nmcli con mod wifi-wlan0 ipv4.method manual ipv4.addresses “192.168.88.70/24” ipv4.gateway “192.168.88.1” ipv4.dns “192.168.88.1” wifi-sec.key-mgmt wpa-psk wifi-sec.psk PresharedKeyTypeItHere
Ethernet :(static not dhcp)
sudo nmcli -p connection show
sudo nmcli con mod “Wired connection 1” ipv4.method manual ipv4.addresses “192.168.88.80/24” ipv4.gateway “192.168.88.1” ipv4.dns “192.168.88.1”
Show some attributes:
sudo nmcli -p connection show “wifi-wlan0”
===============================================================================
Connection profile details (wifi-wlan0)
===============================================================================
connection.id: wifi-wlan0
connection.uuid: ???????????????????????????????
connection.stable-id: —
connection.interface-name: wlan0
connection.type: 802-11-wireless
connection.autoconnect: yes
connection.autoconnect-priority: 0
connection.autoconnect-retries: -1 (default)
connection.timestamp: 1505650728
connection.read-only: no
connection.permissions:
connection.zone: —
connection.master: —
connection.slave-type: —
connection.autoconnect-slaves: -1 (default)
connection.secondaries:
connection.gateway-ping-timeout: 0
connection.metered: unknown
connection.lldp: -1 (default)
——————————————————————————-
802-11-wireless.ssid: ?????????????????????????
802-11-wireless.mode: infrastructure
802-11-wireless.band: —
802-11-wireless.channel: 0
802-11-wireless.bssid: —
802-11-wireless.rate: 0
802-11-wireless.tx-power: 0
802-11-wireless.mac-address: —
802-11-wireless.cloned-mac-address: —
802-11-wireless.generate-mac-address-mask:–
802-11-wireless.mac-address-blacklist:
802-11-wireless.mac-address-randomization:default
802-11-wireless.mtu: auto
802-11-wireless.seen-bssids: 74:DA:38:98:66:08
802-11-wireless.hidden: no
802-11-wireless.powersave: default (0)
——————————————————————————-
802-11-wireless-security.key-mgmt: wpa-psk
802-11-wireless-security.wep-tx-keyidx: 0
802-11-wireless-security.auth-alg: —
802-11-wireless-security.proto:
802-11-wireless-security.pairwise:
802-11-wireless-security.group:
802-11-wireless-security.leap-username: —
802-11-wireless-security.wep-key0: <hidden>
802-11-wireless-security.wep-key1: <hidden>
802-11-wireless-security.wep-key2: <hidden>
802-11-wireless-security.wep-key3: <hidden>
802-11-wireless-security.wep-key-flags: 0 (none)
802-11-wireless-security.wep-key-type: 0 (unknown)
802-11-wireless-security.psk: <hidden>
802-11-wireless-security.psk-flags: 0 (none)
802-11-wireless-security.leap-password: <hidden>
802-11-wireless-security.leap-password-flags:0 (none)
——————————————————————————-
ipv4.method: manual
ipv4.dns: 192.168.88.1
ipv4.dns-search:
ipv4.dns-options: (default)
ipv4.dns-priority: 0
ipv4.addresses: 192.168.88.70/24
ipv4.gateway: 192.168.88.1
ipv4.routes:
ipv4.route-metric: -1
ipv4.ignore-auto-routes: no
ipv4.ignore-auto-dns: no
ipv4.dhcp-client-id: —
ipv4.dhcp-timeout: 0
ipv4.dhcp-send-hostname: yes
ipv4.dhcp-hostname: —
ipv4.dhcp-fqdn: —
ipv4.never-default: no
ipv4.may-fail: yes
ipv4.dad-timeout: -1 (default)
——————————————————————————-
ipv6.method: auto
ipv6.dns:
ipv6.dns-search:
ipv6.dns-options: (default)
ipv6.dns-priority: 0
ipv6.addresses:
ipv6.gateway: —
ipv6.routes:
ipv6.route-metric: -1
ipv6.ignore-auto-routes: no
ipv6.ignore-auto-dns: no
ipv6.never-default: no
ipv6.may-fail: yes
ipv6.ip6-privacy: -1 (unknown)
ipv6.addr-gen-mode: stable-privacy
ipv6.dhcp-send-hostname: yes
ipv6.dhcp-hostname: —
ipv6.token: —
——————————————————————————-
proxy.method: none
proxy.browser-only: no
proxy.pac-url: —
proxy.pac-script: —
——————————————————————————-
===============================================================================
Activate connection details (????????????????????????????????????????)
===============================================================================
GENERAL.NAME: wifi-wlan0
GENERAL.UUID: ??????????????????????????????????????
GENERAL.DEVICES: wlan0
GENERAL.STATE: activated
GENERAL.DEFAULT: no
GENERAL.DEFAULT6: no
GENERAL.VPN: no
GENERAL.ZONE: —
GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/2
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/2
GENERAL.SPEC-OBJECT: /org/freedesktop/NetworkManager/AccessPoint/1
GENERAL.MASTER-PATH: —
——————————————————————————-
IP4.ADDRESS[1]: 192.168.88.70/24
IP4.GATEWAY: 192.168.88.1
IP4.DNS[1]: 192.168.88.1
——————————————————————————-
Make interface go up/down:
sudo ifconfig wifi-wlan0 down
sudo ifconfig wifi-wlan0 up