Hallo zusammen,
ich versuche gerade auf meinem KVM-Server auf dem Xenial Server läuft, eine Firewall in einer VM aufzusetzen. Dafür bonde ich 4 NICs zusammen und möchte dann darauf VLANs aufsetzten. Zuerst habe ich es mit dem standard interface-file versucht. Leider gab es dabei Probleme, da durch die aktuelle Implementierung in Xeniale eine Race-Condition entsteht. Gleichzeit wenn das Bond0 erstellst wird, wird auch das Bond0.10 VLAN erstellt, allerdings muss das nacheinander geschehen. Das Ganze ist hier sehr gut beschrieben:
https://bugs.launchpad.net/ubuntu/+source/ifupdown/+bug/1636708
Leider hilft mir der dort vorgeschlagene Lösungsweg nicht bzw. es funktioniert nicht. Hier mal meine interfaces-Datei:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback allow-hotplug eno1 iface eno1 inet dhcp # The primary network interface allow-hotplug enp7s0f0 iface enp7s0f0 inet manual bond-master bond0 allow-hotplug enp7s0f1 iface enp7s0f1 inet manual bond-master bond0 allow-hotplug enp8s0f0 iface enp8s0f0 inet manual bond-master bond0 allow-hotplug enp8s0f1 iface enp8s0f1 inet manual bond-master bond0 allow-hotplug bond0 iface bond0 inet manual pre-up ifenslave bond0 enp7s0f0 enp7s0f1 enp8s0f0 enp8s0f1 pre-down ifenslave -d bond0 enp7s0f0 enp7s0f1 enp8s0f0 enp8s0f1 bond-slaves enp7s0f0 enp7s0f1 enp8s0f0 enp8s0f1 bond-mode 1 bond-miimon 100 bond-downdelay 200 bond-updelay 200 # LAN VLAN allow-hotplug bond0.10 iface bond0.10 inet dhcp pre-up ifconfig bond0 up pre-up ifenslave bond0 enp7s0f0 enp7s0f1 enp8s0f0 enp8s0f1 vlan-raw-device bond0 |
Anschließend hab ich dann versucht auf den systemd-networkd umzusteigen. Da gibt es allerdings ein ähnliches Problem.
"The problem seams to be that the routes are inserted bevor the dhcp client has a ip set to the interface". https://github.com/systemd/systemd/issues/1850
Das wäre sogar schnell mit "GatewayOnlink" gelöst, nur leider wird unter Xenial systemd 229 verwendet in diese Option noch nicht implementiert ist.
Nun weiß ich leider nicht, was ich noch machen soll. Eine Option wäre eine aktuelle Version von Systemd zu installieren, aber ich weiß nicht wie und fände das auch eher riskant.
Gruß m0nKeY