LXC container and static route

juniper

Well-Known Member
Oct 21, 2013
84
0
46
Hi,

i have one container with 2 network card/connection

i have to set one static route, but using (for example) in /etc/network/interfaces

up route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.10.200.1

doesn't work

suggestion?

thanks in advance
 
obviously the same command from shell works fine...

Should work also in /etc/network/interfaces - but depends on the container template you have; not in all distros /etc/network/interfaces is processed during startup.
 
can you post your /network/interfaces file?

i have two virtual interfaces...
 
can you post your /network/interfaces file?

i have two virtual interfaces...
Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
   address 192.168.18.180
   netmask 255.255.240.0
   gateway 192.168.16.1
   up route add -net 10.110.0.0/16 gw 192.168.18.200

auto eth1
iface eth1 inet static
   address 10.56.153.131
   netmask 255.255.255.0

auto eth2
iface eth2 inet static
   address 10.56.153.132
   netmask 255.255.255.0

auto eth3
iface eth3 inet static
   address 10.56.153.133
   netmask 255.255.255.0

auto eth4
iface eth4 inet static
   address 10.56.153.134
   netmask 255.255.255.0
 

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!