Show DHCP (Dynamic Host Configuration Protocol) information
Show DHCP server information
Show DHCP server leases
sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases
Show DHCP server leases for a specific pool
service dhcp-server shared-network-name
sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --pool $6
Show DHCP server leases sorted by the specified key
sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --sort $6
Show DHCP server leases with a specific state (can be multiple, comma-separated)
sudo ${vyos_op_scripts_dir}/show_dhcp.py --leases --state $(echo $6 | tr , " ")
Show DHCP server statistics
sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics
Show DHCP server statistics for a specific pool
service dhcp-server shared-network-name
sudo ${vyos_op_scripts_dir}/show_dhcp.py --statistics --pool $6
Show DHCPv6 (IPv6 Dynamic Host Configuration Protocol) information
Show DHCPv6 server information
Show DHCPv6 server leases
sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases
Show DHCPv6 server leases for a specific pool
sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --pool $6
Show DHCPv6 server leases sorted by the specified key
sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --sort $6
Show DHCPv6 server leases with a specific state (can be multiple, comma-separated)
sudo ${vyos_op_scripts_dir}/show_dhcpv6.py --leases --state $(echo $6 | tr , " ")
Restart DHCP processes
Restart DHCP server
if cli-shell-api existsActive service dhcp-server; then sudo systemctl restart isc-dhcp-server.service; else echo "DHCP server not configured"; fi
Restart DHCP relay-agent
sudo ${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv4
Restart DHCPv6 processes
Restart DHCPv6 server
sudo systemctl restart isc-dhcp-server6.service
Restart DHCPv6 relay-agent
sudo ${vyos_op_scripts_dir}/restart_dhcp_relay.py --ipv6
Renew specified variable
Renew DHCP client lease
Renew DHCP client lease for specified interface
sudo systemctl restart "dhclient@$4.service"
Renew DHCPv6 client lease
Renew DHCPv6 client lease for specified interface
sudo systemctl restart "dhcp6c@$4.service"