I'm trying to create additional interface with preconfigured static IP.

So I added configuration into /etc/network/interfaces

auto eth88
iface eth88 inet static

And trying to up it with:

ip link set dev eth88 up

As a result I've got: "Cannot find device eth88"

In some articles I've read that interfaces represent physical devices (nic?). But I have some docker0 interface created by docker. Should I create somewhere virtual device to enable my interface?

  • 1
    A good explanation can be found here: <br> <unix.stackexchange.com/questions/128439/…> – Shubhendu Mar 31 '18 at 16:40
  • 1
    The first thing to understand is that that is not Linux network interfaces. That is Debian's interfaces system, which not all Linux operating systems share. So this question is not tagged or titled appropriately. Do you want to know about Debian's system, which it even tries to make work on the FreeBSD and Hurd kernels? Or about network interfaces at a basic level that is common to all Linux operating systems but not necessarily other kernels? Please fix your question as appropriate. – JdeBP Mar 31 '18 at 19:19

A network interface is always backed by some kernel module or similar part of the kernel that represents something, be it a physical interface, or some virtual interface that in some way talks to other interfaces. There are also dummy interface that don't do anything; you can assign an IP address to them, but it very likely won't do what you want to achieve.

In general, you can add new interfaces with a variant of ip link add ... type .... See man ip-link for details and a list of types.

You can also add several IP addresses to a single interface. With ip, you don't need the eth0:1 etc. of ifconfig anymore.

I suspect this is an XY-question, if you would tell us what you actually want to achieve, and what you need the second IP address for, it will be easier to answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.