[systemd-devel] [networkd] Mixing DHCP & static IPs on 1 interface

Ian Pilcher arequipeno at gmail.com
Wed Feb 22 00:30:07 UTC 2017


I'm trying to find a way to do this with systemd-networkd.

The reason is that my cable modem listens on a 192.168.X.X address.
Normally this "just works".  My firewall tries to send traffic destined
for this address to my ISP's router, and the cable modem intercepts the
packets and responds.

If I lose connectivity, however, my firewall doesn't have a default
route, so it doesn't know where to send packets destined for
192.168.X.X.  The net result is that I lose connectivity to my cable
modem's diagnostic pages at exactly the time that I need to access them.
(OK, I don't really lose connectivity; I just have to manually add an
IP address on the proper subnet to the firewall's external interface.
It works, but it's so ... MANUAL!  :-)

My goal is to have both the DHCP assigned address (from my ISP) and the
static address always configured on the external interface.  I've tried
creating two separate .network files that match the interface, but only
the DHCP address is getting assigned.  (The old network service actually
is able to set this up on boot, but the static IP eventually goes away.
I suspect that dhclient is deleting it when it renews its lease.)

Any ideas?

-- 
========================================================================
Ian Pilcher                                         arequipeno at gmail.com
-------- "I grew up before Mark Zuckerberg invented friendship" --------
========================================================================



More information about the systemd-devel mailing list