IP2Location™ LITE IP-ASN Database

Pengenalan

ASN Database

Pangkalan data ini memberikan rujukan untuk menentukan sistem dan nombor autonomi (ASN). Sistem autonomi (AS) adalah kumpulan awalan penghalaan Protokol Internet (IP) yang tersambung di bawah kawalan satu atau lebih pengendali rangkaian sebagai satu entiti pentadbiran dalam dasar perutean.

Ia percuma untuk penggunaan peribadi atau komersial dengan atribusi yang diperlukan dengan menyebut penggunaan data ini sebagai berikut,

Let's explore this database which provides a valuable resource of geolocation data for free now!

Sign Up For Free

Ciri-Ciri

Menterjemahkan alamat IP ke sistem autonomi (AS) dan nombor sistem autonomi (ASN).

Versi terkini November 2024
IPv4 Saiz Pangkalan Data 44.33 MB (603,954 Baris)
IPv6 Saiz Pangkalan Data 55.09 MB (474,161 Baris)
Array Fail Teks ASCII (CSV)

Medan Pangkalan Data

Nama Jenis Penerangan
ip_from INT (10) / DECIMAL (39,0)†† Alamat IP pertama menunjukkan sekatan bersih.
ip_to INT (10) / DECIMAL (39,0)†† Alamat IP terakhir menunjukkan sekatan bersih.
cidr VARCHAR(43) Julat alamat IP dalam CIDR.
asn INT(10) Nombor sistem autonomi (ASN).
as VARCHAR(256) Nama sistem autonomi (AS).

IPv4
†† IPv6

Penyediaan Pangkalan Data

Berikut adalah langkah-langkah untuk menyediakan pangkalan data untuk data IPv4 dan IPv6.

Buat Pangkalan Data
CREATE DATABASE ip2location;
USE ip2location;
CREATE TABLE `ip2location_asn`(
	`ip_from` INT(10) UNSIGNED,
	`ip_to` INT(10) UNSIGNED,
	`cidr` VARCHAR(43),
	`asn` VARCHAR(10),
	`as` VARCHAR(256),
	PRIMARY KEY (`ip_to`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Import Pangkalan Data
LOAD DATA LOCAL
	INFILE 'IP2LOCATION-LITE-ASN.CSV'
INTO TABLE
	`ip2location_asn`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 0 LINES;
Buat Pangkalan Data
CREATE DATABASE ip2location
GO

USE ip2location
GO

CREATE TABLE [ip2location].[dbo].[ip2location_asn](
	[ip_from] bigint NOT NULL,
	[ip_to] bigint NOT NULL,
	[cidr] nvarchar(43) NOT NULL,
	[asn] nvarchar(10) NOT NULL,
	[as] nvarchar(256) NOT NULL
) ON [PRIMARY]
GO

CREATE CLUSTERED INDEX [ip_to] ON [ip2location].[dbo].[ip2location_asn]([ip_to]) ON [PRIMARY]
GO
Import Pangkalan Data
BULK INSERT [ip2location].[dbo].[ip2location_asn]
FROM '{PATH TO IP2LOCATION-LITE-ASN.CSV}'
WITH
(
	FORMATFILE = '{PATH TO ASN.FMT}'
)
GO

CATATAN: Anda perlu menyalin kod FMT di bawah dan menyimpannya sebagai fail bernamaASN.FMT di komputer anda.

12.0
6
1 SQLCHAR 0 1 "\"" 0 first_double_quote  Latin1_General_CI_AI
2 SQLCHAR 0 20 "\",\"" 1 ip_from "",
3 SQLCHAR 0 20 "\",\"" 2 ip_to "",
4 SQLCHAR 0 43 "\",\"" 3 cidr Latin1_General_CI_AI,
5 SQLCHAR 0 10 "\",\"" 4 asn Latin1_General_CI_AI,
6 SQLCHAR 0 256 "\",\"" 5 as Latin1_General_CI_AI
Buat Pangkalan Data
CREATE DATABASE ip2location WITH ENCODING 'UTF8';
\c ip2location
CREATE TABLE ip2location_asn(
	ip_from bigint NOT NULL,
	ip_to bigint NOT NULL,
	cidr character varying(43) NOT NULL,
	asn character varying(10) NOT NULL,
	as character varying(256) NOT NULL,
	CONSTRAINT ip2location_db1_pkey PRIMARY KEY (ip_from, ip_to)
);
Import Pangkalan Data
COPY ip2location_asn FROM 'IP2LOCATION-LITE-ASN.CSV' WITH CSV QUOTE AS '"';
Buat Pangkalan Data
CREATE DATABASE ip2location;
USE ip2location;
CREATE TABLE `ip2location_asn_ipv6`(
	`ip_from` DECIMAL(39,0) UNSIGNED,
	`ip_to` DECIMAL(39,0) UNSIGNED,
	`cidr` VARCHAR(43),
	`asn` VARCHAR(10),
	`as` VARCHAR(256),
	PRIMARY KEY (`ip_to`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Import Pangkalan Data
LOAD DATA LOCAL
	INFILE 'IP2LOCATION-LITE-ASN.IPV6.CSV'
INTO TABLE
	`ip2location_asn_ipv6`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 0 LINES;
Buat Pangkalan Data
CREATE DATABASE ip2location
GO

USE ip2location
GO

CREATE TABLE [ip2location].[dbo].[ip2location_asn_ipv6](
	[ip_from] char(39) NOT NULL,
	[ip_to] char(39) NOT NULL,
	[cidr] nvarchar(43) NOT NULL,
	[asn] nvarchar(10) NOT NULL,
	[as] nvarchar(256) NOT NULL
) ON [PRIMARY]
GO

CREATE CLUSTERED INDEX [ip_to] ON [ip2location].[dbo].[ip2location_asn_ipv6]([ip_to]) ON [PRIMARY]
GO
Import Pangkalan Data
BULK INSERT [ip2location].[dbo].[ip2location_asn_ipv6]
FROM '{PATH TO IP2LOCATION-LITE-ASN.IPV6.CSV}'
WITH
(
	FORMATFILE = '{PATH TO ASN.FMT}'
)
GO

CATATAN: Anda perlu menyalin kod FMT di bawah dan menyimpannya sebagai fail bernamaASN.FMT di komputer anda. Baris pertama kod FMT menunjukkan versi bcp. Tolong ubah versi sesuai dengan MS-SQL yang anda pasang.

12.0
6
1 SQLCHAR 0 1 "\"" 0 first_double_quote  Latin1_General_CI_AI
2 SQLCHAR 0 39 "\",\"" 1 ip_from "",
3 SQLCHAR 0 39 "\",\"" 2 ip_to "",
4 SQLCHAR 0 43 "\",\"" 3 cidr Latin1_General_CI_AI,
5 SQLCHAR 0 10 "\",\"" 4 asn Latin1_General_CI_AI,
6 SQLCHAR 0 256 "\",\"" 5 as Latin1_General_CI_AI
Buat Pangkalan Data
CREATE DATABASE ip2location WITH ENCODING 'UTF8';
\c ip2location
CREATE TABLE ip2location_asn_ipv6(
	ip_from decimal(39,0) NOT NULL,
	ip_to decimal(39,0) NOT NULL,
	cidr character varying(43) NOT NULL,
	asn character varying(10) NOT NULL,
	as character varying(256) NOT NULL,
	CONSTRAINT ip2location_db1_pkey PRIMARY KEY (ip_from, ip_to)
);
Import Pangkalan Data
COPY ip2location_asn_ipv6 FROM 'IP2LOCATION-LITE-ASN.IPV6.CSV' WITH CSV QUOTE AS '"';

Lesen

Sila tinjau Syarat dan Ketentuan Umum untuk pelesenan pangkalan data.

Pangkalan Data Geolokasi Alamat IP IPLocation

Dalam Edisi Komersial, anda akan mendapat lebih daripada sekadar carian alamat IP:

  • Ketepatan data yang lebih baik
  • Akses ke pangkalan data terkini
  • Tahap sokongan tambahan melalui e-mel
Product Upgrade
Sign Up Pop Out

Geolocate Your Visitors Location

Enhance your applications with essential geolocation data by using our FREE databases.