Hallo Luca,
On Fri, Jan 26, 2018 at 12:36:28 +0000, Luca Bertoncello wrote:
So, ich hab's! Es ist ein hässlicher Konstrukt, aber es funktioniert:
auto intlan0 iface intlan0 inet static pre-up /sbin/vconfig add eth0 10 pre-up /sbin/ip link set eth0.10 name intlan0 post-down /sbin/vconfig rem intlan0 address 192.168.10.5 netmask 255.255.255.0 network 192.168.10.0 broadcast 192.168.10.255
Die Flexibilitaet von /etc/network/interfaces hat eben ihre Grenzen... aber dafuer gibt's ja "pre-up", "up", "post-up" usw.
Die Moeglichkeiten von ip (aka iproute2) ueberholen auch staendig das, was sich mit der Syntax von /etc/network/interfaces ausdruecken laesst. Uebrigens, vconfig ist fuer das Erzeugen von VLAN-Interfaces nicht notwendig, auch das geht mit iproute2: ip link add link eth0 name eth0.10 type vlan id 10
Oder fuer Deinen Fall praktischer: ip link add link eth0 name intlan0 type vlan id 10
Gruss, Chris