Secondary Keys Control

[SSG 8.3+]
In Stingray SG, the main keys in DHCP are ClientId (opt61) or, if not specified, the client's MAC address.
But besides them there are other keys that uniquely identify the client, for example, Opt82 or Q-in-Q. These keys are often used as subscriber identifiers in billing.

Let us consider thу following scenario: there is a Q-in-Q network, the subscriber is uniquely identified in billing by Q-in-Q. The subscriber was issued an IP address 10.20.30.40 via DHCP, an account session A was created.

Then the subscriber changes his MAC-address (for example, he changes his home Wi-Fi router to a new one). The new router sends a DHCP request to lease an IP address, the billing system issues it the same address 10.20.30.40, since the Q-in-Q tags (subscriber identifier in billing) have not changed. SSG creates a new accounting session B.

As a result, the subscriber has two accounting sessions for some time, A and B. This may be unacceptable for some billing systems (for example, for LanBilling), which allow only one accounting session for a subscriber. Moreover, billing may not issue an IP-address to the subscriber until the existing session A has ended. So, the new CPE will not receive an IP-address while there is an active session A.

To handle such situations, the option of secondary keys control bras_dhcp_check_secondary_keys has been added to Stingray SG DHCP Proxy. It is disabled by default (= 0). If you enable it (bras_dhcp_check_secondary_keys = 1), SSG will control the subscriber's secondary keys - opt82, Q-in-Q: if an active accounting session is detected by the secondary key, it will be closed by sending an accounting stop before SSG sends a request to issue an IP address to Radius.