ltm rule command whereisΒΆ

iRule(1)		      BIG-IP TMSH Manual		      iRule(1)



whereis
       Returns geographical information on an IP address.

SYNOPSIS
       whereis (ldns | IP_ADDR)
		   ((continent country state abbrev city zip
		    area_code latitude longitude isp org
		    country_cf state_cf city_cf proxy_type)#)?

DESCRIPTION
       Returns the geographic location of a specific IP address.  For more
       information on using whereis in LTM, you can check Jason Rahm's article

       Legal usage notes

	  The data is purchased by F5 for use on BIG-IP systems and products for
	  traffic management. The key to understanding EULA compliance is to
	  figure out where the geolocation decision is being made. It is a direct
	  violation of the EULA to use F5aXXs data to embed geolocation information
	  or codes representing geolocation information into the requests such
	  that another application or server could make the decision on what to
	  do with that data. Customers wishing to use geolocation data on their
	  webservers or in their applications to make decisions in those products
	  should reach out to their account team. F5aXXs traffic management
	  products have a lot of power and flexibility and can make lots of
	  decisions about traffic using the geolocation data on the BIG-IP. For
	  example, a geolocation lookup can be used to route traffic requests to
	  a different site, different server, different URL, or even substitute a
	  different image, object, etc in the stream. The key is that the BIG-IP
	  is making use of the data to make a decision to take some action. These
	  are all allowed and in fact, intended usage of the geolocation data.
	  Passing the data looked up to another system or displaying it back
	  publicly is a violation of the basic data EULA. To summarize, all usage
	  of the data must remain local to the system with the following two
	  exceptions:
	    * Location can be placed in an encrypted cookie for reference ONLY by
	      other BIG-IP devices
	    * Logging data can contain location info and collected into a central
	      logging solution for analysis of F5 logs.

	  Note that you can get a waiver of the EULA from F5. In the near future,
	  F5 expects to have expanded data sets available with less restrictions
	  on the use cases. If youaXXre unsure, run your use case by your sales
	  engineer.

       Syntax

	  As of 10.1.0, the maximum length of the returned list is 8 fields. If
	  more than 8 fields are needed, call whereis a second time with the
	  remaining parameters.

	  Note: In GTM, prior to version 10, even when the country and continent
	  keywords are specified the list of {Continent Country} is still
	  returned. In earlier versions just use whereis and lindex to extract
	  the appropriate field for your use case. An example is provided below.

	  Note: In GTM, as of version 11.0, the ldns option can be used instead
	  of an IP address.

	  Note: Prior to version 10.1, only "country" and "continent" parameters
	  are valid.

       whereis  [country | continent | state | abbrev | city | zip |
       area_code |
	  latitude | longitude | isp | org | country_cf | state_cf | city_cf |
       proxy_type]+

       whereis 

	    * In GTM, returns a Tcl list containing continent followed by country
	      code. In LTM, returns a Tcl list containing continent, country
	      code, region name (if available), and city (if available).
	      GTM: {Asia JP}
	      LTM: {NA US Washington {}}

       whereis  country

	    * Returns a string containing the two-letter country code (JP)
	    * Country codes are defined in ISO-3166:
	    * Country Decoding Table

       whereis  continent

	    * Returns a string containing the continent (Asia)

       whereis  state

	    * Returns a string containing the state (Washington)

       whereis  abbrev

	    * Returns a string containing the state abbreviation (WA)

       whereis  city

	    * Returns a string containing the city

       whereis  zip

	    * Returns a string containing the zip code

       whereis  area_code

	    * Returns a string containing the area code

       whereis  latitude

	    * Returns a string (not a floating point) containing the latitude. To
	      convert to degrees, divide the string by 10000. (the decimal is
	      significant)

       whereis  longitude

	    * Returns a string (not a floating point) containing the longitude.
	      To convert to degrees, divide the string by 10000. (the decimal is
	      significant)

       whereis  isp

	    * Returns a string containing the ISP

       whereis  org

	    * Returns a string containing the organization

       whereis  country_cf

       whereis  state_cf

       whereis  city_cf

       whereis  proxy_type

	    * Returns a string containing the proxy type, or "unknown" if no
	      information is available.

       whereis  continent country state

	    * Returns a list containing the continent, country and state in that
	      order.

       whereis  continent ISP state latitude

	    * Returns a string continent, ISP, state and latitude, in that order.

	  Note: Any combination or order of place parameters is valid, however
	  only 8 values will be returned at once. Note: Some or all of these data
	  may not be available for a given IP address. Unless otherwise
	  specified, in such an event an empty string is returned for a string
	  value, or a zero is returned for a numeric value. Note: Some of these
	  data are not available unless a geographic IP database has been loaded
	  onto your system. Please contact F5 Networks to obtain this database.

RETURN VALUE
VALID DURING
       GLOBAL_GTM

EXAMPLES
HINTS
SEE ALSO
CHANGE LOG
       @BIGIP-10.1.0 --First introduced the command.



BIG-IP				  2017-01-31			      iRule(1)