Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to assign a /64 range of ipv6 ips to an openvz container?

share|improve this question

2 Answers 2

That's certainly possible - why should it not? T

he next question might be whether there would be autoconfiguration for the virtual machines. Leaving aside the fact that you shouldn't be using autoconfiguration for server machines: whether it would work depends on whether you use venet or veth. With veth, each VM has an ethernet address, and you can run radvd in the container. With venet, stateless autoconfiguration will not work, but explicitly assigned addresses will.

My recommended configuration is to assign :: to each VM, assuming they are all dual-stack.

share|improve this answer

This can easily be done,but why? It only makes sense,if you plan to resell containers. Using non-bridged virtual Ethernet,you would have to provide a /64 from a /48. Using RedHat Node,create a "route6-vethX.0" file in /etc/sysconfig/network-scripts.

Add:

fd60:0000:0000:0000::/64 dev vethX.0

If you use a /64 on the Node,you will have to add the prefix to the "route6-ethX" file for the source-route interface,otherwise,IPv6 routing will fail.

Using the above illustration,the interface you want to give the "/64" to(VETH),is the sole owner of this prefix. This means the container that has this particular VETH interface, has a "/64" all to itself.

You want to use Ethernet bridging in this type of configuration,and create the same file for the bridge. In the "for what's worth" department,a container does not need to be "dual-stacked". I have two Node servers that get a "/120" each,and both are IPv6 only.

Here is how I dole out two "/64" prefixes,on a IPv6 test server(Fedora Node)

  • The "route6-eth2"

    fd60:1014:9458:4b60::/64 dev eth2
    fd98:f0bd:b577:3c8b::/64 dev eth2
    
  • The "route6 veth6101.0"

    fd60:1014:9458:4b60:e003:5000:10:100/120 dev veth6101.0
    
  • The "route6-veth6102.0"

    fd60:1014:9458:4b60:e003:5000:10:200/120 dev veth6102.0
    
  • The "route6-virtbr0"

    fd98:f0bd:b577:3c8b:0:0:0:100/120 dev virtbr0
    fd98:f0bd:b577:3c8b:0:0:0:100/120 via fd60:1014:9458:4b60::1a
    
  • Kernel routing

     fd60:1014:9458:4b60::/64 dev virtbr0  proto kernel  metric 256  mtu 1500 advmss1440 hoplimit 4294967295
     fd60:1014:9458:4b60::/64 dev eth2  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
     fd98:f0bd:b577:3c8b::100/120 dev virtbr0  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
     fd98:f0bd:b577:3c8b::100/120 via fd60:1014:9458:4b60::1a dev eth2  metric 1024mtu 1500 advmss 1440 hoplimit 4294967295
     fd98:f0bd:b577:3c8b::/64 dev eth2  metric 1024  mtu 1500 advmss 1440 hoplimit 4294967295
     fe80::/64 dev eth2  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
     fe80::/64 dev veth6101.0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
     fe80::/64 dev veth6102.0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
     fe80::/64 dev veth66101.0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
     fe80::/64 dev virtbr0  proto kernel  metric 256  mtu 1500 advmss 1440 hoplimit 4294967295
     default via fd60:1014:9458:4b60::1 dev eth2  metric 1  mtu 1500 advmss 1440 hoplimit 4294967295
    
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.