Badfishmaan
Badfishmaan

Reputation: 318

Azure VM shows different IPs

I have Windows Azure VM and public IP (40.115.16.153) assigned to it. However when I execute ipconfig /all command inside VM, it shows me different IP address. I'm wondering why?

enter image description here

Upvotes: 0

Views: 1381

Answers (1)

Michael B
Michael B

Reputation: 12228

When you launch a VM in Azure you do not have a public IP Address attached directly to the Nic.

With a v1 (classic) VM you either connect through the Cloud Service IP, or through a Public IP attached to the VM.

In a v2 VM, all VMs need to exist within a virtual network, to which you attach a Network Interface. That interface will have an IP Address that is local to the virtual network it is a member of. Optionally you can attach a Public IP to that interface.

In both cases the external IP address is mapped to the internal address of your VM through whatever firewalling you have configured.

This is the reason that your VM does not have the same IP as the external IP.

Upvotes: 1

Related Questions