What is IPV6 for localhost and 0.0.0.0?

前端 未结 5 785
花落未央
花落未央 2020-11-30 23:12

As we all know the IPv4 address for localhost is 127.0.0.1 (loopback address). What is the IPv6 address for localhost and for 0.

5条回答
  •  春和景丽
    2020-11-30 23:59

    Just for the sake of completeness: there are IPv4-mapped IPv6 addresses, where you can embed an IPv4 address in an IPv6 address (may not be supported by every IPv6 equipment).

    Example: I run a server on my machine, which can be accessed via http://127.0.0.1:19983/solr. If I access it via an IPv4-mapped IPv6 address then I access it via http://[::ffff:127.0.0.1]:19983/solr (which will be converted to http://[::ffff:7f00:1]:19983/solr)

提交回复
热议问题