获得线路的自治域号
http://thyme.apnic.net/current/data-AS20net 是全球自治域列表。
获得特定自治域所属的IP
方法0:
http://thyme.apnic.net/current/data-ASnet-detail
优点是实时性好,缺点是没有下级自治域的资料。
方法1:
http://www.cidr-report.org/cgi-bin/as-report?as=AS4134
可以得到ip列表,很全(至少比whois -i origin 多2-3倍)。
并且可以获得接入本自治域的下游自治域。这样将下游自治域附加到本列表可以获得更全的IP列表
Aggregation Suggestions 下的第一个ip列表就是自治域内的ip列表。获得某自治域ip时需要把这个列表里面的黑色和绿色条目相加(不包括下级自治域).
这个列表的例子(AS24424 的IP列表,未处理颜色问题):
Announced Prefixes
Rank AS Type Originate Addr Space (pfx) Transit Addr space (pfx) Description
6987 AS24424 ORIGIN Originate: 10752 /18.61 Transit: 0 /0.00 CNNIC-GOOGLECN-AP Beijing Gu Xiang Information Technology Co.,Ltd.Aggregation Suggestions
This report does not take into account conditions local to each origin AS in terms of policy or traffic engineering requirements, so this is an approximate guideline as to aggregation possibilities.
Rank AS AS Name Current Wthdw Aggte Annce Redctn %
2487 AS24424 CNNIC-GOOGLECN-AP Beijing Gu Xiang Informatio 7 6 0 1 6 85.71%Prefix AS Path Aggregation Suggestion
203.208.32.0/19 4777 2497 2914 4134 24424
203.208.32.0/23 4777 2497 2914 4134 24424 – Withdrawn – matching aggregate 203.208.32.0/19 4777 2497 2914 4134 24424
203.208.34.0/23 4777 2497 2914 4134 24424 – Withdrawn – matching aggregate 203.208.32.0/19 4777 2497 2914 4134 24424
203.208.36.0/23 4777 2497 2914 4134 24424 – Withdrawn – matching aggregate 203.208.32.0/19 4777 2497 2914 4134 24424
203.208.38.0/23 4777 2497 2914 4134 24424 – Withdrawn – matching aggregate 203.208.32.0/19 4777 2497 2914 4134 24424
203.208.60.0/24 4777 2497 2914 4134 24424 – Withdrawn – matching aggregate 203.208.32.0/19 4777 2497 2914 4134 24424
203.208.61.0/24 4777 2497 2914 4134 24424 – Withdrawn – matching aggregate 203.208.32.0/19 4777 2497 2914 4134 24424
红色的是未生效的条目,后面有原因。
绿色的是一个把小范围IP列表覆盖掉的大的IP范围。(正常是小范围覆盖大范围但是如果两者一样则只使用大范围的可以忽略小范围的 )
http://www.robtex.com/as/as4134.html
也可以获得ip列表。
方法2:
执行 whois -h whois.apnic.net -i origin AS4134 可以获得AS4134这个域的ip。不建议使用,少了将近一半。只有使用whois ip查询的信息有origin字段并且值是AS4134时才会查到这个IP。
获得特定IP的自治域
方法1:
$ traceroute -A 58.48.1.1
可以获得经过的自治域ID(其实是查询的whois.radb.net的数据)
$ whois -h whois.radb.net 192.168.1.1
route: 192.168.0.0/16
descr: MERIT Network Inc.
4251 Plymouth Rd
Ann Arbor
MI 48105-2785, USA
origin: AS64520
mnt-by: MAINT-RATEST
changed: [email protected] 20081016 #17:02:11Z
source: RADB
route: 192.168.0.0/16
descr: EMBRATEL
origin: AS28513
mnt-by: TELMEX-MNT
changed: [email protected] 20081014
source: LEVEL3
方法2:
whois ip
如果有origin字段则值是自治域ID