A Python script can be configured in sub-ident-policy to return following ESM attributes:
sub-id
sla-profile name
sub-profile name
ancp-string
The system runs the Python script configured in the sub-ident-policy against the received DHCPv4 ACK message. This is used as the input of the script. Within the script, the user can set the value with the above ESM attributes.
The alc package contains a DHCP object, and has the following members (Table: DHCP object members ).
Name | Read | Write | Class |
---|---|---|---|
htype |
✓ | integer |
|
hlen |
✓ | integer |
|
hops |
✓ | integer |
|
flags |
✓ | integer |
|
ciaddr |
✓ | integer |
|
yiaddr |
✓ | integer |
|
siaddr |
✓ | integer |
|
giaddr |
✓ | integer |
|
chaddr |
✓ | string |
|
sname |
✓ | string |
|
file |
✓ | string |
|
options |
✓ | TLV |
|
sub_ident |
✓ | string |
|
sub_profile_string |
✓ | string |
|
sla_profile_string |
✓ | string |
|
ancp_string |
✓ | string |
|
app_profile_string |
✓ | string |
|
category_map_name |
✓ | string |
|
int_dest_id |
✓ | string |
The TLV type provides easy access to the value part of a stream of type-length-value variables, as is the case for the DHCP option field. In the example on Configuration, the circuit-ID is accessed as alc.dhcp.options[82][1].
Some DHCP servers do not echo the relay agent option (option 82) when the DHCP message was snooped instead of relayed. For the convenience of the operator, the relay agent option from the request message is returned when alc.dhcp.options[82] is called.