OpenVZ Forum


Home » General » Support » One NIC, Multiple Gateways
Re: One NIC, Multiple Gateways [message #1631 is a reply to message #1475] Thu, 16 February 2006 12:34 Go to previous messageGo to previous message
dev is currently offline  dev
Messages: 1693
Registered: September 2005
Location: Moscow
Senior Member

sure it is doable! but it has nothing to do with openvz actually.
You just need to setup src-based routing rules in host system. e.g.

# /sbin/ip rule add from $IP table $TBL
# /sbin/ip route add default dev eth0 via $GW table $TBL

where $IP is ip address which should use non-default GW.
$GW is gateway for this IP addr
$TBL - any free table number, I use numbers from 6 to ...
every next non-std GW will require another table number

read `man ip` for routing rules details.


http://static.openvz.org/userbars/openvz-developer.png
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: mem leak
Next Topic: unfs3 in a ve and syslog errors
Goto Forum:
  


Current Time: Sat Jul 13 08:48:42 GMT 2024

Total time taken to generate the page: 0.02280 seconds