DHCP and static IP configuration hangs when no DHCP



Hi,

I can't find the proper configuration to have an always enabled static IP address and an optional DHCP address when connected to a network that has a DHCP server. My use case is a portable device that connects to local embedded devices using a private local LAN so the static IP should always be there. When we need to connect on the internet, I would like to plug a DHCP enabled connection to the switch and receive a second IP automatically from DHCP for this.

I can setup both DHCP and static using this configuration:
[ipv4]
address1=10.192.11.10/16
method=auto

The problem is that the whole connection profile will fail if no DHCP server is found, the static IP will never be set. As soon as I plug the DHCP network, both IP will appear. But I would need the static IP to be available from the beginning. I have the same problem if I try the ifupdown configuration through /etc/network/interfaces. I had gentoo in the past and could achieve this using their RC system, DHCP would be assigned to eth0:0 and a static IP to eth0:1. I just can't find a way to do this with Network Manager.

Any idea if that's possible with the profile configuration, or if I need to use 2 configurations or play with some scripts?

Thank you,
David


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]