[Debian] Virtual IPv6 addresses automatic allocation / Webmin manage network interface

3 posts / 0 new
Last post
#1 Mon, 03/07/2016 - 07:10
jazzman

[Debian] Virtual IPv6 addresses automatic allocation / Webmin manage network interface

Hello,

Have configured Virtualmin template to automatically assign an IPv6 to a virtual server from a given range, as we have really plenty IPv6 sitting around. However, my /etc/network/interfaces is not the most usual. Maybe not the best way to go but this really works for me win XEN setup in my datacenter's network topology.

The problem is that whenever adding a new virtual server with automatic allocation, my network is screwed up, the server is unresponsive and have to order a LARA console to rework it. The same happens if I want to manually add a new IPv6 to the interface.

This is how my network config looks like:

auto lo
iface lo inet loopback


auto xenbr0
iface xenbr0 inet static
  address <IPv4>
  netmask 255.255.255.255
  gateway <IPv4_GW>
  pointopoint <IPv4_GW>

  addresses-HOSTING <IPv4_ADDITIONAL>/32
  create_alias_devices yes
  label_addresses yes

  bridge_ports eth0
  bridge_stp off
  bridge_waitport 0
  bridge_fd 0

iface xenbr0 inet6 static
  address <IPv6>
  netmask 64
  gateway fe80::1

  addresses-HOSTING <IPv6_ADDITIONAL>/64
  create_alias_devices yes
  label_addresses yes

The 'addresses-.../create_alias_devices/label_addresses' instructions are for a 3rd party script that allows elegant definition of additional IP addresses: http://wertarbyte.de/debian/ifupdown/addresses

How can I control the way Webmin/Virtualmin handles network configuration files? Are there any scripts I can modify? Basically when adding/removing an IPv6 it should only add/remove a specific simple line and leave the config untouched. I guess I could hack my way around if I know where. The problem is, what will I do when I upgrade Virtualmin? Unfortunately, now, it regenerates the entire config and screws even nicely working IPv4 section, pointopoint directive is removed, etc.

Are there any other options I could have? The virtual xenbr0 interface is there exactly to be able to dinamicaly connect VM's virtual interfaces with their allocated IPs. Can I do something similar so that the new IPv6 is nicely added? Eventually via a hosting vif that would handle all automatically allocated IPs and could be managed/restarted by Virtualmin/Webmin in a standard way without restarting entire network? Any ideas or experience?

Thanks!

Fri, 03/11/2016 - 10:34
jazzman

Hello,

No one?

The whole problem is that Virtualmin removes directives it doesn't know about like pointopoint or worse, bridge_* which is crucial in my configuration. How can I workaround this? Ideally, when only auto-allocating an IPv6, Virtualmin shouldn't touch other interfaces configurations at all!

Tue, 03/15/2016 - 05:23
jazzman

Ok, to put it in another way: I will workaround this by pre-allocating let's say 200 IPv6 addresses in /etc/network/interfaces that will be online and available at any time. How can I configure Virtualmin to do automatic IP allocation from the range(s) but with interfaces 'already up'?