Skip to content

Instantly share code, notes, and snippets.

@typelogic
Last active February 10, 2019 22:48
Show Gist options
  • Save typelogic/5dbe4d181ede1b2961acb84b2150418d to your computer and use it in GitHub Desktop.
Save typelogic/5dbe4d181ede1b2961acb84b2150418d to your computer and use it in GitHub Desktop.
dnsmasq and not dhcpcd
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
# source-directory /etc/network/interfaces.d
# I dunno what's the purpose of these settings anymore
#auto br0
#iface br0 inet manual
#bridge_ports eth0 wlan0
# if rpi's eth0 is wired to a working router
# it will set eth0 ip address and wlan0 clients
# will have internet connectivity
## auto eth0
## iface eth0 inet dhcp
# By hardcoding a static ip address here
# `ps -ef` no longer shows 'dhcpcd' process
# which just waste CPU cycles and clarified
# the fact that `dnsmasq` is our one and true
# dhcp server of wlan0 clients
## allow-hotplug wlan0
## iface wlan0 inet static
## address 10.3.141.1
## netmask 255.255.255.0
## gateway 10.3.141.1
# For AP to work in RPI0W, /etc/network/interfaces should be empty
# and then, `ps -ef | grep dhcpd` must be running
#
# This is not exactly the same with RPI3B, perhaps because
# due to RPI0W's ethernet being a USB-attached?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment