net-update network command section xml [--parent-index index] [[--live] [--config] | [--current]]
Update the given section of an existing network definition, with the changes optionally taking effect immediately, without needing to destroy and re-start the network.
command is one of "add-first", "add-last", "add" (a synonym for add-last), "delete", or "modify".
section is one of "bridge", "domain", "ip", "ip-dhcp-host", "ip-dhcp-range", "forward", "forward-interface", "forward-pf", "portgroup", "dns-host", "dns-txt", or "dns-srv", each section being named by a concatenation of the xml element hierarchy leading to the element being changed. For example, "ip-dhcp-host" will change a <host>
element that is contained inside a <dhcp>
element inside an <ip>
element of the network.
xml is either the text of a complete xml element of the type being changed (e.g. "<host mac="00:11:22:33:44:55' ip='1.2.3.4'/>", or the name of a file that contains a complete xml element. Disambiguation is done by looking at the first character of the provided text - if the first character is "<", it is xml text, if the first character is not "<", it is the name of a file that contains the xml text to be used.
The --parent-index option is used to specify which of several parent elements the requested element is in (0-based). For example, a dhcp <host>
element could be in any one of multiple <ip>
elements in the network; if a parent-index isn't provided, the "most appropriate" <ip>
element will be selected (usually the only one that already has a <dhcp>
element), but if --parent-index is given, that particular instance of <ip>
will get the modification.
If --live is specified, affect a running network. If --config is specified, affect the next startup of a persistent network. If --current is specified, affect the current network state. Both --live and --config flags may be given, but --current is exclusive. Not specifying any flag is the same as specifying --current.
Best Answer
The change won't have any immediate effect on any running DHCP clients. When the DHCP clients reboot they'll send a request asking to continue using their currently leased ip address and will be denied and will then request a new ip address. The same process should occur when running clients attempt to renew their currently leased ip address. Make sure that you don't assign any of the ip addresses that you're removing from the pool to any other hosts until they've been released from the existing DHCP clients.