feat: DHCP server, no client mode
This commit is contained in:
@@ -2,5 +2,5 @@ set default="0"
|
||||
set timeout="0"
|
||||
|
||||
menuentry "WINF-Photobooth" {
|
||||
linux /bzImage root=PARTUUID=UUID_TMP rootwait console=tty1
|
||||
linux /bzImage root=PARTUUID=UUID_TMP rootwait console=tty1 net.ifnames=0
|
||||
}
|
||||
|
||||
21
board/winf-photobooth/overlay/etc/dnsmasq.conf
Normal file
21
board/winf-photobooth/overlay/etc/dnsmasq.conf
Normal file
@@ -0,0 +1,21 @@
|
||||
# DHCP server for devices plugged into the photobooth's ethernet port.
|
||||
# The photobooth is a standalone network host, not a client: no upstream
|
||||
# DNS, no forwarding.
|
||||
|
||||
interface=eth0
|
||||
except-interface=lo
|
||||
bind-interfaces
|
||||
|
||||
# No upstream resolvers (no client mode anymore)
|
||||
no-resolv
|
||||
local=/local/
|
||||
|
||||
# Serve the booth's own name over DNS as well (avahi does mDNS)
|
||||
address=/winf-photobooth.local/192.168.7.1
|
||||
address=/winf-photobooth/192.168.7.1
|
||||
|
||||
# Hand out 192.168.7.100-200 to plugged-in devices, 12h leases
|
||||
dhcp-range=192.168.7.100,192.168.7.200,255.255.255.0,12h
|
||||
dhcp-authoritative
|
||||
dhcp-option=option:router,192.168.7.1
|
||||
dhcp-option=option:dns-server,192.168.7.1
|
||||
12
board/winf-photobooth/overlay/etc/network/interfaces
Normal file
12
board/winf-photobooth/overlay/etc/network/interfaces
Normal file
@@ -0,0 +1,12 @@
|
||||
# The photobooth is NOT a network client. It runs a DHCP server on its
|
||||
# ethernet port: plug a device into eth0 and it gets an address from
|
||||
# 192.168.7.0/24 (see /etc/dnsmasq.conf). The photobooth itself is
|
||||
# 192.168.7.1.
|
||||
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
auto eth0
|
||||
iface eth0 inet static
|
||||
address 192.168.7.1
|
||||
netmask 255.255.255.0
|
||||
Reference in New Issue
Block a user