ip route not sticking on boot?

Gibzon

New Member
Nov 22, 2013
5
0
1
im having this issue when i add a route to /etc/network/interfaces (so it loads on startup) when i reboot the server the change is gone...

this is my /etc/network/interfaces for the interface im changing:

Code:
# for Routing
auto vmbr1
iface vmbr1 inet manual
        post-up ip route add xx.xx.xx.xx dev vmbr1
        post-up /etc/pve/kvm-networking.sh
        bridge_ports dummy0
        bridge_stp off
        bridge_fd 0

i added a route with the vm public ip xx.xx.xx.xx so i can connect to the kvm machine via internet.

this route work when i put it manually but when the server reboots is gone.

what could be happening?
 
Changes need to be made to /etc/network/interfaces.new
cp interfaces to interfaces.new, add you change and reboot

Sent from my Nexus 5
 
Maybe a race condition. If vmbr1's network is brought up before the network referenced to by xx.xx.xx.xx maybe adding the route fails.