0

I am successfully using an Edimax WLAN USB stick which I have manually configured by editing etc/network/interfaces to use a static IP address; everything works as expected (other computers can be pinged, other computers can ping the Raspberry Pi, webbrowsing works), but the GUI indicates "No wireless interfaces found". Does anyone have an idea what this means?

I am using a Raspberry Pi 2 with Raspbian Stretch. I edited the file

/etc/network/interfaces

to contain the following non-comment lines.

auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
auto wlan0
iface wlan0 inet static
address {some address}
netmask {some netmask}
gateway {some gateway}
dns-nameservers {some nameserver}
wpa-ssid {some wlan network name}
wpa-psk {some key}
Codor
  • 103
  • 5
  • What is the output of `nmcli connection` ? – RubberStamp Nov 07 '17 at 21:28
  • Probably because you ignored the warning `# Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'` but as you haven't said what you did, or even which Pi or OS, no one can be sure. See [How to set up Static IP Address](https://raspberrypi.stackexchange.com/a/74428/8697) – Milliways Nov 07 '17 at 22:57
  • @Milliways: That "How to" guide ignores the best way to setup Static IP Address... that being setting up Static Leases via your DHCP server. There's nothing wrong with Static addressing schemes. However, I highly recommend using the full capabilities of your DHCP server rather than setting them on the local host. For example, here's how to do Static via DHCP with a DD-WRT router: [Static Addressing via DHCP](https://www.dd-wrt.com/wiki/index.php/Static_DHCP) – RubberStamp Nov 07 '17 at 23:25
  • I forgot for a moment that "Network Manager" is probably not installed... systemd is probably installed... If so, what is the output of `systemctl status dhcpcd` – RubberStamp Nov 07 '17 at 23:52
  • @RubberStamp Address reservation in a router is **NOT** a static address. The "best" way is to NOT use a static address, unless you are running an isolated network, a DHCP server or such like. I have just about given up on trying to stop Pi users assigning static addresses, now I just try to tell them how to do it properly. – Milliways Nov 08 '17 at 01:41
  • @Milliways: Static addresses are addresses which equate the same hardware address to the same IP address. A static lease via DHCP works very well. Of course, there are ways to change the hardware address... in fact the OTG port configuration with the RPi resets its hardware address with each reboot. However, the "How to Static Addresses" would be better served adding DHCP static leases as the preferred method of static addressing. This is how things are done in the real world, for example ISPs assigning static addresses for business accounts, etc. – RubberStamp Nov 08 '17 at 01:47
  • @RubberStamp I use Address reservation myself, but it **ONLY** applies on a **SINGLE** network, so it definitely ISN'T STATIC, and many users have no access to the router configuration. The "best" approach (IMHO) is to learn to use youe network e.g. [Zero-conf](https://en.wikipedia.org/wiki/Zero-configuration_networking) – Milliways Nov 08 '17 at 01:57
  • Complex static addressing schemes are easily implemented via a dedicated dhcp server. Such server can be the authoritative server for multiple subnets. I prefer isc-dhcp-server for most of my networks. The ISC dhcp can even run on [RPi](http://www.noveldevices.co.uk/rp-dhcp-server). However, the OP question seems to revolve around "Why does the GUI Network software not read the `/etc/network/interfaces` configuration file... and that is a somewhat separate question. I believe the answer is that systemd doesn't pull its configuration from the /etc ... and any config in /etc takes precedence – RubberStamp Nov 08 '17 at 02:28

0 Answers0