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

PaviGuru Pavithragurumurthy gurumurthyka at gmail.com
Thu Nov 8 14:59:16 UTC 2018


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/20181108/00613eba/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DHCPv6_Match_Interface-ID.pcap
Type: application/octet-stream
Size: 28969 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20181108/00613eba/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DHCPv6_Match_remote-ID.pcap
Type: application/octet-stream
Size: 49824 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20181108/00613eba/attachment-0003.obj>


More information about the dhcp-users mailing list