iaine
Oct 31, 2012Nacreous
Extract DHCP address from Network Policy in APM
Hi All
I'm trying to write an irule to extract the DHCP address that APM dishes out to users as part of a Network Policy. Looking at a session dump I can see that the variable that I am after is called
session.assigned.na./Common/webvpn_network_resources.clientip
however I am currently unable to reference this in an iRule. The code that I have been using is
when ACCESS_POLICY_COMPLETED {
set dhcp_address [ACCESS::session data get "session.assigned.na./Common/webvpn_network_resources.clientip"]
set user_name [ACCESS::session data get "session.logon.last.username"]
log local0. "User $user_name has been given this DHCP address: $dhcp_address"
}
However, this doesn't return a value.
I have also tried creating a custom variable
when ACCESS_SESSION_STARTED {
ACCESS::session data set session.custom.dhcpaddress "0.0.0.0"
log local0. "[ACCESS::session data get session.custom.dhcpaddress]"
}
and then as part of the Access Policy get this variable changed but have also been unable to get a value for the DHCP address.
Has anyone been able to do this....?
Thanks, Iain