1

I am trying to ping the host 192.168.1.5 from my computer.

enter image description here

This works good.

The subnet mask of the IP is 255.255.255.0, so the private IP 0.0.0.5 can also be used to ping the same host. But that creates the following error.

enter image description here

Why is this so?

  • 1
    Please, never use images for text. Simply copy the text, paste it in, and use the Pre-formatted Text option ([]). – Ron Maupin Aug 23 '21 at 13:26
  • Did any answer help you? if so, you should accept the answer so that the question does not keep popping up forever, looking for an answer. Alternatively, you could post and accept your own answer. – Ron Maupin Dec 23 '21 at 21:29

2 Answers2

3

Addresses in the 0.0.0.0/8 block cannot be used as destination addresses. You can use 0.0.0.0 as a source address when the host is looking to get an address, e.g. DHCP. You should look at the IANA IPv4 Special-Purpose Address Registry:

Address Block Name RFC Allocation Date Termination Date Source Destination Forwardable Globally Reachable Reserved-by-Protocol
0.0.0.0/8 "This network" [RFC791], Section 3.2 1981-09 N/A True False False False True
0.0.0.0/32 "This host on this network" [RFC1122], Section 3.2.1.3 1981-09 N/A True False False False True

the private IP 0.0.0.5 can also be used to ping the same host.

That is not a Private IPv4 address. The Private addresses are in thee ranges defend by RFC 1918, Address Allocation for Private Internets:

3. Private Address Space

The Internet Assigned Numbers Authority (IANA) has reserved the
following three blocks of the IP address space for private internets:

 10.0.0.0        -   10.255.255.255  (10/8 prefix)
 172.16.0.0      -   172.31.255.255  (172.16/12 prefix)
 192.168.0.0     -   192.168.255.255 (192.168/16 prefix)

We will refer to the first block as "24-bit block", the second as
"20-bit block", and to the third as "16-bit" block. Note that (in
pre-CIDR notation) the first block is nothing but a single class A
network number, while the second block is a set of 16 contiguous
class B network numbers, and third block is a set of 256 contiguous
class C network numbers.

Ron Maupin
  • 99,565
  • 26
  • 120
  • 195
2

The subnet mask of the IP is 255.255.255.0, so the private IP 0.0.0.5

That's not how it works. A host has one or more addresses assigned to it. You can't make up an address and expect it to work. The host part of an address is only meaningful with the network part still attached.

You can read this question for excellent answers on how IP addresses and network masks work.

The 0.0.0.0/8 network is reserved by IANA and can't be used with most equipment.

0.0.0.0 is the undefined address that is e.g. used to specify binding a local service to all possible IP addresses.

Zac67
  • 84,333
  • 4
  • 69
  • 133