Editing Using private IPs for Hardware Nodes

Jump to: navigation, search

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 61: Line 61:
 
  [HN]# /tmp/br_add >/dev/null 2>&1 &
 
  [HN]# /tmp/br_add >/dev/null 2>&1 &
  
=== Container configuration ===
+
Way to use the internet to help ppeloe solve problems!
 
 
==== Start a container ====
 
[HN]# vzctl start 101
 
 
 
==== Add a [[Virtual_Ethernet_device|veth interface]] to the container ====
 
[HN]# vzctl set 101 --netif_add eth0 --save
 
 
 
==== Set up an IP to the newly created container's veth interface ====
 
[HN]# vzctl exec 101 ifconfig eth0 85.86.87.195/26
 
 
==== Add the container's veth interface to the bridge ====
 
[HN]# brctl addif br0 veth101.0
 
 
 
{{Note|There will be a delay of about 15 seconds(default for 2.6.18 kernel) while the bridge software runs STP to detect loops and transitions the veth interface to the forwarding state.
 
<!-- /sys/class/net/$BR_NAME/bridge/forward_delay in SEC*USER_HZ -->}}
 
 
 
==== Set up the default route for the container ====
 
[HN]# vzctl exec 101 ip route add default via 85.86.87.193 dev eth0
 
 
==== (Optional) Add CT↔HN routes ====
 
The above configuration provides the following connections:
 
* CT X ↔ CT Y (where CT X and CT Y can locate on any OVZ HN)
 
* CT  ↔ Internet
 
 
 
Note that
 
 
 
* The accessability of the CT from the HN depends on the local gateway providing NAT (probably - yes)
 
 
 
* The accessability of the HN from the CT depends on the ISP gateway being aware of the local network (probably not)
 
 
 
So to provide CT ↔ HN accessibility despite the gateways' configuration you can add the following routes:
 
 
 
[HN]# ip route add 85.86.87.195 dev br0
 
[HN]# vzctl exec 101 ip route add 10.0.0.2 dev eth0
 
  
 
=== Resulting OpenVZ Node configuration ===
 
=== Resulting OpenVZ Node configuration ===

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: