Giter Club home page Giter Club logo

china-operator-ip's Introduction

**运营商IP地址库

FOSSA Status

依据**网络运营商分类的IP地址库

为什么创造这个项目

在国内,BGP/ASN数据分析的商业服务只有一个ipip.net,是目前运营商IP库准确度最高的服务商,我认为没有之一。

随着互联网规模的增加,为了处理大批量的路由数据,边界网关协议(即BGP,下同)应运而生,是互联网的基础协议之一。为了保证了全球网络路由的可达性,但凡需要在互联网中注册一个IP(段),都需要借助BGP协议对外广播,这样互联网中的其他自治域才能学习到这段地址的路由信息,其它主机才能成功访问这个IP(段)。因此可以说,BGP数据是最适合分析运营商IP地址的数据来源之一。

但是,目前国内绝大多数IP库都由WHOIS数据库作为基础数据来源。WHOIS数据仅表示某个IP被哪个机构注册,但无从知晓该IP被用在何处,这就导致许多非运营商自己注册的IP地址无法被正确分类。ipip.net是最早开始做BGP/ASN数据分析的公司之一,数据准确性甩其它库几条街。但很可惜是,ipip.net作为商业公司,绝大多数高质量的IP数据都是收费的,且价格不菲。

由于在做其他课题时需要处理BGP数据,本着开源精神,我将这部分代码重新封装,创造了这个项目。至于如何使用,大家可以自己发挥想象力。如:@ustclug将其用在权威DNS服务器上做分域解析;我则借助这个IP库做了一个多出口的网关,访问不同的运营商时走不同的线路(如果都不匹配则走国外vps,原因你懂的)。

但由于个人精力有限,IP库的覆盖率并不及ipip.net,尤其是一些骨干网节点的地址,这些地址往往是核心路由设备或企业托管给运营商的地址,对普通用户影响不大。

如果大家有任何建议或疑问,欢迎提交issue。

收录的运营商

  • **电信(chinanet)
  • **移动(cmcc)
  • **联通(unicom)
  • **铁通(tietong)
  • 教育网(cernet)
  • 科技网(cstnet)
  • 鹏博士(drpeng) <试验阶段>

P.S. 鹏博士集团(包括:鹏博士数据、北京电信通、长城宽带、宽带通)的IP地址并非全都由独立的自治域做广播,目前大部分地址仍由电信、联通、科技网代为广播。故列表中的地址仅为鹏博士拥有的部分IP地址,且这些IP同时具有电信、联通两个上级出口。详见issue #2.

如何获取数据

使用预生成结果

IP列表(CIDR格式)保存在仓库的ip-lists分支中,Travis CI每日自动更新。

git clone -b ip-lists https://github.com/gaoyifan/china-operator-ip.git

P.S. stat文件记录了各运营商的IP数量的统计信息。

从BGP数据生成

安装依赖

  • bgptools (cargo install bgptools )
  • docker (curl -sSL https://get.docker.com | sh)

生成IP列表

./generate.sh

统计IP数量

./stat.sh

致谢

协议

FOSSA Status

china-operator-ip's People

Contributors

gaoyifan avatar fossabot avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.