Network connections between processes inside a machine

0

When you give the command netstat -na in the windows cmd, the network connections that are in progress on the machine appear.

In my case several connections appeared, having as source and destination IP the "127.0.0.1" which is the "internal" address, that is, the communication of the machine itself.

Does anyone know why Windows does this? Rather than simply using (and only) interprocess communication? (Pipes, fifos, messages, signs ...)

    
asked by anonymous 31.07.2017 / 00:33

2 answers

0

Imagine that you need to test your client-server or peer-to-peer application with yourself, your machine is not connected to the Internet, does not have a real IP, and the network protocol is TCP / IP. What address would you use to connect with yourself?

Well, the IETF has long written to RFC 5735, which, among other things, defines special IP addresses, such as this, 127.0.0.1 , called loopback . It is a fixed address that always points to the machine itself. Using the localhost domain results in the same, because in the hosts file of the operating system localhost is mapped to 127.0.0.1 .

The application never takes care of the network. It makes no difference whether you are running the client and server on the same machine or on different machines. It will just get the IP configuration and port passed to it and ask the operating system to send the communication. But when you send something to 127.0.0.1 , the operating system does not even bother to send it beyond the network card. The TCP / IP network driver passes directly to the application port.

There are other minor utilities at this address. For example, test whether the network communication protocol installed is the TCP / IP IPv4 version, with the command $ ping 127.0.0.1 . The operating system needs to understand this address.

    
31.07.2017 / 01:52
0
  

Does anyone know why Windows does this? Rather than simply using (and only) interprocess communication? (Pipes, fifos, messages, signs ...)

Not quite the windows that does this, there are some services in it that do this, but most are from other programs that must have installed on your computer.

Imagine a database server, all communication is done over TCP / IP because it must work over the network. And for local communication, it continues to use TCP / IP, but with the loopback address.

Imagine the complication to develop a network communication and a local (between processes, messages, pipes, etc) just not to generate these connections in loopback. Totally unnecessary.

Use netstat -a -b to see which executables are listening or communicating with these ports, or a% sysinternals% software that shows detailed all OS communications.

Download tcpview: link

    
31.07.2017 / 03:44