How to write a systemd unit to manage the loopback interface?

Solution Verified - Updated -

Issue

  • How to write a systemd unit to manage the loopback interface?
  • NetworkManager does not manage lo (the loopback interface) but we want to make some changes to it without using the network initscript or old network service. How do we do this?
  • How to set loopback MTU to a different value on boot?

Environment

  • Red Hat Enterprise Linux 8
  • Red Hat Enterprise Linux 7
  • Changes to lo loopback interface
  • systemd with no network initscripts

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content