Knowledge Base ISC Main Website Ask a Question/Contact ISC
DHCPv6 support for relay options in ISC DHCP 4.3
Author: Brian Conry Reference Number: AA-01096 Views: 5744 Created: 2014-01-21 13:59 Last Updated: 2014-01-21 17:19 0 Rating/ Voters

Question:

How can I access relay agent options in my DHCPv6 configuration?

Answer:

Unlike DHCPv4, in DHCPv6 each relay agent along the packet path will add its own set of relay agent options, encapsulating the options of all prior relay agents, with the specification mandating support for up to 32 sets of relay agent options.  This complicates accessing these options because you have to specify which set of options you wish to look at.

To support this, we have added the v6relay expression and extended the host-identifier statement with a v6relopt expression.

The v6relay expression allows access to the nested relay agent options in statements.  This works by taking two arguments, the first specifies which relay agent to look at and the second specifies which relay agent option to look at.  Each relay agent is numbered in order from the client, starting with 1 and continuing through 32.  Additionally, the value 0 indicates the client-supplied options, and values greater than 32 indicate the relay agent closest to the server no matter what number it would be.  If the agent specified is not present, v6relay will return nothing the same as if that agent did not specify the requested option.

# look at what the relay closest to the server says
if v6relay(33, option dhcp6.subscriber-id) = "client_1" { log(info, "client_1 closest to server"); }

# look at what the relay closest to the client says
# if there is only one set of relay agent options then both 33 and 1 will look at the same data
if v6relay(1, option dhcp6.subscriber-id) = "client_1" { log(info, "client_1 closest to client"); }

# probably will not match anything
if v6relay(32, option dhcp6.subscriber-id) = "client_1" { log(info, "client_1 from agent 32"); }

The v6relopt expression of the host-identifier statement allows you to specify a relay agent option option to be used as the host-identifier.  Its syntax and semantics parallel those of the v6relay expression.

# this matches at the relay agent closest to the server, if any
host client_3 {
  host-identifier v6relopt 33 dhcp6.subscriber-id "client_3";
}



© 2001-2016 Internet Systems Consortium

Please help us to improve the content of our knowledge base by letting us know below how we can improve this article.

If you have a technical question or problem on which you'd like help, please don't submit it here as article feedback.

For assistance with problems and questions for which you have not been able to find an answer in our Knowledge Base, we recommend searching our community mailing list archives and/or posting your question there (you will need to register there first for your posts to be accepted). The bind-users and the dhcp-users lists particularly have a long-standing and active membership.

ISC relies on the financial support of the community to fund the development of its open source software products. If you would like to support future product evolution and maintenance as well having peace of mind knowing that our team of experts are poised to provide you with individual technical assistance whenever you call upon them, then please consider our Professional Subscription Support services - details can be found on our main website.

Feedback
  • There is no feedback for this article
Info Submit Feedback on this Article
Nickname: Your Email: Subject: Comment:
Enter the code below:
Quick Jump Menu