Uncommon IP notations

后端 未结 2 958
有刺的猬
有刺的猬 2021-01-14 05:06

I know that it is possible to write IPs in IPv4 as an integer e.g. 2130706433 instead of 127.0.0.1.

What is the reason for this possibility

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-14 05:43

    An IPv4 address is just a 32bit number. You could represent it in any way you can represent such a number (decimal, hex, octal). The dotted notation a.b.c.d is just much more practical.

    You can do the same thing with IPv6 addresses, except that those are 128bit numbers - even harder to grok in decimal form.

    The usual tools will only deal with usual notations. Decimal isn't one of those.

提交回复
热议问题