IPv6 log remote-id

perl-list perl-list at network1.net
Wed Nov 7 14:13:49 UTC 2018


My understanding (and personal experience) is that, in the case of remote-id, dhcp doesn't attempt to decode it (RFC says not to), or does decode it and its binary (which won't log and will break the log line). 

When I log, I log the option 18 / option 37 / ip-mac-lease details on separate lines in case of this type of thing. Binary values will break log lines. 

You can probably decode the remote-id also if you can figure the proper parameters for binary-to-ascii() for that particular option (assuming the incoming value is binary encoded instead of ASCII). 

Is remote-id supposed to be a mac address in your case? If so, something like this may work:

binary-to-ascii(16,8,":",v6relay(1,option dhcp6.remote-id))

----- Original Message -----
> From: "Nicholas Thompson" <Nicholas.Thompson at brandenburgtel.com>
> To: "Users of ISC DHCP" <dhcp-users at lists.isc.org>
> Sent: Wednesday, November 7, 2018 7:40:29 AM
> Subject: IPv6 log remote-id

> I am having issues logging remote-id in IPv6. I can see in the packet capture
> that option 37 does have the proper information.

> However when I attempt to log it I get blank string and the lines after it don't
> process either.

> Here is what I have

> log(info,
> concat("IP Address: ",
> binary-to-ascii(16, 16, ":", suffix(option dhcp6.ia-pd, 16)),
> "/",
> binary-to-ascii(10, 8, ":", substring(suffix(option dhcp6.ia-pd, 17), 0, 1)),
> " | Subscriber:",
> v6relay(1, option dhcp6.remote-id),
> " | MacID: ",
> binary-to-ascii(16, 8, ":", suffix(option dhcp6.client-id, 6))
> )
> );

> Here is the log result:
> IP Address: 2604:b400:1e59:b400:0:0:0:0/56 | Subscriber:

> If I take out the subscriber section:
> log(info,
> concat("IP Address: ",
> binary-to-ascii(16, 16, ":", suffix(option dhcp6.ia-pd, 16)),
> "/",
> binary-to-ascii(10, 8, ":", substring(suffix(option dhcp6.ia-pd, 17), 0, 1)),
> " | MacID: ",
> binary-to-ascii(16, 8, ":", suffix(option dhcp6.client-id, 6))
> )
> );

> Here is the log result:
> IP Address: 2604:b400:1e92:6700:0:0:0:0/56 | MacID: 0:23:6a:9:8e:2e

> We have the same logging format working with IPv4 and option82 not sure why I
> can't log option 37 in v6

> Thank you in advance for any help you can provide.
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users


More information about the dhcp-users mailing list