Posts: 4
Joined: Mon Feb 26, 2018 9:27 am

Persistent static IP address on virtual interface

Mon Feb 26, 2018 3:19 pm

I am trying to create a new virtual loopback interface (lo:metadata) with a specific IP address. I need this virtual interface to be up every time the OS boots up.

How i created it:

Code: Select all

sudo ip addr add broadcast dev lo:metadata
sudo ip link set dev lo:metadata up
Now, is there any type of /etc/network/interfaces file or something similar where one can configure static IPs for interfaces? I saw that for static IP interfaces, you go through the GUI, but for virtual interfaces this is not an option. I could also create a script that runs every time at boot, but that seems too hacky.

So, my question is: "Is there a way to configure a network interface from a configuration file?"

Thank you :)

Return to “Other Questions”