Open main menu

OpenVZ Virtuozzo Containers Wiki β

Changes

Using private IPs for Hardware Nodes

260 bytes added, 11:28, 24 July 2007
<u>VE configuration</u>
==== Set up an IP to the newly created VE's veth interface ====
<pre>[HN]# vzctl exec 101 ifconfig eth0 85.86.87.194195/26</pre> ==== Set up the default route for the VE ====<pre>[HN]# vzctl exec 101 ip route change default via 85.86.87.192 dev eth0</pre>
==== Add the VE's veth interface to the bridge ====
<pre>[HN]# brctl addif br0 veth101.0</pre>
==== Set up the default route for the VE ====<pre>[HN]# vzctl exec 101 ip route add default via 85.86.87.193 dev eth0</pre> ==== (Optional) Make Add routes VE <-> HN(s) to be accessible from a VE ====
The configuration above provides following connections available:
<pre>
VE X <-> VE Y (where VE X and VE Y can locate on any OVZ HN)
VE <-> Internet
HN -> VE
</pre>
* A VE accessibility from the HN depends on if the local gateway provides NAT or not (probably - yes).
* A HN accessibility from a VE depends on if the ISP gateway is aware about the local network addresses (most probably - no).
If you really need a So to provide VE to have an access to <-> HN accessibility despite the HN(s) gateways' configuration you can add an additional following route rulerules:<pre>[HN]# ip route add 85.86.87.195 dev br0[HN]# vzctl exec 101 ip route add 10.0.0.0/24 2 dev eth0</pre>
=== <u>The resulted OVZ Node configuration</u> ===