Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Obtain the subnets belong to the same AS.

7 views
Skip to first unread message

Hongyi Zhao

unread,
Jun 7, 2017, 9:39:18 PM6/7/17
to
Hi all,

I try to obtain all of the subnets belong to the same AS, say, for google,
which has the asn 15169.

I tried the following several methods, but each of them give different
results:

[1] curl -s ipinfo.io/aS15169/ |
awk -v RS=\" -v avar=AS15169 ' $0 ~ "^[/]" avar "[/]" && !/[:]/ {print
substr($0, length(avar) +3) } '

[2] curl -s http://thyme.apnic.net/current/data-raw-table |
awk '$2 == 15169 {print $1}'

[3] whois -h whois.radb.net '!gas15169' | sed '1d;$d' |
sed ':a ; N;s/\n// ; t a ;' | tr ' ' '\n'

Any hints for this issue?

Regards
--
.: Hongyi Zhao [ hongyi.zhao AT gmail.com ] Free as in Freedom :.

Hongyi Zhao

unread,
Jun 7, 2017, 9:41:08 PM6/7/17
to
On Thu, 08 Jun 2017 01:39:15 +0000, Hongyi Zhao wrote:

> [1] curl -s ipinfo.io/aS15169/

Like domain names, asn is case-insensitive.
0 new messages