The DHCP Lease Query LEG Process
The DHCP Lease Query LEG processes DHCP Lease Query transactions to the DHCP server using the IP address indicated in the pull request from Cisco SCE. The DHCP server replies whether there is an active lease (DHCPLEASEACTIVE message) for this IP address and provides information about the subscriber associated with this IP address according to the list of options requested by the LEG. By default, the LEG requests information about the lease time, server identifier, and the modem’s MAC address, and adds package association-related options, if needed.
The DHCP Lease Query LEG supports up to two redundant DHCP servers. The LEG identifies a server failure by counting the consecutive requests that time out. After a configurable threshold of timed-out requests, the LEG starts to send the requests to the recently activated server, which was previously in standby. The LEG does not return to the failed server until the activated server fails.
When installing the LEG on the SM server, it runs with the privileges assigned to the user pcube on this machine. On UNIX platforms, because only the super-user (root) can open ports under 1024, the LEG cannot open the DHCP ports. To solve this problem, a simple application is supplied with the LEG, which forwards the DHCP packets between the LEG and the DHCP servers. This application is the DHCP Forwarder, which is described in the DHCP Forwarder Application chapter.
When installing the LEG on the SCE device, there is no need to use the DHCP Forwarder application.
NoteThe trigger for the DHCP Lease Query LEG to send a query to the DHCP Server is unknown subscriber traffic followed by the pull request from the SCE. Therefore, if the subscriber’s package is changed at the DHCP Server, the SM receives the new package information only when the subscriber next logs in. The trigger for the DHCP Lease Query LEG to send a query to the DHCP Server is unknown subscriber traffic followed by the pull request from the SCE. Therefore, if the subscriber’s package is changed at the DHCP Server, the SM receives the new package information only when the subscriber next logs in.
DHCP Lease Query Transaction
The DHCP Lease Query transaction is a DHCP transaction where the client (LEG) sends a DHCPLEASEQUERY message to the server, indicating the information it wants to query. In turn, the LEG queries the IP address. The server can reply with several types of messages, for example, a DHCPLEASEACTIVE message means that an active lease was found, and the request information is supplied, and a DHCPLEASEUNASSIGNED message means this IP is currently not assigned to any subscriber.
The following is a detailed description of the attributes extracted from the DHCP Lease Query transaction :
- Subscriber ID—By default, the subscriber ID is the modem MAC address, which you extract from option 82 (Remote ID sub-option of the DHCP Relay Agent Information Option). Therefore, the DHCP server must support and store option 82 for each Customer Premise Equipment (CPE). This default can be overwritten by configuration. Furthermore, the LEG can assign the IP address as a fallback if the option does not exist in the server's response. This fallback is disabled by default.
- Server Identifier—The IP address of the DHCP server is identified from option 54.
- Lease time—The assigned IP is added to the SM or SCE database with a lease time taken from option 51. Note that if option 51 does not appear in the DHCPLEASEACTIVE reply, an infinite lease time is assigned for this IP address.
- Package—Configurable options in the DHCP message determine how to assign the package information. The LEG includes a component that converts the package information data from the DHCP packet to a subscriber package ID. If the packet does not contain package information, it is possible to log in the subscriber with a default package, or log in the subscriber with no package information at all. The package options are assumed to be encoded as strings.
After extracting the preceding information, the LEG logs the subscriber into the SM/SCE.