update_network
Change a UniFi network’s VLAN, subnet, DHCP settings, or enabled state without altering other fields. Requires confirm=true to apply changes.
Instructions
Update a network/VLAN; only the fields you provide change.
Mutating operation: applied immediately and persisted on the UniFi console. A single field change preserves the network's other settings. Pass both empty dhcp_start and dhcp_stop to disable DHCP. Requires confirm=true because VLAN, routing, or enable-state changes can disconnect clients. Inspect with get_networks.
Args: name: Network name or record id to update. name_new: Rename the network to this value. subnet: New subnet in CIDR form (e.g. "192.168.50.1/24"). vlan: New VLAN id (1-4094); pass -1 to clear VLAN tagging. domain_name: New DNS domain name for clients. dhcp_start: New DHCP pool start IP; pair with dhcp_stop to enable DHCP. dhcp_stop: New DHCP pool end IP; pair with dhcp_start to enable DHCP. dhcp_lease_time: New DHCP lease duration in seconds. enabled: Enable or disable the network. site: Site to operate on. Defaults to "default". device: Optional console name to target a specific UniFi device; omit for default. confirm: Safety gate: must be True to apply. Defaults to False.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Network name or record id to update. | |
| site | No | Site to operate on. Defaults to "default". | default |
| vlan | No | New VLAN id (1-4094); pass -1 to clear VLAN tagging. | |
| device | No | Optional console name to target a specific UniFi device; omit for default. | |
| subnet | No | New subnet in CIDR form (e.g. "192.168.50.1/24"). | |
| confirm | No | Safety gate: must be True to apply. Defaults to False. | |
| enabled | No | Enable or disable the network. | |
| name_new | No | Rename the network to this value. | |
| dhcp_stop | No | New DHCP pool end IP; pair with dhcp_start to enable DHCP. | |
| dhcp_start | No | New DHCP pool start IP; pair with dhcp_stop to enable DHCP. | |
| domain_name | No | New DNS domain name for clients. | |
| dhcp_lease_time | No | New DHCP lease duration in seconds. |