This question has been asked before but never really answered or I’ve miss read it.
I want a simple way to just flush all DHCP lease entries. I am running VyOS 1.4
There is a command:
clear dhcp-server lease
Although if I have 50+ leases I don’t want to be going through them individually.
So I thought something like this may work
show dhcp server leases | awk "{print $1}" | xargs -I {} clear dhcp-server lease {}
Unfortunately this failed
Maybe because the script templates were not there.
So I decided to put it into a script but also no luck
#!/bin/vbash
source /opt/vyatta/etc/functions/script-template
run show dhcp server leases | awk '{print $1 }' | xargs -I {} clear dhcp-server lease {}
Anyone have an idea how to clear all entries, without doing them one at a time?