DHCP multiple shared networks vs multiple subnets, global-params vs shared-network-params vs subnet-params

Hello,

I’ve been using VyOS since it was Vyatta, so I’m very familiar with it, but there are always things to learn, and I’m hoping someone can fill me in on a couple topics related to the DHCP server.

My first question is regarding having multiple shared-network-names, each with one subnet, vs having a single shared-network-name that contains multiple subnets. What are the differences between these two approaches? Why would you choose one over the other? Are there things you can do with one that you can’t do with another? Etc.

My second question is regarding global-parameters vs shared-network-parameters vs subnet-parameters. I gather that these are all raw parameters in the format you would place them in dhcpd.conf, but I’m trying to understand the difference between them (other than just their progressively-smaller scopes, which I understand). As an example, let’s consider DHCPD DynamicDNS updates. I’ve gathered from some Google searching that I can enable this in VyOS with something like this (I have not tried this yet, because I want to better understand these scopes and their raw options before I do):

global-parameters 'ddns-update-style standard;'
global-parameters 'ddns-rev-domainname "in-addr.arpa."'
global-parameters 'deny client-updates;'
global-parameters 'do-forward-updates on;'
global-parameters 'update-optimization off;'
global-parameters 'update-conflict-detection off;'
global-parameters 'key "pdns-key" { algorithm hmac-sha256; secret "passcode"; };'
global-parameters 'zone example.org. { primary 11.22.33.44; key pdns-key; }'
global-parameters 'zone 1.168.192.in-addr.arpa. { primary 11.22.33.44; key key-name; }'

(See StackExchange and UniFi Forums for where I learned to put these together.)

So, to continue this example, if I didn’t want all subnets across all shared networks to do DynamicDNS updates, could I instead put all of these same parameters in shared-network-params? What about subnet-params? How does all of this relate to what actually goes into the dhcpd.conf file?

Thanks in advance for helping me understand this better, to reduce my changes of breaking something. :slight_smile:

Nick