Hi fellow linux-users,
I have a server with 4 nics(currently only using 2), running virtual machines.
It uses two networks on different subnets.
E.g
eth1 192.168.2.0/29 (via gateway 192.168.2.1)
eth2 192.168.1.0/29 (via gateway 192.168.1.1)
I ran the following commands to make the 192.168.2.1/29 network to work with internet connection:
ip rule add from 192.168.2.1/29 table 200
ip route add default via 192.168.2.1 dev eth1 table 200
However if I leave the server for a couple of hours, it looses its connection to 192.168.2.1.
I have tried to make it persistent by making the following changes:
in /etc/sysconfig/network-scripts/route-eth1:
default via 192.168.2.1 dev eth1 table 200
192.168.2.1/29 via 192.168.2.1
from 192.168.2.1/29 table 200
in /etc/sysconfig/network-scripts/rule-eth1:
from 192.168.2.1/29 table 200
Any obvious ideas or errors?
I am new to linux, and have read a lot of network threads - and I cannot seem to get it work.
Hope you guys have some ideas.
Thanks,
Martin
Btw. Im using Centos 6