1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

IPアドレスを10進数に変換する

Posted at

head -n1 /etc/issue

CentOS release 6.4 (Final)

cd /usr/local/src/
wget https://ipaddr-py.googlecode.com/files/3144.tar.gz
tar zxvf 3144.tar.gz
cd ipaddr-branches/3144/
python ./setup.py install

yum install bind-utils
host www.kame.net

www.kame.net is an alias for orange.kame.net.
orange.kame.net has address 203.178.141.194
orange.kame.net has IPv6 address 2001:200:dff:fff1:216:3eff:feb1:44d7

IPv4

python -c "import ipaddr; print ipaddr.IPv4Interface('203.178.141.194/32')._ip"

3417476546

python -c "import ipaddr; print ipaddr.IPv4Address(3417476546)"

203.178.141.194

IPv6

python -c "import ipaddr; print ipaddr.IPv6Interface('2001:200:dff:fff1:216:3eff:feb1:44d7/32')._ip"

42540528731127839924839251083080582359

python -c "import ipaddr; print ipaddr.IPv6Address(42540528731127839924839251083080582359)"

2001:200:dff:fff1:216:3eff:feb1:44d7

Markdown: ipaddr-py Using3144

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?