Custom IPAM plugins - NIPAP

hvisage

Renowned Member
May 21, 2013
262
22
83
Good day,

is there perhaps a template/documentation/examples for implementing a custom IPAM for the ProxMox SDN side?

I'm looking at https://spritelink.github.io/NIPAP/ for IPAM as we roll out the next steps of our network, so obviously the question comes in w.r.t. PVE not (yet) supporting it whether we could roll our own and what might be involved?
 
Good day,

is there perhaps a template/documentation/examples for implementing a custom IPAM for the ProxMox SDN side?

I'm looking at https://spritelink.github.io/NIPAP/ for IPAM as we roll out the next steps of our network, so obviously the question comes in w.r.t. PVE not (yet) supporting it whether we could roll our own and what might be involved?
so you need to create a plugin file in

/usr/share/perl5/PVE/Network/SDN/Ipams/

(you can look at /usr/share/perl5/PVE/Network/SDN/Ipams/NetboxPlugin.pm && /usr/share/perl5/PVE/Network/SDN/Ipams/PhpIpamPlugin.pm to see how it's work , nothing complex)

Then this plugin need to be loaded at the begin of
/usr/share/perl5/PVE/Network/SDN/Ipams.pm
Code:
use PVE::Network::SDN::Ipams::PVEPlugin;
use PVE::Network::SDN::Ipams::NetboxPlugin;
use PVE::Network::SDN::Ipams::PhpIpamPlugin;
use PVE::Network::SDN::Ipams::Plugin;

PVE::Network::SDN::Ipams::PVEPlugin->register();
PVE::Network::SDN::Ipams::NetboxPlugin->register();
PVE::Network::SDN::Ipams::PhpIpamPlugin->register();
PVE::Network::SDN::Ipams::Plugin->init();


Currently, auto-loading custom ipam (and sdn ) plugins is not implemented, so this file can be overwriten when a new sdn package version is released.


Note that currently, the ipam plugins only register subnets && gateway ip. But the vm/ct ip registration is not yet done. (but it could come soon, I think for the end of this year max)
 
Thank you!

Having those entries added in, is a good starting point to check/do things.


What I am getting/doing, just... might not work in the SDN setup, as I don't "want" the PVEs to be the router/gateways, but a dedicated VM (FortiGate/etc.) , but still thank you for the pointers to consider
 
What I am getting/doing, just... might not work in the SDN setup, as I don't "want" the PVEs to be the router/gateways, but a dedicated VM (FortiGate/etc.) , but still thank you for the pointers to consider
you have layer2 zone (vlan, vxlan, qinq), where PVE is not the gateway. (the gateway defined in the subnet is only used for ipam here).

only layer3 routable zone (evpn, simple), are deploying the gateway defined on the subnet.
 
only layer3 routable zone (evpn, simple), are deploying the gateway defined on the subnet.
That is what I am aiming for, ie. Layer3 evpn/vxlan and remove the switching network, but the FortiGateVM being the gateway, not the PVE hypervisors
 
That is what I am aiming for, ie. Layer3 evpn/vxlan and remove the switching network, but the FortiGateVM being the gateway, not the PVE hypervisors
you can do layer2 vxlan for example, and simply put the fortigatevm nic(s) in the vxlan network, and use it as gateway.
 
  • Like
Reactions: hvisage
I am currently in a similar situation. I managed to make my custom plugin in the GUI by additionally registering it in /usr/share/perl5/PVE/API2/Network/SDN/Ipams.pm and modifying /usr/share/pve-manager/js/pvemanagerlib.js.

Seems to be working fine so far, however I would love to know how I can properly test my perl code. Do I have to restart some systemd service so that changes to the code are applied to the API?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!