Forum Discussion
Jon_Strabala_46
Nimbostratus
Jul 17, 2012How accurate is IP::hops and how is it calculated
Hi, 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...
nitass
Employee
Jul 18, 2012this is what i found.
1. IP::ttl
This gives us the ip_ttl on an inbound IPv4 or IPv6 packet from the peer.
2. IP::hops
What this does is find the nearest next-highest power of 2 in the range [64, 128, 255], and subtracts IP::ttl from it. This has the effect of enabling us to passively estimate the number of hops between us and the peer. In all cases, we use option base 0, meaning that a hop of 0 means that the client is on the local network.
so, i understand it is calculated by using TTL in packet.
[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
DevCentral Quicklinks
* 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
Discover DevCentral Connects
