public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>
To: "pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com>,
	"aderumier@odiso.com" <aderumier@odiso.com>,
	"s.hanreich@proxmox.com" <s.hanreich@proxmox.com>
Subject: Re: [pve-devel] [RFC series pve-network/pve-cluster/qemu-server] DHCP
Date: Mon, 13 Nov 2023 15:44:01 +0000	[thread overview]
Message-ID: <c956710afc1c8050562af48b746f545190265f86.camel@groupe-cyllene.com> (raw)
In-Reply-To: <b84e7dab-d593-9eb6-ecb7-66ce6f8c41f0@proxmox.com>

Hi Stefan !

On 11/13/23 11:04, Alexandre Derumier wrote:
> I have splitted the ipam add|del , from the dhcp lease reservation.
> 
> The ipam add|del ip is done when creating|deleting vm, or add|del a
> vm nic
> 
> The dhcp reservation is done at vm start.
> 
> The delete of dhcp reservation is done at vm destroy.
> 
> (This can be easily extend for ephemeral ip)
> 
> At vm start, we search ip associated with mac address.

>>Thanks very much, that looks like a very good solution! From what I
>>can
>>tell migration would also work with this?

yes sure !  (and also remote migration to another cluster with same
external ipam)




> I have only implemented calls in qemu-server for now

>>Do you plan on checking out pve-container as well? Or should I look
>>into this?

I was waiting comments before doing pve-container, but if you are ok,
no problem,I'll work on it.


I'll try also to improve dnsmasq reload, as we don't always need to
reload it (if nothing change), and maximum once by vm start. (currently
it's always done for each interface)

I don't have tested yet ipv6 with dnsmasq, but the ips are correctly
set in ethers file.


>>I integrated it into my branch and will be giving it a test drive
now.

Thanks. I have spare time theses next 2 weeks for help/fix/bug.


>>I've been working on a UI integration in the meanwhile and it's
>>getting
>>along quite well although it will need to cook for another day or
two.


I think it also need api to add dhcp-range in subnet, as for external
ipam like netbox, It need to call netbox api to add the ip range.

So, maybe a button in subnet panel :"add dhcp-range", allowing to add
multiple range. 




  reply	other threads:[~2023-11-13 15:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 10:04 Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC pve-cluster 1/1] add priv/macs.db Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC pve-network 1/9] define dhcpplugin in zone Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC qemu-server 1/5] don't remove dhcp mapping on stop Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC pve-network 2/9] dhcp : add|del_ip_mapping: only add|del dhcp reservervation Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC qemu-server 2/5] vmnic add|remove : add|del ip in ipam Alexandre Derumier
2023-11-13 16:14   ` Stefan Hanreich
2023-11-13 10:04 ` [pve-devel] [RFC qemu-server 3/5] vm_start : vm-network-scripts: get ip from ipam and add dhcp reservation Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC pve-network 3/9] vnet|subnet: add_next_free_ip : implement dhcprange ipam search Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC qemu-server 4/5] api2: create|restore|clone: add_free_ip Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC pve-network 4/9] ipam : add macs.db for fast mac lookup Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC pve-network 5/9] ipam : add get_ips_from_mac Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC qemu-server 5/5] vm_destroy: delete ip from ipam && dhcp Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC pve-network 6/9] vnets: rename del|add|update_cidr to ip Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC pve-network 7/9] vnets: add del_ips_from_mac Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC pve-network 8/9] ipams : pveplugin: remove del_dhcp_ip Alexandre Derumier
2023-11-13 10:04 ` [pve-devel] [RFC pve-network 9/9] dhcp : dnsmasq: add_mapping: remove old mac, ip before append Alexandre Derumier
2023-11-13 10:35 ` [pve-devel] [RFC series pve-network/pve-cluster/qemu-server] DHCP Stefan Hanreich
2023-11-13 15:44   ` DERUMIER, Alexandre [this message]
2023-11-13 16:11     ` Stefan Hanreich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c956710afc1c8050562af48b746f545190265f86.camel@groupe-cyllene.com \
    --to=alexandre.derumier@groupe-cyllene.com \
    --cc=aderumier@odiso.com \
    --cc=pve-devel@lists.proxmox.com \
    --cc=s.hanreich@proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal