From 7826a0e35e25e3d0e1a782c9507d49352e3dd720 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Sat, 29 Jul 2023 22:53:57 +0200 Subject: T3355: migrate "show dhcp client lease" to new op-mode style vyos@vyos# ${vyos_op_scripts_dir}/dhcp.py show_client_leases --family inet --interface eth0.10 Interface eth0.10 IP address 172.16.33.123 [Active] Subnet Mask 255.255.255.0 Domain Name vyos.net Router 172.16.33.254 Name Server 172.16.254.30 DHCP Server 172.16.33.254 DHCP Server 86400 Last Update Sat Jul 29 21:13:32 CEST 2023 Expiry Sun Jul 30 21:13:31 CEST 2023 vyos@vyos# ${vyos_op_scripts_dir}/dhcp.py show_client_leases --family inet --interface eth0.10 --raw [ { "last_update": "Sat Jul 29 21:13:32 CEST 2023", "reason": "BOUND", "interface": "eth0.10", "new_expiry": "1690744411", "new_dhcp_lease_time": "86400", "medium": "", "alias_ip_address": "", "new_ip_address": "172.16.33.123", "new_broadcast_address": "172.16.33.255", "new_subnet_mask": "255.255.255.0", "new_domain_name": "vyos.net", "new_network_number": "172.16.33.0", "new_domain_name_servers": "172.16.254.30", "new_routers": "172.16.33.254", "new_static_routes": "", "new_dhcp_server_identifier": "172.16.33.254", "new_dhcp_message_type": "5", "old_ip_address": "", "old_subnet_mask": "", "old_domain_name": "", "old_domain_name_servers": "", "old_routers": "", "old_static_routes": "" } ] --- op-mode-definitions/dhcp.xml.in | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'op-mode-definitions/dhcp.xml.in') diff --git a/op-mode-definitions/dhcp.xml.in b/op-mode-definitions/dhcp.xml.in index 66584efc3..6855fe447 100644 --- a/op-mode-definitions/dhcp.xml.in +++ b/op-mode-definitions/dhcp.xml.in @@ -7,6 +7,30 @@ Show DHCP (Dynamic Host Configuration Protocol) information + + + Show DHCP client information + + + + + Show DHCP client leases + + + + + Show DHCP client information for a given interface + + + + + ${vyos_op_scripts_dir}/dhcp.py show_client_leases --family inet --interface $6 + + + ${vyos_op_scripts_dir}/dhcp.py show_client_leases --family inet + + + Show DHCP server information -- cgit v1.2.3