Log option (18) Interface-Id in DHCPv6 failed

Bjørn Mork bjorn at mork.no
Tue Feb 24 08:27:06 UTC 2015


"Darko Bezjak" <darko.bezjak at t-2.com> writes:

> Thanks, now log looks like this:
>
> Feb 24 08:30:57 MB-DHCP-T-02 dhcpd: Client 00:03:00:01:d4:ca:6d:2f:fd:7c
> releases prefix 2a01:260:8043:1033::/64
> Feb 24 08:30:57 MB-DHCP-T-02 dhcpd: Sending Relay-reply to
> 2a01:260:8043:1007::1 port 547
> Feb 24 08:30:58 MB-DHCP-T-02 dhcpd: Relay-forward message from
> 2a01:260:8043:1007::1 port 547, link address 2a01:260:8043:1007::1, peer
> address fe80::d6ca:6dff:fe2f:fd7c
> Feb 24 08:30:58 MB-DHCP-T-02 dhcpd: Interface-ID: (missing)
> Feb 24 08:30:58 MB-DHCP-T-02 dhcpd: Interface-ID: (missing)
> Feb 24 08:30:58 MB-DHCP-T-02 dhcpd: Advertise PD: address
> 2a01:260:8043:1033::/64 to client with duid 00:03:00:01:d4:ca:6d:2f:fd:7c
> iaid = 1 valid for 43200 seconds
> Feb 24 08:30:58 MB-DHCP-T-02 dhcpd: Sending Relay-reply to
> 2a01:260:8043:1007::1 port 547
> Feb 24 08:30:58 MB-DHCP-T-02 dhcpd: Relay-forward message from
> 2a01:260:8043:1007::1 port 547, link address 2a01:260:8043:1007::1, peer
> address fe80::d6ca:6dff:fe2f:fd7c
> Feb 24 08:30:58 MB-DHCP-T-02 dhcpd: Interface-ID: (missing)
> Feb 24 08:30:58 MB-DHCP-T-02 dhcpd: Interface-ID: (missing
> .....
>
> but if you look pcap file, it's always option 18 included (attached file).

from  dhcp-options(5):

ACCESSING DHCPV6 RELAY OPTIONS
       v6relay (relay-number option This option allows access to an option that  has  been
       added  to a packet by a relay agent.  Relay-number value selects the relay to exam‐
       ine and option is the option to find.  In DHCPv6 each relay encapsulates the entire
       previous message into an option, adds its own options (if any) and sends the result
       onwards.  The RFC specifies a limit of 32 hops.  A relay-number of 0 is a no-op and
       means  don't  look  at the relays.  1 is the relay that is closest to the client, 2
       would be the next in from the client and so on.  Any value  greater  than  the  max
       number  of  hops  is  which is closest to the server independent of number.  To use
       this option in a class statement you would have something like this:

       match if v6relay(1, option dhcp6.subscriber-id) = "client_1";



Try this completely untested:

   log(info,concat("Interface-ID: ",
                   pick-first-value((v6relay(1, option dhcp6.interface-id)),
 		                   "(missing)")));


Or if you want to ensure that you are looking at the relay closest to
the server, then this might work:

   log(info,concat("Interface-ID: ",
                   pick-first-value((v6relay(32, option dhcp6.interface-id)),
 		                   "(missing)")));



Bjørn


More information about the dhcp-users mailing list