mirror of
https://github.com/ipverse/asn-ip.git
synced 2026-05-03 20:43:56 +05:30
2.3 KiB
2.3 KiB
Migration guide
This repository will be renamed from asn-ip to as-ip-blocks.
Migration steps
- If only consuming plaintext files: just update the download URL, no code changes needed
- Update repository URLs in your code from
ipverse/asn-iptoipverse/as-ip-blocks - If parsing JSON: handle the
metadatanested object andsubnets→prefixesrename
What's changing
Repository name
- Old:
ipverse/asn-ip - New:
ipverse/as-ip-blocks
File structure
The file structure remains the same:
as/1/aggregated.json
as/1/ipv4-aggregated.txt
as/1/ipv6-aggregated.txt
JSON format
Old:
{
"asn": 1,
"handle": "LVLT-1",
"description": "Level 3 Parent LLC",
"subnets": {
"ipv4": [
"177.75.88.0/24",
"177.75.90.0/24"
],
"ipv6": []
}
}
New:
{
"asn": 1,
"metadata": {
"handle": "LVLT-1",
"description": "Level 3 Parent LLC",
"countryCode": "US",
"country": "United States",
"origin": "authoritative"
},
"prefixes": {
"ipv4": [
"177.75.88.0/24",
"177.75.90.0/24"
],
"ipv6": []
}
}
Changes:
subnetsrenamed toprefixeshandle,descriptionnow nested undermetadataobject- Added
countryCodefield in metadata (ISO 3166-1 alpha-2 code ornull) - Added
countryfield in metadata (country name in English ornull) - Added
originfield in metadata (values:authoritative,inferred,overlaid,none)
Plaintext format
The plaintext format remains the same with separate IPv4 and IPv6 files:
ipv4-aggregated.txt:
# AS1 (LVLT-1)
# Level 3 Parent LLC
#
177.75.88.0/24
177.75.90.0/24
ipv6-aggregated.txt:
# AS1 (LVLT-1)
# Level 3 Parent LLC
#
2a01:1234::/32
URL changes
Old:
https://raw.githubusercontent.com/ipverse/asn-ip/master/as/1/aggregated.json
https://raw.githubusercontent.com/ipverse/asn-ip/master/as/1/ipv4-aggregated.txt
https://raw.githubusercontent.com/ipverse/asn-ip/master/as/1/ipv6-aggregated.txt
New:
https://raw.githubusercontent.com/ipverse/as-ip-blocks/master/as/1/aggregated.json
https://raw.githubusercontent.com/ipverse/as-ip-blocks/master/as/1/ipv4-aggregated.txt
https://raw.githubusercontent.com/ipverse/as-ip-blocks/master/as/1/ipv6-aggregated.txt