Here’s the clean, repeatable way to do DHCP + multiple static IPv4s on the same Pi interface using NetworkManager (nmcli). Works on Raspberry Pi OS Bookworm (Pi 5).
1) Find your active connection name
nmcli con show --active
nmcli dev status
Note the connection name (e.g., “Wired connection 1”) and the device (e.g., eth0). Raspberry Pi OS Bookworm uses NetworkManager by default.
Raspberry Pi Stack Exchange
2) Enable DHCP and add extra static addresses
Use one profile with DHCP enabled and add “additional static addresses” to it (don’t set an extra gateway for the statics):
CON="Wired connection 1" # change to your connection name
# Keep DHCP on:
sudo nmcli con mod "$CON" ipv4.method auto
# Add one or more static IPv4s (prefix after slash), no gateway:
sudo nmcli con mod "$CON" +ipv4.addresses "192.168.50.10/24"
sudo nmcli con mod "$CON" +ipv4.addresses "10.10.10.20/24"
# Make sure no manual gateway is set (default route will come from DHCP):
sudo nmcli con mod "$CON" ipv4.gateway ""
# (Optional) keep DHCP-provided DNS. To force your own:
# sudo nmcli con mod "$CON" ipv4.ignore-auto-dns yes ipv4.dns "1.1.1.1 9.9.9.9"
Bring the profile up (or reapply):
sudo nmcli con up "$CON" || sudo nmcli dev reapply eth0
Verify:
nmcli -f IP4.ADDRESS dev show eth0
ip addr show dev eth0
This “DHCP + additional static addresses” approach is supported by NetworkManager (GUI shows it as “Automatic (DHCP) + Additional addresses”; the same is done via nmcli above).
3) IPv6 (optional)
Same idea if you also need IPv6:
sudo nmcli con mod "$CON" ipv6.method auto \
+ipv6.addresses "fd00:abcd::123/64"
4) Common variations & tips
- Two statics in the same /24? Fine—each gets its own /32 host route plus the on-link subnet route. No extra gateway needed as long as DHCP supplies the default route. (If you set a second gateway, you’ll create routing conflicts.)
- Want a static address even when DHCP is down? Some setups report the extra addresses don’t appear until DHCP succeeds. If you truly need a DHCP-fallback static, create a second profile with ipv4.method manual and your static IP, set both profiles to autoconnect, and prefer the DHCP one with a higher connection.autoconnect-priority. (Alternative: enable IPv4 link-local fallback so you still get 169.254.x.y when DHCP fails.)
Quick reset / remove examples
Remove one address:
sudo nmcli con mod "$CON" -ipv4.addresses "10.10.10.20/24"
Clear all manual IPv4s:
sudo nmcli con mod "$CON" ipv4.addresses ""
sudo nmcli con up "$CON"
Reference docs and examples for multiple addresses and DHCP method are in the NetworkManager manuals and distro docs.

Top comments (0)