[SOLVED] Permanente statische Route setzen

Minga

Member
Oct 20, 2020
39
1
13
Servus zusammen, ich bin neu hier und habe gleich eine Frage ;-) Wie lässt sich eine permanente Route in der PMG eintragen? /etc/network/interfaces soll nicht verändert werden und wenn doch, dann funktioniert es nicht. Manuell lässt sich die Route setzen doch sie soll "dauerhaft" aktiv bleiben :) Ich freue mich auf dem Lösungsweg. Danke & Servus.
 
Wie lässt sich eine permanente Route in der PMG eintragen?
normalerweise als 'post-up' zeile in der stanza des interfaces wo die route sein soll in /etc/network/interfaces

/etc/network/interfaces soll nicht verändert werden
warum nicht?

bitte mal die /etc/network/interfaces posten und beschreiben, was versucht wurde und was nicht geht
 
Hallo zurück,

hier ist die "interfaces" Datei. Die gesetzte Route funktioniert nicht und die PMG
schreibt GUI Änderungen in die interfaces.new. Die manuelle Route funktioniert
bis zum nächsten Neustart:

ip route add 192.168.10.0/24 via 192.168.200.1 dev ens192

/etc/network/interfaces:

# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

auto lo
iface lo inet loopback

auto ens192
iface ens192 inet static
address 192.168.200.10/24
gateway 192.168.200.254
up route add -net 192.168.10.0 netmask 255.255.255.0 via 192.168.200.1 ens192
 
a) statt 'up' - 'post-up'
b) potentiell ist route nicht installiert (ist im legacy paket net-tools, welches nicht immer vorhanden ist)

also folgendes versuchen:
Code:
post-up ip route add 192.168.10.0/24 via 192.168.200.1 dev ens192

(interfaces.new löschen sofern vorhanden und rebooten)
 
  • Like
Reactions: nullu and Minga
Top! Der neue Eintrag hat funktioniert :)
freut zu Hören :) - bitte den Thread als 'SOLVED' markieren - das hilft anderen Usern mit ähnlichen Fragen

Danke!
 
Moin,

leider funktioniert der Eintrag bei mir nicht. Die Route kann ich manuell setzen aber ein Eintrag in die /etc/network/interfaces wird offenbar ignoriert. Spielt es eine Rolle, wo ich den setze? Ich habe das unter dem Gateway Eintrag des entsprechenden Interfaces gesetzt.
 
Moin,

leider funktioniert der Eintrag bei mir nicht. Die Route kann ich manuell setzen aber ein Eintrag in die /etc/network/interfaces wird offenbar ignoriert. Spielt es eine Rolle, wo ich den setze? Ich habe das unter dem Gateway Eintrag des entsprechenden Interfaces gesetzt.
Bitte nicht auf threads replien, die zuletzt vor 7-8 Monaten aktiv waren - sondern lieber einen neuen aufmachen.

beim neuen Thread auch gleich die /etc/network/interfaces posten und auch was im journal nach einem reboot steht bezueglich networking
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!