Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #186057

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

From Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM>
Newsgroups linux.debian.user
Subject Re: How does one create virtual ethernet devices with modern tools on Debian 8 (jessie)?
Date 2017-08-28 08:10 +0200
Message-ID <ujlpg-1UB-31@gated-at.bofh.it> (permalink)
References <uint7-51N-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Tom Browder:

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

Ironically, the "modern tools" aspect is the thing that you are in fact 
aiming to eliminate here. |/etc/network/interfaces| is best treated as 
an entirely descriptive mechanism, with as little imperative stuff in it 
as can be arranged.  Here, you are getting rid of the imperative 
explicit invocations of the |ip| command, the "modern tool" as you 
mention, and replacing them with the descriptive "stanzas" that 
|/etc/network/interfaces| /already has/ as a mechanism for 
non-imperatively describing multiple IPv4/IPv6 addresses on a single 
|eth0| interface.

|ifup| and |ifdown| are best thought of as translators, as their manual 
page implies.  They take what is in |/etc/network/interfaces| and 
translate it into the necessary sequences of imperative commands for 
actually doing the job, which they run under the covers. Those 
underlying commands can include |bootpc|, |avahi-autoipd|, 
|settle-dad.sh|, |pon|, |poff|, |wvdial|, |dhclient|, |dhclient3|, 
|pump|, |udhcpc|, |dhcpd|, |kill|, |ip|, and (sic!) |ifconfig|, all 
invoked with various parameters calculated from the 
|/etc/network/interfaces| description.

They aren't the only translators for that file.  For example, here's 
what happens when one runs your proposed non-imperative 
|/etc/network/interfaces| (with the typing errors mentioned elsewhere 
cleaned up) through mine, which translates from that description 
<http://jdebp.eu./Softwares/nosh/guide/rcconf-amalgamation.html> into 
(roughly) the |rc.conf| configuration format for FreeBSD/TrueOS 
<https://www.freebsd.org/cgi/man.cgi?query=rc.conf>:

> JdeBP % sudo redo -C /etc/system-control/convert/ rc.conf
> Password:
> redo: INFO: rc.conf: Redone.
> JdeBP % sed -ne '/etc.network.interfaces/,/sysrc:/p' /etc/system-control/convert/rc.conf
> # Converted from /etc/network/interfaces:
> network_interfaces="lo eth0 "
> ifconfig_lo="AUTO inet  127.0.0.1 "
> ifconfig_eth0="AUTO inet  142.54.186.2 netmask 255.255.255.248 gateway 142.54.186.1 "
> ifconfig_eth0_ipv6="inet6  2604:4300:a:95::2 netmask ffff:ffff:ffff:ffff:: "
> ifconfig_eth0_aliases="inet 142.54.186.3
> inet 142.54.186.4
> inet 142.54.186.5
> inet 142.54.186.6
> inet6 2604:4300:a:95::3
> inet6 2604:4300:a:95::4
> inet6 2604:4300:a:95::5
> inet6 2604:4300:a:95::6"
> # dump by sysrc:
> JdeBP %


Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

How does one create virtual ethernet devices with modern tools on  Debian 8 (jessie)? Tom Browder <tom.browder@gmail.com> - 2017-08-25 16:10 +0200
  Re: How does one create virtual ethernet devices with modern tools on Debian 8 (jessie)? Sven Hartge <sven@svenhartge.de> - 2017-08-25 16:30 +0200
    Re: How does one create virtual ethernet devices with modern tools  on Debian 8 (jessie)? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-08-25 17:10 +0200
      Re: How does one create virtual ethernet devices with modern tools on  Debian 8 (jessie)? Tom Browder <tom.browder@gmail.com> - 2017-08-25 21:10 +0200
    Re: How does one create virtual ethernet devices with modern tools on  Debian 8 (jessie)? Tom Browder <tom.browder@gmail.com> - 2017-08-25 17:10 +0200
      Re: How does one create virtual ethernet devices with modern tools on Debian 8 (jessie)? Sven Hartge <sven@svenhartge.de> - 2017-08-25 17:50 +0200
        Re: How does one create virtual ethernet devices with modern tools  on Debian 8 (jessie)? Zenaan Harkness <zenaan@freedbms.net> - 2017-08-28 07:10 +0200
          Re: How does one create virtual ethernet devices with modern tools on Debian 8 (jessie)? Sven Hartge <sven@svenhartge.de> - 2017-08-28 10:30 +0200
      Re: How does one create virtual ethernet devices with modern tools on  Debian 8 (jessie)? Mario Castelán Castro <marioxcc.MT@yandex.com> - 2017-08-26 17:30 +0200
  Re: How does one create virtual ethernet devices with modern tools on  Debian 8 (jessie)? Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2017-08-28 08:10 +0200

csiph-web