Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Using private IPs for Hardware Nodes

No change in size, 11:45, 11 March 2008
m
Robot: Automated text replacement (-VE0 +CT0)
IP_STRIP=${IP%%/*};
echo "Adding a route from VE0 CT0 to VE$VEID."
$ip route add $IP_STRIP dev $VEROUTEDEV
done
if [ -n "$VE0_IPCT0_IP" ]; then echo "Adding a route from VE$VEID to VE0CT0." $vzctl exec $VEID $ip route add $VE0_IP CT0_IP dev $VEIFNAME
fi
==== Setting the route VE → HN ====
To set up a route from the VE to the HN, the custom script has to get a HN IP (the $VE0_IP CT0_IP variable in the script). There are several ways to specify it:
# Add an entry VE0_IPCT0_IP="VE0 CT0 IP" to the <code>$VEID.conf</code># Add an entry VE0_IPCT0_IP="VE0 CT0 IP" to the <code>/etc/vz/vz.conf</code> (the global configuration config file)# Implement some smart algorithm to determine the VE0 CT0 IP right in the custom network configuration script
Each variant has its pros and cons, nevertheless for HN static IP configuration variant 2 seems to be acceptable (and the most simple).
2,253
edits