Subscriber classification scripts support DHCP options conveyed through COPS. When COPS reports an address, the JUNOSe router sends DHCP options received for DHCP requests for that address. The DHCP options are available in the subscriber classification context for selecting the subscriber profile to load.
The fields in Table 6 are in the classification context of subscriber classification scripts.
Table 6: DHCP Options in UserClassificationContext Field
The DHCP options are accessible to the subscriber classification script with the following syntax:
- dhcp.giAddr = “ match”
- # interpret option 61 as string
- dhcp[61].string = “ match”
- # interpret option 1 (subnet) as dotted decimal IP
- dhcp[1].ipAddress = “ match”
- # option 82, suboption 1, interpreted as string
- dhcp[82].subOptions[1].string = “ match”
The received DHCP options are also stored in the UserSession and are available through the portal API (method User.getDhcpOptions).