{"image_url":null,"author_url":"https://blog.hatena.ne.jp/takuya_1st/","blog_title":"\u305d\u308c\u30de\u30b0\u3067\uff01","title":" python \u306e netaddr \u3067 ip( ipv4) \u30a2\u30c9\u30ec\u30b9\u3092\u6271\u3046","height":"190","width":"100%","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakuya-1st.hatenablog.jp%2Fentry%2F2021%2F01%2F28%2F201002\" title=\" python \u306e netaddr \u3067 ip( ipv4) \u30a2\u30c9\u30ec\u30b9\u3092\u6271\u3046 - \u305d\u308c\u30de\u30b0\u3067\uff01\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://takuya-1st.hatenablog.jp/","version":"1.0","provider_name":"Hatena Blog","author_name":"takuya_1st","published":"2021-01-28 20:10:02","categories":["ipv6","ip6","python"],"description":"ip \u30a2\u30c9\u30ec\u30b9\u3092\u8a08\u7b97\u3092\u7c21\u4fbf\u306b\u3059\u308b\u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u3042\u3063\u305f\u306e\u3067\u4f7f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u305f\u3002 \u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8aad\u307f\u8fbc\u3080 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002 $ pip install netaddr \u4f7f\u3046\u6e96\u5099\u3092\u3059\u308b\u3002 from netaddr import * ip \u30a2\u30c9\u30ec\u30b9(\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u542b\u3080\uff09\u3092\u6271\u3046\u3002 \u30b5\u30d6\u30cd\u30c3\u30c8\u30de\u30b9\u30af\u8868\u8a18\u3092\u542b\u3080\u5834\u5408\u306f IPNetwork \u3092\u4f7f\u3046\u3002 >>> ip= IPNetwork('10.2.0.1/8') >>> ip.network IPAddress('10.0.0.0') >>> ip.netmask IPAddress('255.0.0.0') >>> ip.ip IPAddress('10.2.\u2026","url":"https://takuya-1st.hatenablog.jp/entry/2021/01/28/201002","type":"rich"}