Lease Query

The Prime Cable Provisioning RDU queries Network Registrar for the IP address of devices using the DHCP lease query protocol. Prime Cable Provisioning then uses this information for device disruption and for reporting details of both IPv4 and IPv6 devices.

Prime Cable Provisioning supports the following configurations:
  • Lease Query Autoconfiguration

  • Lease Query Source IP Address

This chapter contains the following sections:

Lease Query Autoconfiguration

The RDU performs name resolution to determine the IP addresses of Network Registrar servers to which it sends lease queries. In case of a DNS failure, lease queries can fail. In Prime Cable Provisioning, you can directly configure the IP addresses of Network Registrar servers in a provisioning group to which the RDU must send lease query requests.

When you enable automatic configuration, the RDU adjusts its lease query configuration to set both IPv4 and IPv6 address lists from the Network Registrar servers in the provisioning group. It performs this task after comparing the current information registered with the server to the information stored in the RDU database. If the Prime Cable Provisioning Network Registrar extensions have moved from one provisioning group to another, the lease query configuration is changed to delete:

  • IP addresses that are present in the lease query configuration on the previous provisioning group object.

  • IP addresses that are no longer present in the IP address list.

The RDU searches the lease query configuration to verify if the provisioning group is configured to use the specified extension. If the provisioning group is not configured to use the extension, the RDU selects an address from the addresses being registered with the Network Registrar server and adds to the provisioning group’s lease query configuration.

If you disable this autoconfiguration, the RDU does not change its lease query configuration upon registering with the Network Registrar server. This feature is, by default, enabled.

To enable or disable autoconfiguration of lease query addresses in a provisioning group, you can set the LeaseQuery AutoConfig option from the administrator user interface. See Monitoring Provisioning Groups.

Lease Query Source IP Address

In earlier Cisco BAC versions, the lease query feature relied on the operating system to select the source interface and the source port for sending lease query requests. While this is the default behavior In Prime Cable Provisioning, you can also configure the RDU to send lease query requests using a specific interface.

Configuring Lease Query

Prime Cable Provisioning, by default, binds to the IP addresses and ports that are described in the following table.

Table 1. Lease Query Address for Binding

Protocol

IP Address

Port

IPv4

Wildcard1

67

IPv6

Wildcard

547

1

The wildcard is a special local IP address. It usually means "any” and can only be used for bind operations.

If port 547 and port 67 are available on the RDU, you need not perform any special configuration to send lease query requests. If while installing the RDU, the installation program detects that either of these ports is being used by another process, it recommends that you use the dynamic ports that the operating system selects.

For example:


DHCPv4/DHCPv6 lease query port(s) (Udp/67 and Udp/547) is in use.
Configuring the RDU to use a dynamic port for DHCPv4/DHCPv6 lease query.

The installation program automatically enables selection of dynamic ports by setting zero values to the following properties in the BPR_HOME/rdu/conf/rdu.properties file:


/cnrQuery/clientSocketAddress=0.0.0.0:0
/cnrQuery/ipv6/clientSocketAddress=[::]:0

You can also configure the IP address and port of your choice for lease query communication using the same properties. For example:


/cnrQuery/clientSocketAddress=10.1.2.3:166
/cnrQuery/ipv6/clientSocketAddress=[2001:0DB8:0:0:203:baff:fe12:d5ea]:1547

Using these properties, the RDU binds to the IP address and the port that you specify.


Note

When you manually change properties in the rdu.properties file, remember to restart the RDU. Use the /etc/init.d/bprAgent restart rdu command.



Note

The names of the below properties, earlier prefixed with /cnrQuery in the release 5.0 have been changed to start with /dhcpLeaseQuery from the release 5.1
  • /cnrQuery/retries -> /dhcpLeaseQuery/retries (default:1)

  • /cnrQuery/timeout -> /dhcpLeaseQuery/timeout (default: 500)

  • /cnrQuery/requireAllAnswers -> /dhcpLeaseQuery/requireAllAnswers (default: false)






The requireAllAnswers property (/dhcpLeaseQuery/requireAllAnswers) is available for IPv4 lease query.

Whenever a lease query request is triggered from RDU, it is sent to all the Network Registrar servers in the provisioning group to which the device belongs. As soon as one of the Network Registrar servers responds for the request with the IPAddress of the device, the RDU does not wait for a response from the other Network Registrar servers.

By enabling the requireAllAnswers property, you can configure the RDU to wait for the responses from all the Network Registrar servers. After receiving the responses from multiple servers, the RDU uses the response with the most recent transaction time (client-last-transaction-time).

From Prime Cable Provisioning 6.0, the requireAllAnswers property (/dhcpLeaseQuery/ipv6/requireAllAnswers) is added for IPv6 lease query. By default, the property is in disabled state, which improves the performance of IPv6 lease query since the RDU does not wait for responses from all the Network Registrar servers. By enabling the requireAllAnswers property, the RDU uses the response with the most recent OPTION_CLT_TIME (client-last-transaction-time) from the responses received from all the Network Registrar servers.

Configuring Prime Cable Provisioning as Relay Agent for Lease Query

You can configure Prime Cable Provisioning to act as a relay agent. The relay agent option is:

  • Enabled by default for IPv4

  • Disabled by default for IPv6

For IPv4 Lease Query

For Prime Cable Provisioning to act as a relay agent for an IPv4 lease query, Prime Cable Provisioning provides the GIADDR (the IP address to which the DHCP server should reply) in the Lease Query Request packet. The RDU, by default, uses the primary IP address on the machine for this purpose.


Note

Ensure that all DHCP servers in your deployment can reach this IP address. Also, the IP address that you use in this property must exist on the machine on which you have installed the RDU.


To change the IP address used in the GIADDR field, you must change the value of the /cnrQuery/giaddr property in the rdu.properties file. For example, if you wanted to change the GIADDR to 10.10.10.1, you would add:


/cnrQuery/giaddr=10.10.10.1

When you manually change properties in the rdu.properties file, remember to restart the RDU using the /etc/init.d/bprAgent restart rdu command.

For IPv6 Lease Query

To configure Prime Cable Provisioning to act as a relay agent for an IPv6 lease query, you must include the following properties in the rdu.properties file.

/cnrQuery/ipv6/linkAddress=IPv6 address

/cnrQuery/ipv6/peerAddress=IPv6 address

For example:


/cnrQuery/ipv6/linkAddress=2001:0DB8:0:0:203:baff:fe12:d5ea
/cnrQuery/ipv6/peerAddress=2001:0DB8:0:0:203:baff:fe12:d5ea

Note

The values that you enter for link address and peer address depend on the network configuration in which Prime Cable Provisioning and Network Registrar are operating. In simple cases, you must set the link address and peer address to an IPv6 address of the RDU host. This IPv6 address must be routable to Network Registrar.


Restart the RDU using the /etc/init.d/bprAgent restart rdu command.

Examples

This example features output for an IPv6 lease query request with the relay agent option enabled:


rdu.example.com: 2007 10 18 19:40:30 EDT: %BAC-RDU-7-DEBUG_DHCP_IF_IPV6: PACE-2:ServerBatch[Batch:rdu.example.com/10.10.10.1:1b994de:115b52abeb4:80000278]: Peer[rdu.example.com:33743]: Querying single prov group for DUID [00:03:00:01:23:45:67:89:98:56] via DHCPv6 LEASEQUERY packet [version V6, message-type 12, hop-count 0, link-address 2001:0DB8:0:0:203:baff:fe12:d5ea, peer-address 2001:0DB8:0:0:203:baff:fe12:d5ea, (relay_msg (9) option (52 bytes) version V6, message-type 14, transaction-id 13401290, (client-identifier (1) option (9 bytes) 00:11:22:33:44:55:66:77:88), (lq-query (44) option (31 bytes) query-type 2, link-address 0:0:0:0:0:0:0:0, (client-identifier (1) option (10 bytes) 00:03:00:01:23:45:67:89:98:56)))]

Enabling AIC Echo

Using the AIC Echo option, you can configure Network Registrar to send its reply to the source port of the client from which the request was made, instead of the standard port.

For example, if a client whose IP address is 10.1.1.1 forwards a request using port 1456 and AIC Echo is disabled on the server, then the server returns the reply to the standard client port. Depending on the protocol stack, the standard client port is:

  • 67 for IPv4

  • 546 for IPv6

If AIC Echo is enabled, the reply is forwarded to port 1456.

If you are requesting IPv4 lease queries, AIC Echo is disabled by default. This option is used only if the default IPv4 binding port is changed.

If you are requesting IPv6 lease queries, then AIC ECHO is enabled by default. However, because IPv6 lease query messages are not relayed by default, this option is used to get lease query responses back to port 547 instead of to standard client port 546.

Debugging Lease Query

Using the Info-level logging (6-Information) at the RDU, you can view important details related to lease-query processing. (To set the log level at the RDU, see Using the RDU Log Level Tool.)

For debugging the lease query feature, you can use these properties:

  • dhcpleasequeryv4—Debugs IPv4 lease queries

  • dhcpleasequeryv6—Debugs IPv6 lease queries

IPv6 Lease Query Use Cases

This section describes the following IPv6 lease query use cases:

One lease per client across all (two) Network Registrar servers in a provisioning group

With no failover protocol, typically, only one Network Registrar server in a provisioning group has lease information for a client. In this case, where there are two Network Registrar servers in a provisioning group, the RDU sends lease query requests to both the servers, but receives a response only from one. The IP address provided in that response will be used.

You can view this IP address from the:

  • Administrator user interface, on the Devices > Device Details page.

  • API, using the client-ipaddress attribute in the lease query map.

Multiple leases per client across all (two) Network Registrar servers in a provisioning group

In rare instances, when both Network Registrar servers in a provisioning group have the lease for the same client, both servers respond with a lease query reply. In this case, as per the DHCPv6 Leasequery draft, the response with the most recent OPTION_CLT_TIME (client-last-transaction-time) is used.

Multiple leases per client on a single Network Registrar server

If a client has leases on two different links on the same server, Network Registrar includes all the link addresses in the OPTION_LQ_CLIENT_LINK option while replying. Prime Cable Provisioning then queries Network Registrar for each individual link and gets all the IP addresses. With this list, Prime Cable Provisioning uses the first IP address that is not a loopback or multicast address for device disruption.

From the administrator user interface, you can view the list of IP addresses obtained in this process on the Devices > Device Details page.

Leases for devices with delegated prefix

You can send lease query requests for devices with assigned IP addresses, or a delegated prefix, or both.

From the administrator user interface, you can view the IP addresses and prefixes on the Devices > Device Details page. To get this IP address via the API, use the iaprefix attribute in the lease query map.