Source based routing

From OpenVZ Virtuozzo Containers Wiki
Revision as of 16:39, 20 July 2006 by Dev (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

IP source based routing

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://forum.openvz.org/index.php?t=msg&goto=1631&&srch=src+routing#msg_1631 http://forum.openvz.org/index.php?t=tree&th=492&mid=2881&&rev=&reveal=

Category:HOWTO