I've been trying to setup some software on my server over at GCP, and assigned a public static IP. But I don't see it inside the VM through ifconfig
or ip addr
. I understand there is no way to get the IP show up inside the VM and there's a 1-to-1 mapping from NAT to the public IP, but what I don't understand is, why. While this question askes basically the same, the answers don't really answer the why part clearly.
I occasionally run VM on my windows PC, and sometimes, I bridge the adaptor so that the VM gets an IP on my local network, so I know that it's possible (unless I'm missing something here). IBM cloud seems to have this feature though.
So, my question is, what and why could be the reason this is not allowed, or not implemented yet? What problems does it solve or simplify? Why can't I just look at the IP with ifconfig
or ip addr
(I know I can't cause the IP isn't assigned to an interface, I mean to say why isn't there one)? As a beginner, I think that feature would be what one 'expects', so I want to know the technical reasoning behind this.
Thanks!