I'm facing an issue in our environment where I'm starting a ServerSocket (Java), and configuring it to listen on 0.0.0.0
.
Then I'm creating a network interface, and my client is attempting to connect to that Socket using the newly created interface IP. But it is unable to connect. I have to restart the server socket in order for my client to be able to use the new IP to connect to the socket.
As per my understanding, binding to 0.0.0.0 should enable listening on all network interfaces, irrespective of whether it exists or not, as also mentioned here: networking-binding-a-socket-on-all-interfaces-when-interfaces-goes-up-down
But I'm seeing an opposite behavior here.
Please do point me to any resources that I should read in order to understand this behavior. Thanks