NetScaler data formats for Location Database Import

NetScaler data formats for Location Database Import

book

Article ID: CTX235799

calendar_today

Updated On:

Description

netscaler (default netscaler format)
  Dot_IPv4_From,
  Dot_IPv4_To,
  String_q_name[0]_Continent,
  String_q_name[1]_Country(short name (iso3166)),
  String_q_name[2]_Region,
  String_q_name[3]_City,
  String_q_name[4]_ISP,
  String_q_name[5]_Organization,
  Float_Longitude(degrees),
  Float_Latitude(degrees)

ip-country (IP-Country format (ip2location.com))
  Num_IPv4_From,
  Num_IPv4_To,
  String_q_name[1]_Country(short name (iso3166)),
  FieldSkip(Long Country Name)

ip-country-isp (IP-Country-ISP format (ip2location.com))
  Num_IPv4_From,
  Num_IPv4_To,
  String_q_name[1]_Country(short name (iso3166)),
  FieldSkip(Long Country Name),
  String_q_name[4]_ISP

ip-country-region-city (IP-Country-Region-City (ip2location.com))
  Num_IPv4_From,
  Num_IPv4_To,
  String_q_name[1]_Country(short name (iso3166)),
  FieldSkip(Long Country Name),
  String_q_name[2]_Region,
  String_q_name[3]_City
  

ip-country-region-city-isp (IP-Country-Region-City-ISP (ip2location.com))
  Num_IPv4_From,
  Num_IPv4_To,
  String_q_name[1]_Country(short name (iso3166)),
  FieldSkip(Long Country Name),
  String_q_name[2]_Region,
  String_q_name[3]_City,
  String_q_name[4]_ISP

geoip-country (GeoIP country (maxmind.com))
  Dot_IPv4_From,
  Dot_IPv4_To,
  FieldSkip_Num_IPv4_From,
  FieldSkip_Num_IPv4_To,
  String_q_name[1]_Country(short name (iso3166)),
  FieldSkip(Long Country Name)

geoip-region (GeoIP region (maxmind.com))
  Dot_IPv4_From,
  Dot_IPv4_To,
  FieldSkip_Num_IPv4_From,
  FieldSkip_Num_IPv4_To,
  String_q_name[1]_Country(short name (iso3166)),
  String_q_name[2]_Region

geoip-city (GeoIP city (maxmind.com))
  // This is not actual format from maxmind - it is combined format.
  // Maxmind provides two files Blocks and locations, which are connected using Location ID field in both files
  Num_IPv4_From,
  Num_IPv4_To,
  FieldSkip (Location ID),
  String_q_name[1]_Country(short name (iso3166)),
  String_q_name[2]_Region,
  String_q_name[3]_City,
  FieldSkip (Postal Code),
  Float_Longitude(degrees),
  Float_Latitude(degrees),
  FieldSkip (Metro Code),
  FieldSkip (Area Code)


geoip-country-org (GeoIP Country Organization (maxmind.com))
  Dot_IPv4_From,
  Dot_IPv4_To,
  String_q_name[1]_Country(short name (iso3166)),
  String_q_name[5]_Organization

geoip-country-isp (GeoIP Country ISP (maxmind.com))
  Dot_IPv4_From,
  Dot_IPv4_To,
  String_q_name[1]_Country(short name (iso3166)),
  String_q_name[4]_ISP

geoip-city-isp-org (GeoIP City ISP Organization (maxmind.com))
  // This is combined format provided by maxmind in two files: ip blocks+isp, organization and geoip-city data connected via ID field
  Num_IPv4_From,
  Num_IPv4_To,
  FieldSkip (Location ID),
  String_q_name[1]_Country(short name (iso3166)),
  String_q_name[2]_Region,
  String_q_name[3]_City,
  FieldSkip (Postal Code),
  Float_Longitude(degrees),
  Float_Latitude(degrees),
  String_q_name[4]_ISP,
  String_q_name[5]_Organization


netscaler6 (NetScaler format IPv6)
  Colon_IPv6_From,
  Colon_IPv6_To,
  String_q_name[0]_Continent,
  String_q_name[1]_Country(short name (iso3166)),
  String_q_name[2]_Region,
  String_q_name[3]_City,
  String_q_name[4]_ISP,
  String_q_name[5]_Organization,
  Float_Longitude(degrees),
  Float_Latitude(degrees)

geoip-country6 (GeoIP Country IPv6 (maxmind.com))
  Colon_IPv6_From,
  Colon_IPv6_To,
  FieldSkip_Num_IPv6_From,
  FieldSkip_Num_IPv6_To,
  String_q_name[1]_Country(short name (iso3166))


Notes
  Dot_IPv4: IPv4 in dotted decimal format
  Num_IPv4: Ipv4 in decimal number format
  FieldSkip: Field not used by the NetScaler, skipped
  String: Text string, 32 characters, including null terminating.
  q_name[n]: Represents the NetScaler qualifier where string will be inserted.
  
 

Issue/Introduction

The NetScaler supports the import of location database CSV files. Here are the supported file formats up to NetScaler version 12.0

Additional Information

root@NS1# nsmap
nsmap [[-h] [-d] [-dbfile <filename> || -dbfile6 <filename>] [-f <format name>] [-o <file name>]] | [-l] file
   -h prints this message
   -f specifies format of the input file
      netscaler (default)        - netscaler format
      ip-country                 - IP-Country format (ip2location.com)
      ip-country-isp             - IP-Country-ISP format (ip2location.com)
      ip-country-region-city     - IP-Country-Region-City (ip2location.com)
      ip-country-region-city-isp - IP-Country-Region-City-ISP (ip2location.com)
      geoip-country              - GeoIP country (maxmind.com)
      geoip-region               - GeoIP region (maxmind.com)
      geoip-city                 - GeoIP city (maxmind.com)
      geoip-country-org          - GeoIP Country Organization (maxmind.com)
      geoip-country-isp          - GeoIP Country ISP (maxmind.com)
      geoip-city-isp-org         - GeoIP City ISP Organization (maxmind.com)
      geoip-country6             - GeoIP Country IPv6 (maxmind.com)
      netscaler6                 - netscaler format with IPv6 addresses
   -o specifies output netscaler format file
   -l runs as daemon and communicates with the NetScaler kernel or PPE
   -d creates user space database, may be overwritten by kernel
   -dbfile name of the user space database file
   -dbfile6 name of the user space database file for ipv6 addresses
   -logfile logs data into the /var/tmp/nsmap.log instead of syslog
Test the database:
nsmap [-d] [-op] -t [ip address]   -t test the database if ip address is given - non interactive test
   -op prints database test results in old format