title: Raspberry Pi as WLAN hotspot and static IP on LAN
body: <p>I have a Raspberry Pi 3B with Raspberry Pi OS lite and I would like to use the Pi as WLAN hotspot and server with a static IP (169.254.1.100) on eth0.</p>
  <p>Therefore, I have installed dnsmasq and hostapd and edited following files:</p>
  <p>I edited /etc/dnsmasq.conf:</p>
  <pre><code># DHCP-Server aktiv für WLAN-Interface
  interface=wlan0
  
  # DHCP-Server nicht aktiv für bestehendes Netzwerk
  no-dhcp-interface=eth0
  
  # IPv4-Adressbereich und Lease-Time
  dhcp-range=192.168.1.100,192.168.1.200,255.255.255.0,24h
  
  # DNS
  dhcp-option=option:dns-server,192.168.1.1
  </code></pre>
  <p>I added to /etc/dhcpcd.conf</p>
  <pre><code>interface wlan0
  static ip_address=192.168.1.1/24
  </code></pre>
  <p>I edited /etc/hostapd/hostapd.conf:</p>
  <pre><code>interface=wlan0
  
  ssid=PI_WLAN
  channel=1
  hw_mode=g
  ieee80211n=1
  ieee80211d=1
  country_code=AT
  wmm_enabled=1
  
  auth_algs=1
  wpa=2
  wpa_key_mgmt=WPA-PSK
  rsn_pairwise=CCMP
  wpa_passphrase=somePassword
  </code></pre>
  <p>I am starting WLAN with</p>
  <pre><code>&gt; sudo hostapd -dd /etc/hostapd/hostapd.conf
  </code></pre>
  <p>The WLAN is only created if the eth0 is not static, but when the IP is static DHCP fails to start and WLAN does not work.</p>
  <p>How can I enable DHCP for WLAN0 even when DHCP is disabled for eth0?</p>
  <p>Kind regards,
  Wolfgang</p>