How to assign static IP address on Windows Server 2022

Here are two easy ways to configure a static TCP/IP address on your Windows Server 2022 installation.

Avatar for Mauro Huc

On Windows Server 2022 (or 2019 and 2016), you can assign a static IP address in at least two ways through the graphical user interface (GUI) or commands, and in this guide, you will learn how.

When planning to install the server version of Windows , configuring a static IP address is among one the first tasks you have to complete as it will make it easier to share files and printers, and you may need this configuration to set up other networking features like port forwarding. Otherwise, services can stop working at any time.

By default, the server and client version of Windows receives a dynamic network configuration from the Dynamic Host Configuration Protocol (DHCP) server, and since it’s “dynamic,” it can change at any time. If this happens to a server, users won’t be able to connect to the services. 

Regardless of the service you plan to configure on the server, you must make sure to set a static IP address, and on Windows Server 2022, you can perform this task in at least two ways through Control Panel and PowerShell.

This guide will teach you the steps to assign a static TCP/IP address on Windows Server 2022, 2019, and 2016.

Configure static IP address on Windows Server from Control Panel

Configure static ip address on windows server from powershell.

To assign a static IP on Windows Server 2022, use these steps:

Open Control Panel on Windows Server.

Click on Network and Internet .

Click on  Network and Sharing Center .

Click the Change adapter settings option on the left navigation pane.

Change adapter settings

Right-click the network adapter and select the Properties option.

Windows Server network properties

Select the “Internet Protocol Version 4 (TCP/IPv4)” option.

TCP/IPv4 properties

Click the Properties button.

Select the “Use the following IP address” option.

Assign the static IP address – for example, 10.1.4.120 .

Windows Server set static IP address

Specify a Subnet mask . Typically, on a home network, the subnet mask is 255.255.255.0 .

Specify a Default gateway . (Usually, your router’s IP address. For example, 10.1.4.1 .)

Under the “Use the following DNS server addresses set Preferred DNS server” section, set the Preferred DNS server address , usually your router’s IP address or server IP address providing DNS resolutions (for example, 10.1.4.1 ).

(Optional) Specify an Alternative DNS server , which the computer will use if it cannot reach the preferred DNS server.

Click the OK button.

Click the Close button again.

Once you complete the steps, you can open your web browser and load a website to see if the configuration works.

To set a static IP address with PowerShell on Windows Server 2022, use these steps:

Open Start.

Search for PowerShell , right-click the top result, and select the Run as administrator option.

Type the following command to view the current configuration and press Enter :

PowerShell view IP configuration

Confirm the “InterfaceIndex,” “IPv4Address,” “IPv4DefaultGateway,” and “DNSServer.”

Type the following command to set a static IP address on Windows Server 2022 and press Enter :

Windows Server PowerShell set static IP

In the command, replace the “InterfaceIndex” number with the corresponding number of your adapter. Change “IPAddress” with the static IP address you want to assign to your device. Replace “PrefixLength” (subnet mask) with the correct bit number if necessary. Usually, the setting is “24” to represent “255.255.255.0.” Also, replace the “DefaultGateway” option with the default gateway address (usually the router) of the network.

Type the following command to set the DNS server IP address and press Enter :

PowerShell set static DNS server IP

(Optional) Type the following command to set a secondary DNS server address and press Enter :

In the command, change the “InterfaceIndex” number with your network adapter number and “ServerAddresses” with the DNS IP address.

Once you complete the steps, the PowerShell command will apply the static network to the server.

Can I set a static IP configuration from the Settings app?

Yes, you can use the Settings app to configure a static configuration. However, it’s worth noting that the Settings app also provides an interface to configure a static network configuration. However, it’s not recommended to use this method, as you may encounter problems, such as “Can’t save IP settings. Check one or more settings and try again” and others. One of the reasons is that the “Subnet mask” has to represent with bit number, not the full address. For example, “24” instead of “255.255.255.0.” As a result, 

Why Windows Server static IP address isn’t working?

The static IP address is not working on Windows Server, because you are using the Settings app to apply the configuration. The easiest way to assign a static TCP/IP address is using Control Panel.

Do these instructions only apply to Windows Server 2022?

No, you can use these instructions to configure a static IP address on Windows Server 2022, 2019, 2016, 2012, 2012 R2, and even older versions.

What TCP/IP address to use for a static configuration?

Always assign a TCP/IP address in the network range and outside of the DHCP server scope to allow proper connectivity and avoid configuration conflicts with other devices in the network.

  • How to install Proxmox in 2023
  • How to install Terminal on Windows Server 2022

How to set a static IP on Windows Server (2019)

Johannes heinzl.

Set a static IP as usual:

To set a static IP address in Windows 7, 8, and 10:

  • Click Start Menu > Control Panel > Network and Sharing Center or Network and Internet > Network and Sharing Center.
  • Click Change adapter settings .
  • Right-click on Wi-Fi or Local Area Connection.
  • Click Properties .
  • Select Internet Protocol Version 4 (TCP/IPv4) .
  • Select Use the following IP address .
  • Enter the IP address , Subnet mask , Default gateway , and DNS server .

Unfortunately, Windows Server does not show our assigned static IP.

If you type, you see that a different ip (marked as preferred) is used and our static IP is a duplicate:

C:\Users\Administrator> ipconfig /all

To fix it, enter this from Command Prompt:

C:\Users\Administrator> netsh interface ipv4 show inter

result as: Idx Met MTU State Name ---  ----------  ----------  ------------  ---------------------------   1          50  4294967295  connected     Loopback Pseudo-Interface 1 11          10        1500  connected     Local Area Connection       11: <=Keep it in mind Next run this command:            

C:\Users\Administrator>netsh interface ipv4 set interface 11 dadtransmits=0 store=persistent

Next, enter Run > services.msc > disable DHCP Client service Final, restart your server.

https://kb.netgear.com/27476/How-do-I-set-a-static-IP-address-in-Windows

https://social.technet.microsoft.com/Forums/ie/en-US/3e26affd-bb91-460a-b5fa-c7c0496c927c/how-to-disable-autoconfiguration-ipv4-?forum=winserverNIS

how to configure a static ip address on windows server 2019

Sign up for more like this.

how to configure a static ip address on windows server 2019

how to configure a static ip address on windows server 2019

How To Set a Static IP Address With PowerShell

In this blog post, I will show you how to assign and set a static IP address to a Windows 10 machine or Windows Server using PowerShell.

NetIPAddress

The NetIPAddress PowerShell module, which is included with PowerShell allows us to manage and configure the TCP\IP configuration of a Windows machine with PowerShell.

This option is very powerful because it allows us to programmatically set the IP address of a host using PowerShell, either remote or locally.

The PowerShell code \ script below will set the IP address of my machine with a static IP address, Default Gateway and a DNS server.

The code will assign the IP address to the network adapter and will exclude all virtual and VPN adapter.

NTW – Content Network

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Administer a Server Core server

  • 14 contributors
Applies to: Windows Server 2022, Windows Server 2019, Windows Server 2016

Because Server Core doesn't have a UI, you need to use Windows PowerShell cmdlets, command line tools, or remote tools to perform basic administration tasks. The following sections outline the PowerShell cmdlets and commands used for basic tasks. You can also use Windows Admin Center , a unified management portal currently in public preview, to administer your installation.

Administrative tasks using PowerShell cmdlets

Use the following information to perform basic administrative tasks with Windows PowerShell cmdlets.

Set a static IP address

When you install a Server Core server, by default it has a DHCP address. If you need a static IP address, you can set it using the following steps.

To view your current network configuration, use Get-NetIPConfiguration .

To view the IP addresses you're already using, use Get-NetIPAddress .

To set a static IP address, do the following:

Run Get-NetIPInterface .

Note the number in the IfIndex column for your IP interface or the InterfaceDescription string. If you have more than one network adapter, note the number or string corresponding to the interface you want to set the static IP address for.

Run the following cmdlet to set the static IP address:

  • InterfaceIndex is the value of IfIndex from step 2. (In our example, 12)
  • IPAddress is the static IP address you want to set. (In our example, 191.0.2.2)
  • PrefixLength is the prefix length (another form of subnet mask) for the IP address you're setting. (For our example, 24)
  • DefaultGateway is the IP address to the default gateway. (For our example, 192.0.2.1)

Run the following cmdlet to set the DNS client server address:

  • InterfaceIndex is the value of IfIndex from step 2.
  • ServerAddresses is the IP address of your DNS server.

To add multiple DNS servers, run the following cmdlet:

where, in this example, 192.0.2.4 and 192.0.2.5 are both IP addresses of DNS servers.

If you need to switch to using DHCP, run Set-DnsClientServerAddress –InterfaceIndex 12 –ResetServerAddresses .

Join a domain

Use the following cmdlets to join a computer to a domain.

Run Add-Computer . You'll be prompted for both credentials to join the domain and the domain name.

If you need to add a domain user account to the local Administrators group, run the following command at a command prompt (not in the PowerShell window):

Restart the computer. You can do this by running Restart-Computer .

Rename the server

Use the following steps to rename the server.

  • Determine the current name of the server with the hostname or ipconfig command.
  • Run Rename-Computer -ComputerName <new_name> .
  • Restart the computer.

Activate the server

Run slmgr.vbs –ipk<productkey> . Then run slmgr.vbs –ato . If activation succeeds, you won't get a message.

You can also activate the server by phone, using a Key Management Service (KMS) server , or remotely. To activate remotely, run the following cmdlet from a remote computer:

Configure Windows Firewall

You can configure Windows Firewall locally on the Server Core computer using Windows PowerShell cmdlets and scripts. See NetSecurity for the cmdlets you can use to configure Windows Firewall.

Enable Windows PowerShell remoting

You can enable Windows PowerShell Remoting, in which commands typed in Windows PowerShell on one computer run on another computer. Enable Windows PowerShell Remoting with Enable-PSRemoting .

For more information, see About Remote FAQ .

Administrative tasks from the command line

Use the following reference information to perform administrative tasks from the command line.

Configuration and installation

Networking and firewall, updates, error reporting, and feedback, services, processes, and performance, disk and file system.

Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback .

Submit and view feedback for

Additional resources

  Windows OS Hub / Windows Server 2019 / How to Configure NIC Teaming on Windows Server 2019/2016 and Windows 10

How to Configure NIC Teaming on Windows Server 2019/2016 and Windows 10

Configuring a nic teaming on windows server 2019, how to create nic teaming on windows server with powershell, how to enable nic teaming on windows 10 and 11.

Why may you need to combine multiple network adapters into a NIC Team?

  • Increase throughput . For example, by joining two 1GB network cards into a NIC Team, you will get a 2Gbit/s bandwidth on a logical adapter;
  • Manage network card load balancing . You can balance the network traffic across active NICs.
  • Fault tolerance . If any of your network cards in a NIC Team fails, the rest cards take their functions and the connection with the server is not interrupted. For critical servers, the mechanism protects a service against downtime if a network switch or an Ethernet port on it fails, or if a network cable (connecting your host and switch) is damaged. To implement this feature, it is enough to connect network cards to different physical switches.

You can configure NIC Teaming on Windows Server 2012 or newer. Let’s see how to combine multiple network adapters into a NIC Team interface on Windows Server 2019. NIC Teaming is disabled by default on Windows Server.

To enable it, open the Server Manager, select Local Server, and click NIC Teaming: Disabled in its properties.

enable nic teaming on windows server

In the next window, select Tasks -> New Team in the left bottom pane.

create new NIC team on Windows Server

Then enter a Team name and select the network adapters you want to add to the group.

Configure NIC Teaming additional properties (load balancing mode, standby)

You can select special team options. The options set NIC Teaming rules and performance. Let’s take a closer look at these settings.

Teaming Mode . The option sets how the group interacts with the network switches:

  • Static Teaming (IEEE 802.3ad) is a static operation mode depending on your network hardware. All team adapters must be connected to the same switch, which Ethernet ports are configured to use static channel aggregation (additional switch configuration is required);
  • Switch Independent (a default mode) — the NIC Team works independently of the switch; no additional configuration of network hardware is needed. If this mode is on, you can connect different network adapters to different switches to improve fault tolerance (protection against switch failure);
  • LACP (Link Aggregation Control Protocol, LACP, IEEE 802.1ax) is the mode that depends on your network hardware as well. You need to enable and configure the dynamic link aggregation using the LACP on your switch.
  • Address Hash — a special hash is assigned to each physical adapter (based on sender and recipient MAC or IP addresses). All traffic from a specific sender will go through this NIC;
  • Hyper-V Port — you can use this mode on a server with the Hyper-V role . It allows you to bind an adapter from your NIC Team to a specific port on a Hyper-V virtual switch;
  • Dynamic is a default option combining both load balancing types.

You can make one of the adapters in the group a Standby adapter . In a normal operation mode, this NIC is not used to process traffic. If any other adapter in your NIC Team fails, it will be replaced by a standby one. Actually, if this function is not enabled, there will be no service downtime when any network adapter fails, since its load will be automatically distributed among other cards in the group.

Select the settings you need, click OK and a new NIC Team will be created.

Open the list of network connections in the Control Panel. Make sure that a new device labeled Microsoft Network Adapter Multiplexor Driver (it has a different icon) has appeared. This is the NIC Teaming virtual adapter.

NIC Teaming adapter: Microsoft Network Adapter Multiplexor Driver

Further configuration of the network card (protocols, IPv4/v6 address) is performed in the properties of the NICTeam adapter.

configure IP address on NIC team interface

Later you can add or remove network adapters to your NIC Team.

You can use the NIC Teaming to configure multiple VLAN interfaces on Windows Server . To do it, you can even create a NIC Teaming group from a single network adapter.

You can create and manage NIC Teams both through the Windows graphical interface and PowerShell. PowerShell can be used to set up NIC Teaming on Windows Server Core .

You can use the built-in NetLbfo module on Windows Server to manage NIC Teaming. Display a list of network adapters on your server:

Get-NetAdapter

Get-NetAdapter powershell

Create a new Team0 from the adapters named Ethernet1 and Ethernet3. Select NIC Teaming mode: Switch Independent with dynamic load balancing.

New-NetLbfoTeam -Name Team0 -TeamMembers Ethernet1,Ethernet3 -TeamingMode SwitchIndependent -LoadBalancingAlgorithm Dynamic

New-NetLbfoTeam creates a new NIC group consisting of two physical NICs

  • TeamingMode : Static  SwitchIndependent, Lacp
  • LoadBalansingAlgorithm : TransportPorts, IPAddresses, MacAddresses, HyperVPort, Dynamic

To get information about NIC Teams on a server, use the command below:

Get-NetLbfoTeam

Get-NetLbfoTeam - list NIC teaming properties

You can use PowerShell to configure an IP address of your NIC Teaming interface and other network settings:

New-NetIPAddress -InterfaceAlias team0 -IPAddress 192.168.13.100 -PrefixLength 24 -DefaultGateway 192.168.13.1 Set-DnsClientServerAddress -InterfaceAlias team0 -ServerAddresses 192.168.13.10

Run the Get-NetAdapter command. Note that the LinkSpeed of the NIC Teaming network adapter is 2 Gbit/s .

check Team adapter

To change the NIC Teaming group settings, use the NetLbfoTeam cmdlet:

Set-NetLbfoTeam -Name Team0 -TeamingMode LACP

To add an additional VLAN interface via NIC Teaming, run the command below: Add-NetLbfoTeamNIC -Team Team0 -VlanID 44

You can remove a NIC Team using this command:

Remove-NetLbfoTeam -Name Team0

You can use NIC Teaming to combine network adapters both in Windows Server and in desktop versions of Windows 10 and 11. The main thing is that your network card must support Link aggregation, NIC teaming, or LBFO.

For example, NIC Teaming works out of the box with Realtek PCIe GbE Family Controller (10.35.510.2019) or Intel(R) 82574L Gigabit Network Adapter.

To create a NIC Team on Windows 10 (in this example, it is Windows 10 20H2), open your PowerShell console and list network adapters:

Let’s create a NIC Team of Ethernet0 and Ethernet1 adapters.

New-NetSwitchTeam -Name "MyNICTeam" -TeamMembers "Ethernet0","Ethernet1"

New-NetSwitchTeam - create NIC teaming interface on Windows 10

Make sure that a new NIC Teaming interface has appeared on the computer:

Get-NetSwitchTeam

Get-NetSwitchTeam

Don’t forget to set its network settings. Now you have got a new 2 Gbit/s interface.

Windows 10 NIC team properties

To remove a NIC Team, use PowerShell: Remove-NetSwitchTeam -Name "MyNICTeam"

Installing MS Office Group Policy Administrative Templates (ADMX)

How to run gpo logon script only once, related reading, create a multi-os bootable usb flash drive with..., read, modify, and parse json file (object) with..., configure dns scavenging to clean up stale dns..., how to read outlook emails with powershell, hide library and special folders from file explorer....

' src=

I got “new-NetLbfoTeam : The parameter is incorrect.” output like this new-NetLbfoTeam : The parameter is incorrect. At line:1 char:1 + new-NetLbfoTeam + ~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (MSFT_NetLbfoTeam:root/StandardCimv2/MSFT_NetLbfoTeam) [New-NetLbfoTeam], CimException + FullyQualifiedErrorId : Windows System Error -2147024809,New-NetLbfoTeam

' src=

I have my team made and work but it is i guess only fail over…in network setting of team says 2gb, but not getting that much.

Leave a Comment Cancel Reply

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Current ye@r *

Leave this field empty

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How to set static ip address in hyper-v vms windows server 2019

I have Windows server 2019 and multiple application running in IIS. I want to create different network for hyper-v vms with static ip.

And i dont need internet access to hyperv vms.

How can I configure vSwitch to achieve these?
  • microsoft-virtual-server

ahnirab's user avatar

Not at all. The vSwitch is that - a virtual switch. It has no control over the IP addresses on the VMs.

Just set the static IP (and DNS) in the VM, either by first logging into the VM or by using Powershell (on the host - there is a way to connect from the host in a powershell session INTO a VM, assuming you know username and password - look up https://docs.microsoft.com/en-us/virtualization/community/team-blog/2015/20150514-powershell-direct-running-powershell-inside-a-virtual-machine-from-the-hyper-v-host )

Like a physical switch, a vSwitch does not care (as in: AT ALL) about what the VM does IP address wide. Which is why it is VERY - and I mean VERY VERY - good, if you do not control all VM's, to isolate different client VM's into separate VLANs (which you set in the VM configuraiton, not in the VM) and use a router (as VM) to route between them. As such, vSwitch is 100% identical to ANY other switch on the world in the standard configuration. It does not care - it collects what IP address is used there using the ARP protocol.

Make a network diagram, implement it, like you would with hardware and not VM's.

TomTom's user avatar

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged hyper-v microsoft-virtual-server ..

  • The Overflow Blog
  • Between hyper-focus and burnout: Developing with ADHD
  • Featured on Meta
  • Our Partnership with OpenAI
  • Imgur image URL migration: Coming soon to a Stack Exchange site near you!

Hot Network Questions

  • Can I travel to the UK with a child accompanied visa without the adult named on my visa but with the consent from that adult to another adult?
  • Grant permissions from the command line
  • Are these lines in my toilet bowl signs of a (impending?) structural failure?
  • Optional chaining - change
  • Could a Thri-Kreen use it's secondary arms to operate two-handed ranged weapons?
  • Social Planner vs Representative Household
  • Evolution of predatory elves
  • Violin becomes a spring by the force of my jaw (without me pushing extra)
  • How long does it take to add 2 oz sealant through valve?
  • How could the words עשב בשדך run together?
  • Best way to drive multiple LED strips at distinct times with one LED driver
  • Taking the inverse (not the reciprocal) of both sides of an inequality
  • What does "come the nut-cutting" mean?
  • How can I save a dating relationship when I am promoted and she will be in my vertical reporting chain?
  • Why does the angel say no in Joshua 5:14?
  • What's the story behind the "mysterious" 486DX3?
  • Does the axis of spin of a particle also rotate?
  • Does Licensing open-source prevent me from selling the product?
  • Generic Shor's algorithm with Qiskit
  • Hash as filename to protect data
  • 4 term exact sequence diagram, surjective map
  • Can a piece of duct tape bring down a plane today (Flight 603, Perú)?
  • How to know what details Ubuntu is using for SSH host?
  • Using already existing bolt width

how to configure a static ip address on windows server 2019

Serveracademylogo 800x309

I forgot my password

Or sign in using

Don't have an account yet?

Create a free account

Sign in instead

Please wait...

How to Assign a Static IP address on Windows Server 2016

This tutorial describes the steps to assign a static IP address on Windows Server 2016 through both the GUI and Windows PowerShell.

Jump to a specific section:

Method 1) Through the GUI with Server Manager

Method 1) assign a static ip with windows powershell.

First - open Server Manager by clicking the Windows button and selecting  Server Manager:

ServerManager

Next - click  Local Server followed by the blue text next to "Ethernet":

ServerManager2

This will open Network Connections . From here, right click on your  Ethernet adapter and chose "Properties".

Adapters

Uncheck TCP/IPv6 (most likely won't use it, if you need it you will know), select TCP/IPv4 and  Properties

EthernetProperties

Select  Use the following IP address and enter your desired IP, subnet mask and default gateway. This will require that you also specify a preferred or alternate DNS server as shown below:

TCPIPv4 Properties

Click OK , and  OK again to close the properties windows to make sure your settings took effect.

If you have no idea what your settings should be and assuming your computer is already connected to the internet, you could look at your automatic IP configuration by running "ipconfig /all" in command prompt or Windows PowerShell.

First you need to open PowerShell. If you are running Server core, then PowerShell will be open by default but if not, select the Windows button and search for and launch PowerShell as an administrator:

PowerShell

Once you have PowerShell open, we can assign a static IP in two steps:

  • Get your network adapter index
  • Assign static IP address, subnet mask, default gateway and DNS settings

Let's start by running the command below to get our network adapter index:

Get-NetAdapter

We are going to take the output of the ifIndex value which in my case is two, and we will pass that on to the next command when we assign an IP address:

And that's it! Let me know your thoughts below...

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

How to add a Static IP-Adress to a Virtual Machine in Hyper V to stop changing the ip adress when restarting the VM

I have two questions:

How can i set up a Static IP Adress on my virtual Machine, which is running on Windows 11 in Hyper v. Every time i do start The virtual Machine and write in the command Prompt"IP-Config" then i always have a different one.

I want to have via Remote Desktop, Control Access to my virtual Machine Outside from the local network. In order to that, i need a port forwarding, so basically i need a static IP-Adress which i can add to the Port forwarding settings.

The Question is, which Kind of Switch should i set up and give a Static IP Adress? should it be the External Switch or Internal Switch?

  • remote-desktop

Rohit Gupta's user avatar

3 Answers 3

You cannot use static IP with the default switch. This is a very painful fact and I have spent many fruitless hours trying to find a solution.

Eventually I wrote a program to automatically update the host file upon guest restarts, so I can use hostname instead of IP address to access the guest.

https://github.com/aaalgo/hyperv2hosts

wdong's user avatar

how can i set up a Static IP Adress on my virtual Machine, which is running on Windows 11 in Hyper v. Every time i do start The virtual Machine and write in the command Prompt"IP-Config" then i always have a different one.

Open Hyper-V Manager, go to Network Settings, and add an external NIC switch that you can give a Static IP on your Router that your Host machine uses.

My Second question is, i want to have via Remote Desktop Controll Acess to my virtual Machine Outside from the local network. In order to that, i need a port forwarding, so basically i need a static IP-Adress which i can add to the Port forwarding settings.

You would use a VPN or SSH connection or if your ISP allows Port Forwarding, you can try setting up that way.

Here is a solution you might find helpful

Hyper V static IP external swtich

John's user avatar

  • what does "ISP" mean? –  kongiponki kongiponki Jan 26, 2022 at 21:23
  • ISP is the company that provides you with Internet and you need determine if you a NAT connection or whether they will let you do port forwarding. –  John Jan 26, 2022 at 21:31
  • ISP stands for " internet service provider " –  Alexandre Huat Dec 30, 2022 at 13:18

If you also have control over the DHCP controller in your local network (Router, Firewall, ... whoever does DHCP for your devices), one option to make sure that the VM always gets the same IP address is to:

  • give the VM a static MAC address
  • configure your DHCP server to reserve a specific IP for the static MAC address of the VM

lwohlhart's user avatar

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged remote-desktop hyper-v switch ..

  • The Overflow Blog
  • Between hyper-focus and burnout: Developing with ADHD
  • Featured on Meta
  • Our Partnership with OpenAI
  • Imgur image URL migration: Coming soon to a Stack Exchange site near you!

Hot Network Questions

  • How to find what is wearing out my SSDs
  • I think I don't truly understand Cauchy's Integral theorem
  • Well distributed sets
  • How far can you push Object Oriented Programming?
  • Does Licensing open-source prevent me from selling the product?
  • Which formula do I use when calculating finite geometric series?
  • Which cognitive psychology findings are solid, that I can use to help my students?
  • Shortest battleship game, to find number of battleships
  • How many rolls are sufficient to ensure, with probability 99%, that the sum is greater than 100?
  • What does "much more shall we be saved" mean in Romans 5:9?
  • What is the meaning of "they've got life beat."?
  • Name of (90’s?) movie or tv that had an alien scorpion creature that attaches to a forearm as a weapon/tool?
  • how to close gap between to edges when using bevel in edit mode?
  • What does "come the nut-cutting" mean?
  • How would humans on Earth detect a Shkadov thruster on other side of the Milky Way Galaxy?
  • Can Vecna’s Rotten Fate ability kill a player outright?
  • How could the words עשב בשדך run together?
  • “Out of the mouths of babes”: Is this idiom strictly used to refer to children?
  • Are there countries where defendants are fully compensated for their time if they’re found not guilty?
  • Why did SpaceX change the landing site from the Pacific (ITF-1, ITF-2) to the Indian Ocean (ITF-3 and subsequent flights)?
  • How to know what details Ubuntu is using for SSH host?
  • Advice on designing an inconsistent magic system
  • What bike components will receive more wear when pulling a 65 lb. trailer?
  • Java interpreter

how to configure a static ip address on windows server 2019

Configure Static IP Address on Windows Server 2022

A static IP address is an IP address that was manually configured for a Windows device instead of an IP address assigned by a DHCP server. This step by step tutorial covers how to configure a Static IP Address on Windows Server 2022

Demo environment

  • Computer Name: server1
  • Operating System: Windows Server 2022 Datacenter

The IP address is assigned by DHCP by default.

1. Open the Server Manager dashboard, select Local Server, and click Ethernet.

Configure Static IP Address on Windows Server 2022

2. Right-Click on Ethernet and Click  Properties .

Configure Static IP Address on Windows Server 2022

3. In Ethernet Properties, click  Internet Protocol Version 4(TCP/IPv4)

Configure Static IP Address on Windows Server 2022

4. In Internet Protocol Version 4(TCP/IPv4) Properties, set Static IP address, Gateway, and other details and click  OK .

  • IP address: 192.168.1.60
  • Subnet mask: 255.255.255.0
  • Default gateway:192.168.1.1
  • Preferred DNS server: 8.8.8.8
  • Alternate DNS server:8.8.4.4

Configure Static IP Address on Windows Server 2022

5. Click  OK .

Configure Static IP Address on Windows Server 2022

The static IP (IPv4) address has been configured.

IP Address (IPV4)

IP Addressing is logical addressing. An IP address can be divided into 2 portions network and host address. The network address is used to identify the network and the host address is used to identify devices on the network. IP V4 is 32-bit addressing. The 32 bits are divided into 4 octets and the total IP addressing scheme is divided into 5 classes (Class A, Class B, Class C, Class D, and Class E). Private IP Addresses used on private networks are not routable through the internet.

Class B is used for used Local area network (LAN) and Local area network (WAN).

  • First octet range: 0 – 127
  • Default Subnet Mask: 255.0.0.0
  • Privet IP Address: 10.0.0.0-10.255.255.255
  • First octet range:128-191
  • Default Subnet Mask: 255.255.0.0
  • Privet IP Address: 172.16.0.0-172.31.255.255
  • First octet range: 192-223
  • Default Subnet Mask: 255.255.255.0
  • Privet IP Address: 192.168.0.0-192.168.255.255

Class D is used for Multicasting.

  • First octet range: 224 – 239

Class E is used for Research and development.

  • First octet range: 240 – 255

Related Posts

Configure permissions on a shared folder - Windows Server 2022

Configure permissions on a shared folder – Windows Server 2022

Schedule Automatic Shutdown in Windows Server 2022

Schedule Automatic Shutdown in Windows Server 2022

Install and Configure Windows Admin Center on Windows server 2022

Install and Configure Windows Admin Center on Windows Server 2022

Install SQL Server 2022 on Windows Server 2022

Install SQL Server 2022 on Windows Server 2022

How-To Geek

How to assign a static ip address in windows 10 or windows 11.

When organizing your home network it's easier to assign each computer it's own IP address than using DHCP. Here we will take a look at doing it in XP,

Quick Links

What is a static ip address, assign static ip addresses via your router, how to set a static ip address in windows 11, how to set a static ip address in windows 10, how to set a static ip address in windows 7 or 8 using "network connections", set a static ip address in windows vista, set a static ip address in windows xp, key takeaways.

  • To set a static IP address in Windows 10 or 11, open Settings -> Network & Internet and click Properties for your active network.
  • Choose the "Edit" button next to IP assignment and change the type to Manual.
  • Flip the IPv4 switch to "On", fill out your static IP details, and click Save.

Sometimes, it's better to assign a PC its own IP address rather than letting your router assign one automatically. Join us as we take a look at assigning a static IP address in Windows.

A static IP address is manually set to a permanent, fixed address rather than being assigned automatically by your router using a procotol known as Dynamic Host Configuration Protocol (DHCP). DHCP is a handy way for devices to connect to your network more easily, because you don't have to configure IP addressing for each new device yourself. The downside to automatic addressing is that it's possible for a device's IP address to change from time to time, which is why people choose static IPs for certain types of devices. For example:

  • You have a device like a home media server that you want to be able to find using the same IP address or host name each time.
  • You have certain apps that can only connect to network devices using their IP address. In particular, many older networking apps suffer this limitation.
  • You forward ports through your router to devices on your network. Some routers play nice with port forwarding and dynamic IP addresses; others do not.

Whatever your reason, assigning static IP addresses to devices is not difficult, but you do have a choice to make---whether to do it from the router or on the device itself.

Related: How to Set a Static IP Address in Ubuntu

While this article covers assigning static IP addresses to PCs within Windows itself, there is another way to go about it. Many routers allow you to assign a pool of IP addresses that are handed out to specific devices (based on the device's physical, or MAC address). This method offers a couple of significant advantages:

  • IP addresses are still managed by the router, meaning that you won't have to make (and keep up with) changes on each individual device.
  • It's easier to assign addresses within the same IP address pool your router uses.

This article is about assigning static IP addresses directly to PCs running Windows. We've already got a great guide on How to Set Static IP Addresses On Your Router , so if that's the way you want to go, be sure to give it a read.

With all that in mind, though, let's take a look at how to assign static IP addresses within any version of Windows.

Related: How to Find Your Router's IP Address on Any Computer, Smartphone, or Tablet

To set a static IP address in Windows 11, you'll want to open Settings, go to Network & Internet, and then find the Properties for your network. Inside there you'll be able to click the Edit button for IP Assignment and then fill out the manual network details.

First, open up the Settings app and then find Network & Internet on the left-hand side. You'll be presented with a panel that shows your current network connection. You can click where it says "Properties" right underneath the network, or if you have multiple network connections you can drill down into the specific network to see the IP address details for each one . In this case it's called "Ethernet", but you will most likely see "Wi-Fi" as the option to choose.

Once you've drilled down into the network connection that you want to set a manual IP for, scroll down until you see "IP Assignment" and then click the Edit button to the right.

Once there, you'll flip the drop-down to "Manual" and switch the IPv4 switch to "On". At this point you can fill out your network details and click Save to finish.

You can also use the old-school Network Connections panel in Windows 11, so if you prefer to use that method, keep reading.

If you're interested in more advanced networking, you might need to set up a static TCP/IP route , reset the entire TCP/IP stack on Windows , check open TCP/IP ports , find your MAC address on Windows , or find your IP address from the Command Prompt . We've got you covered there too.

To set a static IP address in Windows 10, you'll need to open the Settings app and drill down to Network & Internet. From there you'll select Properties for your network, and then the Edit button next to IP Assignment where you can input a manual IP address.

First, open the Settings app and locate the Network & Internet button.

On the next screen you'll see your network status, which should show you your active network. Here you'll want to click the Properties button. If you have multiple different networks, you could select them from the left-hand menu---in our case you'll notice we have both Wi-Fi and Ethernet networks, so you'll want to pick the one that you are trying to set a manual IP address for. You'll notice this is the same method we use when we're trying to find an IP address on Windows 10 .

On the network properties screen, scroll down until you see "IP settings" and click the Edit button under "IP assignment".

In the resulting popup window, change the Edit IP settings dropdown to Manual and then flip the IPv4 switch to "On". Fill out the details, click Save, and you should be good to go.

You might need to reboot to get all of your applications to work properly, just because it's Windows.

It's worth noting that you can use the old Network Connections method to set an IP address in any version of Windows, so if you prefer that method, keep reading.

To change the computer's IP address in Windows 7, you'll need to open the "Network Connections" window. Hit Windows+R, type "ncpa.cpl" into the Run box, and then hit Enter.

In the "Network Connections" window, right-click the adapter for which you want to set a static IP address, and then select the "Properties" command.

In the properties window for the adapter, select "Internet Protocol Version 4 (TCP/IPv4)" and then click the "Properties" button.

Select the "Use the following IP address" option, and then type in the IP address, subnet mask, and default gateway that corresponds with your network setup. Next, type in your preferred and alternate DNS server addresses. Finally, select the "Validate settings upon exit" option so that Windows immediately checks your new IP address and corresponding information to ensure that it works. When you're ready, click the "OK" button.

And then close out of the network adapter's properties window.

Windows automatically runs network diagnostics to verify that the connection is good. If there are problems, Windows will give you the option of running the Network troubleshooting wizard. However, if you do run into trouble, the wizard likely won't do you too much good. It's better to check that your settings are valid and try again.

Changing your IP from DHCP to a Static address in Vista is similar to other versions of Windows, but getting to the correct location is a bit different. Open the Start Menu, right-click on Network, and select Properties.

The Network and Sharing Center opens...click on Manage network connections.

Right-click on the network adapter you want to assign an IP address and click Properties.

Highlight Internet Protocol Version 4 (TCP/IPv4) then click the Properties button.

Now change the IP, Subnet mask, Default Gateway, and DNS Server Addresses. When you're finished click OK.

You'll need to close out of Local Area Connection Properties for the settings to go into effect.

Open the Command Prompt and use the

command to verify that the changes were successful.

To set a Static IP in Windows XP, right-click the "My Network Places" icon, and then select "Properties."

Right-click the adapter for which you want to set the IP, and then select "Properties" from the context menu.

Select the "Internet Protocol (TCP/IP)" entry, and then click the "Properties" button.

Select the "Use the following IP address" option. Type in the IP address, subnet mask, default gateway, and DNS server addresses you want to use. When you're finished, click the "OK" button.

You will need to close out of the adapter's properties window before the changes go into effect.

And you can verify your new settings by using the

 command at the command prompt.

By and large, it's better to let most of your devices have their IP addresses assigned automatically by your router. Occasionally, though, you might want to set a static IP address for a particular device. While you can set static IP addresses directly on your devices (and this article has shown you how to do just that on Windows PCs), we still recommending setting up static IP addressing on your router if possible. It will just make life easier.

Related: How to Find Any Device's IP Address, MAC Address, and Other Network Connection Details

  • Get Windows 2019
  • Install Windows 2019
  • (01) Add Local Users
  • (02) Change Admin User Name
  • (03) Set Computer Name
  • (04) Set Static IP address
  • (05) Windows Update
  • (06) Allow ICMP Echo Reply
  •   NTP Server
  • (01) Configure NTP Server
  • (02) Configure NTP Client
  •   SSH Server
  • (01) Configure SSH Server
  • (02) Configure SSH Client
  • (03) SSH Key-Pair Authentication
  • (04) Use SSH-Agent
  • (05) Change default Shell
  • (01) Remote Desktop (Server)
  • (02) Remote Desktop (Client)
  • (03) Enable Multi Sessions
  • (04) Install RDS (Session based)
  • (05) Create Session Collections
  • (06) Publish RemoteApps
  • (07) Connect to RemoteApps
  •   DNS Server
  • (01) Install DNS Server
  • (02) Add Forward lookup Zone
  • (03) Add Reverse lookup Zone
  • (04) Add A/PTR record
  • (05) Verify resolving
  • (06) Add MX record
  • (07) Add CNAME record
  • (08) Configure Secondary Zone
  • (09) Configure Stub Zone
  • (10) Set Forwarder
  • (11) Set Conditional Forwarder
  •   DHCP Server
  • (01) Install DHCP Server
  • (02) Configure DHCP Server
  • (03) Configure DHCP Client
  •   Active Directory Domain Service
  • (01) Install Active Directory
  • (02) Configure DC
  • (03) Join in Domain from Clients
  • (04) Add User Accounts
  • (05) Add UNIX attributes to Accounts
  • (06) Add User Accounts (CUI)
  • (07) Add Group Accounts
  • (08) Add Group Accounts (CUI)
  • (09) Add Organizational Unit
  • (10) Add Organizational Unit (CUI)
  • (11) Add Computer Accounts
  • (12) Add Computer Accounts (CUI)
  •   iSCSI
  • (01) Install iSCSI Target
  • (02) Configure iSCSI Target
  • (03) Configure iSCSI Target (CUI)
  • (04) Configure iSCSI Initiator
  • (05) Configure iSCSI Initiator (CUI)
  • (01) Install NFS Server
  • (02) Configure NFS Shared Folder
  • (03) Install NFS Client
  • (04) Connection from NFS Client
  •   Hyper-V
  • (01) Install Hyper-V
  • (02) Create Virtual Machine(Win)
  • (03) Create Virtual Machine(Linux)
  •   Docker
  • (01) Install Docker
  • (02) Basic Usage of Docker
  • (03) Add Container Images
  • (04) Access to Services on Container
  • (05) Use Dockerfile
  • (06) Use Persistent Storage
  • (07) Docker Network Basis
  •   Web Server (IIS)
  • (01) Install IIS
  • (02) Use Default Web Site
  • (03) Configure Virtual Directory
  • (04) Add Web Sites
  • (05) SSL/TLS Settings
  • (06) Enable HSTS
  • (07) Install ASP.NET feature
  • (08) Basic Authentication
  • (09) WebDAV Setting
  • (10) Windows Authentication
  • (11) IP and Domain Ristrictions
  • (12) Use Python Scripts
  •   FTP Server
  • (01) Install FTP Server
  • (02) Configure Passive Mode
  • (03) Add FTP Site
  • (04) SSL/TLS Setting
  • (05) FTP Client Usage
  • (06) FTP User Isolation Setting
  •   SQL Server 2019
  • (01) Preparation
  • (02) Install SQL Server 2019
  • (03) Connect to Database Engine
  • (04) Connect from remote Hosts
  • (05) SQL Server Services
  • (06) SQL Server System Databases
  • (07) Firewall Settings
  • (08) AlwaysOn Availability #1
  • (09) AlwaysOn Availability #2
  • (10) Failover Cluster Instance #1
  • (11) Failover Cluster Instance #2
  • (01) Install File Server
  • (02) Set Network File Sharing
  • (03) Set File Sharing (Advanced)
  • (04) Access to Sharing Folder
  • (05) Configure SMB Multi Channel
  • (06) Install Resource Manager
  • (07) Set Quotas
  • (08) Set auto apply Quotas
  • (09) Install DFS NameSpace
  • (10) Create DFS NameSpaces
  • (11) Set Folders to DFS NameSpace
  • (12) Install DFS Replication
  • (13) Configure DFS Replication
  •   Windows Server Backup
  • (01) Install Windows Backup
  • (02) Run Backup Once
  • (03) Set Scheduled Backup
  • (04) Recover Files
  • (05) Restoring System
  •   Windows Admin Center
  • (01) Install Admin Center
  • (02) Connect to Admin Console
  • (03) Add Target Hosts
  • (04) Overview for Items#1
  • (05) Overview for Items#2
  • (01) Install WDS
  • (02) Configure WDS
  • (03) Add install image
  • (04) Add boot image
  • (05) Installation on Clients
  • (01) Install WSFC
  • (02) Configure Shared Storage
  • (03) Configure Cluster
  • (04) Configure Cluster (CUI)
  • (05) Add Nodes
  • (06) Remove Nodes
  • (07) Clustering outside AD
  • (01) Set Profile
  • (02) Set Alias
  • Install Python
  • Create SSL Certificate (Self Sign)
  • Windows Subsystem for Linux
  • Use SysPrep
  • (01) Add Local User
  • (04) Set Static IP Address
  • (05) Configure Windows Update

how to configure a static ip address on windows server 2019

  • Articles Automation Career Cloud Containers Kubernetes Linux Programming Security

How to troubleshoot DHCP communication problems on your network

%t min read | by Damon Garn

Networking cables

Imagine you have a repurposed enterprise switch with a Dynamic Host Configuration Protocol (DHCP) service that you need to troubleshoot. There is little information available about the switch's configuration or previous deployments. The device is reported to be functional and should lease Internet Protocol (IP) address configurations to clients. However, the attached clients are not receiving IP configurations from the switch.

There are many ways to troubleshoot this, including the ones I'll explore in this article: network scanning and packet sniffing tools. An advantage of scanning and sniffing tools is that they display exactly what is happening on the network. Not what the network should do, but what it is doing.

DHCP uses a four-step process to enable clients to lease an IP address configuration:

  • DHCP DISCOVER: Client broadcasts that it needs to lease an IP configuration from a DHCP server
  • DHCP OFFER: Server broadcasts to offer an IP configuration
  • DHCP REQUEST: Client broadcasts to formally ask for the offered IP configuration
  • DHCP ACKNOWLEDGE (ACK): Server broadcasts confirming the leased IP configuration

These broadcasts use ports 67/udp and 68/udp. If you're not familiar with how DHCP works, see Static and dynamic IP address configurations: DHCP deployment .

Start with the basics

First, check all the basics:

  • Does physical connectivity exist with functional network media?
  • Have you restarted the DHCP service?
  • Is a DHCP scope configured?
  • Do the server and client logs display any clues as to why the leases fail? (If so, try to fix those issues before moving on.)

Once you've confirmed the above (including that there aren't any clues in the logs), follow the steps below to use network scanners and packet sniffers to display valuable troubleshooting information.

Scan for the DHCP server

One logical step is to confirm that the DHCP service device has a network presence. An Nmap scan verifies its identity on the network. Many articles describe how to use Nmap . Begin with a basic ping sweep that identifies all hosts on the segment. Run the scan from a connected device with a static IP address configuration.

For a basic ping sweep to identify available hosts on the 192.168.1.0/24 network, type:

Good news: The network device hosting the DHCP service was detected. If it appears to have a legitimate IP address configuration, then it should be able to lease addresses. Refer to the organization's network diagram to ensure Nmap detects the nodes you expect to see.

If the results indicate it did not find the DHCP server on the network, check its static IP address configuration, ensure network interface controllers (NICs) are enabled, and so on.

Sniff for DHCP traffic

IT Automation ebook

You might be asking: What DHCP traffic is being exchanged? The clients send DHCP DISCOVER queries, and the server provides DHCP OFFER responses. Use a protocol analyzer (or packet sniffer) to intercept network traffic and ensure the communication occurs as expected. The two primary examples of sniffers are tcpdump and Wireshark . Which you select is a matter of preference, familiarity, and what is installed on the system.

Sniffing network traffic with tcpdump

The tcpdump utility is fairly common on many Linux admin computers. If not, use dnf to install it:

The network interface you want to monitor must be in promiscuous mode. You set this using the ip command. For example, to configure eth0 :

You can configure tcpdump to grab specific network packet types, and on a busy network, it's a good idea to focus on just the protocol needed. This example gathers information on eth0 for UDP ports 67 and 68 (DHCP) in verbose mode. tcpdump writes the output to a file named dhcp.pcap :

View the file's contents using tcpdump (rather than a standard text editor!). The read option is -r , followed by the filename:

tcpdump can read the file, but it may be more visually appealing and easier to filter the output by opening the file in Wireshark. Launch Wireshark, go to the File menu, select Open , and select the output .pcap file (the exact process may vary by version).

First, establish whether the clients sent DHCP DISCOVER queries (remember, the client initiates the lease-generation process). If so, then the clients are likely functioning properly. If DHCP DISCOVER queries are getting sent, check for DHCP OFFER responses from the server. Do these responses exist and are they offering the correct information?

[ Download the Bash shell scripting cheat sheet . ]

Sniffing network traffic with Wireshark

Wireshark is another excellent traffic-sniffing tool, and the process is basically the same as with tcpdump. It's best to run Wireshark from the DHCP server in this case because the client computers aren't configured. Another option is to configure a central troubleshooting workstation with a static IP address to capture all traffic. Wireshark has excellent flexibility, and you can also run it from non-Linux systems.

Set the capture filter for the appropriate network interface (there isn't a capture filter for DHCP), and begin the capture process. Again, confirming the DHCP DISCOVER and DHCP OFFER communications is key. Next, start a DHCP client workstation to initiate the lease-generation process. Stop the capture after about one minute, at most. The DHCP query occurs very early in the operating system's startup procedure.

Save the capture file, if desired. In the Display filter box, type dhcp and select Enter to filter the packets. Wireshark now displays the DHCP packets picked up from the network. The client packets are DHCP DISCOVER communications, and the server should reply with a DHCP OFFER. If both sets of packets are displayed, the devices are communicating correctly. If either set is missing, then the related device has the issue. DHCP REQUEST and ACK exchanges are also displayed if the lease-generation process is successful.

[ Get access to a free trial of full access to Red Hat's curriculum . ]

Use an Nmap script

While Nmap can conduct general scans and protocol analyzers can display information based on packet captures, what about a more complete solution? Browse the Nmap site for the Nmap Scripting Engine (NSE). It contains more than 600 scripts with preconfigured settings for various Nmap scans. Authors create and share these scripts. In this scenario, the broadcast-dhcp-discover script helps with DHCP troubleshooting.

The script generates a DHCP DISCOVER message, the same as a standard DHCP client, and logs the DHCP OFFER responses from any DHCP servers. Not only can this information prove that the DHCP server is answering requests from clients, but it also detects rogue DHCP servers (rogue DHCP servers may be planted in the network by malicious actors, or they might be misconfigured servers or unknown servers deployed by administrators). The script should detect any DHCP servers because the DISCOVER message is broadcast to the 255.255.255.255 address.

The basic syntax for Nmap scripts, with the DHCP broadcast script as an example, is nmap --script broadcast-dhcp-discover . A more specific DHCP syntax is:

The unicast version of the script , dhcp-discover , sends a direct query to the DHCP server. Notice the query is addressed to the DHCP server:

This query generates a response from the server that provides basic configuration information and suggests that the service is communicating. The response to this message may vary by DHCP service type, but any response should indicate functionality. The DHCP server is likely misconfigured, not running, blocked, or otherwise unavailable if no response is detected. Regardless, it identifies the server as the problem in this scenario.

Note: There are corresponding scripts for IPv6 network troubleshooting, as well.

Start with the simple stuff

Narrowing the scope of the problem to specific network communications by using packet sniffers gives the most granular view of what's happening on the network. Confirming the presence of the DHCP server on the segment with Nmap is a good way of knowing what you think is on the network is actually on the network.

I want to point out a general note on my troubleshooting methodology in this article. Notice that I began with the simple stuff: physical connectivity, service status, service configuration, logs, and such. Begin with the simple things and move toward the more complicated. Just because a network is complex does not mean the problem is complex.

A row of old tools for cutting and carving

Damon Garn owns Cogspinner Coaction, LLC, a technical writing, editing, and IT project company based in Colorado Springs, CO. Damon authored many CompTIA Official Instructor and Student Guides (Linux+, Cloud+, Cloud Essentials+, Server+) and developed a broad library of interactive, scored labs. He regularly contributes to Enable Sysadmin, SearchNetworking, and CompTIA article repositories. Damon has 20 years of experience as a technical trainer covering Linux, Windows Server, and security content. He is a former sysadmin for US Figure Skating. He lives in Colorado Springs with his family and is a writer, musician, and amateur genealogist. More about me

Try Red Hat Enterprise Linux

Download it at no charge from the red hat developer program., related content.

A blue cable plugged into a green Raspberry Pi

How to Configure Static IP Address on Ubuntu 24.04 (Desktop)

In this article, we will show you how to configure static ip address on Ubuntu 24.04 desktop step by step.

When you want a persistent IP address on your Ubuntu 24.04 desktop, then you must a configure a static IP address. Whenever we install Ubuntu then DHCP is enabled by default, and it will try to fetch the IP address from DHCP server if it is available over the network.

In Ubuntu Desktop 24.04, there are two ways to configure static IP address:

  • Graphical User Interface
  • Command Line

We will cover both the methods in this article.

Prerequisites

  • Pre-Install Ubuntu 24.04
  • Regular user with sudo rights
  • Basic understanding of networks

Configure Static IP Address on Ubuntu 24.04 Using GUI

Login to your desktop, click on the network icon and then choose Wired option as shown below:

Wired-Network-Settings-Ubuntu-24-04

We will get the following window, click on “ gearbox” icon

Gearbox-Icon-Ubuntu-24-04-Network-WiredSettings

Go to IPv4 tab, there you will see that DHCP is enabled for automatic IP allocation.

Automatic-DHCP-Option-Ubuntu-24-04-Network-Settings-GUI

Choose Manual option to configure static IP address and specify IP details (IP address, netmask, gateway and DNS IP) as show below:

Note: Change the IP details that suits to your network

Configure Static IP Address On Ubuntu 24.04

Click on Apply .

Next, disable and enable the interface to make above changes into effect.

Above screen confirms that we have successfully configured static IP address on our Ubuntu 24.04 desktop.

Configure Static IP Address on Ubuntu 24.04 Using Command Line

We can use netplan utility and its configuration file to assign the static ip on the interface (like ep0s3 or eth0).

Netplan configuration file are placed in /etc/netplan directory. Under this directory there should be a file with name 01-netcfg.yaml , 50-cloud-init.yaml or may be else depending on your environment.

Netplan-Configuration-file-Ubuntu-24-04-Desktop

Edit netplan configuration file, in our case it is 01-netcfg.yaml

save and close the file.

Note: In above file, replace the IP address details and interface according to your setup. We have also used renderer as “ NetworkManager ” which instructs netplan to use NetworkManager as its backend. It is used for desktops and for the servers and headless environments use “ networkd ” instead of NetworkManager.

Configure Static IP Address On Ubuntu 24.04 Command Line

Set the permission on this file using chmod command,

To make above changes into the affect, run below netplan apply command.

Next, verify the IP address and network connectivity.

Verify-IP-Details-Ubuntu-24-04-Desktop

Perfect, output above shows that we have successfully configure static ip address using netplan utility.

That’s all from this article. We hope you have found it informative and useful, feel free to post your queries and feedback in below comments section.

Read Also : How to Install Git on Ubuntu 24.04

Leave a Comment Cancel reply

IMAGES

  1. Windows Server 2019 : Initial Settings : Set Static IP Address : Server

    how to configure a static ip address on windows server 2019

  2. HOW TO SET STATIC IP ADDRESS IN WINDOWS SERVER 2019

    how to configure a static ip address on windows server 2019

  3. How to Set Up a Static IP Address

    how to configure a static ip address on windows server 2019

  4. Windows Server 2019 : Initial Settings : Set Static IP Address : Server

    how to configure a static ip address on windows server 2019

  5. How To Set a A Static IP Address In Windows

    how to configure a static ip address on windows server 2019

  6. How to set a static IP address in Windows

    how to configure a static ip address on windows server 2019

VIDEO

  1. Configure Static IP address on Windows Server Machine

  2. How to Set Static IP Address in Windows 7

  3. Never Lose Connection! Set a STATIC IP Address on Windows 11/10 (EASY Way!)

  4. Step By Step

  5. How to set a Static IP Address Windows 7

  6. How to Configure a Static IP Address on Windows 11

COMMENTS

  1. How to configure Static IP on Windows Server 2019

    In this article. Prerequisites. Step 1: Log in to Windows using RDP. Step 2: Open Ethernet Adapter Properties. Step 3: Find the Static IP of Your Server. Step 4: Configure Static IPv4 Address. Step 5: Obtain IPv6 Address. Step 6: Configure Static IPv6 Address. Conclusion.

  2. Initial Settings : Set Static IP Address 2019/02/04

    Run [Server Manager] and select [Local Server] on the left pane and click [Ethernet] section on the right pane. Right-Click [Ethernet] icon and open [Properties]. Select [Internet Protocol Version 4] and click [Properties] button. Set Static IP address and Gateway and others for your local network.

  3. How to assign static IP address on Windows Server 2022

    To assign a static IP on Windows Server 2022, use these steps: Open Control Panel on Windows Server. Click on Network and Internet. Click on Network and Sharing Center. Click the Change adapter settings option on the left navigation pane. Right-click the network adapter and select the Properties option. Select the "Internet Protocol Version 4 ...

  4. LAB GUIDE:4. Assign a Static IP Address in Windows Server 2019

    Lab Guide on How to assign static IP addressing in Windows Server 2019.This lab guide covers the steps prepare newly installed windows server 2019 before usi...

  5. How to set a static IP on Windows Server (2019)

    Click Start Menu > Control Panel > Network and Sharing Center or Network and Internet > Network and Sharing Center. Click Change adapter settings. Right-click on Wi-Fi or Local Area Connection. Click Properties. Select Internet Protocol Version 4 (TCP/IPv4). Click Properties. Select Use the following IP address.

  6. Windows Server 2019 Static IP Address

    A domain controller should have own static ip address listed for DNS (192.168.2.100 in your example) and no others such as router or public DNS. Domain DNS is so members can find and logon to domain. Internet queries would be passed on to the 13 default root hint servers in a top level down fashion or optionally to forwarders.

  7. HOW TO SET STATIC IP ADDRESS IN WINDOWS SERVER 2019

    This video teaches you how to set static ip address in windows server 2019 You can view our social media link belowhttps://kbestitslution.wixsite.com/kbesth...

  8. Windows Server 2019 Set Static ip Address

    Here you will learn, Windows Server 2019 Set Static ip Address | Configure Static ip Windows Server 2019#windowsserver2019setstaticipaddress#configurestatici...

  9. Configure Network Settings on Windows with PowerShell: IP Address, DNS

    In Windows, you can manage the settings for your network adapters not only from the GUI but also from the PowerShell command prompt. In this article, we'll look at the most important cmdlets that you can use to find out the current IP address of a network adapter, assign a static IP address, assign a DNS server IP, or configure a network interface to receive an IP configuration from a DHCP ...

  10. How To Set a Static IP Address With PowerShell

    In this blog post, I will show you how to assign and set a static IP address to a Windows 10 machine or Windows Server using PowerShell. NetIPAddress. The NetIPAddress PowerShell module, which is included with PowerShell allows us to manage and configure the TCP\IP configuration of a Windows machine with PowerShell.

  11. Change IP address of a network adapter

    How to change the IP address assigned to a Network Adapter. Log on to the computer by using the Administrator account. Click Start, point to Control Panel, and click Network Connections. Right-click the local area connection that you want to modify and then click Properties. In the This connection uses the following items box, click Internet ...

  12. Administer Server Core

    Use the following information to perform basic administrative tasks with Windows PowerShell cmdlets. Set a static IP address. When you install a Server Core server, by default it has a DHCP address. If you need a static IP address, you can set it using the following steps. To view your current network configuration, use Get-NetIPConfiguration.

  13. How to Configure NIC Teaming on Windows Server 2019/2016 and Windows 10

    NIC Teaming is disabled by default on Windows Server. To enable it, open the Server Manager, select Local Server, and click NIC Teaming: Disabled in its properties. In the next window, select Tasks -> New Team in the left bottom pane. Then enter a Team name and select the network adapters you want to add to the group.

  14. Adding an IP to a Windows Server

    Verify the new IP address. Open Windows Powershell by using the following steps: Press the Windows Key and R on the keyboard to open the Run dialog box. Enter powershell.exe and press Enter. Enter the command ping <ipaddress> replacing with the newly added IP address. A successful response indicates the IP address was added successfully.

  15. Assign a static IP address using PowerShell

    From the properties, you can note down the interface index value. then you can use the below command to set the IP address. If you are setting the IP address first time the use command as. New-NetIPAddress -IPAddress 192.168.10.100 -PrefixLength 24 -DefaultGateway 192.168.10.1 -InterfaceIndex 4.

  16. How to set static ip address in hyper-v vms windows server 2019

    The vSwitch is that - a virtual switch. It has no control over the IP addresses on the VMs. Just set the static IP (and DNS) in the VM, either by first logging into the VM or by using Powershell (on the host - there is a way to connect from the host in a powershell session INTO a VM, assuming you know username and password - look up https ...

  17. Multiple Static IP Subnets on Server 2019

    If I add a second IP to Windows Server 2019 on the LAN NIC as say 192.168.2.250, would this be possible without affecting the local LAN and domain controller and Primary DNS and would it allow the VPN users to see the Server. Any user with a different subnet at home (Not 192.168.1.x) can connect and see the server. 6 Spice ups.

  18. How to Assign a Static IP address on Windows Server 2016

    Method 1) Assign a static IP With Windows PowerShell. Method 1) Through the GUI with Server Manager. First - open Server Manager by clicking the Windows button and selecting Server Manager: Next - click Local Server followed by the blue text next to "Ethernet": This will open Network Connections. From here, right click on your Ethernet adapter ...

  19. remote desktop

    If you also have control over the DHCP controller in your local network (Router, Firewall, ... whoever does DHCP for your devices), one option to make sure that the VM always gets the same IP address is to: give the VM a static MAC address; configure your DHCP server to reserve a specific IP for the static MAC address of the VM

  20. Configure Static IP Address on Windows Server 2022

    Operating System: Windows Server 2022 Datacenter. The IP address is assigned by DHCP by default. 1. Open the Server Manager dashboard, select Local Server, and click Ethernet. 2. Right-Click on Ethernet and Click Properties. 3. In Ethernet Properties, click Internet Protocol Version 4 (TCP/IPv4) 4.

  21. Configure Windows Server 2019 Static IP Address Windows ...

    About Press Copyright Contact us Creators Advertise Developers Terms Privacy Policy & Safety How YouTube works Test new features NFL Sunday Ticket Press Copyright ...

  22. How to Assign a Static IP Address in Windows 10 or Windows 11

    Key Takeaways. To set a static IP address in Windows 10 or 11, open Settings -> Network & Internet and click Properties for your active network. Choose the "Edit" button next to IP assignment and change the type to Manual. Flip the IPv4 switch to "On", fill out your static IP details, and click Save. Sometimes, it's better to assign a PC its ...

  23. Windows Server 2019 : Initial Settings : Set Static IP Address : Server

    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.

  24. How to troubleshoot DHCP communication problems on your network

    Begin with a basic ping sweep that identifies all hosts on the segment. Run the scan from a connected device with a static IP address configuration. For a basic ping sweep to identify available hosts on the 192.168.1./24 network, type: $ nmap -sn 192.168.1.1 -255. Good news: The network device hosting the DHCP service was detected.

  25. How to Configure Static IP Address on Ubuntu 24.04 (Desktop)

    Configure Static IP Address on Ubuntu 24.04 Using GUI. Login to your desktop, click on the network icon and then choose Wired option as shown below: We will get the following window, click on "gearbox" icon. Go to IPv4 tab, there you will see that DHCP is enabled for automatic IP allocation. Choose Manual option to configure static IP ...