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

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



I am currently defining my devices like this in file /etc/network/interfaces:

#=================================================
# 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
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

  # added alias IPv4s:
  up   ip addr add 142.54.186.3/29 dev $IFACE label $IFACE:0
  down ip addr del 142.54.186.3/29 dev $IFACE label $IFACE:0

  up   ip addr add 142.54.186.4/29 dev $IFACE label $IFACE:1
  down ip addr del 142.54.186.4/29 dev $IFACE label $IFACE:1

  up   ip addr add 142.54.186.5/29 dev $IFACE label $IFACE:2
  down ip addr del 142.54.186.5/29 dev $IFACE label $IFACE:2

  up   ip addr add 142.54.186.6/29 dev $IFACE label $IFACE:3
  down ip addr del 142.54.186.6/29 dev $IFACE label $IFACE:3
#=================================================

I would like to add a large chunk (say 20) of my IPv6 addresses, too.

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
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
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
#=================================================


FYI, here is a chunk of the output of "dmesg | grep -i eth":

#=================================================
[    0.898483] e1000e 0000:09:00.0 eth0: (PCI Express:2.5GT/s:Width
x4) 00:1e:68:2e:df:be
[    0.898486] e1000e 0000:09:00.0 eth0: Intel(R) PRO/1000 Network Connection
[    0.898564] e1000e 0000:09:00.0 eth0: MAC: 5, PHY: 5, PBA No: FFFFFF-0FF
[    9.525606] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   11.846375] e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow
Control: Rx/Tx
[   11.846877] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
#=================================================

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

Thanks.

-Tom


Reply to: