Skip to content

Commit 21b8f5c

Browse files
authored
Merge pull request #210200 from asudbring/ip-multi-vm-config
Update of include file for OS instructions for multiple IP for a Azure VM
2 parents 32f98d2 + eeaf408 commit 21b8f5c

File tree

1 file changed

+83
-22
lines changed

1 file changed

+83
-22
lines changed

includes/virtual-network-multiple-ip-addresses-os-config.md

Lines changed: 83 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,50 +5,111 @@
55
author: asudbring
66
ms.service: virtual-network
77
ms.topic: include
8-
ms.date: 05/10/2019
9-
ms.author: anavin
8+
ms.date: 09/05/2022
9+
ms.author: allensu
1010
ms.custom: include file
1111
---
1212

1313
## <a name="os-config"></a>Add IP addresses to a VM operating system
1414

15-
Connect and sign in to a VM you created with multiple private IP addresses. You must manually add all the private IP addresses (including the primary) that you added to the VM. Complete the steps that following for your VM operating system.
15+
Connect and sign in to a VM you created with multiple private IP addresses. You must manually add all the private IP addresses, including the primary, that you added to the VM. Complete the following steps for your VM operating system.
1616

1717
### Windows Server
1818

1919
<details>
2020
<summary>Expand</summary>
2121

22-
1. From a command prompt, type *ipconfig /all*. You only see the *Primary* private IP address (through DHCP).
23-
2. Type *ncpa.cpl* in the command prompt to open the **Network connections** window.
24-
3. Open the properties for the appropriate adapter: **Ethernet**.
25-
4. Double-click Internet Protocol version 4 (IPv4).
26-
5. Select **Use the following IP address** and enter the following values:
22+
1. Open a command prompt or PowerShell.
2723

28-
* **IP address**: Enter the *Primary* private IP address
29-
* **Subnet mask**: Set based on your subnet. For example, if the subnet is a /24 subnet then the subnet mask is 255.255.255.0.
30-
* **Default gateway**: The first IP address in the subnet. If your subnet is 10.0.0.0/24, then the gateway IP address is 10.0.0.1.
31-
* Select **Use the following DNS server addresses** and enter the following values:
32-
* **Preferred DNS server**: If you aren't using your own DNS server, enter 168.63.129.16. If you're using your own DNS server, enter the IP address for your server. (For Alternate DNS Server you can pick any free public DNS server address.)
33-
* Select the **Advanced** button and add additional IP addresses. Add each of the secondary private IP addresses, that you added to the Azure network interface in a previous step, to the Windows network interface that is assigned the primary IP address assigned to the Azure network interface.
24+
2. Enter **`ipconfig /all`** at the command line. You'll see the **Primary** private IP address that was assigned through DHCP.
3425

35-
You should never manually assign the public IP address assigned to an Azure virtual machine within the virtual machine's operating system. When you manually set the IP address within the operating system, ensure that it's the same address as the private IP address assigned to the Azure [network interface](../articles/virtual-network/ip-services/virtual-network-network-interface-addresses.md#change-ip-address-settings), or you can lose connectivity to the virtual machine. Learn more about [private IP address](../articles/virtual-network/ip-services/virtual-network-network-interface-addresses.md#private) settings. You should never assign an Azure public IP address within the operating system.
26+
3. Enter **`ncpa.cpl`** at the command line to open the **Network Connections** configuration.
3627

37-
* Select **OK** to close out the TCP/IP settings and then **OK** again to close the adapter settings. Your RDP connection is re-established.
28+
4. Open the **Properties** for the network adapter assigned the new IP addresses.
3829

39-
6. From a command prompt, type *ipconfig /all*. Verify all IP addresses you added are shown and DHCP is turned off.
40-
7. Configure Windows to use the private IP address of the primary IP configuration in Azure as the primary IP address for Windows. See [No Internet access from Azure Windows VM that has multiple IP addresses](https://support.microsoft.com/help/4040882/no-internet-access-from-azure-windows-vm-that-has-multiple-ip-addresse) for details.
30+
5. Double-click **Internet Protocol Version 4 (TCP/IPv4)**.
31+
32+
6. Select **Use the following IP address:**. Enter the following values.
33+
34+
| Setting | Value |
35+
| ------- | ----- |
36+
| **IP address:** | Enter the **Primary** private IP address. |
37+
| **Subnet mask:** | Enter a subnet mask based on your IP address. </br> For example, if the subnet is a **/24** subnet then the subnet mask is **255.255.255.0**. |
38+
| **Default gateway:** | The first IP address in the subnet. </br> If your subnet is **10.0.0.0/24**, then the gateway IP address is **10.0.0.1**. |
39+
40+
7. Select **Use the following DNS server addresses:**. Enter the following values.
41+
42+
| Setting | Value |
43+
| ------- | ----- |
44+
| **Preferred DNS server:** | Enter your primary DNS server. </br> Enter the IP address of **168.63.129.16** to use the default Azure provided DNS. |
45+
46+
8. Select the **Advanced** button.
47+
48+
9. Select **Add**.
49+
50+
10. Enter the private **IP address** you added to the Azure network interface. Enter the corresponding **Subnet mask**. Select **Add**.
51+
52+
11. Repeat the previous steps to add any additional private IP addresses that you added to the Azure network interface.
53+
54+
> [!IMPORTANT]
55+
> You should never manually assign the public IP address assigned to an Azure virtual machine within the virtual machine's operating system. When you manually set the IP address within the operating system, ensure that it's the same address as the private IP address assigned to the Azure network interface. Failure to assign the address correctly can cause loss of connectivity to the virtual machine. For more information, see [Change IP address settings](../articles/virtual-network/ip-services/virtual-network-network-interface-addresses.md#change-ip-address-settings).
56+
>
57+
For more information about private IP addresses, see [Private IP address](../articles/virtual-network/ip-services/virtual-network-network-interface-addresses.md#private).
58+
59+
12. Select **OK** to close the secondary IP address settings.
60+
61+
13. Select **OK** to close the adapter settings. Your RDP connection will re-establish.
62+
63+
14. Open a command prompt or PowerShell.
64+
65+
15. Enter **`ipconfig /all`** at the command line.
66+
67+
16. Verify the primary and secondary private IP addresses have been added to the configuration.
68+
69+
```powershell
70+
PS C:\Users\azureuser> ipconfig /all
71+
72+
Windows IP Configuration
73+
74+
Host Name . . . . . . . . . . . . : myVM
75+
Primary Dns Suffix . . . . . . . :
76+
Node Type . . . . . . . . . . . . : Hybrid
77+
IP Routing Enabled. . . . . . . . : No
78+
WINS Proxy Enabled. . . . . . . . : No
79+
80+
Ethernet adapter Ethernet:
81+
82+
Connection-specific DNS Suffix . :
83+
Description . . . . . . . . . . . : Microsoft Hyper-V Network Adapter
84+
Physical Address. . . . . . . . . : 00-0D-3A-E6-CE-A3
85+
DHCP Enabled. . . . . . . . . . . : No
86+
Autoconfiguration Enabled . . . . : Yes
87+
Link-local IPv6 Address . . . . . : fe80::a8d1:11d5:3ab2:6a51%5(Preferred)
88+
IPv4 Address. . . . . . . . . . . : 10.1.0.4(Preferred)
89+
Subnet Mask . . . . . . . . . . . : 255.255.255.0
90+
IPv4 Address. . . . . . . . . . . : 10.1.0.5(Preferred)
91+
Subnet Mask . . . . . . . . . . . : 255.255.255.0
92+
IPv4 Address. . . . . . . . . . . : 10.1.0.6(Preferred)
93+
Subnet Mask . . . . . . . . . . . : 255.255.255.0
94+
Default Gateway . . . . . . . . . : 10.1.0.1
95+
DHCPv6 IAID . . . . . . . . . . . : 100666682
96+
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2A-A8-26-B1-00-0D-3A-E6-CE-A3
97+
DNS Servers . . . . . . . . . . . : 168.63.129.16
98+
NetBIOS over Tcpip. . . . . . . . : Enabled
99+
```
100+
101+
17. Ensure the primary private IP address used in windows is the same as the primary IP address of the Azure VM network interface. For more information, see [No Internet access from Azure Windows VM that has multiple IP addresses](https://support.microsoft.com/help/4040882/no-internet-access-from-azure-windows-vm-that-has-multiple-ip-addresse).
41102
42103
#### Validation (Windows Server)
43104
44-
To ensure you're able to connect to the internet from your secondary IP configuration via the public IP associated it, once you've added it correctly using steps above, use the following command (replacing 10.0.0.7 with the secondary, private IP address):
105+
To validate connectivity to the internet from the secondary IP configuration via the public IP, use the following command. Replace 10.1.0.5 with the secondary private IP address you added to the Azure VM network interface.
45106
46-
```bash
47-
ping -S 10.0.0.7 outlook.com
107+
```powershell
108+
ping -S 10.1.0.5 outlook.com
48109
```
49110

50111
> [!NOTE]
51-
> For secondary IP configurations, you can only ping to the Internet if the configuration has a public IP address associated with it. For primary IP configurations, a public IP address is not required to ping to the Internet.
112+
> For secondary IP configurations, you can ping to the Internet if the configuration has a public IP address associated with it. For primary IP configurations, a public IP address is not required to ping to the Internet.
52113
53114
</details>
54115

0 commit comments

Comments
 (0)