C
C
c_J2020-12-12 07:20:51
Computer networks
c_J, 2020-12-12 07:20:51

An example of using IPv4 addresses from the block 0.0.0.0/8 and 127.0.0.0/8 (not counting 0.0.0.0/32 and 127.0.0.1/32)?

Hello, dear Habrazhitel!

I've been trying for 5 hours now to find anything concrete about the use of addresses from the above blocks, but other than the special cases 0.0.0.0/32 and 127.0.0.01/32 I can't find anything. My head is already exploding!

There are two guesses:

  1. According to some sources, addresses from block 0.0.0.0/8 are used when creating IP sockets to communicate between these sockets (within the same host). Is it so? That is, if I understand correctly, I write the client and server parts of the application, the same chat, and assign addresses from the above range to the created sockets?
  2. Can I assign addresses from the 127.0.0.0/8 block to any server applications running on my machine to communicate between these server applications?

And what does "this" of your network mean? The internal network of this host?

In general, I would be grateful for help in understanding this issue.
Sincerely

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Akina, 2020-12-12
@c_J

The 127.0.0.0/8 network (and any of its subnets) are the IP stack addresses of the local machine. By accessing any address from this network, you are accessing the local host. Any service can listen to any of these addresses, working accordingly on it as a local server (this, by the way, allows you to solve the problem of simultaneous operation of two different services / applications on the same host using the same port) - but we must remember that such an address should be specified as an IP, because the localhost name always resolves to 127.0.0.1 (unless otherwise specified in the HOSTS file - but it's better not to do this, it can lead to unpleasant consequences).
As for the network 0.0.0.0/8, it is better not to use it for applied purposes at all.

K
ky0, 2020-12-12
@ky0

Your head explodes, but you didn’t think to look at the banal Wikipedia ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question