Open main menu

OpenVZ Virtuozzo Containers Wiki β

Editing Using private IPs for Hardware Nodes

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
{{Legacy}}
 
 
 
This article describes how to assign public IPs to containers running on OVZ Hardware Nodes in case you have a following network topology:
 
This article describes how to assign public IPs to containers running on OVZ Hardware Nodes in case you have a following network topology:
  
Line 26: Line 24:
  
 
=== Hardware Node configuration ===
 
=== Hardware Node configuration ===
 
{{Warning|if you are '''configuring''' the node '''remotely''' you '''must''' prepare a '''script''' with the below commands and run it in background with the redirected output or you'll '''lose the access''' to the Node.}}
 
  
 
==== Create a bridge device ====
 
==== Create a bridge device ====
Line 45: Line 41:
 
  [HN]# ip route add default via 10.0.0.1 dev br0
 
  [HN]# ip route add default via 10.0.0.1 dev br0
 
   
 
   
 
+
{{Warning|if you are '''configuring''' the node '''remotely''' you '''must''' prepare a '''script''' with the above commands and run it in background with the redirected output or you'll '''lose the access''' to the Node.}}
  
 
==== A script example ====
 
==== A script example ====
Line 228: Line 224:
 
exit 0
 
exit 0
 
</pre>
 
</pre>
<p><small>Note: this script can be easily extended to work for multiple triples &lt;bridge, ip address, veth device&gt;, see http://sysadmin-ivanov.blogspot.com/2008/02/2-veth-with-2-bridges-on-openvz-at.html </small></p>
+
<p><small>Note: this script can be easily extended to work for multiple triples &lt;bridge, ip address, veth device&gt;, see http://vireso.blogspot.com/2008/02/2-veth-with-2-brindges-on-openvz-at.html </small></p>
  
 
==== Make the script to be run on a container start ====
 
==== Make the script to be run on a container start ====
Line 241: Line 237:
  
 
==== Create On-umount script for remove HW → CT route(s) ====
 
==== Create On-umount script for remove HW → CT route(s) ====
which should be called each time a container with VEID (<code>/etc/vz/conf/$VEID.umount</code>), or any container (<code>/etc/vz/conf/vps.umount</code>) is stopped.
+
which should be called each time a container with VEID (<code>/etc/vz/conf/$VEID.umount</code>), or any container (<code>/etc/vz/conf/vps.umount</code>) is stop.
  
 
<pre>
 
<pre>

Please note that all contributions to OpenVZ Virtuozzo Containers Wiki may be edited, altered, or removed by other contributors. If you don't want your writing to be edited mercilessly, then don't submit it here.
If you are going to add external links to an article, read the External links policy first!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)

Templates used on this page: