0

I have following configuration: server has two network interfaces, both are attached to switch (and will become LOWER_UP after been made up). One of those interfaces will have DHCP server with a lease. Other interface will not provide me with leases.

I need such configuration for CentOS 7, that it will receive IP regardless of interface used for DHCP.

I've tried to make both interfaces BOOTPROTO="dhcp", ONBOOT="yes" and IPV4_FAILURE_FATAL="no". But there is a catch: If CentOS detects link on eno1, it will continue to try to bring up eth0, without trying DHCP on eth2. I couldn't disable eno1, because by random chance DHCP may be on eno1 (or eno2).

Is here a way to say CentOS "try to bring up all those interfaces"?

2
  • You certainly can't get an IP address from a DHCP server when the Ethernet cable is disconnected! What is really going on here? Mar 22, 2017 at 13:50
  • Interface eno1 is connected to switch, but there is no DHCP server on that net in 50% of cases. Mar 22, 2017 at 16:45

1 Answer 1

0

After some debugging I reduced dhcp timeouts to 10 seconds (/etc/dhcp/dhclient.conf). It helped. Now eno1 failing fast enough to allow eno2 to find lease before global network timeout happens.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.