rir-ip/README.md

56 lines
1.8 KiB
Markdown
Raw Normal View History

2021-12-08 13:49:54 +01:00
# ipverse-rir-ip
2021-12-11 14:02:47 +01:00
Drop-in replacement for the IP subnet lists previously available at [ipverse.net](http://ipverse.net)
based on Internet number resource usage data published by the Regional Internet Registries (RIR). The data
is organized by country code (ISO 3166).
2021-12-08 13:49:54 +01:00
2021-12-13 19:29:58 +01:00
This repository is updated daily (if the underlying data changes).
2021-12-08 13:49:54 +01:00
## How to use
2021-12-08 16:38:26 +01:00
To download the delegated IPv4 subnets for Switzerland, try:
2021-12-08 13:49:54 +01:00
```$ curl https://raw.githubusercontent.com/ipverse/rir-ip/master/country/ch/ipv4-aggregated.txt```
2021-12-08 16:38:26 +01:00
To download the delegated IPv6 subnets for Switzerland, try:
2021-12-08 14:38:18 +01:00
```$ curl https://raw.githubusercontent.com/ipverse/rir-ip/master/country/ch/ipv6-aggregated.txt```
2021-12-08 19:59:37 +01:00
The data (IPv4 + IPv6 combined) is available in JSON format as well:
2021-12-11 14:54:03 +01:00
```$ curl https://raw.githubusercontent.com/ipverse/rir-ip/master/country/ch/aggregated.json```
2021-12-08 16:36:43 +01:00
2021-12-08 16:38:26 +01:00
The resulting JSON will look similar to this:
2021-12-08 16:37:26 +01:00
```
{
2021-12-11 14:54:03 +01:00
"country": "Switzerland",
"country-code": "CH",
2021-12-08 16:51:05 +01:00
"delegation-status": [
2021-12-08 16:36:43 +01:00
"allocated",
"assigned"
],
"mode": "aggregated",
"subnets": {
"ipv4": [
"43.254.56.0/22",
"45.115.72.0/22",
"59.153.132.0/22",
],
"ipv6": [
"2001:df0:840::/48",
"2001:df7:f980::/48",
"2401:4b80::/32",
]
}
2021-12-08 16:37:26 +01:00
}
```
2021-12-11 14:49:16 +01:00
## Migrating from ipverse.net?
2021-12-11 14:56:27 +01:00
While all download-URLs pointing to [ipverse.net](http://ipverse.net) are being redirected to the corresponding file in this Github repository, you may choose to directly dowload the data from the new location. Here's how to change the download-URL:
2021-12-11 14:49:16 +01:00
Old URL:
2021-12-11 14:50:34 +01:00
```http://ipverse.net/ipblocks/data/countries/ch.zone```
```http://ipverse.net/ipblocks/data/countries/ch-ipv6.zone```
2021-12-11 14:49:16 +01:00
New URL:
2021-12-11 14:50:34 +01:00
```https://raw.githubusercontent.com/ipverse/rir-ip/master/country/ch/ipv4-aggregated.txt```
```https://raw.githubusercontent.com/ipverse/rir-ip/master/country/ch/ipv6-aggregated.txt```