0

I just configured a Debian 10 virtual private server on a new hosting provider and somehow /etc/network/interfaces is missing.

Running ip a reveals a lo and eth0@if24 interface.

Trying to add an interface alias to eth0@if24.

What is going on here?

3 Answers 3

2

Your "virtual machine" is actually a container, not a virtual machine, and it appears your container host is configuring networking for you.

4
  • Thanks Michael. The hosting provider is using LXD vs KVM... do you know how I can add interface aliases in this context? Commented Aug 5, 2020 at 17:45
  • 1
    @sunknudsen You don't add interface aliases. They have been deprecated for more than a decade. Just add the additional IP addresses to the interface. Commented Aug 5, 2020 at 18:31
  • I am actually trying to solve serverfault.com/questions/1029000/… hence why I am trying to create the alias. Have a moment to help? Commented Aug 5, 2020 at 18:47
  • @sunknudsen Again, you don't add interface aliases. They don't even strictly exist anymore. If you think you are making one, it's ignored and the IP address is added to the specified interface, no alias, just a human readable label attached to the IP address. As for the other problem, this probably isn't the way to solve it. Commented Aug 5, 2020 at 18:53
1

Thanks to the help of Wesley, I figured it out.

That VPS was configured to use SystemdNetworkd so files in /etc/systemd/network instead of /etc/network/interfaces.

Also, thanks to Michael, I learned that interface aliases are a thing of the past.

See How to configure interface aliases using Systemd-Networkd?.

0

Your host is probably using NetPlan and CloudInit. /etc/network/interfaces is old and deprecated, so... don't use it. Check for the existence of /etc/netplan/config.yaml Have a plan for netplan

15
  • Thanks for helping out Wesley. cat: /etc/netplan/config.yaml: No such file or directory and ls: cannot access '/etc/cloud': No such file or directory. Commented Aug 5, 2020 at 17:48
  • Is the yaml file missing, or the directory? There isn't a config.yaml file by default, but the netplan directory exists. Also, there should be a netplan command in your path, e.g. netplan --help Commented Aug 5, 2020 at 17:55
  • ls: cannot access '/etc/netplan/': No such file or directory and -bash: netplan: command not found Commented Aug 5, 2020 at 17:59
  • So it would seem that initial networking is set up by cloudinit, but then netplan is left as an exercise for the customer. Commented Aug 5, 2020 at 18:06
  • Are we sure netplan is involved? There has to be a file somewhere to configure this right? Commented Aug 5, 2020 at 18:07

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.