2

Is wireless networking better handled through /etc/network/interfaces as so:

thufir@doge:~$ 
thufir@doge:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback


auto wlan0
iface wlan0 inet static
        address 192.168.1.102
        netmask 255.255.255.0
        gateway 192.168.1.1
        network 192.168.1.0
        broadcast 192.168.1.255
        dns-nameservers 192.168.1.1, 8.8.8.8, 8.8.4.4
        wpa-ssid 6^&*(%&$4
        wpa-psk (^&*%^&$%#&#%^&

thufir@doge:~$

or through netplan? In the context of CLI.

Secondly, how do I establish that /etc/network/interfaces is being used? Possibly the router is simply assigning that particular IP address with DHCP from network-manager.

thufir@doge:~$ 
thufir@doge:~$ nmcli connection show
NAME                UUID                                  TYPE             DEVICE  
Wi-Fi connection 1  be9517ab-aadf-4a89-bbe5-1ea846a543d3  802-11-wireless  wlp12s0 
Wired connection 1  3f6263c6-cd4b-3e0d-b402-11b6c64fd5d1  802-3-ethernet   --      
thufir@doge:~$ 
thufir@doge:~$ nmcli device show
GENERAL.DEVICE:                         wlp12s0
GENERAL.TYPE:                           wifi
GENERAL.HWADDR:                         00:1F:3C:CD:E6:AD
GENERAL.MTU:                            0
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     Wi-Fi connection 1
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/0
IP4.ADDRESS[1]:                         192.168.1.102/24
IP4.GATEWAY:                            192.168.1.1
IP4.ROUTE[1]:                           dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]:                             192.168.1.1
IP6.ADDRESS[1]:                         fe80::339d:b8d2:ab1b:3e07/64
IP6.GATEWAY:                            

GENERAL.DEVICE:                         enp9s0
GENERAL.TYPE:                           ethernet
GENERAL.HWADDR:                         00:22:19:D1:9C:0B
GENERAL.MTU:                            1500
GENERAL.STATE:                          20 (unavailable)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
WIRED-PROPERTIES.CARRIER:               off

GENERAL.DEVICE:                         lo
GENERAL.TYPE:                           loopback
GENERAL.HWADDR:                         00:00:00:00:00:00
GENERAL.MTU:                            65536
GENERAL.STATE:                          10 (unmanaged)
GENERAL.CONNECTION:                     --
GENERAL.CON-PATH:                       --
IP4.ADDRESS[1]:                         127.0.0.1/8
IP4.GATEWAY:                            
IP6.ADDRESS[1]:                         ::1/128
IP6.GATEWAY:                            
thufir@doge:~$ 
Thufir
  • 4,631

1 Answers1

3

In a desktop machine, using Network Manager, all fingers point to Network Manager. /etc/network/interfaces is devoid of ethernet or wireless details, expecting that NM will do the work. As well, in desktop installations, even netplan hands off the job to NM. Here is the typical netplan file:

cat  /etc/netplan/01-network-manager-all.yaml

# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

While it is quite possible to bypass or even remove NM, there is no compelling reason to do so, aside from, "tweak it until it breaks."

I suggest, therefore, that your static IP address be set in NM:

enter image description here

In order to correctly set a static IP, be certain that the selected address is outside the pool of addresses used for DHCP in the router. For example, configure your router to assign DHCP from 192.168.1.2 to 192.168.1.50. Then set a static IP of 192.168.1.100 and you know that it's you and not the router that selected the address.

chili555
  • 61,330