ISC DHCP 4.4.1_CentOS7_DHCPv6_Relay_server: issue related with Class matching option along with condition.

PaviGuru Pavithragurumurthy gurumurthyka at gmail.com
Fri Nov 9 08:56:52 UTC 2018


Hello,



DHCPv6 relay with option 37 is working after modification of matching to
the location number.

just after the Value Enterprise ID  with range of 4. So extended to 4th
location. it worked!!.





Remote Identifier

        Option: Remote Identifier (37)

        Length: 36

        Value: 0000303a30383a30323a...

        Enterprise ID: <<< 4 >>>

        Remote-ID: 123454755...



The format of the DHCPv6 Relay Agent Remote-ID option is shown below:



0                   1                   2                   3

        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

       |       OPTION_REMOTE_ID        |         option-len            |

       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

       |                       enterprise-number                       |

       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

       .                                                               .

       .                           remote-id                           .

       .                                                               .

       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+



* Config File*

class "team" {

        match if(

        (substring (v6relay(1, option dhcp6.remote-id), *4*, 8) =
"TESTING|")

);

}



subnet6 3001:db8:100:f101::0/64 {

  pool6 {

    allow members of "team";

    range6 3001:db8:100:f101::0:100 3001:db8:100:f101::0:1FF;

  }

}

Thanks
Guru

On Thu, Nov 8, 2018 at 8:29 PM PaviGuru Pavithragurumurthy <
gurumurthyka at gmail.com> wrote:

> Hello,
>
>
>
> Thanks for your valuable input. DHCPv6 Option 18 Interface-id it worked.
>
>
>
> IP allocation is working if match found, else no IP allocation.
>
>
>
>
>
> *Dhcpd6.conf*
>
> class "team" {
>
>         match if(
>
>          (substring (v6relay(1, option dhcp6.interface-id), 0, 8) =
> "TESTING|")
>
> );
>
> }
>
>
>
> subnet6 3001:db8:100:f101::0/64 {
>
>   pool6 {
>
>     allow members of "team";
>
>     range6 3001:db8:100:f101::0:100 3001:db8:100:f101::0:1FF;
>
>   }
>
> }
>
>
>
>
>
> *root at tester:/home/tester# dhcpd -6 -cf /etc/dhcp/dhcpd6.conf -lf
> /var/lib/dhcp/dhcpd6.leases eth0  -d*
>
> Internet Systems Consortium DHCP Server 4.4.1
>
> Copyright 2004-2018 Internet Systems Consortium.
>
> All rights reserved.
>
> For info, please visit https://www.isc.org/software/dhcp/
>
> Config file: /etc/dhcp/dhcpd6.conf
>
> Database file: /var/lib/dhcp/dhcpd6.leases
>
> PID file: /var/run/dhcpd6.pid
>
> Wrote 0 class decls to leases file.
>
> Wrote 4 NA, 0 TA, 0 PD leases to lease file.
>
> Bound to *:547
>
> Listening on Socket/5/eth0/3001:db8:100:f101::/64
>
> Sending on   Socket/5/eth0/3001:db8:100:f101::/64
>
> Server starting service.
>
> Relay-forward message from 3001:db8:100:f101:62a8:feff:feab:5500 port 547,
> link address 3001:db8:100:f101:62a8:feff:feab:5500, peer address
> fe80::208:2ff:fe01:1
>
> Advertise NA: address 3001:db8:100:f101::103 to client with duid
> 00:01:00:01:00:00:00:00:00:08:02:01:00:01 iaid = 141616593 valid for 86400
> seconds
>
> Sending Relay-reply to 3001:db8:100:f101:62a8:feff:feab:5500 port 547
>
> Relay-forward message from 3001:db8:100:f101:62a8:feff:feab:5500 port 547,
> link address 3001:db8:100:f101:62a8:feff:feab:5500, peer address
> fe80::208:2ff:fe01:1
>
> Reply NA: address 3001:db8:100:f101::103 to client with duid
> 00:01:00:01:00:00:00:00:00:08:02:01:00:01 iaid = 141616593 valid for 86400
> seconds
>
> Reusing lease for: 3001:db8:100:f101::103, age 19572 secs < 25%, sending
> shortened lifetimes - preferred: 34428, valid 66828
>
> Sending Relay-reply to 3001:db8:100:f101:62a8:feff:feab:5500 port 547
>
>
>
> *For Option 37 _remote ID*
>
> IP allocation is not working, I used same way of interface-id. But match
> got failed. I assume there is no changes on config file. It should work !!.
> any clue ?
>
> *Attached pcap DHCPv6_Match_remote-ID.pcap*
>
>
>
> *Dhcpd6.conf*
>
> class "team" {
>
>         match if(
>
>          (substring (v6relay(1, option dhcp6.remote-id), 0, 8) =
> "TESTING|")
>
> );
>
> }
>
>
>
> subnet6 3001:db8:100:f101::0/64 {
>
>   pool6 {
>
>     allow members of "team";
>
>     range6 3001:db8:100:f101::0:100 3001:db8:100:f101::0:1FF;
>
>   }
>
> }
>
>
>
>
>
> *root at tester:/home/tester# dhcpd -6 -cf /etc/dhcp/dhcpd6.conf -lf
> /var/lib/dhcp/dhcpd6.leases eth0  -d*
>
> Internet Systems Consortium DHCP Server 4.4.1
>
> Copyright 2004-2018 Internet Systems Consortium.
>
> All rights reserved.
>
> For info, please visit https://www.isc.org/software/dhcp/
>
> Config file: /etc/dhcp/dhcpd6.conf
>
> Database file: /var/lib/dhcp/dhcpd6.leases
>
> PID file: /var/run/dhcpd6.pid
>
> Wrote 0 class decls to leases file.
>
> Wrote 0 NA, 0 TA, 0 PD leases to lease file.
>
> Bound to *:547
>
> Listening on Socket/5/eth0/3001:db8:100:f101::/64
>
> Sending on   Socket/5/eth0/3001:db8:100:f101::/64
>
> Server starting service.
>
> Relay-forward message from 3001:db8:100:f101:62a8:feff:feab:5500 port 547,
> link address 3001:db8:100:f101:62a8:feff:feab:5500, peer address
> fe80::208:2ff:fe01:1
>
> *Unable to pick client address: no addresses available*  - shared network
> 3001:db8:100:f101::/64: 0 total, 0 active,  0 abandoned
>
> Sending Relay-reply to 3001:db8:100:f101:62a8:feff:feab:5500 port 547
>
> Relay-forward message from 3001:db8:100:f101:62a8:feff:feab:5500 port 547,
> link address 3001:db8:100:f101:62a8:feff:feab:5500, peer address
> fe80::208:2ff:fe01:1
>
> *Unable to pick client address: no addresses available*  - shared network
> 3001:db8:100:f101::/64: 0 total, 0 active,  0 abandoned
>
> Sending Relay-reply to 3001:db8:100:f101:62a8:feff:feab:5500 port 547
>
> Relay-forward message from 3001:db8:100:f101:62a8:feff:feab:5500 port 547,
> link address 3001:db8:100:f101:62a8:feff:feab:5500, peer address
> fe80::208:2ff:fe01:1
>
> Unable to pick client address: no addresses available  - shared network
> 3001:db8:100:f101::/64: 0 total, 0 active,  0 abandoned
>
> Sending Relay-reply to 3001:db8:100:f101:62a8:feff:feab:5500 port 547
>
> Relay-forward message from 3001:db8:100:f101:62a8:feff:feab:5500 port 547,
> link address 3001:db8:100:f101:62a8:feff:feab:5500, peer address
> fe80::208:2ff:fe01:1
>
> Unable to pick client address: no addresses available  - shared network
> 3001:db8:100:f101::/64: 0 total, 0 active,  0 abandoned
>
> Sending Relay-reply to 3001:db8:100:f101:62a8:feff:feab:5500 port 547
>
>
>
> Thanks
>
> Guru
>
> On Thu, Nov 8, 2018 at 6:28 PM yoshihiko fujita <fujita at ncad.co.jp> wrote:
>
>>
>> Hi
>>
>> I think that now can be solved
>> match if substring(v6relay(1, option dhcp6.interface-id), 0, 8) =
>> "TESTING|”;
>>
>> Good luck!
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20181109/23daf20d/attachment-0001.html>


More information about the dhcp-users mailing list