Skip to content

Setting the IP address in Windows Server

In this article

Information

The Netsh utility program is used to configure the IP address in Windows Server OS.

How to configure DHCP

Attention

Active DHCP services on external Ethernet interfaces are forbidden by the Terms and Conditions of services and the use of the site.

Switching the interface to receive an address via DHCP:

netsh interface ip set address "LOCAL_AREA_CONNECTION" dhcp

How to set up a static IP address

netsh interface ip set address name="INTERFACE_NAME" static YOUR_IP_ADDRESS SUBNET_MASK GATEWAY

Where INTERFACE_NAME is the name of the network adapter (you can view it with the netsh interface show interface command), and YOUR_IP_ADDRESS, SUBNET_MASK and GATEWAY are the IP address, subnet mask and gateway from the server delivery email or from the Network tab in Invapi. The default subnet mask is 255.255.255.0.

DNS server configuration:

netsh interface ip set dns name="INTERFACE_NAME" static 8.8.8.8

Applying a configuration

Settings made with netsh are applied immediately. To check that the IP address is configured correctly, run the command:

ipconfig /all

Attention

If you configure the server remotely (via RDP), an error in the address or gateway will cause loss of access to the server. Make the changes through the server management console or IPMI.

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×