Windows 2025
Sponsored Link

Initial Settings : Set Static IP Address2024/11/26

 

IP address is assigned by DHCP by default, so set Static IP address for Server usage. This example shows to set only IPv4 address.

On CUI configuration, set like follows.

[1] Run PowerShell with Admin Privilege and Configure like follows.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# display network interfaces
PS C:\Users\Administrator> Get-NetIPInterface -AddressFamily IPv4 

ifIndex InterfaceAlias                  AddressFamily NlMtu(Bytes) InterfaceMetric Dhcp     ConnectionState
------- --------------                  ------------- ------------ --------------- ----     --------------
5       Ethernet0                       IPv4                  1500              25 Enabled  Connected
1       Loopback Pseudo-Interface 1     IPv4            4294967295              75 Disabled Connected

# set DHCP off (replace InterfaceIndex number to your own environment (ifIndex above))
PS C:\Users\Administrator> Set-NetIPInterface -InterfaceIndex 5 -Dhcp Disabled 

# for example, set IP address [10.0.0.101/24], gateway [10.0.0.1]
PS C:\Users\Administrator> New-NetIPAddress -InterfaceIndex 5 -AddressFamily IPv4 -IPAddress "10.0.0.101" -PrefixLength 24 -DefaultGateway "10.0.0.1" 

IPAddress         : 10.0.0.101
InterfaceIndex    : 5
InterfaceAlias    : Ethernet0
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 24
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Tentative
ValidLifetime     :
PreferredLifetime :
SkipAsSource      : False
PolicyStore       : ActiveStore

IPAddress         : 10.0.0.101
InterfaceIndex    : 5
InterfaceAlias    : Ethernet0
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 24
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Invalid
ValidLifetime     :
PreferredLifetime :
SkipAsSource      : False
PolicyStore       : PersistentStore

# for example, set DNS [10.0.0.10]
PS C:\Users\Administrator> Set-DnsClientServerAddress -InterfaceIndex 5 -ServerAddresses "10.0.0.10" -PassThru 

InterfaceAlias               Interface Address ServerAddresses
                             Index     Family
--------------               --------- ------- ---------------
Ethernet0                            5 IPv6    {}
Ethernet0                            5 IPv4    {10.0.0.10}

# confirm settings
PS C:\Users\Administrator> ipconfig /all 

Windows IP Configuration

   Host Name . . . . . . . . . . . . : RX-7
   Primary Dns Suffix  . . . . . . . : srv.world
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : srv.world

Ethernet adapter Ethernet0:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) 82574L Gigabit Network Connection
   Physical Address. . . . . . . . . : 00-0C-29-9B-20-7E
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
   Link-local IPv6 Address . . . . . : fe80::5bd8:e363:be49:8666%5(Preferred)
   IPv4 Address. . . . . . . . . . . : 10.0.0.101(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.0.0.1
   DNS Servers . . . . . . . . . . . : 10.0.0.10
   NetBIOS over Tcpip. . . . . . . . : Enabled
Initial Settings : Set Static IP Address (GUI)
 

On GUI configuration, set like follows.

[2] Run [Server Manager] and select [Local Server] on the left pane and click [Ethernet] section on the right pane.
[3] Double-Click an [Ethernet] icon.
[4] Click [Properties] button.
[5] Select [Internet Protocol Version 4] and click [Properties] button.
[6] Set Static IP address and Gateway and others for your local network.
[7] After setting static IP address, changes are enabled on Server Manager.
Matched Content