<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ものぐさ備忘録 &#187; network</title>
	<atom:link href="http://www.ginriki.net/wd/category/network/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ginriki.net/wd</link>
	<description>ソフトウェア関係の話を中心とした備忘録的日記</description>
	<lastBuildDate>Sun, 16 Jan 2011 20:07:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>e-mobile接続時に割り当てられるIPアドレス範囲</title>
		<link>http://www.ginriki.net/wd/2009/01/01/56/</link>
		<comments>http://www.ginriki.net/wd/2009/01/01/56/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 15:49:16 +0000</pubDate>
		<dc:creator>ginriki</dc:creator>
				<category><![CDATA[network]]></category>
		<category><![CDATA[e-mobile]]></category>
		<category><![CDATA[ip]]></category>
		<category><![CDATA[whois]]></category>

		<guid isPermaLink="false">http://www.gikogeek.net/wd/?p=56</guid>
		<description><![CDATA[諸事情により、e-mobileのデータ通信カードが手元にあります。
データ通信カードを使ってインターネットに接続する際に割り当てられるIPは、接続毎に変化します。
この割り当てられるIPアドレスの範囲が気になったので調べ [...]]]></description>
			<content:encoded><![CDATA[<p>諸事情により、e-mobileの<a href="http://emobile.jp/products/ne/d21ne/">データ通信カード</a>が手元にあります。<br />
データ通信カードを使ってインターネットに接続する際に割り当てられるIPは、接続毎に変化します。<br />
この割り当てられるIPアドレスの範囲が気になったので調べてみることにしました。</p>
<p>これは、whoisサーバを使えば調べられます<sup>1</sup>。</p>
<pre>
#とりあえず、接続した際に割り当てられたIPアドレス(114.48.45.211)で調べる
$ whois -h whois.apnic.net 114.48.45.211
% [whois.apnic.net node-2]
% Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html

inetnum:      114.48.0.0 - 114.51.255.255
netname:      eMobile
...<略>

#netnameがわかったので、その名前で調べ直す
$ whois -h whois.apnic.net eMobile
% [whois.apnic.net node-2]
% Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html

inetnum:      60.254.192.0 - 60.254.255.255
netname:      eMobile
...<略>

inetnum:      117.55.0.0 - 117.55.127.255
netname:      eMobile
...<略>

inetnum:      119.72.0.0 - 119.72.255.255
netname:      eMobile
...<略>

inetnum:      119.72.0.0 - 119.72.255.255
netname:      eMobile
...<略>
</pre>
<p>なお、inetnumやnetnameの仕様は<a href='http://www.apnic.net/db/ref/attributes/attributes-inetnum.html'>こちら</a>で規定されてます。</p>
<h4>whoisプロトコルに関するメモ</h4>
<p>whoisプロトコルの仕様は、<a href='http://www.rfc-editor.org/rfc/rfc3912.txt'>RFC3912</a>で規定されています。whoisサーバはTCP 43番ポートでListenするとか、データの区切りが&lt;CR&gt;&lt;LF&gt;であることがRFC3912によって決められています。</p>
<p>RFC3912にはwhoisサーバとの通信例として下記が載っています。</p>
<pre>
clientがwhoisサーバ(whois.nic.mil)にSmithについて問い合わせた場合の通信例。

   client                           server at whois.nic.mil

   open TCP   ---- (SYN) ------------------------------>
              <---- (SYN+ACK) -------------------------
   send query ---- "Smith<CR><LF>" -------------------->
   get answer <---- "Info about Smith<CR><LF>" ---------
              <---- "More info about Smith<CR><LF>" ----
   close      <---- (FIN) ------------------------------
              ----- (FIN) ----------------------------->
</pre>
<p>実際の所、RFC3912ではsend queryやget answerの部分でやりとりする情報について何も決められていません。</p>
<p>やり取りする情報はwhoisサーバによって変わります。<br />
例えば、APNICのwhoisサーバの場合、各団体へ割り当てを行ったIPアドレス範囲の<br />
問い合わせや応答に使われます。</p>
<p>APNICのwhoisサーバがどのような情報を返すかは下記リンク先を参照してください。<br />
<a href='http://www.apnic.net/info/faq/apnic_faq/about_whois.html'>http://www.apnic.net/info/faq/apnic_faq/about_whois.html</a></p>
<p>なお、APNICの場合、IPアドレス範囲はinetnumという名称でしたが、<br />
ARINのwhoisサーバの場合、NetRangeという名称になります。<br />
<a href='http://www.felix-colibri.com/papers/web/whois/whois.html'>http://www.felix-colibri.com/papers/web/whois/whois.html</a></p>
<p>このあたりは、各団体ごとに仕様がバラバラのようです。</p>
<ol class="footnotes"><li id="footnote_0_56" class="footnote">判明したIPアドレスの範囲すべてがe-mobile接続時に割り当てられうるとは限りませんが</li></ol>]]></content:encoded>
			<wfw:commentRss>http://www.ginriki.net/wd/2009/01/01/56/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

