1

I am trying to use systemd-networkd to configure my network. I would like to have a dhcp setting but I must keep the interface from being up. The step scenario would be

  • Machine boot up
  • Network interfaces are down
  • Manual raising of net-interface
  • Requests to dhcp are made.

I have not beeen able to keep interfaces down and dhcp config. I also tried having no config and managing request using dhclient but having multiple interfaces gives me a weird routing-table(this in itself could be another question in the future).

For a bit more information. I have a regular RJ45 network port and several USB modems that I would like to plugin without automatic-connect.

1
  • IMHO there is no way to keep ethernet-interfaces down and still do DHCP. Is your goal to keep Ethernet down and configure network via the modems when they are plugged in only? Commented May 31, 2022 at 8:31

2 Answers 2

0

Depending on your distro you could add
ONBOOT=no to /etc/sysconfig/network-scripts/your-interface
That way the interface stays down after reboot and can be enabled via:
ifup your-interface

To enable DHCP you can add
BOOTPROTO=dhcp to the same file

0

After some help, it turns out one solution that works for me is adding the following to the .network file

[Link] RequiredForOnline=no ActivationPolicy=manual 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.