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
Recommended Posts