Log option (18) Interface-Id in DHCPv6 failed

Darko Bezjak darko.bezjak at t-2.com
Tue Feb 24 14:29:47 UTC 2015


Thanks,
log looks like this:

Feb 24 15:08:24 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 15:08:24 MB-DHCP-T-02 dhcpd: Interface-ID: ae0:3000-1151
Feb 24 15:08:24 MB-DHCP-T-02 dhcpd: Interface-ID: ae0:3000-1151
Feb 24 15:08:24 MB-DHCP-T-02 dhcpd: Advertise PD: address 2a01:260:8043:1032::/64 to client with duid 00:03:00:01:d4:ca:6d:2f:fd:7c iaid = 1 valid for 43200 seconds
Feb 24 15:08:24 MB-DHCP-T-02 dhcpd: Sending Relay-reply to 2a01:260:8043:1007::1 port 547
Feb 24 15:08:24 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 15:08:24 MB-DHCP-T-02 dhcpd: Interface-ID: ae0:3000-1151
Feb 24 15:08:24 MB-DHCP-T-02 dhcpd: Interface-ID: ae0:3000-1151
Feb 24 15:08:24 MB-DHCP-T-02 dhcpd: Reply PD: address 2a01:260:8043:1032::/64 to client with duid 00:03:00:01:d4:ca:6d:2f:fd:7c iaid = 1 valid for 43200 seconds
Feb 24 15:08:24 MB-DHCP-T-02 dhcpd: Sending Relay-reply to 2a01:260:8043:1007::1 port 547

Config:

dhcpv6-lease-file-name "/var/lib/dhcp/dhcpd6.leases";

subnet6 fe80::/64 {
}

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

option dhcp6.name-servers 2a01:260:1:3::3,2a01:260:1:2::3;
option dhcp6.domain-search "t-2.net";

shared-network t2 {

host client_3 {
  host-identifier v6relopt 1 dhcp6.subscriber-id "ae0:3000-1151";
        fixed-prefix6  2a01:260:8043:1001::/64;
}


        subnet6 2a01:260:8043::/48 {
                range6 2a01:0260:8043:1001:: 2a01:0260:8043:1006::;
#               #range6 2a01:260:8043::/64 temporary;
                prefix6 2a01:0260:8043:1011:: 2a01:0260:8043:1032:: /64;
        }
}

Now I have problem with fixed prefix assigned:

host client_3 {
  host-identifier v6relopt 1 dhcp6.subscriber-id "ae0:3000-1151";
        fixed-prefix6  2a01:260:8043:1001::/64;
}

Regards, Darko.




-----Original Message-----
From: Bjørn Mork [mailto:bjorn at mork.no] 
Sent: Tuesday, February 24, 2015 9:27 AM
To: Darko Bezjak
Cc: 'Users of ISC DHCP'
Subject: Re: Log option (18) Interface-Id in DHCPv6 failed

"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