Ich habe auf einem Debian KVM installiert und mehrere VLANs erstellt. Ich möchte nun das Inter-VLAN Routing von einem externen Switch erledigen lassen.
Die Interfaces auf dem Debian sehen wie folgt aus:
Code: Alles auswählen
cat /etc/network/interfaces
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet manual
# Mgmt interface
auto eth0.30
iface eth0.30 inet dhcp
vlan-raw-device eth0
hwaddress ether 00:30:48:f5:70:30
# Clonezilla interface
auto eth0.40
iface eth0.40 inet manual
vlan-raw-device eth0
hwaddress ether 00:30:48:f5:70:40
# Server interface
auto eth0.50
iface eth0.50 inet manual
vlan-raw-device eth0
hwaddress ether 00:30:48:f5:70:50
auto vmbr40
iface vmbr40 inet manual
bridge_ports eth0.40
bridge_stp off
bridge_maxwait 10
# bridge_hw 00:30:48:f5:70:40
auto vmbr50
iface vmbr50 inet manual
bridge_ports eth0.50
bridge_stp off
bridge_maxwait 10
# bridge_hw 00:30:48:f5:70:50
Ich habe mir vorgestellt, dass ich für jedes VLAN eine eigene Routingtabelle benötige, mit einer eigenen default Route.
Ich habe das mal mit Policy Routing versucht:
cat /etc/iproute2/rt_tables
#
# reserved values
#
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
# VRF 30
300 vrf30
# VRF 40
400 vrf40
# VRF 50
500 vrf50
Für jedes Subnet habe ich nun eine ip rule erstellt:
Nun versuche ich die Routing Tabelle zu füllen:ip rule ls
0: from all lookup local
32761: from 10.1.0.0/18 lookup vrf50
32762: from 10.0.192.0/18 lookup vrf40
32763: from 10.0.128.0/18 lookup vrf30
32764: from all lookup main
32765: from 10.0.128.0 lookup vrf30
32766: from all lookup main
32767: from all lookup default
ip route add default via 10.0.128.1 dev eth0.30 table vrf30
ip route add default via 10.0.192.1 dev eth0.40 table vrf40
RTNETLINK answers: No such process
Leider kann ich nur eine Default Route erstellen. Hat jemand eine Idee, wie ich das einrichten kann?ip route add default via 10.1.0.1 dev eth0.50 table vrf50
RTNETLINK answers: No such process
Vielen Dank
Gruss Remo