Is 0.0.0.0 a valid IP address?

后端 未结 10 1251
遇见更好的自我
遇见更好的自我 2020-11-29 04:14

Is 0.0.0.0 a valid IP address? I want my program to be able to store it as an indication that no address is in use, but this won\'t work if it\'s actually valid.

10条回答
  •  感动是毒
    2020-11-29 04:59

    Doing a Network Whois query can also produce output that is quite helpful.
    Example:
    http://whois.arin.net/rest/nets;q=0.0.0.0?showDetails=true

    Comment: The address 0.0.0.0 may only be used as the address of an outgoing packet when a computer is learning which IP address it should use. It is never used as a destination address. Addresses starting with "0." are sometimes used for broadcasts to directly connected devices.

提交回复
热议问题