how can i put "next-server" and "filename" - informations into the logging

marty.mcfly at fv.nrw.de marty.mcfly at fv.nrw.de
Wed Dec 3 08:56:06 UTC 2014


Good Morning,

I would like to add some more information to the logging from the DHCP packets that are sent by the DHCP server to the client.
Information like "hardware-address", "leased-address" or "option vendor-class-identifier" are no Problem!
	
I add the following lines into the global "on commit" - block already to get an logging line like this:
      log (info,
         concat (
            "DNS_UPDATE",
            ": ",
            concat (
               suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,1,1))),2), ":",
               suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,2,1))),2), ":",
               suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,3,1))),2), ":",
               suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,4,1))),2), ":",
               suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,5,1))),2), ":",
               suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,6,1))),2)
            ),
            " ",
            binary-to-ascii(10, 8, ".", leased-address)
         )
      );

to get an logging line like this:

Dec  2 07:48:38 DHCPServer dhcpd: DNS_UPDATE: 00:12:ab:34:cd:56 192.168.13.154


The problem is to put out informations like "next-server" and "filename" into the logging.

I have already searched and tried without any result. 

Could anyone please help me!

thanks

Best regards

Marty


More information about the dhcp-users mailing list