Mentions légales du service

Skip to content

WIP. network dictectomy and ipv6 support

SIMONIN Matthieu requested to merge wip/network_dictectomy_and_ipv6 into master

Some initial work/thoughts about supporting ipv6 network natively in EnOSlib.

When one calls provider.init, one takes ownerships on nodes and networks (somehow). In EnOSlib, we only reflect the ownership over IPv4 networks.

So the intent of the changes here, is to explore a way to expose both IPv4 and IPv6 networks the the users.

The initial idea I got was to extend the list of networks returned by provider.init to include the IPv6 networks.

  1. G5k

In G5k, a networks can be:

  • the production network. Ownership on this network is limited (user can't do what he wants with the IPs of this network). But still, she owns the IPs given to her nodes. Production network is by default an IPv4 network. IPv6 is possible (needs to call dhclient -6 on the nodes).
  • vlan networks. Ownership is a reality: user can have extra IPs to play with. Here also for each IPv4 network there's a corresponding IPv6 network (with lots of ips!)
  • subnet networks. True ownership also here. The purpose of this network is to provide some ip/mac range to give to some VMs. There's no IPv6 support yet.

Reference:

  1. FIT
  • There is also a IPv6 production network for the A8 nodes that is statically defined.

  • This static network comes with a companion static IPv6 subnet that can be used to connect M3 nodes.

  • If you use only M3 nodes, you need to "reserve" a subnet dynamically.

Reference: https://www.iot-lab.info/docs/getting-started/ipv6/

  1. Vagrant

We'll stick to a IPv4 network

Implementation.

Until now, we didn't have a Network data structure at the library level. We used a dictionnary for that and each provider was responsible to dump its internal network representation to a dict with the right compatible keys.

I propose to model a network at the library level with a better defined object: enoslib.Network (similar to enoslib.Host but for networks...)

At a first glance enoslib.Network is a wrapper around ipaddress.IPv4Network or ipaddress.IPv6Network with some extras attribute/methods.

What exactly needs to be in this is still to be defined (e.g address of gateway/dns).

The new class has been introduced and some tests for G5k but not used yet.

Benefits.

  • get rid of dictionnary for representing networks
  • compatibility with discover_networks (still unclear) -> one can see discover_networks as a mean to sync our state with the configuration on the nodes.
Edited by SIMONIN Matthieu

Merge request reports

Loading