Static IP and alias IP provided by DHCP on same interface?


Can anyone tell me if it's possible to configure an interface with a static IP address, and have a DHCP client configure a second IP address as an alias, without replacing the static one?

I have a VDSL modem directly connected to my FreeBSD gateway. It has a web admin UI on IP address so I want to give my gateway host the static address so that I can connect to the web UI.

However, the modem also functions as an ethernet to VDSL bridge, so I need to run a DHCP client on the gateway host to obtain a public IP address from my ISP.

Is this possible?


EDIT: I know this is an ancient post, so hopefully this edit won't bump it, but I recently found a solution to the question I asked and thought it would be useful for anyone searching for the same thing.

dhclient.conf(5) now has an alias directive that can be used to assign a static IP to an interface alongside the one obtained through DHCP. This might be a new thing that didn't exist 11 months ago.
interface "em0" {

alias {
  interface "em0";
  option subnet-mask;
Last edited:
My cable modem does something similar. It has an address but it's in bridge mode. So the machine that's connected to it only has my "external" address. However, I'm still able to connect to it on the address even when the interface doesn't have an address in that range.
  • Thanks
Reactions: jem