Forum Discussion
How accurate is IP::hops and how is it calculated
How accurate is IP::hops I might base a production iRULE that is revenue generating on this information and need to know if it is 100%, 95%, 90% (or other) accurate etc.
Would it be accurate and valid always on the very first HTTP_REQUEST for a given connection, or would I be better off waiting for the 10th HTTP_REQUEST before relying on it. In other words does it imporve with time.
I assume it is a per connection (IP:port to IP:port statistic) right ?
Alternatively if I knew how IP::hops is calculated I could get a good feeling for whether I should use it.
For example I know "traceroute" uses a "novel" of sending packets with different TTL to determine the HOP distance (see below):
Traceroute sets the TTL field in the first three packets to a value of 1
so that they are discarded by the first router on the path. When the ICMP
TIME_EXCEEDED messages are returned by that router, traceroute records
the source IP address of these ICMP messages. This is the IP address of
the first hop on the route to the destination. Next, three packets are sent with
their TTL field set to 2. repeat ... repeat until packets reach their destination.
Does a call to [IP::hops] trigger such an algorithm (traceroute above) each time?
Does every new connection get a calculated [IP:hops] or is it based on IP (this would be bad for a DHCP or NAT system when IPs get reused or recycled)?
Thanks in Advance
Jon Strabala
- Brian_Van_Stone
Nimbostratus
I can't say anything about how it is implemented, but in a simple test I just ran traceroute reported 7 actual hops while [IP::hops] reported only 6. The documentation does mention that it is an estimate, but who knows how it is performed. - nitass
Employee
this is what i found.[root@ve10:Active] config b rule myrule list rule myrule { when CLIENT_DATA { log local0. "client [IP::remote_addr]:[UDP::remote_port] | ttl [IP::ttl] | hops [IP::hops]" } } /var/log/ltm Jul 19 04:33:13 local/tmm info tmm[5111]: Rule myrule : client 172.28.19.251:55555 | ttl 100 | hops 28 Jul 19 04:33:14 local/tmm info tmm[5111]: Rule myrule : client 172.28.19.251:55555 | ttl 100 | hops 28 Jul 19 04:33:15 local/tmm info tmm[5111]: Rule myrule : client 172.28.19.251:55555 | ttl 100 | hops 28 Jul 19 04:33:16 local/tmm info tmm[5111]: Rule myrule : client 172.28.19.251:55555 | ttl 100 | hops 28 Jul 19 04:33:21 local/tmm info tmm[5111]: Rule myrule : client 172.28.19.251:55555 | ttl 101 | hops 27 Jul 19 04:33:22 local/tmm info tmm[5111]: Rule myrule : client 172.28.19.251:55555 | ttl 101 | hops 27 Jul 19 04:33:23 local/tmm info tmm[5111]: Rule myrule : client 172.28.19.251:55555 | ttl 101 | hops 27 Jul 19 04:33:26 local/tmm info tmm[5111]: Rule myrule : client 172.28.19.251:55555 | ttl 102 | hops 26 Jul 19 04:33:27 local/tmm info tmm[5111]: Rule myrule : client 172.28.19.251:55555 | ttl 102 | hops 26 Jul 19 04:33:28 local/tmm info tmm[5111]: Rule myrule : client 172.28.19.251:55555 | ttl 102 | hops 26
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com