[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How does one create virtual ethernet devices with modern tools on Debian 8 (jessie)?



Tom Browder <tom.browder@gmail.com> wrote:

Before we start:

"virtual ethernet devices" are something totally different than you are
doing here. You just want to put multiple IP addresses on one interface.

"virtual ethernet devices" are for example used with virtualization or
docker, to connect an isolated VM or container through the host to the
network.

> Although not yet implemented (for fear of messing my remote host up),
> the following has been recommended:

> #=================================================
> # This file describes the network interfaces available on your system
> # and how to activate them. For more information, see interfaces(5).

> # The loopback network interface
> auto lo
> iface lo inet loopback

> # The primary network interface
> allow-hotplug eth0
> auto etho

One of "allow-hotplug" or "auto", not both. And you have a typo there,
it should read "auto eth0".

> iface eth0 inet static
>         address 142.54.186.2
>         netmask 255.255.255.248
>         gateway 142.54.186.1
>         dns-nameservers 192.187.107.16 69.30.209.16
> iface eth0 inet static
>         address 142.54.186.3
> iface eth0 inet static
>         address 142.54.186.4
> iface eth0 inet static
>         address 142.54.186.5
> iface eth0 inet static
>         address 142.54.186.6
> iface eth0 inet6 static
>         address 2604:4300:a:95::2
>         netmask ffff:ffff:ffff:ffff::
>         gateway 2604:4300:a:95::1
>         dns-nameservers 192.187.107.16 69.30.209.16

No need to duplicate the nameservers. Also this line only gets used if
you use the package "resolvconf". On servers with static IP
configuration I usually get rid of this mechanism and set the
nameservers myself in /etc/resolv.conf

> iface eth0 inet6 static
>         address 2604:4300:a:95::3
> iface eth0 inet6 static
>         address 2604:4300:a:95::4
> iface eth0 inet6 static
>         address 2604:4300:a:95::5
> iface eth0 inet6 static
>         address 2604:4300:a:95::6

Yes, everything is fine. 

Side note: I'd truly randomize the IPv6 addresses, so the subnet is not
as easily scannable from the outside.

> So how does one do the same thing with "modern" tools?

I don't understand the question. Do you mean "systemd-networkd"?

Grüße,
S°

-- 
Sigmentation fault. Core dumped.


Reply to: