I have installed FreeBSD 14.3 in a VPS.
I select DHCP so the provider can provision the IP, but I have also a floating IP I can assign to that interface.
I have tried the following in /etc/rc.conf:
But after rebooting the system the static IP does not appear configured (you do not see using ifconfig)
However if I just type as root:
Then the static IP is added normally to the DHCP assigned one.
Is that the right way to add both DHCP + static IP in /etc/rc.conf?
Why the manual command works but the entry in /etc/rc.conf does not?
I select DHCP so the provider can provision the IP, but I have also a floating IP I can assign to that interface.
I have tried the following in /etc/rc.conf:
Code:
ifconfig_vtnet0="DHCP"
ifconfig_vtnet0_alias0="inet W.X.Y.Z netmask 255.255.255.255"
But after rebooting the system the static IP does not appear configured (you do not see using ifconfig)
However if I just type as root:
Code:
ifconfig vtnet0 W.X.Y.Z netmask 255.255.255.255 alias
Then the static IP is added normally to the DHCP assigned one.
Is that the right way to add both DHCP + static IP in /etc/rc.conf?
Why the manual command works but the entry in /etc/rc.conf does not?