Debian 10.0X VLANs und IP

Lokal als root

apt-get update                                                                                   BS-Aktualisieren 

apt-get vlan                                                                                         VLAN möglich machen

su -c ‘echo “8021q” >> /etc/modules’                                          VLAN als Modul laden

Nur IP eintragen

systemctl status systemd-networkd

systemctl stop dhcpcd

systemctl disable dhcpcd

systemctl enable systemd-resolved

systemctl start systemd-resolved

systemctl status systemd-resolved

ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf

ls /etc/systemd/network/

nano /etc/systemd/network/eth0.network

[Match]

Name=eth0

[Network]

Address=192.168.1.2/24

Gateway=192.168.1.1
DNS=192.168.1.1

systemctl enable systemd-networkd

systemctl start systemd-networkd

Virtuelle VLAN NIC erstellen mit IP

nano /etc/network/interfaces.d/vlans

auto enp0s25.30

iface enp0s25.30 inet static

vlan-raw-device enp0s25

nano /etc/systemd/network/enp0s25..netdev

[Netdev]

Name=enp0s25.30

Kind=VLAN

[VLAN]

Id=30

nano /etc/systemd/network/enp0s25.30.network

[Match]

Name=enp0s25.30

[Network]

Description=“VLAN 30“

Address=192.168.30.177/24

Gateway=192.168.30.254

DNS=192.168.30.19

[Route]

Gateway=192.168.1.1

Table=10

[RoutingPolicyRule]

From=192.168.1.0/24

Table=10

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.