Hi Group,<br><br>For quite some time we have been generating DHCP ddns hostnames as follows:<br><br>if exists host-name {<br>        ddns-hostname = concat (lcase (option host-name) , "-" , binary-to-ascii(10 , 8 , "-" , leased-address));<br>

        }<br>    else {<br>        ddns-hostname = concat("dhcp-" , binary-to-ascii(10 , 8 , "-" , leased-address));<br>        }<br><br>This is not an uncommon format.  It helps us ensure unique host names on our network.  Lately I notice a handful of user devices that present host names with invalid characters, such as android_blah or "nintendo 3ds" with a space in the middle (no quotes).<br clear="all">

What are you folks doing to mitigate this?  As it stands these users do not receive valid NS records and we get a bevy of log messages when illegal characters are in the hostname.<br><br>- I have seen mention of the use of regex in the man pages for dhcp-eval.  Is there a method to examine the host-name for invalid characters, replacing them with a hyphen or otherwise?    (Is there REGEX evaluation available within dhcpd.conf)<br>

- if there is no way to do a character by character replace, can I fail down to my else condition, simply prepending dhcp- to the front of the IP address?<br>-- <br>K. Fitzgerald<br>UALR Information Technology Services<br>

<br><br>