Assign a Static IP on Windows Server 2025 | 2 Easy Methods

Posted on

Assign a Static IP on Windows Server 2025 | 2 Easy Methods

Assign a Static IP on Windows Server 2025 | 2 Easy Methods

Windows Server 2025 introduces several enhancements, but the necessity for a static IP address remains a foundational step in server setup. Whether deploying a new server or reconfiguring an existing one, understanding how to assign a static IP on Windows Server 2025 is essential.

You can now proceed to the guide steps below on the Orcacore website to complete Static IP Configuration in Windows Server 2025.

Step by Step Guide To Assign a Static IP on Windows Server 2025

Imagine you’re running an important program on your server, and suddenly it stops working because the server’s IP address changed after restarting. DHCP (Dynamic Host Configuration Protocol) is helpful for everyday computers, but servers work better with a fixed IP address. A static IP ensures that the server can always be reached the same way, makes DNS setup easier, and is important for things like Active Directory, DNS, and websites. Knowing how to assign a static IP address is a cornerstone of server administration.

So you can proceed to the steps below and choose one of the following methods to configure a Static IP in Windows Server 2025:

Method 1. Configure Static IP via PowerShell in Windows Server 2025

For those who work better with a command line interface, PowerShell offers a powerful and efficient way to set a static IP. First, run your PowerShell as an Administrator (Right-click on the Start menu and select “Windows PowerShell (Admin)”) and follow the steps below:

List All Network Interfaces

First of all, you must list all your network interfaces by running the command below from Powershell Admin:

Get-NetIPInterface -AddressFamily IPv4

Note the “InterfaceIndex” of the adapter you wish to configure.

List All Network Interfaces

Disable DHCP

At this point, you must disable your DHCP by using the following command:

Set-NetIPInterface -InterfaceIndex <InterfaceIndex> -Dhcp Disabled

Remember to replace <InterfaceIndex> with the appropriate number.

Assign Static IP

Now you can assign a static IP on Windows Server 2025 with the following command:

New-NetIPAddress -InterfaceIndex <InterfaceIndex> -AddressFamily IPv4 -IPAddress "192.168.1.100" -PrefixLength 24 -DefaultGateway "192.168.1.1"

Replace the placeholders with your desired settings.

Configure DNS Server

At this point, you must configure your DNS server by using the following command:

Set-DnsClientServerAddress -InterfaceIndex <InterfaceIndex> -ServerAddresses "192.168.1.1"

Remember to replace the placeholders with your desired settings.

That’s it, you are done. You can now verify your configuration by using the command below:

ipconfig /all

This method is efficient, especially when configuring multiple servers or automating deployments.

Method 2. Configure Static IP via Server Manager in Windows Server 2025 (GUI)

For those who prefer a graphical interface, Windows Server 2025 offers a straightforward method by using the Server Manager. To configure Static IP from the GUI, follow the steps below:

First, click on the Start menu and open “Server Manager.” In the left pane, select “Local Server.”

Open Local Server from Server Manager

On the right pane, find the “Ethernet” section and click on the active network connection.

active network connection

In the new window, double-click on the network adapter, then click on the “Properties” button.

Open network adaptor properties

Select “Internet Protocol Version 4 (TCP/IPv4)” and click “Properties.”

Internet Protocol Version 4 (TCP/IPv4)

Choose “Use the following IP address” and input your desired IP address, subnet mask, and default gateway. Also, specify the preferred DNS server. Click “OK” to save changes and close all dialog boxes.

Configure Static IP Adrress
Configure Static IP on Windows Server 2025

This method is intuitive and ideal for administrators who are more comfortable with visual interfaces. Knowing how to assign a static IP using the GUI is a valuable skill.

Alternative Methods for Assigning a Static IP Address

While the PowerShell and GUI methods are common, there are other approaches you can take to assign a static IP. Here are two alternatives:

1. Using Netsh Command-Line Utility:

The netsh utility provides another command-line option for configuring network settings. While PowerShell is generally preferred, netsh can be useful in certain scripting scenarios or when PowerShell is unavailable.

Explanation:

The netsh command is a powerful tool for managing network configurations directly from the command line. It allows you to modify network adapter settings, IP addresses, DNS servers, and other network-related parameters. Using netsh, you can automate the process of assigning static IP addresses, making it suitable for scripting and batch operations.

Code Example:

Open Command Prompt as Administrator.

First, identify your interface name:

netsh interface show interface

Then, use the following commands, replacing the placeholders with your actual values:

netsh interface ip set address name="Ethernet" static 192.168.1.101 255.255.255.0 192.168.1.1
netsh interface ip set dns name="Ethernet" static 192.168.1.1 primary

This code sets the IP address to 192.168.1.101, subnet mask to 255.255.255.0, and default gateway to 192.168.1.1. It also sets the primary DNS server to 192.168.1.1. Replace "Ethernet" with the actual name of your network adapter as identified by the netsh interface show interface command.

2. DHCP Reservation (Hybrid Approach):

Instead of directly configuring a static IP on the server, you can use a DHCP reservation. This involves configuring the DHCP server to always assign the same IP address to a specific server based on its MAC address.

Explanation:

DHCP reservations offer a balance between the centralized management benefits of DHCP and the predictability of static IP addresses. By reserving an IP address for a specific MAC address, you ensure that the server always receives the same IP from the DHCP server. This approach simplifies network management and reduces the risk of IP address conflicts.

Configuration:

  1. Access your DHCP server’s management console: This is typically done through Server Manager if the DHCP server role is installed locally, or through the DHCP server’s management interface if it’s on a separate device.
  2. Locate the "Reservations" section: Within the DHCP scope for your network, find the area for creating reservations.
  3. Create a new reservation: You will need to provide the following information:
    • Reservation Name: A descriptive name for the reservation.
    • IP Address: The static IP address you want to assign to the server.
    • MAC Address: The MAC address of the server’s network adapter. You can obtain this from the server using the ipconfig /all command in the command prompt.
    • Description (Optional): A brief description of the reservation.
  4. Save the reservation: Once you have entered the required information, save the reservation. The DHCP server will now always assign this IP address to the specified server.
  5. Configure Server for DHCP: Ensure the server’s network adapter is configured to obtain an IP address automatically via DHCP.

This approach avoids manual IP configuration on the server itself, centralizing IP management on the DHCP server. This can significantly simplify network administration.

Best Practices and Considerations for Assigning a Static IP

Always keep a clear record of which devices are using which IP addresses. This helps you avoid problems like two devices accidentally using the same IP address. It’s also useful if you need to make changes or fix issues later.

Try to follow the same pattern or system when assigning IP addresses across your network. For example, you might use a certain range for servers and another range for printers. This makes it easier to manage and understand your network.

Make sure that only trusted and trained people are allowed to change network settings. This helps stop others from making mistakes or causing security problems by changing things they shouldn’t.

Look at your network setup from time to time to make sure everything is working as expected. If something is wrong, like an IP conflict or a setting that was changed, you can catch it early and fix it quickly.

Conclusion

Setting a static IP address in Windows Server 2025 is an important step to keep your server working smoothly and reliably. You can do it using the regular settings menu (GUI) or with PowerShell. Knowing how to do this helps make sure your server is always easy to reach and works well with the rest of your network. Ultimately, the ability to assign a static IP contributes to a more stable and manageable server environment.

Hope you enjoy it. Please subscribe to us on Facebook, X, Instagram, and YouTube.

You may also like to read the following articles:

Set up Defender Antivirus on Windows Server 2025

Install and Configure IIS on Windows Server 2025

SMTP Setup on Windows Server 2022

Install Plesk on Windows Server 2022

FAQs

Is DHCP bad for servers?

Not necessarily, but it’s not ideal. DHCP can assign a different IP on reboot or lease renewal. That unpredictability makes it unsuitable for servers that need to be reliably found at the same address by clients and other systems.

How do I know if my server is using a static or dynamic IP?

You can check this by running the command from PowerShell:
Get-NetIPInterface -AddressFamily IPv4

How do I avoid IP address conflicts when using static IPs?

– Keep a documented list of assigned static IPs.
– Use IP addresses outside the DHCP scope.
– Consider using DHCP reservations as an alternative if you want fixed IPs but centrally managed.

Leave a Reply

Your email address will not be published. Required fields are marked *