I need a small bash script that sends raw DHCP-RELEASE messages to a certain DHCP server using netcat (nc).
As arguments the script shall take the network the netmask and the server and an IP to exclude.
./dchp_release <NETWORK> <NETMASK> <DHCP-SERVER> <EXCLUDE>
./dhcp_release 192.168.0.0 255.255.255.0 192.168.0.1 [url removed, login to view]
For all IPs defined by <NETWORK> and <NETMASK> with exception of <EXCLUDE> a DHCP-RELEASE message shall be send to <DHCP-SERVER>. Please see RFC and wireshark how to construct such a message. The client identifier shall be left empty in this scenario.
After messages for all IPs are send the script shall sleep 30 seconds and start again.
Please state in your bid or personal message what experience you have with bash scripting and dhcp.
Looking forward to your bid.