Skip to content

Commit d6e5c0c

Browse files
committed
added more stuff
1 parent 292fc20 commit d6e5c0c

File tree

3 files changed

+270
-41
lines changed

3 files changed

+270
-41
lines changed

articles/virtual-network/how-to-dhcp-azure.md

Lines changed: 190 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -14,71 +14,221 @@ ms.date: 02/28/2024
1414

1515
# Deploy a DHCP server in Azure on a virtual machine
1616

17+
In this how-to, learn how to deploy a highly available DHCP server in Azure on a virtual machine. This server is used as a target for an on-premises DHCP relay agent to provide dynamic IP address allocation to on-premises clients. Broadcast packets directly from clients to a DHCP Server don't work in an Azure Virtual Network by design.
1718

1819
## Prerequisites
1920

20-
<!-- Optional: Prerequisites - H2
21+
- An Azure account with an active subscription. [Create one for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio).
2122

22-
If included, "Prerequisites" must be the first H2 in the article.
23+
[!INCLUDE [virtual-network-create-with-bastion.md](../../includes/virtual-network-create-with-bastion.md)]
2324

24-
List any items that are needed for the integration,
25-
such as permissions or software.
25+
## Create internal load balancer
2626

27-
If you need to sign in to a portal to do the quickstart,
28-
provide instructions and a link.
27+
In this section, you create an internal load balancer that load balances virtual machines. An internal load balancer is used to load balance traffic inside a virtual network with a private IP address.
2928

30-
-->
29+
During the creation of the load balancer, you configure:
3130

32-
## "[verb] * [noun]"
31+
* Frontend IP address
32+
* Backend pool
33+
* Inbound load-balancing rules
3334

34-
[Introduce the procedure.]
35+
1. In the search box at the top of the portal, enter **Load balancer**. Select **Load balancers** in the search results.
3536

36-
1. Procedure step
37-
1. Procedure step
38-
1. Procedure step
37+
1. In the **Load balancer** page, select **Create**.
3938

40-
<!-- Required: Steps to complete the task - H2
39+
1. In the **Basics** tab of the **Create load balancer** page, enter, or select the following information:
4140

42-
In one or more H2 sections, organize procedures. A section
43-
contains a major grouping of steps that help the user complete
44-
a task.
41+
| Setting | Value |
42+
| --- | --- |
43+
| **Project details** | |
44+
| Subscription | Select your subscription. |
45+
| Resource group | Select **test-rg**. |
46+
| **Instance details** | |
47+
| Name | Enter **load-balancer** |
48+
| Region | Select **(US) East US 2**. |
49+
| SKU | Leave the default **Standard**. |
50+
| Type | Select **Internal**. |
51+
| Tier | Leave the default **Regional**. |
4552

46-
Begin each section with a brief explanation for context, and
47-
provide an ordered list of steps to complete the procedure.
53+
1. Select **Next: Frontend IP configuration** at the bottom of the page.
4854

49-
If it applies, provide sections that describe alternative tasks or
50-
procedures.
55+
1. In **Frontend IP configuration**, select **+ Add a frontend IP configuration**.
5156

52-
-->
57+
1. Enter **frontend-1** in **Name**.
5358

54-
## Next step -or- Related content
59+
1. Select **subnet-1 (10.0.0.0/24)** in **Subnet**.
5560

56-
> [!div class="nextstepaction"]
57-
> [Next sequential article title](link.md)
61+
1. In **Assignment**, select **Static**.
5862

59-
-or-
63+
1. In **IP address**, enter **10.0.0.100**.
6064

61-
* [Related article title](link.md)
62-
* [Related article title](link.md)
63-
* [Related article title](link.md)
65+
1. Select **Add**.
66+
67+
1. Select **Next: Backend pools** at the bottom of the page.
68+
69+
1. In the **Backend pools** tab, select **+ Add a backend pool**.
70+
71+
1. Enter **backend-pool** for **Name** in **Add backend pool**.
72+
73+
1. Select **NIC** or **IP Address** for **Backend Pool Configuration**.
74+
75+
1. Select **Save**.
76+
77+
1. Select the blue **Review + create** button at the bottom of the page.
78+
79+
1. Select **Create**.
80+
81+
### Add second frontend to load balancer
82+
83+
A second frontend is required for the load balancer to provide high availability for the DHCP server. Use the following steps to add a second frontend to the load balancer.
84+
85+
1. In the Azure portal, search for and select **Load balancers**.
86+
87+
1. Select **load-balancer**.
88+
89+
1. In **Settings**, select **Frontend IP configuration**.
90+
91+
1. Select **+ Add**.
92+
93+
1. Enter or select the following information in **Add frontend IP configuration**:
94+
95+
| Setting | Value |
96+
| --- | --- |
97+
| **Name** | Enter **frontend-2**. |
98+
| **Subnet** | Select **subnet-1 (10.0.0.0/24)**. |
99+
| **Assignment** | Select **Static**. |
100+
| **IP address** | Enter **10.0.0.200**. |
101+
| **Availability zone** | Select **Zone-redundant**. |
102+
103+
1. Select **Add**.
104+
105+
1. Verify that in **Frontend IP configuration**, you have **frontend-1** and **frontend-2**.
106+
107+
[!INCLUDE [create-two-virtual-machines-windows-load-balancer.md](../../includes/create-two-virtual-machines-windows-load-balancer.md)]
108+
109+
## Configure DHCP server network adapters
110+
111+
You will sign-in to the virtual machines with Azure Bastion and configure the network adapter settings and DHCP server role for each virtual machine.
112+
113+
1. In the Azure portal, search for and select **Virtual machines**.
114+
115+
1. Select **vm-1**.
116+
117+
1. In the **vm-1** page, select **Connect** then **Connect via Bastion**.
118+
119+
1. Enter the username and password you created when you created the virtual machine.
120+
121+
1. Open **PowerShell** as an administrator.
122+
123+
1. Run the following command to install the DHCP server role:
124+
125+
```powershell
126+
Install-WindowsFeature -Name DHCP -IncludeManagementTools
127+
```
128+
129+
### Install Microsoft Loopback Adapter
130+
131+
Use the following steps to install the Microsoft Loopback Adapter by using the Hardware Wizard:
132+
133+
1. Open **Device Manager** on the virtual machine.
134+
135+
1. Select the computer name **vm-1** in **Device Manager**.
136+
137+
1. In the menu bar, select **Action** then **Add legacy hardware**.
64138
65-
<!-- Optional: Next step or Related content - H2
139+
1. In the **Add Hardware Wizard**, select **Next**.
66140
67-
Consider adding one of these H2 sections (not both):
141+
1. Select **Install the hardware that I manually select from a list (Advanced)**, and then select **Next**
68142
69-
A "Next step" section that uses 1 link in a blue box
70-
to point to a next, consecutive article in a sequence.
143+
1. In the **Common hardware types** list, select **Network adapters**, and then select **Next**.
71144
72-
-or-
145+
1. In the **Manufacturers** list box, select **Microsoft**.
73146
74-
A "Related content" section that lists links to
75-
1 to 3 articles the user might find helpful.
147+
1. In the **Network Adapter** list box, select **Microsoft Loopback Adapter**, and then select **Next**.
76148
77-
-->
149+
1. select **Next** to start installing the drivers for your hardware.
78150
79-
<!--
151+
1. select **Finish**.
80152
81-
Remove all comments except the customer intent
82-
before you sign off or merge to the main branch.
153+
1. In **Device Manager**, expand **Network adapters**. Verify that **Microsoft Loopback Adapter** is listed.
154+
155+
1. Close **Device Manager**.
156+
157+
### Set static IP address for Microsoft Loopback Adapter
158+
159+
Use the following steps to set a static IP address for the Microsoft Loopback Adapter:
160+
161+
1. Open **Network and Internet settings** on the virtual machine.
162+
163+
1. Select **Change adapter options**.
164+
165+
1. Right-click **Microsoft Loopback Adapter** and select **Properties**.
166+
167+
1. Select **Internet Protocol Version 4 (TCP/IPv4)** and select **Properties**.
168+
169+
1. Select **Use the following IP address**.
170+
171+
1. Enter the following information:
172+
173+
| Setting | Value |
174+
| --- | --- |
175+
| **IP address** | Enter **10.0.0.100**. |
176+
| **Subnet mask** | Enter **255.255.255.0**. |
177+
178+
1. Select **OK**.
179+
180+
1. Select **Close**.
181+
182+
### Enable routing between the loopback interface and the network adapter
183+
184+
Use the following steps to enable routing between the loopback interface and the network adapter:
185+
186+
1. Open **CMD** as an administrator.
187+
188+
1. Run the following command to list the network interfaces:
189+
190+
```cmd
191+
netsh int ipv4 show int
192+
```
193+
194+
```output
195+
C:\Users\azureuser>netsh int ipv4 show int
196+
197+
Idx Met MTU State Name
198+
--- ---------- ---------- ------------ ---------------------------
199+
1 75 4294967295 connected Loopback Pseudo-Interface 1
200+
6 5 1500 connected Ethernet
201+
11 25 1500 connected Ethernet 3
202+
```
203+
204+
In this example the network interface connected to the Azure Virtual network is **Ethernet**. The loopback interface that you installed in the previous section is **Ethernet 3**.
205+
206+
**Make note of the `Idx` number for the primary network adapter and the loopback adapter. In this example the primary network adapter is `6` and the loopback adapter is `11`. You'll need these values for the next steps.**
207+
208+
> [!CAUTION]
209+
> Don't confuse the **Loopback Loopback Pseudo-Interface 1** with the **Microsoft Loopback Adapter**. The **Loopback Pseudo-Interface 1** isn't used in this scenario.
210+
211+
1. Run the following command to enable **weakhostreceive** and **weakhostsend** on the primary network adapter:
212+
213+
```cmd
214+
netsh int ipv4 set int 6 weakhostreceive=enabled weakhostsend=enabled
215+
```
216+
217+
1. Run the following command to enable **weakhostreceive** and **weakhostsend** on the loopback adapter:
218+
219+
```cmd
220+
netsh int ipv4 set int 11 weakhostreceive=enabled weakhostsend=enabled
221+
```
222+
223+
1. Close the bastion connection to **vm-1**.
224+
225+
1. Repeat the previous steps to configure **vm-2**. Replace the IP address of **10.0.0.100** with **10.0.0.200** in the static IP address configuration of the loopback adapter.
226+
227+
228+
```cmd
229+
## Related content
230+
231+
* [Related article title](link.md)
232+
* [Related article title](link.md)
233+
* [Related article title](link.md)
83234
84-
-->
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
title: include file
3+
description: include file
4+
services: virtual-network
5+
author: asudbring
6+
ms.service: virtual-network
7+
ms.topic: include
8+
ms.date: 02/28/2024
9+
ms.author: allensu
10+
ms.custom: include file
11+
---
12+
13+
## Create virtual machines
14+
15+
In this section, you create two VMs (**vm-1** and **vm-2**) in two different zones (**Zone 1** and **Zone 2**).
16+
17+
These VMs are added to the backend pool of the load balancer that was created earlier.
18+
19+
1. In the search box at the top of the portal, enter **Virtual machine**. Select **Virtual machines** in the search results.
20+
21+
1. Select **+ Create** then **Azure virtual machine**.
22+
23+
1. In **Create a virtual machine**, type or select the values in the **Basics** tab:
24+
25+
| Setting | Value |
26+
|---|---|
27+
| **Project details** | |
28+
| Subscription | Select your subscription. |
29+
| Resource group | Select **test-rg**. |
30+
| **Instance details** | |
31+
| Virtual machine name | Enter **vm-1**. |
32+
| Region | Select **East US 2**. |
33+
| Availability options | Select **Availability zone**. |
34+
| Availability zone | Select **Zones 1**. |
35+
| Security type | Select **Standard**. |
36+
| Image | Select **Windows Server 2022 Datacenter - x64 Gen2**. |
37+
| VM architecture | Leave the default of **x64**. |
38+
| Size | Select a size. |
39+
| **Administrator account** | |
40+
| Authentication type | Select **Password**. |
41+
| Username | Enter **azureuser**. |
42+
| Password | Enter a password. |
43+
| Confirm password | Reenter the password. |
44+
| **Inbound port rules** | |
45+
| Public inbound ports | Select **None**. |
46+
47+
1. Select the **Networking** tab, or select **Next: Disks**, then **Next: Networking**.
48+
49+
1. In the Networking tab, enter or select the following information:
50+
51+
| Setting | Value |
52+
|-|-|
53+
| **Network interface** | |
54+
| Virtual network | Select **vnet-1**. |
55+
| Subnet | Select **subnet-1 (10.0.0.0/24)** |
56+
| Public IP | Select **None**. |
57+
| NIC network security group | Select **Basic**|
58+
| Public inbound ports | Leave the default of **None**. |
59+
| **Load balancing** |
60+
| Place this virtual machine behind an existing load-balancing solution? | Select the check box.|
61+
| **Load balancing settings** |
62+
| Load-balancing options | Select **Azure load balancer** |
63+
| Select a load balancer | Select **load-balancer** |
64+
| Select a backend pool | Select **backend-pool** |
65+
66+
1. Select **Review + create**.
67+
68+
1. Review the settings, and then select **Create**.
69+
70+
1. Follow the previous steps to create a VM with the following values and all the other settings the same as **vm-1**:
71+
72+
| Setting | VM 2 |
73+
| ------- | ----- |
74+
| Name | **vm-2** |
75+
| Availability zone | **2** |
76+
| Network security group | Select the existing **nsg-1** |
77+
| Load-balancing options | Select **Azure load balancer** |
78+
| Select a load balancer | Select **load-balancer** |
79+
| Select a backend pool | Select **backend-pool** |

includes/virtual-network-create-with-bastion.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The following procedure creates a virtual network with a resource subnet, an Azu
4545
| Setting | Value |
4646
|---|---|
4747
| Azure Bastion host name | Enter **bastion**. |
48-
| Azure Bastion public IP address | Select **Create a public IP address**. </br> Enter **public-ip** in Name. </br> Select **OK**. |
48+
| Azure Bastion public IP address | Select **Create a public IP address**. </br> Enter **public-ip-bastion** in Name. </br> Select **OK**. |
4949

5050
:::image type="content" source="./media/virtual-network-create-with-bastion/enable-bastion.png" alt-text="Screenshot of enable bastion host in Create virtual network in the Azure portal.":::
5151

0 commit comments

Comments
 (0)