dmn988
Posts: 10
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 169.254.169.254/24 broadcast 169.254.169.255 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 :)


User avatar
kyrios
Posts: 2355
Joined: Thu Sep 22, 2016 4:20 pm

Re: Persistent static IP address on virtual interface

Thu Apr 05, 2018 6:25 pm

dmn988 wrote:
Thu Apr 05, 2018 2:47 pm
Bump
Solus uses network manager. I guess you'll find what you need in the man pages

Code: Select all

man nmcli
man networkmanager

Robert45
Posts: 9
Joined: Thu Jan 19, 2017 9:20 am

Re: Persistent static IP address on virtual interface

Fri May 25, 2018 11:03 am

dmn988 wrote:
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 169.254.169.254/24 broadcast 169.254.169.255 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 :)
Did you get this sorted out. I am finding if I set a static IP in the NetworkManager GUI it crashes on boot. The problem is with Solus there does not seem to be any other way of managing networks.

dmn988
Posts: 10
Joined: Mon Feb 26, 2018 9:27 am

Re: Persistent static IP address on virtual interface

Mon Jun 04, 2018 5:22 pm

I actually gave up on setting it manually and I have a script that I run every time I log in

Return to “Other Questions”