Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

Virtuozzo 7 networking config
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Virtuozzo 7 networking config

elwebmasterelwebmaster Member
edited November 2016 in Help

I am having some issues with OpenVZ 7 networking config, not sure if anybody here is using it or has experience with its advanced networking features.
On my host node I have these interfaces:

enp5s0 - no ip  
eth0 - static public ip  
host-routed  - no ip  
venet0 - no ip  
veth42d5092e - no ip  
virbr0 : inet 10.37.130.2  netmask 255.255.255.0  broadcast 10.37.130.255  
virbr0-nic - no ip

# brctl show  
bridge name     bridge id               STP enabled     interfaces  
host-routed             8000.000000000000       no  
virbr0          8000.525400b32271       no              virbr0-nic

The only interface I configured is eth0, all other interfaces were created automatically by Virtuozzo. I created a VM like this:

# prlctl create MyCT --vmtype ct --ostemplate centos-7-x86_64
# prlctl set MyCT --netif_add eth0
# prlctl set MyCT --ifname eth0 --dhcp yes --network Bridged

Needless to say MyCT doesn't get an IP. I want to use Dnsmasq to manage IP assignments to containers. My questions:
1) Which interface should I make Dnsmasq listen on? (I am confused by all these interfaces created by Virtuozzo)
2) What private IP range should I assign IPs from? (not sure if I need to stick to the 10.37.130.0 already chosen by Virtuozzo)

All containers will have have private IPs and I will do NAT. Thanks.

Comments

  • elwebmasterelwebmaster Member
    edited November 2016

    Got it figured out, will post solution in case anybody else is interested. The main difference between OpenVZ6 and OpenVZ7/Virtuozzo in terms of bridged networking appears to be the automatic addition of the container's interface to the bridge. To achieve NAT-based bridged networking in OpenVZ7:

    1) Set static private IP for br0 in /etc/sysconfig/network-scripts/ifcfg-br0
    2) Bind Dnsmasq to the static IP assigned to br0
    3) Give Dnsmasq a private IP range as the IP assigned to br0
    4) Use prlctl set MyCT --ifname eth0 --dhcp yes --network Bridged

    For this setup the virbr0 and virbr0-nic interfaces are not of interest as they belong to the Host-Only bridge which doesn't support forwarding.

Sign In or Register to comment.