CLI Commands : service-director

service-director
Configure service-director parameters. Entity = city, continent, country, isp, state, or zip value. See “Configure Service Director” on page 83 for implementation details.
service-director
crossdomain
domain <string>
xml-response <name>
query-url-host {<hostname> | <IP_address>}
activate
cache-response age <seconds>
hash-verify share-secret <string> time-interval deviation <seconds>
match {city | continent | country | isp | state | zip | default}
host-response {<hostname>|<IP_address>} [<hostname>|<IP_address>]...
xml-response {<hostname> | <IP_address>]
xml-response <name> <http-url>
Notes:
crossdomain—Configure the crossdomain.xml file that has to be returned to flash players. There are two configuration options:
domain—Enter up to four domain names to be used to auto generate the crossdomain.xml in the document root directory.
xml-response—Give the name configured under xml-response name (below).
query-url-host—This defines the hostname of the incoming query. For example, if a query issued by a player is http://www.geosvc.example.com/svc/geo/uk-xml-map.xml, the query-url-host is geosvc.example.com. Once the query is matched with the right hostname, the IP address is matched to one (and only one of) country, state, city, zip, or ISP specified by the match "entity" value and a response (either configured host-response or xml-response) is sent. More than one query-url-host can be configured to allow different types of response-to-IP address depending on which Geo-Load Balancing server in the system is being hit. Note! Under query-url-host, mapping is done in the order in which the hosts are added; as soon as Service Director finds a matching entity, it takes it, so you want to enter the most specific entities first. For example if you configure "Country USA" as the first entry followed by "City Santa Clara" then all the IP addresses from USA are mapped *only* to the entry "Country USA" and Service Director never sees any entities entered after.
activate—Make this host active.
cache-response age—Allows the Service Director to set a maximum age in the HTTP response it sends, to allow the browser to cache. The default value is 1 day (86400 seconds). A value of 0 indicates that the response should be made non-cacheable.
hash-verify—Hash verification of incoming URL is optional. If enabled you must configure a share-secret, and, optionally, a time-interval deviation.
shared-secret {append | prefix}—Enter a secret key that is then appended or prefixed (as specified) to the URI, to calculate the hash which is then "matched" with the match query-string-parm hash value.
time-interval deviation—Enter a value in seconds after which requests are not accepted. Used to avoid denial-of-service hijacks repeatedly sending the same request over and over. Default is 10 seconds.
match—Enter location option (isp, zip, city, state, country, continent) or default and a response value.
host-response—Enter up to three domain names or IP addresses to be used to auto generate the crossdomain.xml in the document root directory.
xml-response—Give the name configured under xml-response name (below).
xml-response <name> <http-url>—A configured XML file (format given below) located at an external server; the configured file <name> and <http-url> allow the file to be extracted from a server, this file should be installed in the document root directory.
Example:
service-director xml-response UK-response http://www.example.com/svc/geo/uk-xml-map.xml
service-director query-url-host geosvc.example.com
match isp Comcast response video1.comcast.com video2.comcast.com
match zip 95054 response example1.video.com example2.video.com
match city “Los Angeles” response cdn1.video.com cdn2.video.com
match state CA response 12.1.10.183 12.1.10.184 12.2.18.23
match country USA response cdn2.video.com
match country GBR response UK-response
match continent Asia response cdn.singapore.com
match default response cdn3.video.com
Response XML format example:
<?xml version="1.0" encoding="UTF-8" ?>
<geoiplookup name="GeoIP Service" service="Host Lookup">
<version>1.0.1</version>
<host_1>media10.break.com</host_1>
<host_2>media10.break.com</host_2>
<host_3>media10.break.com</host_3>
<country_code>USA</country_code>
<region_code>California</region_code>
<city_code>Los Angeles</city_code>
<client_ip>204.102.252.1</client_ip>
<query_ip>98.22.15.52</query_ip>
<curr_time>1234567890</curr_time>
<error_code>0</error_code>
</geoiplookup>
show service-director <service_name>
Display status of the specified service.

Report an Error
Media Flow Manager Administrator's Guide and CLI Command Reference
Copyright © Juniper Networks, Inc.