OpenVZ Forum


Home » International » German » 2 NIC Routing Problem
Re: 2 NIC Routing Problem [message #49745 is a reply to message #49212] Mon, 10 June 2013 15:23 Go to previous message
blahugo@yahoo.de is currently offline  blahugo@yahoo.de
Messages: 4
Registered: May 2013
Junior Member
Hi,

Zwei default Gateways gehen natürlich nicht.

Du musst wohl ein source based routing konfigurieren.
Unter CentOS nimmst Du dafür das Paket iproute.

Dann neue Routing Tabelle definieren:
/etc/iproute2/rt_tables: z.B.
100 <NEW Table>

Eine Config mit den Routen und Regeln:
z.B. /etc/sysconfig/iproute2:
route replace default via <GATEWAY-B> dev <DEVICE> table <NEW Table>
route replace <NETWORK-B/MASK> dev <DEVICE> src <IP-B> table <NEW Table>
rule add to <NETWORK-B/MASK> table <NEW Table>

Und dann beim Systemstart die Regeln anwenden per /etc/rc.local oder mit welchen Script Du willst:
# Apply iproute2 commands
IPR2_FILE=/etc/sysconfig/iproute2

if [[ -e $IPR2_FILE ]]
then
while read IPR2_CMD
do ip $IPR2_CMD
done < $IPR2_FILE
fi

Gruss
blahugo

[Updated on: Fri, 14 June 2013 06:48]

Report message to a moderator

 
Read Message
Read Message
Previous Topic: Iptables openvz Host
Next Topic: VPS startet aber irgendwie auch nicht
Goto Forum:
  


Current Time: Mon Jul 22 18:37:27 GMT 2024

Total time taken to generate the page: 0.02347 seconds