• Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture

Related Articles

  • FCP (Fibre Channel Protocol)
  • How VPNs Affect Internet Speed?
  • What is Data Encryption?
  • How to Determine the Optimal MTU and MSS Size?
  • What is Transaction Processing Monitors (TPM)?
  • What is Crosstalk?
  • Why Does the OSI Reference Model Matter?
  • What is a Software-Defined Perimeter (SDP)?
  • Types of EIGRP Packet in Computer Network
  • What is Delay Distortion in Computer Network?
  • What is Circuit-Level Gateway?
  • What is Wide-Mouth Frog?
  • What is a Web Application Firewall?
  • What are CDP (Cisco Discovery Protocol) Attacks?
  • How to Read a Traceroute?
  • How Many IP Addresses a Computer Can Have?
  • What is Message Oriented Middleware (MOM)?
  • Link Aggregation Control Protocol
  • What is Pilot Channel?

Setting IP Address Using DHCP Server

Every computer on the network has to have an IP address for communication purposes. An IP address is an identifier for a computer or device on a network. The IP address can be assigned in two ways i.e. Static IP or Dynamic IP. 

Static IP : A static IP is where a user assigns an IP address manually. It has certain drawbacks for example you have 100 computers or devices in your network and you want to assign IP addresses to each one statically, so keep in mind that the IP address must be unique because if you assign the same IP address twice it would cause an IP conflict and it would not have access to a network. 

Dynamic IP: A dynamic IP is where a computer gets an IP address from a DHCP server. A DHCP server automatically assigns a computer an IP address along with a subnet mask, default gateway, DNS server. 

DHCP Server: A Dynamic Host Configuration Protocol is an application layer protocol that is used to provide dynamic IP addresses to computers and devices. DHCP is a service that runs on a server, such as a Microsoft server or a Linux server. It’s also a service that runs on routers.

Why set the IP address using the DHCP server?

When a computer obtains an IP address from a DHCP server the server assigns the IP address on lease. The computer doesn’t own the IP address its lease and lease is the amount of time an IP address is assigned to a computer. For example, the lease could be for one day.

Another reason for lease is to make sure that the DHCP server does not run out of IP addresses. A DHCP server has its scope, let’s just say that this DHCP scope has only a range of three IP addresses so it can give only three IP addresses. Now obviously this is not so realistic as no network administrator is going to create a scope with such a small range. But for now, as an example let use this example let’s go ahead and add three computers to a network once they get added, a DHCP server is going to assign them IP addresses so in this example let’s just say that the IP address given to computers is not on lease so the DHCP has reached out its limit on giving IP address all these three IP addresses are currently being used.

What if one of the computers gets removed from the network. If a computer is removed it takes the IP address that it has been given with it. Let’s say another computer gets added to the network but the problem is the computer won’t be able to access the network because the DHCP server has run out of IP addresses. Even though that third computer has been removed it still occupies an IP address that could be used for another computer. 

This is why the IP address leased and are not given permanently because if IP addresses are leased then this would tell the DHCP server which IP address is still being used and which ones are not being used so in this example the IP address are leased, after a certain period during lease a computer must send a signal to the server asking to the server to renew its list of the IP addresses. In another word, we can say informing the DHCP server that it is still present on the network and its IP address is still being used.

If a computer is removed from the network that computer not going to ask the DHCP server for renewal and if it doesn’t ask for renewal then the list will expire and then the IP address will go back to their IP address pool of servers. Now the IP address can be used for another computer and this is why the IP address is leased.  

How to set the IP address using the DHCP server?

Lets us see practically how to assign an IP address using DHCP to your windows 10/8/7 computer step by step :

Step 1:  Go to the control panel.

Step 2:   Select the Networking and sharing option.

Step 3:   Select change adapter setting.

Step 4:   Select and open your internet, ethernet , or wi-fi connection to which you want to set the IP address using the DHCP server. 

Step 5: Once you have done with Step 4 a pop-up of wi-fi status (in my case connected with wi-fi) will appear on your screen, now click on properties.

WiFi Status

Step 6: Once you click on the properties option a new pop-up of wi-fi properties will appear on your screen. Now, select Internet Protocol version 4(TCP/IPv4) in some cases it may have IPv6. Once you select this option properties option will enable and once it is enabled click on that.

WiFi Properties

Step 7: After clicking on the properties option of the recent screen a new screen of Internet Protocol Version will appear where you have to go inside the general tab which by default opens and click on the option of obtain an IP address automatically along with this option click on obtain DNS server address automatically.   

Ipv4

When we choose this option computer will broadcast a request for an IP address on the network then the DHCP server will assign an IP address from its pool and deliver it to the computer. once it is done you can verify that the DHCP server has given address to your computer or not by opening a command prompt on your system and typing a command ipconfig  /all and you can see there is DHCP enable or not along with IPv4 or IPV6 address, subnet mask, and default gateway.

All of these settings are given by the DHCP server. Dynamic IP addressing is the best choice because it automatically manages the network and makes the process a lot easier.

Please Login to comment...

author

  • Computer Subject
  • 10 Best ChatGPT Prompts for Lawyers 2024
  • What is Meta’s new V-JEPA model? [Explained]
  • What is Chaiverse & How it Works?
  • Top 10 Mailchimp Alternatives (Free) - 2024
  • Dev Scripter 2024 - Biggest Technical Writing Event By GeeksforGeeks

Improve your Coding Skills with Practice

 alt=

What kind of Experience do you want to share?

How to Assign Static IP Address to Your Devices

IP address

By default, your router assigns dynamic IP Address to every device that connects to it. This is called DHCP (short for Dynamic Host Control Protocol). But sometimes, we need our devices to have the same IP address (i.e. Static IP) every time it connects to the network. Reason being,

  • Access your computer from the Internet.
  • Share data between two devices on the same network.
  • Quickly access your Network Printer or NAS.
  • Use your computer as a media server.
  • Or your work WiFi requires you to use Static IP address.

IP address

What IP address should you choose?

If two devices on the network have the same IP address, then there will be conflicts. The Internet won’t work on one of them or both, depending on your router. So, it’s important to assign a unique IP address to your computer. There are a couple of ways to pick an unused IP address.

For instance– first  find your device’s IP address , say it’s  192.168.1.7 ; then keep the first three values (i.e. 192.168.1) as it’s and replace the last digit with some far number like  192.168.1.222 . Though make sure the last digit should be between a  0-255  range.

Assigning Static IP address to most devices is easy, just go to its network settings, look for DHCP option and turn it OFF. Once you do that, you’ll see a text area to enter Static IP address. Enter the new IP address there, save changes and that’s it.

So let’s see how to Assign Static IP address to various Operating Systems

1. Assign IP Address on Windows 10/8/7

You can do this quickly through the command line. You will need to first find your subnet mask, default gateway, and network adapter name. In my case, I’m on a Wi-Fi network, so the adapter name is Wi-Fi. To find yours just type the following command.

Once you get the output, find for the Network Adapter which has IP listed under it. The adapter name is a one-word name suffixed to the end of the Network Title. You will also need the Subnet mask and the Default Gateway Address.

adapter_name_command_line

Once you have the adapter name, Subnet Mask and Default Gateway, run the following command.

Wherein, Wi-Fi should be replaced by your adapter name and the IP, subnet mask and gateway address according to your configuration.

staticIP_cmd

This will change your IP address from DHCP to manual with the static IP address you have specified.

In case you find it too confusing, you are not alone. You can do the same via GUI which is much more intuitive. You’ll need the  Subnet Mask and Default Gateway Address . You can refer to the above step on how to find these details. Once you have noted down the address, click on  Start  Menu and type in  Network and Sharing Center.  Click once you see the Network and Sharing Center Icon.

Network_Sharing_Center_Start_Menu

Alternatively, if you are in Windows 10 then you can right-click on the Start menu and click on “ Network Connections “.

RightClickOnStartMenu_Windows10

A new window will open, click on  Change Adapter Options.

Change_Adapter_Options

Right Click on your Current Network Adapter ( like WiFi)  and choose  Properties.

Right_Click_NetworkAdapter

When the new window pops up, select  Internet Protocol Version 4(TCP/IPv4)   and click on  Properties.

IPv4_Properties

Once you get the pop-up window, select “ Enter the IP address you want ” and fil the IP Address, For Subnet Mask , and Default Gateway Address enter the values that you have noted down previously. Next, click on OK to save changes.

Manual_IP_Settings

To switch to dynamic IP, click on Obtain the IP address automatically. Once this is enabled, your system will start picking an IP address dynamically from the router.

2. How to setup static IP on Ubuntu

On Ubuntu, you can set a static IP Address via the terminal or GUI. Firstly, let’s start with the command line. Right-click anywhere on the desktop to open the terminal.

OpenTerminal_Ubuntu

Once the terminal window opens, we need to run a command. We need the subnet mask and network adapter name in order to set a static IP and to get that, run the following command on the terminal.

assigning static ip addresses using dhcp

Once you have the subnet mask noted down, in my case, it’s 255.255.255.0, we can proceed further.

It is pretty simple and straight forward. We need to open the Network Adapter settings. To do that, click on the Network Icon at the top right corner of the desktop.

GUI_Network

Now, navigate on the active network and click on the expand button for more options. Click on Wired Settings to open the Network menu.

Wired_Settings_GUI

Once you get the Wired Settings dialogue, make sure you are on the Network page. Click on the Settings icon beside the active network to open the adapter properties.

assigning static ip addresses using dhcp

When you get the pop-up, navigate to the IPv4 tab to change the IP settings.

IPv4_Tab

On the IPv4 tab, select the radio button which says “ Manual “. Some text fields will appear, you need to enter the IP address, Netmask and Gateway accordingly. Once it is validated, you can click on the Apply button to register the changes.

static_IP_GUI_Ubunty

Again you need to restart the network for the changes to take effect. You can do it manually via command line or just switch off and switch on the Network adapter. Once done, run ifconfig on the terminal to check the IP address. It should be the same IP address which you have specified earlier.

changed_IP_Config

3. How to setup static IP on Mac

If you are on macOS, setting static IP is quite similar to that of Ubuntu. But, here you don’t need the subnet mask or Default Gateway Address. Right click on the apple icon at the top left corner of the desktop. Click on  System Preferences  from the dropdown list.

mac_systemPreferences

Once the System Preferences dialogue box displays, navigate to Network and click on it to open the Network Settings

Network_Symbol

Alternatively, you can also hit Cmd+Space to trigger the Spotlight search. Type “ Network ” in the search bar and click on the icon once it appears. This will directly navigate you to the Network Settings.

network_on_spotlight

From the pop-up window, select an active network interface. For example, I am connected to a WiFi network so my active network is  Wi-Fi. Make sure you are on the active network tab and then click on  Advanced .

Network_Settings_menu

A new window will open the configuration settings for that adapter. Move over to the IP settings by clicking on the TCP/IP tab .

TCP_IP_tab

From the Configure IPv4 menu, choose Using DHCP with manual address.  Enter a static IP address in the IPv4 Address and leave the Subnet Mask and Router field as default. Click Ok to save the changes.

change_tcp_ip_Settings

Now when you do an ifconfig, the system should be using the static IP you have defined in the previous times. If the IP’s have not changed, try restarting the Wi-Fi and it should fix it.

To switch back to dynamic IP, move back to “ Using DHCP ” from the Configure IPv4 menu.

4. How to setup static IP on Android

Settings_menu_Android

The network which you are connected to should be on top of the list. Tap on the settings icon beside the Wi-Fi network name.

Wifi_connected_network

Once the pop-up opens, you will see IP settings at the bottom of the menu. The default option is “DHCP”. Tap on it to change the IP configuration.

IP_Settings_Android

Select “ Static ” from the presented drop-down menu. Enter the desired IP address and leave the other options as default. Make sure that other devices are not using the same IP. You can see the IP address of the other devices in your network by using a small utility called Fing . For a detailed process, check our article on how to find the IP Address of any Device on your network . Once you have entered the IP, click on Save to register the change. Now, your Android phone should start using the desired IP Address.

Manual_IP_Android

In almost all the Android version, you get the option to set static IP Address. For some rare older Android versions, you can use a third-party app like  WiFi Static . It’s free and it doesn’t require ROOT.

To switch back to dynamic IP, repeat the same procedure and select “DHCP” from the IP settings instead.

5. How to setup static IP on iPhone and iPad

If you are using an iPhone or iPad, then you can set static IP Address natively. You would need the Subnet Mask of your network. This can be obtained from the Wi-Fi settings and we would see to it in the further steps. To get started, click on the Settings icon in the dock to get to the Settings menu.

ios_Settings

Now on the Settings menu page, tap on Wi-Fi to get to the Wi-Fi settings.

Settings_page_wifi_ios

On the Wi-Fi page, you should see your connected Wi-Fi network at the top. Click on the “i” button beside it. This will open the Wi-Fi configuration window.

i_button_ios_wifi

Once the Wi-Fi settings page appears, you will see an option called “ Configure IP “. By Default, this would be set to automatic. Just below this option, you will see “ Subnet Mask “, note it down as we will need it in the further steps. In order to set static IP, we need to change Configure IP it to Manual. Tap on it and it will open the IPv4 settings page.

Configure_ip_page

There should be 3 options available on the “Configure IPv4” page. Select “ Manual ” from it. As soon as Manual IP is enabled, you will get extra text fields at the bottom to enter the IP Address, Subnet Mask, Router. We need to fill in the IP Address of our choice and Subnet Mask which we noted down in the previous step. Now, after you fill both the fields, the save button at the top right corner will be enabled. Click on it to save the static IP configuration.

IPv4_Configuration_Menu

Now, when you return to the Wi-Fi settings page, you will see your device is using the Static IP address. This should be the same IP address we have set in the IP configuration menu.

ipaddr_ios

This static IP address will be applicable only to that particular Wi-Fi network. In case, you connect to some other Wi-Fi network the IP will change accordingly.

6. How to setup static IP to any Device from Router

Other network devices like your  Wireless Printer, PS4, NAS, IP Camera, Raspberry Pi , etc. do not have an Interface. Hence, in order to configure the network, either you have to connect remotely or use the router. If you have access to the router, setting Static IP for network devices is the easiest and convenient way. I would recommend this method over any other.

So, to assign a Static IP Address to any network device, you need to login to the web portal of the router. The web portal address, username, and password are mostly printed behind the router. In case you don’t have physical access to the router, the web portal URL is mostly the PC’s gateway address. To find that, open command prompt and type the following command.

Once you have the web portal loaded, log in with the credentials. Now every router has a different web UI, but the overall structure is the same. Basically,  you will have to link the IP Address to the Mac Address and Hostname of the device. So, we need to find the MAC address & Hostname of the network device. To do that, look for DHCP client list which should look something like the following screenshot.

MAC_address_Router

You can get your MAC Address & Hostname under DHCP Client list. Once, you have the MAC address & Hostname noted down, we can proceed further. On most of the routers, you will have the option to set a Static IP under the section  IP Mac binding or DHCP Static IP  option. In case you are on a custom ROM like dd-wrt, head over to Services tab and you will have DHCP Server . Under DHCP Server, add an entry for Static Leases by clicking on the Add button.

Static_leases_router

Clicking on the Add button will create a new row. You have to enter the MAC Address, Hostname, desired Static IP and Lease time . Lease time is a unit in minutes after which your IP will be renewed. Since we are adding only 1 entry for the particular host the IP will be the same even after the renewal. Once, done click on Save changes .

staticIPSetting_Router

Once you have configured successfully on the router, just restart the Wi-Fi on the device. When it connects it should start using the static IP. In case of issues, make sure that you have the correct MAC Address and Hostname. To check, just run the command ipconfig or look back again in the router’s DHCP client list.

ipconfig_newIP

These changes are written to the ROM so restarting the router won’t make changes to the static IP configuration. In order to get back to Dynamic IP, just remove the entry from the IP leases.

What’s next

Once you have started configuring the IPs on Router and network devices, you are good to go configure telnet and SSH. Have a look at our brief article on  How to Enable Telnet Server in Windows 10 ,  Best SSH clients for iOS To Manages Remote Servers and  6 Best FTP Clients For Android . A word of caution would be to note down the static IPs assigned to devices as assigning the same IP to two network devices would render them useless.

Also Read:  How To Change DNS on Windows|Mac|Android|iOS

' src=

Mrinal Saha

Mrinal is a tech geek who spends half of his day reading and writing about tech. While the nights are spent on shooting or editing YouTube videos. Feel free to geek out with him on-

You may also like

How to share files using airdrop on apple..., 7 fixes for instagram not downloading reels on..., how to use iphone as passkey to login..., 8 fixes for something went wrong error on..., how to use travel mode on apple vision..., 10 fixes for tiktok couldn’t upload video error, 10 fixes for amazon fire tv stick stuck..., why am i getting notifications when someone posts..., top 7 fixes for too many attempts error..., how to create and share stickers on whatsapp.

  • Skip to content
  • Skip to search
  • Skip to footer

DHCP - Static Mapping

Available languages, download options.

  • PDF (268.3 KB) View with Adobe Reader on a variety of devices

Bias-Free Language

The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.

Table Of Contents DHCP—Static Mapping Contents Information About DHCP—Static Mapping DHCP Database and DHCP Server How to Configure DHCP—Static Mapping Configuring the DHCP Server and the Text File URL Prerequisites Restrictions Examples Configuration Examples for DHCP—Static Mapping Configuring the DHCP Server and the Static-Binding File URL: Example Additional References Related Documents Standards MIBs RFCs Technical Assistance Command Reference debug ip dhcp server origin Glossary DHCP—Static Mapping The DHCP—Static Mapping feature enables assignment of static IP addresses without creating numerous host pools with manual bindings by using a customer-created text file that the DHCP server reads. The benefit of this feature is that it eliminates the need for a long configuration file and reduces the space required in NVRAM to maintain address pools. Feature History for the DHCP—Static Mapping Feature Release Modification 12.3(11)T This feature was introduced. 12.2(27)SBA This feature was integrated into Cisco IOS Release 12.2(27)SBA. Finding Support Information for Platforms and Cisco IOS Software Images Use Cisco Feature Navigator to find information about platform support and Cisco IOS software image support. Access Cisco Feature Navigator at http://www.cisco.com/go/fn . You must have an account on Cisco.com. If you do not have an account or have forgotten your username or password, click Cancel at the login dialog box and follow the instructions that appear. Contents • Information About DHCP—Static Mapping • How to Configure DHCP—Static Mapping • Configuration Examples for DHCP—Static Mapping • Command Reference • Glossary Information About DHCP—Static Mapping To configure this feature, you should understand the following concept: • DHCP Database and DHCP Server DHCP Database and DHCP Server A DHCP database contains an external file that is configured by a DHCP server. The file contains the mappings between a client IP address and the hardware address. There are two types of bindings: manual bindings that are special address pools stored in NVRAM, and automatic bindings that are assigned from an address pool by the DHCP server. Automatic bindings are stored on a remote host called the database agent and are saved as text records for easy maintenance. Both manual and automatic bindings are static. The DHCP—Static Mapping feature enables the capability of reading the static bindings in a separate text file (similar in format to the DHCP database file) and configuring special pools to store bindings read from the files. The static-binding files are read when the existing database files are read, for example, when a router reloads or the service restarts. The files are read-only. The read automatic bindings are treated just like the manual bindings, in that they are: • Retained across DHCPRELEASEs from the clients. • Not timed out. • Deleted only upon deletion of the pool. • Provided appropriate exclusions for the contained addresses, which are created at the time of the read. Just like automatic bindings and manual bindings, the static bindings are also displayed by using the show ip dhcp binding static command. How to Configure DHCP—Static Mapping This section contains the following procedure: • Configuring the DHCP Server and the Text File URL (required) Configuring the DHCP Server and the Text File URL Perform this task to configure the DHCP server and text file URL. You will input your addresses in the text file, which is stored in the DHCP database for the DHCP server to read. There is no limit on the number of addresses or the number of address pools. The file format has the following elements: • IP address • Hardware type • Hardware address • Lease expiration Legal values are defined in the ARP section of the Dynamic Host Configuration Protocol , RFC 2131. There is also a special type ID that indicates that a field is a DHCP client identifier. A sample file is as follows: *time* January 21 2005 03:52 PM *version* 2 !IP address    Type      Hardware address               Lease expiration 2.0.0.4 /24         1            0090.bff6.081e                   Infinite 2.0.0.5 /28         id           00b7.0813.88f1.66 3.0.0.2 /21         1            0090.bff6.081d                  Infinite *end* If the subnet mask is not specified, a natural mask is assumed depending on the IP address. Prerequisites The administrator should create the static-binding text file in the correct format and configure the address pools before performing this task. Before editing the file, you must disable the DHCP server using the no service dhcp command. In the static-binding text file, there must be a space between the IP address and mask. Restrictions The bindings must not be deleted when a DHCPRELEASE is received or must not be timed out by the DHCP timer. The automatic bindings should be treated just like manual bindings created by using the ip dhcp pool command. SUMMARY STEPS 1. enable 2. configure terminal 3. ip dhcp pool name 4. origin file url 5. exit DETAILED STEPS   Command or Action Purpose Step 1  enable Example: Router> enable Enables privileged EXEC mode. • Enter your password if prompted. Step 2  configure terminal Example: Router# configure terminal Enters global configuration mode. Step 3  ip dhcp pool name Example: Router(config)# ip dhcp pool abcpool Assigns a name to a DHCP pool and enters DHCP configuration mode. Note If you have already configured the IP DHCP pool name using the ip dhcp pool command and the static file URL using the origin file command, you must perform a fresh read using the no service dhcp command and service dhcp command. Step 4  origin file url Example: Router(dhcp-config)# origin file tftp://10.1.0.1/static-bindings Specifies the URL from which the DHCP server can locate the text file. Step 5  exit Example: Router(dhcp-config)# exit Exits to global configuration mode. Examples The following example shows what has been configured: Router# show ip dhcp binding 00:05:14:%SYS-5-CONFIG_I: Configured from console by console Bindings from all pools not associated with VRF: IP address  Client-ID/            Ls expir   Type    Hw address           User name 10.9.9.4/8  0063.7363.2d30.3036.  Infinite   Static  302e.3762.2e39.3634. 632d.4574.8892. 10.9.9.1/24 0063.6973.636f.2d30.  Infinite   Static  3036.302e.3437.3165. 2e64.6462.342d. The following sample shows each entry in the static-binding text file: *time* January 21 2005 22:52 PM !IP address Type        Hardware address                              Lease expiration 10.19.9.1 /24    id          0063.6973.636f.2d30.3036.302e.3437 10.9.9.4        id          0063.7363.2d30.3036.302e.3762.2e39.3634.632d  Infinite *end* The following sample debug output shows the reading of the bindings from the TFTP server: Router# debug ip dhcp server Loading abc/static_pool from 10.19.192.33 (via Ethernet0): [OK - 333 bytes] *May 26 23:14:21.259: DHCPD: contacting agent tftp://10.19.192.33/abc/static_pool (attempt 0) *May 26 23:14:21.467: DHCPD: agent tftp://10.19.192.33/abc/static_pool is responding. *May 26 23:14:21.467: DHCPD: IFS is ready. *May 26 23:14:21.467: DHCPD: reading bindings from                              tftp://10.19.192.33/abc/static_pool. *May 26 23:14:21.707: DHCPD: read 333 / 1024 bytes. *May 26 23:14:21.707: DHCPD: parsing text line *time* Apr 22 2002 11:31 AM *May 26 23:14:21.707: DHCPD: parsing text line "" *May 26 23:14:21.707: DHCPD: parsing text line !IP address Type Hardware address Lease expiration *May 26 23:14:21.707: DHCPD: parsing text line "10.9.9.1 /24 id 0063.6973.636f.2d30.3036.302e.3437" *May 26 23:14:21.707: DHCPD: creating binding for 10.9.9.1 *May 26 23:14:21.707: DHCPD: Adding binding to radix tree (10.9.9.1) *May 26 23:14:21.707: DHCPD: Adding binding to hash tree *May 26 23:14:21.707: DHCPD: parsing text line "10.9.9.4 id 0063.7363.2d30.3036.302e.3762.2e39.3634.632d" *May 26 23:14:21.711: DHCPD: creating binding for 10.9.9.4 *May 26 23:14:21.711: DHCPD: Adding binding to radix tree (10.9.9.4) *May 26 23:14:21.711: DHCPD: Adding binding to hash tree *May 26 23:14:21.711: DHCPD: parsing text line "Infinite" *May 26 23:14:21.711: DHCPD: parsing text line "" *May 26 23:14:21.711: DHCPD: parsing text line !IP address Interface-index Lease expiration VRF *May 26 23:14:21.711: DHCPD: parsing text line "*end*" *May 26 23:14:21.711: DHCPD: read static bindings from tftp://10.19.192.33/abcemp/static_pool. Configuration Examples for DHCP—Static Mapping This section contains the following configuration example: • Configuring the DHCP Server and the Static-Binding File URL: Example Configuring the DHCP Server and the Static-Binding File URL: Example The following example shows how to restart the DHCP server, configure the pool, and specify the URL at which the static-binding file is stored: no service dhcp service dhcp ip dhcp pool abcpool  origin file tftp://10.1.0.1/staticfilename Additional References The following sections provide references related to the DHCP—Static Mapping feature. Related Documents Related Topic Document Title DHCP overview and configuration Cisco IOS IP Configuration Guide , Release 12.3 DHCP commands: complete command syntax, command mode, defaults, usage guidelines, and examples Cisco IOS IP Command Reference, Volume 1 of 4: Addressing and Services , Release 12.3 T Standards Standards Title No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. — MIBs MIBs MIBs Link No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature. To locate and download MIBs for selected platforms, Cisco IOS releases, and feature sets, use Cisco MIB Locator found at the following URL: http://www.cisco.com/go/mibs RFCs RFCs Title RFC 2131 Dynamic Host Configuration Protocol Technical Assistance Description Link Technical Assistance Center (TAC) home page, containing 30,000 pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content. http://www.cisco.com/public/support/tac/home.shtml Command Reference This section documents modified commands only. • debug ip dhcp server • origin debug ip dhcp server To enable Cisco IOS Dynamic Host Configuration Protocol (DHCP) server debugging, use the debug ip dhcp server command in privileged EXEC mode. To disable DHCP server debugging, use the no form of this command. debug ip dhcp server { events | packets | linkage | class } no debug ip dhcp server { events | packets | linkage | class } Syntax Description events Reports server events, such as address assignments and database updates. packets Decodes DHCP receptions and transmissions. linkage Displays database linkage information, such as parent-child relationships in a radix tree. class Displays DHCP class-based information. Command Modes Privileged EXEC Command History Release Modification 12.0(1)T This command was introduced. 12.2(13)ZH The class keyword was added. 12.3(4)T This command was integrated into Cisco IOS Release 12.3(4)T. 12.3(8)YA This command was integrated into Cisco IOS Release 12.3(8)YA. 12.3(11)T The output was enhanced to show the static mappings. 12.2(27)SBA This command was integrated into Cisco IOS Release 12.2(27)SBA. Examples The following example shows a combination of DHCP server events and decoded receptions and transmissions: Router# debug ip dhcp server events Router# debug ip dhcp server packets DHCPD:DHCPDISCOVER received from client 0b07.1134.a029 through relay 10.1.0.253. DHCPD:assigned IP address 10.1.0.3 to client 0b07.1134.a029. DHCPD:Sending DHCPOFFER to client 0b07.1134.a029 (10.1.0.3). DHCPD:unicasting BOOTREPLY for client 0b07.1134.a029 to relay 10.1.0.253. DHCPD:DHCPREQUEST received from client 0b07.1134.a029. DHCPD:Sending DHCPACK to client 0b07.1134.a029 (10.1.0.3). DHCPD:unicasting BOOTREPLY for client 0b07.1134.a029 to relay 10.1.0.253. DHCPD:checking for expired leases. The following example shows database linkage information: Router# debug ip dhcp server linkage DHCPD:child pool:10.1.0.0 / 255.255.0.0 (subnet10.1) DHCPD:parent pool:10.0.0.0 / 255.0.0.0 (net10) DHCPD:child pool:10.0.0.0 / 255.0.0.0 (net10) DHCPD:pool (net10) has no parent. DHCPD:child pool:10.1.0.0 / 255.255.0.0 (subnet10.1) DHCPD:parent pool:10.0.0.0 / 255.0.0.0 (net10) DHCPD:child pool:10.0.0.0 / 255.0.0.0 (net10) DHCPD:pool (net10) has no parent. The following example shows when a DHCP class is removed: Router# debug ip dhcp server class DHCPD:deleting class CLASS1 The following example shows the debug output when the configured pattern does not match: Router# debug ip dhcp server class DHCPD:Searching for a match to 'relay-information 0106000 400020202020800060009e80b8800' in class CLASS1 DHCPD:Searching for a match to 'relay-information 0106000400020202020800060009e80b8800' in class CLASS1 DHCPD:Searching for a match to 'relay-information 0106000 The following example shows the debug output when you unconfigure a DHCP pattern in a DHCP class and then configure the pattern in the DHCP class: Router# debug ip dhcp server class DHCPD:pattern 'relay-information 123456' removed from class CLASS1 DHCPD:Added pattern 'relay-information 010600040002020202 0800060009e80b8800' for class CLASS1 The following example shows the debug output when the configured pattern does match: Router# debug ip dhcp server class DHCPD:Searching for a match to 'relay-information 0106000 400020202020800060009e80b8800' in class CLASS1 DHCPD:input pattern 'relay-information 010600040002020202 0800060009e80b8800' matches class CLASS1 DHCPD:input matches class CLASS1 The following example shows the debug output when static mappings are configured: Router# debug ip dhcp server Loading abc/static_pool from 10.19.192.33 (via Ethernet0): ! [OK - 333 bytes] *May 26 23:14:21.259: DHCPD: contacting agent tftp://10.19.192.33/abc/static_pool (attempt 0) *May 26 23:14:21.467: DHCPD: agent tftp://10.19.192.33/abc/static_pool is responding. *May 26 23:14:21.467: DHCPD: IFS is ready. *May 26 23:14:21.467: DHCPD: reading bindings from                              tftp://10.19.192.33/abc/static_pool. *May 26 23:14:21.707: DHCPD: read 333 / 1024 bytes. *May 26 23:14:21.707: DHCPD: parsing text line "*time* Apr 22 2002 11:31 AM" *May 26 23:14:21.707: DHCPD: parsing text line "" *May 26 23:14:21.707: DHCPD: parsing text line !IP address Type Hardware address Lease expiration. *May 26 23:14:21.707: DHCPD: parsing text line "10.9.9.1/24 id 0063.6973.636f.2d30.3036.302e.3437" *May 26 23:14:21.707: DHCPD: creating binding for 10.9.9.1 *May 26 23:14:21.707: DHCPD: Adding binding to radix tree (10.9.9.1) *May 26 23:14:21.707: DHCPD: Adding binding to hash tree *May 26 23:14:21.707: DHCPD: parsing text line "10.9.9.4 id 0063.7363.2d30.3036.302e.3762.2e39.3634.632d" *May 26 23:14:21.711: DHCPD: creating binding for 10.9.9.4 *May 26 23:14:21.711: DHCPD: Adding binding to radix tree (10.9.9.4) *May 26 23:14:21.711: DHCPD: Adding binding to hash tree *May 26 23:14:21.711: DHCPD: parsing text line "Infinite" *May 26 23:14:21.711: DHCPD: parsing text line "" *May 26 23:14:21.711: DHCPD: parsing text line !IP address Interface-index Lease expiration VRF. *May 26 23:14:21.711: DHCPD: parsing text line "*end*" *May 26 23:14:21.711: DHCPD: read static bindings from tftp://10.19.192.33/smith/static_pool. Related Commands Command Description debug dhcp Displays debugging information about the DHCP client and monitors the status of DHCP packets. debug ip ddns update Enables debugging for DDNS updates. host (host-list) Specifies a list of hosts that will receive DDNS updates of A and PTR RRs. ip ddns update hostname Enables a host to be used for DDNS updates of A and PTR RRs. ip ddns update method Specifies a method of DDNS updates of A and PTR RRs and the maximum interval between the updates. ip dhcp client update dns Enables DDNS updates of A RRs using the same hostname passed in the hostname and FQDN options by a client on an interface. ip dhcp-client update dns Enables DDNS updates of A RRs using the same hostname passed in the hostname and FQDN options by a client. ip dhcp update dns Enables DDNS updates of A and PTR RRs for most address pools. ip host-list Specifies a list of hosts that will receive DDNS updates of A and PTR RRs. show ip ddns update Displays information about the DDNS updates. show ip ddns update method Displays information about the DDNS update method. show ip dhcp server pool Displays DHCP server pool statistics. show ip host-list Displays the assigned hosts in a list. update dns Dynamically updates a DNS with A and PTR RRs for some address pools. origin To configure an address pool as an on-demand address pool (ODAP) or static mapping pool, use the origin command in DHCP pool configuration mode. To disable the ODAP, use the no form of this command. origin { dhcp | aaa | ipcp | file url } [ subnet size initial size [ autogrow size ]] no origin { dhcp | aaa | ipcp | file url } [ subnet size initial size [ autogrow size ]] Syntax Description dhcp Specifies the Dynamic Host Configuration Protocol (DHCP) as the subnet allocation protocol. aaa Specifies authentication, authorization, and accounting (AAA) as the subnet allocation protocol. ipcp Specifies the IP Control Protocol (IPCP) as the subnet allocation protocol. file url Specifies the external database file that contains the static bindings assigned by the DHCP server. The url argument specifies the location of the external database file. subnet size initial size (Optional) Specifies the initial size of the first requested subnet. You can enter size as either the subnet mask (nnnn.nnnn.nnnn.nnnn) or prefix size (/nn). The valid values are /0 and /4 to /30. autogrow size (Optional) Specifies that the pool can grow incrementally. The size argument is the size of the requested subnets when the pool requests additional subnets (upon detection of high utilization). You can enter size as either the subnet mask (nnnn.nnnn.nnnn.nnnn) or prefix size (/nn). The valid values are /0 and /4 to /30. Defaults The default size value is /0. Command Modes DHCP pool configuration Command History Release Modification 12.2(8)T This command was introduced. 12.3(11)T The file keyword was added. 12.2(27)SBA This command was integrated in to Cisco IOS Release 12.2(27)SBA. Usage Guidelines If you do not configure the pool as an autogrow pool, the pool will not request additional subnets if one subnet is already in the pool. Use the dhcp keyword to obtain subnets from DHCP, the aaa keyword to obtain subnets from the AAA server, and the ipcp keyword to obtain subnets from IPCP negotiation. If you expect that the utilization of the pool may grow over time, use the autogrow size option. If a pool has been configured with the autogrow size option, ensure that the source server is capable of providing more than one subnet to the same pool. Even though the Cisco IOS software specifies the requested subnet size, it can accept any offered subnet size from the source server. Examples The following example shows how to configure an address pool named green to use DHCP as the subnet allocation protocol with an initial subnet size of 24 and an autogrow subnet size of 24: ip dhcp pool green   vrf green   origin dhcp subnet size initial /24 autogrow /24   utilization mark high 80   utilization mark low 20 The following example shows how to configure the location of the external text file: ip dhcp pool abcpool  origin file tftp://10.1.0.1/staticbindingfile Related Commands Command Description show ip dhcp pool Displays information about the DHCP address pools. Glossary address binding —A mapping between the client IP and hardware addresses. The client IP address may be pre-configured by the administrator (manual address allocation) or assigned from a pool by the Dynamic Host Configuration Protocol (DHCP) server (automatic address allocation). address pool —The range of IP addresses assigned by the DHCP server. The pool may also store client parameters, such as default router and DNS servers. database agent —Any host storing the DHCP bindings database. DHCP client —Any host requesting configuration parameters. DHCP database —An external file configured in a DHCP server, which stores automatic bindings from the server. DHCP server —Any host providing configuration parameters. Note Refer to Internetworking Terms and Acronyms for terms not included in this glossary. Copyright © 2004, 2005 Cisco Systems, Inc. All rights reserved.

Was this Document Helpful?

Feedback

Contact Cisco

login required

  • (Requires a Cisco Service Contract )

assigning static ip addresses using dhcp

  • Articles Automation Career Cloud Containers Kubernetes Linux Programming Security

Static and dynamic IP address configurations: DHCP deployment

%t min read | by Damon Garn

Static and dynamic IP address configurations: DHCP deployment

In my Static and dynamic IP address configurations for DHCP article, I discussed the pros and cons of static versus dynamic IP address allocation. Typically, sysadmins will manually configure servers and network devices (routers, switches, firewalls, etc.) with static IP address configurations. These addresses don’t change (unless the administrator changes them), which is important for making services easy to find on the network.

With dynamic IP configurations, client devices lease an IP configuration from a Dynamic Host Configuration Protocol (DHCP) server. This server is configured with a pool of available IPs and other settings. Clients contact the server and temporarily borrow an IP address configuration.

In this article, I demonstrate how to configure DHCP on a Linux server.

[ You might also like:  Using systemd features to secure services ]

Manage the DHCP service

First, install the DHCP service on your selected Linux box. This box should have a static IP address. DHCP is a very lightweight service, so feel free to co-locate other services such as name resolution on the same device.

Note : By using the -y option, yum will automatically install any dependencies necessary.

Configure a DHCP scope

Next, edit the DHCP configuration file to set the scope. However, before this step, you should make certain you understand the addressing scheme in your network segment. In my courses, I recommend establishing the entire range of addresses, then identifying the static IPs within the range. Next, determine the remaining IPs that are available for DHCP clients to lease. The following information details this process.

How many static IP addresses?

Figure out how many servers, routers, switches, printers, and other network devices will require static IP addresses. Add some additional addresses to this group to account for network growth (it seems like we’re always deploying more print devices).

What are the static and dynamic IP address ranges?

Set the range of static IPs in a distinct group. I like to use the front of the available address range. For example, in a simple Class C network of 192.168.2.0/24, I might set aside 192.168.2.1 through 192.168.2.50 for static IPs. If that’s true, you may assume I have about 30 devices that merit static IP addresses, and I have left about twenty addresses to grow into. Therefore, the available address space for DHCP is 192.168.2.51 through 192.168.2.254 (remember, 192.168.2.255 is the subnet broadcast address).

This screenshot from the part one article is a reminder:

spreadsheet tracking IP addresses, MAC addresses, hostnames, etc

Note : Some administrators include the static IPs in the scope and then manually mark them as excluded or unavailable to the DHCP service for leasing. I’m not a fan of this approach. I prefer that the DHCP not even be aware of the addresses that are statically assigned.

What is the router’s IP address?

Document the router’s IP address because this will be the default gateway value. Administrators tend to choose either the first or the last address in the static range. In my case, I’d configure the router’s IP address as 192.168.2.1/24, so the default gateway value in DHCP is 192.168.2.1.

Where are the name servers?

Name resolution is a critical network service. You should configure clients for at least two DNS name servers for fault tolerance. When set manually, this configuration is in the /etc/resolv.conf file.

Note that the DNS name servers don’t have to be on the same subnet as the DNS clients.

Lease duration

In the next section, I’ll go over the lease generation process whereby clients receive their IP address configurations. For now, suffice it to say that the IP address configuration is temporary. Two values are configured on the DHCP server to govern this lease time:

default-lease-time - How long the lease is valid before renewal attempts begin.

max-lease-time - The point at which the IP address configuration is no longer valid and the client is no longer considered a lease-holder.

Configure the DHCP server

Now that you understand the IP address assignments in the subnet, you can configure the DHCP scope. The scope is the range of available IP addresses, as well as options such as default gateway. There is good documentation here .

Create the DHCP scope

Begin by editing the dhcp.conf configuration file (you’ll need root privileges to do so). I prefer Vim :

Next, add the values you identified in the previous section. Here is a subnet declaration (scope):

Remember, that spelling counts and typos can cause you a lot of trouble. Check your entries carefully. A mistake in this file can prevent many workstations from having valid network identities.

Reserved IP addresses

It is possible to reserve an IP address for a specific host. This is not the same thing as a statically-assigned IP address. Static IP addresses are configured manually, directly on the client. Reserved IP addresses are leased from the DHCP server, but the given client will always receive the same IP address. The DHCP service identifies the client by MAC address, as seen below.

Start the DHCP service

Start and enable the DHCP service. RHEL 7 and 8 rely on systemd to manage services, so you’ll type the following commands:

See this article I wrote for a summary on successfully deploying services.

Don’t forget to open the DHCP port in the firewall:

Explore the DORA process

Now that the DHCP server is configured, here is the lease generation process. This is a four-step process, and I like to point out that it is entirely initiated and managed by the client, not the server. DHCP is a very passive network service.

The process is:

  • Acknowledge

Which spells the acronym DORA .

  • The client broadcasts a DHCPDiscover message on the subnet, which the DHCP server hears.
  • The DHCP server broadcasts a DHCPOffer on the subnet, which the client hears.
  • The client broadcasts a DHCPRequest message, formally requesting the use of the IP address configuration.
  • The DHCP server broadcasts a DHCPAck message that confirms the lease.

The lease must be renewed periodically, based on the DHCP Lease Time setting. This is particularly important in today’s networks that often contain many transient devices such as laptops, tablets, and phones. The lease renewal process is steps three and four. Many client devices, especially desktops, will maintain their IP address settings for a very long time, renewing the configuration over and over.

Updating the IP address configuration

You may need to obtain a new IP address configuration with updated settings. This can be an important part of network troubleshooting.

Manually generate a new lease with nmcli

You can manually force the lease generation process by using the nmcli command. You must know the connection name and then down and up the card.

Manually force lease generation with dhclient

You can also use the dhclient command to generate a new DHCP lease manually. Here are the commands:

dhclient -r to release it

dhclient (no option) to lease a new one

dhclient -r eth0 for specific NIC

Note : use -v for verbose output

Remember, if the client’s IP address is 169.254.x.x, it could not lease an IP address from the DHCP server.

Other DHCP considerations

There are many ways to customize DHCP to suit your needs. This article only covers the most common options. Two settings to keep in mind are lease times and dealing with routers.

Managing lease times

There is a good trick to be aware of. Use short lease durations on networks with many portable devices or virtual machines that come and go quickly from the network. These short leases will allow IP addresses to be recycled regularly. Use longer durations on unchanging networks (such as a subnet containing mostly desktop computers). In theory, the longer durations reduced network traffic by requiring fewer renewals, but on today’s networks, that traffic is inconsequential.

Routers and DHCP

There is one other aspect of DHCP design to consider. The DORA process covered above occurs entirely by broadcast. Routers, as a general rule, are configured to stop broadcasts. That’s just part of what they do. There are three approaches you can take to managing this problem:

  • Place a DHCP server on each subnet (no routers between the DHCP server and its clients).
  • Place a DHCP relay agent on each subnet that sends DHCP lease generation traffic via unicast to the DHCP server on a different subnet.
  • Use RFC 1542-compliant routers, which can be configured to recognize and pass DHCP broadcast traffic.

[ Getting started with containers? Check out this free course. Deploying containerized applications: A technical overview . ]

DHCP is a simple service but an absolutely critical one. Understanding the lease generation process helps with network troubleshooting. Proper planning and tracking are essential to ensuring you don’t permit duplicate IP address problems to enter your network environment.

Static and dynamic IP configurations for DHCP

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.

Photo of a broken pink egg with smaller eggs spilling out

  • Configuring a DHCP server static IP address

For certain types of servers, you must assign a static IP address and subnet mask during or after Setup. These servers include DHCP servers, DNS servers, WINS servers, and any server providing access to users on the Internet. It is also recommended that you assign a static IP address and subnet mask for each domain controller. If a computer has more than one network adapter, you must assign a separate IP address for each adapter.

Click Start , click Control Panel , click Network and Internet , click Network and Sharing Center and then click Change Adapter Settings .

Right-click the connection to which you want to add a static IP address and then click Properties .

Acknowledge the UAC dialog and then double-click Internet Protocol Version 4 (TCP/IP/IPv4).

Click Use the following IP address , and do one of the following:

  • For a local area connection, in IP address, Subnet mask , and Default gateway , type the IP address, subnet mask, and default gateway addresses.
  • For all other connections, in IP address , type the IP address.

Click Use the following DNS server addresses .

In Preferred DNS server and Alternate DNS server , type the primary and secondary DNS server addresses.

To configure advanced static IPv4 address settings for a local area connection, click Advanced .

Acknowledge the UAC dialog and then double-click Internet Protocol Version 4 (TCP/IP/IPv6).

Click Use the following IPv6 address , and then do one of the following:

  • For a local area connection, in IPv6 address, Subnet prefix length , and Default gateway , type the IP address, subnet prefix length, and default gateway address.
  • For all other connections, in IPv6 address , type the IP address.

To configure advanced static IPv6 address settings for a local area connection, click Advanced .

Additional Resources

For a list of Help topics providing related information, see Configuring DHCP Server Role Settings .

For updated detailed IT pro information about DHCP and TCP/IP, see the Windows Server 2008 documentation on the Microsoft TechNet Web site.

Table Of Contents

  • DHCP Overview
  • Installing the DHCP Server Role
  • More about WINS server settings
  • Integrating DHCP with DNS
  • More about adding scopes
  • More about authorizing DHCP servers in AD DS
  • More about DHCPv6 stateless mode
  • DHCP network interface card bindings
  • Configuring Split Scopes
  • Configuring Name Protection
  • Configuring Link Layer Filtering
  • Configuring a DHCP Scope
  • Configuring a DHCP Multicast Scope
  • Configuring a DHCP Superscope
  • More About Predefined DHCP Options
  • Increase fault tolerance by splitting DHCP scopes
  • Eliminate manual updates of DNS records by configuring dynamic update and secure dynamic update
  • Allow remote administration of DHCP servers by configuring Windows Firewall ports
  • Prevent rogue DHCP servers on your network by authorizing DHCP servers in AD DS
  • Enforce network access policies for client health by configuring DHCP with Network Access Protection
  • Automate management of devices that have static IP addresses by creating DHCP reservations
  • Support multiple subnets with one DHCP server by configuring DHCP relay agents
  • Avoid reconfiguring DHCP on a new server by migrating an existing DHCP infrastructure
  • Balance the load on your DHCP servers by using the 80/20 rule for scopes
  • Centralize management of two or more DHCP servers as a single system by clustering DHCP servers
  • More About DHCP Backup and Restore
  • More About Exporting and Importing the DHCP Database
  • More About DHCP Security Groups
  • Distribute DHCP Leases Based on MAC Address
  • Prevent Name Squatting with Name Protection
  • More About DHCP Audit and Event Logging

How to configure a static IP on Windows 10 or 11

Do you need to switch from a dynamic to a static IP address configuration on Windows 11 or 10? Here's how.

Windows 11 static IP

  • Windows 11 static IP
  • Windows 10 static IP

On Windows, the router's Dynamic Host Configuration Protocol (DHCP) server is (usually) responsible for assigning a dynamic Transmission Control Protocol/Internet Protocol (TCP/IP) configuration to every device in the network, including to your computer running Windows 11 or Windows 10.

Although a dynamic IP address is the recommended configuration for most situations, you may need to change to a static IP address if you're thinking about setting up a printer or file sharing, or you have to configure port forwarding on the router to your computer.

The reason is that a dynamic network configuration can change at any time after the lease from the DHCP expires and if the address changes, network resources you may have configured will stop working. Setting a static IP address will always stay the same on the computer, allowing a more reliable experience sharing resources in the network or forwarding ports.

Whatever the reason, on Windows 10 and 11, you have many ways to configure a static TCP/IP address, including using the Settings app and Command Prompt.

This guide will walk you through the different ways to configure a static network configuration on Windows 11 and 10.

How to set a static TCP/IP network configuration on Windows 11

On Windows 11, you can change your computer's dynamic IP configuration to static in at least two ways through the Settings app or commands.

Configure IP from Settings app

To assign a permanent TCP/IP configuration on Windows 11, use these steps:

  • Open  Settings .
  • Click on  Network & internet .
  • (Optional) Click on Advanced network settings .
  • Under the "More settings" section, click on Hardware and connection properties.
  • Note the current IPv4 ,  Subnet mask ,  Default Gateway , and  DNS server addresses to determine the new configuration, as it has to be in the same network scope.
  • Click the  Ethernet  or  Wi-Fi  page on the right side from the "Network & internet." page.
  • Quick note:  If you select the Wi-Fi page, you need to click on the connection properties to access the network settings.
  • Click on the  Edit  button for the "IP assignment" setting.
  • Select the  Manual  option from the drop-down menu.
  • Turn on the  IPv4  toggle switch.
  • Confirm the IP address for the computer – for example, 10.1.4.90.
  • Confirm the subnet mask for the configuration – for example, 255.255.255.0.
  • Confirm the default gateway address (usually your router's IP) – for example, 10.1.4.1.
  • Confirm the preferred DNS address – for example, 10.1.4.1.
  •   Quick note:  In a home network, you may also be able to use the router's IP address for the DNS configuration. You can also use third-party DNS services like Google Public DNS, Cloudflare, Cisco's OpenDNS, and others. 
  • (Optional) Select the  "On (automatic template)"  option for the "DNS over HTTPS" setting and leave the  "Fallback to plaintext"  option disabled unless you want to encrypted as well as unencrypted traffic or you're troubleshooting connectivity.
  • Quick note:  DNS over HTTPS (DoH) is a feature that encrypts the DNS queries over the HTTPS protocol to improve security and privacy on the internet. You only want to enable this feature if the DNS server supports this feature.
  • Confirm the alternate DNS address (if applicable).
  • (Optional) Select the  "On (automatic template)"  option for the "DNS over HTTPS" setting and leave the  "Fallback to plaintext"  option disabled.
  • Click the  Save  button.

Once you complete the steps, the computer will start using the static network configuration. If everything has been configured correctly, you should be able to open the web browser to access the internet.

If you entered an address (such as the DNS address) and then changed it, you probably won't be able to save the settings. If this is the case, cancel the configuration, start over, enter the correct configuration, and then try to save the settings.

Configure IP from Command Prompt

To set a static TCP/IP configuration on Windows 11, use these steps:

  • Open  Start .
  • Search for  Command Prompt , right-click the top result, and select the  Run as administrator  option.
  • Type the following command to see your current networking configuration and press  Enter : ipconfig /all
  • Confirm the name of the adapter and the networking configuration, including the IPv4 , Subnet mask , Default Gateway , and DNS Servers .
  • Type the following command to configure a static TCP/IP address and press  Enter :  netsh interface ip set address name= "ADAPTER-NAME" static IP-ADDRESS SUBNET-ADDRESS DEFAULT-GATEWAY-ADDRESS

In the above command, replace  ADAPTER-NAME  with the name of your network adapter. Change  IP-ADDRESS SUBNET-ADDRESS    DEFAULT-GATEWAY-ADDRESS  with the device IP address, subnet mask, and default gateway addresses you want. For example, this command sets the 10.1.4.90, 255.255.255.0, 10.1.4.1 configuration:  netsh interface ip set address name="Ethernet 10Gb" static 10.1.4.90 255.255.255.0 10.1.4.1

  • Type the following command to set a DNS server address and press  Enter :  netsh interface ip set dns name="ADAPTER-NAME" static DNS-ADDRESS  

In the command, change  ADAPTER-NAME  with your adapter's name and  DNS-ADDRESS  with the DNS server address of the network. For example, this command sets the local router as the DNS server:  netsh interface ip set dns name="Ethernet 10Gb" static 10.1.4.1

  • Type the following command to set an alternate DNS server address and press  Enter :  netsh interface ip add dns name="ADAPTER-NAME" DNS-ADDRESS index=2

In the command, change  ADAPTER-NAME  with the adapter's name and  DNS-ADDRESS  with an alternate DNS server address. For example, netsh interface ip add dns name="Ethernet 10Gb" 1.1.1.1 index=2

After you complete the steps, the commands will set a static network configuration on Windows 11.

How to set a static TCP/IP network configuration on Windows 10

On Windows 10, you can also use the Settings app and Command Prompt to set up a static IP network configuration.

To assign a permanent TCP/IP configuration on Windows 10, use these steps:

  • Click on  Ethernet  or  Wi-Fi .
  • Click on the active connection on the right side.
  • Click the  Edit  button for the "IP assignment" setting.
  • Select the  Manual  option.
  • Confirm the subnet prefix length (subnet mask) for the configuration – for example, 24 to specify the 255.255.255.0 subnet mask.
  • Quick tip:  It's important to use the number that represents the network instead of the subnet mask. Otherwise, the configuration won't save. If you don't know the subnet prefix length for your subnet mask, you can use any  online subnet calculator  to find out.

Once you complete the steps, Windows 10 will start using the static IP configuration. If you lose network connectivity, restart the computer to regain access to the local network and internet.

To change from dynamic to static IP address with commands on Windows 10, use these steps:

In the command, change  ADAPTER-NAME  with your adapter's name and  DNS-ADDRESS  with the DNS server address of the network. For example, this command sets the local router as the DNS server:  netsh interface ip set dns name=" Ethernet 10Gb" static 10.1.4.1

In the command, change  ADAPTER-NAME  with the adapter's name and  DNS-ADDRESS  with an alternate DNS server address. For example, netsh interface ip add dns name="Ethernet0" 1.1.1.1 index=2

After you complete the steps, the network configuration will switch from dynamic to static on Windows 10.

Get the Windows Central Newsletter

All the latest news, reviews, and guides for Windows and Xbox diehards.

Mauro Huculak

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

  • 2 This PC comes without memory, storage, or an operating system, and it's the best thing to happen to laptops this year
  • 3 Riot Games' fighting game Project L is now 2XKO, and it's coming to Xbox and Windows PC in 2025
  • 4 NVIDIA finally dumps mandatory login for GeForce Experience and merges with the Control Panel app
  • 5 Sony is working to bring PlayStation VR2 to Windows PC

assigning static ip addresses using dhcp

  • Help Center
  • Speakers and Displays
  • Nest Thermostat
  • Cameras and Doorbell
  • Locks and Alarm Systems
  • Smoke Alarms
  • Subscriptions and Services
  • Nest Common Concerns
  • Your privacy
  • Google Nest
  • Privacy Policy
  • Terms of Service
  • Submit feedback
  • Speakers and Displays Get started Explore features Change your settings Fix a problem Warranty, manual and returns
  • Nest Thermostat Introducing Nest thermostats Get started Explore features and settings Fix a problem Warranty, manual & returns
  • Cameras and Doorbell Introducing Nest cameras and doorbells Get started Explore features and settings Fix a problem Warranty, manual & returns
  • Locks and Alarm Systems Locks Alarm Systems
  • Smoke Alarms Introducing Nest Protect Get started Explore features and settings Safety and certifications Fix a problem Warranty, manual & returns
  • Wi-Fi Learn about Wifi products Get started Features and settings Fix a problem Warranty, manual & returns Your privacy
  • Subscriptions and Services Nest Aware Partner Devices and Services Nest Renew Rush Hour Rewards HVAC monitoring Nest Pro installation ADT
  • Nest Common Concerns Nest Products Nest App Accounts Notifications and Emails
  • Features and settings
  • Network settings

DHCP IP reservation or Set a Static IP address for a device

To get the most out of Google Home, choose your Help Center: U.S. Help Center, U.K Help Center , Canada Help Center, Australia Help Center . 

When you use DHCP IP reservation, you're telling your Wi-Fi network to assign the same IP address to a specific device whenever that device connects to your network.

Why use DHCP IP reservation or Static IP

Most devices use DHCP, which assigns dynamic IP addresses, as a default. But sometimes, you want devices to always have the same IP address.

For example, a wireless printer. When you print something, your computer and printer locate each other using IP addresses. If your printer’s IP address keeps changing, your computer may not always be able to find it. Giving your printer a static IP address ensures that your computer always knows the address of your printer as it won’t change if it’s rebooted or if a DHCP IP lease expires.

  • You'll need DHCP IP reservation (Static IP for your client) if you want to set up port forwarding to that device.
  • You can customize the subnet you use under LAN settings (if you prefer to use a different subnet).
  • This article applies only to local devices connected to your router (laptop, smartphone, tablet, etc.). They can have static IP addresses that only your router sees. The outside world won’t see these static IP addresses. But your router can also have a static IP address that the rest of the internet sees. Learn about Static IP for your Wifi point’s WAN .

Change your DHCP settings

assigning static ip addresses using dhcp

  • Tap the device for which you’d like to assign a static IP.

assigning static ip addresses using dhcp

Note : You may need to disconnect this device from your Wi-Fi network and reconnect it before it is assigned the reserved IP.

Was this helpful?

Need more help, try these next steps:.

Get an answer from a google advisor here Message an Advisor

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.

Does the DHCP server know about static IP addresses set in end devices?

I have a simple setup up at home with a vendor provided ADSL router and a few home devices I connect to it to connect to the outside world. I would like one of my devices to have a static internal IP address so I can use it as a server inside my house. I have done this by just setting up a static IP address on the particular device. This seems to work. However,

Does the dhcp server in the router somehow know about this static ip address or might it try to hand out that ip address to another device that joins the networks?
  • wireless-networking

thyu's user avatar

  • 1 you should tell the router to assign a static ip to that particular client. That way, it will not give out that IP to another device. Depending on the setup, sometimes you don't even need to config the client. e.g.: my server gets its IP via DHCP, but the router has a static IP entry for it, so it ALWAYS gets the same IP. –  Russell Uhl Apr 10, 2015 at 14:23

In short the general rule of thumb is no the DHCP server will not know about this Static IP and if hands that same IP out to another device you will have an IP conflict which can take both devices offline.

You have a two options really:

Check what the DHCP scope is and make sure your static IP is outside of that scope for example if your device hands out between 192.168.0.10 to 192.168.0.200 then set the static IP to 192.168.0.210

If your DHCP router supports IP reservations you can reserve the IP so even if it is in the IP range you can tell it the Servers MAC address and it will always hand the same IP out to that device (kind of a mix of static and DHCP).

Hope that helps.

CharlesH's user avatar

  • Is this answer the complete? While working with local IT people I have had them tell me multiple times that setting the current DHCP-assigned address as a static IP is fine because the router will see it and not hand it out to another device. I can't for the life of me think of what to google to confirm this as there are a thousand pages about how to set a static IP on the local computer or at the router. Avoiding the DHCP range is best practice but my customers never have access to the router so I have to guess at the DHCP range by pinging for empty spots. –  user922020 Oct 7, 2019 at 14:49
  • 4 Hey, there is a little bit more to DHCP than what is written above, it was a simplified answer as most home routers DHCP is very basic. In terms of more expensive devices and Windows Server DHCP you do have something called 'Conflict Detection Attempts'. This setting will allow your DHCP Server to 'test' an IP to see if there is a conflict, this can normally be tweaked, if set to 0 and you have static IP's in your range could cause an IP conflict, if you up this to maybe 2 or more attempts before it will hand out the IP it can prevent conflicts...... –  CharlesH Oct 9, 2019 at 14:17
  • 3 ....However if the device with a static IP does not respond back to say 'yes I have that IP assigned statically to me', in other words if no reply comes back to the device it will still hand it out and this can cause an IP conflict. As far as I'm aware there is no DHCP service which actively scans the range to check for static IP addresses, and DHCP naively does not add static IP's to its assigned pool. Hope this helps. –  CharlesH Oct 9, 2019 at 14:20

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged networking wireless-networking router dhcp ..

  • The Overflow Blog
  • Who owns this tool? You need a software component catalog
  • Down the rabbit hole in the Stack Exchange network
  • Featured on Meta
  • Upcoming privacy updates: removal of the Activity data section and Google...
  • Changing how community leadership works on Stack Exchange: a proposal and...

Hot Network Questions

  • What is a "consecutive stay plan"?
  • What happens when the runway is unusable at an isolated aerodrome?
  • What is the Chinese equivalent of "a few loose screws"?
  • Could relativity be consistent if there are multiple light-like fields with different invariant speeds?
  • What's the source of John Adams's quote against the two-party system?
  • Does this 8088 assembly code in the Leisure Suit Larry 2 game actually do anything?
  • Were any U.S. founding fathers present at the storming of the Bastille?
  • Why did Jesus choose to perform his first miracle at the wedding in Cana by turning water into wine?
  • Equation of Motion Invariance in Galilean Mechanics
  • Is it possible to download HTML versions of articles available on publishers' websites?
  • Can "innate" magic exist without fostering elitism?
  • why don’t men have to mourn their dead wife while a woman has to mourn her dead husband
  • What is the definition of 909/808/707/etc. percussion?
  • Why I can't input the equal math symbol "=" in tikz-feynman?
  • Should I put functions in .bashrc, .bash_aliases or .profile
  • extremely slow leak in tire
  • Divide rubies and diamonds on a necklace into 2 equal halves
  • What's the relation between a language being managed and its compiler being reversible?
  • Inverse of a special triangular matrix
  • How to use sed to remove newlines above and below a string?
  • Can a decimal that is infinitely repeating in one base be nonrepeating in another?
  • Is there any performance penalty to unsigned integer underflow?
  • Could the bassist and the rhythm guitarist be the same person?
  • Can an Eidetic Spellcaster benefit from the Geometer feature that allows one page per spell in the spellbook?

assigning static ip addresses using dhcp

  • Shop at FS.com
  • Help center
  • Chinese (traditional)

Learn more 

  • Case Study  
  • Knowledge Center  

Product Updates (103)

Getting Started (97)

News & Announcements (49)

Self Service (10)

Troubleshooting Guide (6)

Configuration Guide (5)

Client Reviews (4)

Product Testing (4)

Installation Guide (3)

Switches (85)

Optics and Transceivers (77)

Network Cabling and Wiring (56)

Networking Devices (43)

Optical Networking (17)

Networking (74)

Fiber Optic Communication (51)

Data Center (26)

General (25)

Wireless and Mobility (6)

Business Type (5)

Routing and Switching (5)

  • Product Updates
  • Networking Devices
  • Case Study 
  • Knowledge Center 

assigning static ip addresses using dhcp

DHCP vs Static IP: Which One Is Better?

Nowadays, most networking devices such as routers or network switches use IP protocol as the standard to communicate over the network. In the IP protocol, each device on a network has a unique identifier that is called IP address. The easiest method of achieving this was configuring a fixed IP address or static IP address. Since there are limitations to static IP, some administrators seek to use dynamic IP instead. DHCP (Dynamic Host Configuration Protocol) is a protocol for assigning dynamic IP addresses to devices that are connected to the network. So DHCP vs static IP, what's the difference?

What Is a Static IP Address?

A static IP address is an address that is permanently assigned to your network devices by your ISP, and does not change even if your device reboots. Static IP addresses typically have two versions: IPv4 and IPv6. A static IP address is usually assigned to a server hosting websites and provides email, VPN and FTP services. In static IP addressing, each device on the network has its own address with no overlap and you'll have to configure the static IP addresses manually. When new devices are connected to a network, you would have to select the "manual" configuration option and input the IP address, the subnet mask, the default gateway and the DNS server.

A typical example of using static IP address is web server. From the Window on your computer, go to START -> RUN -> type "cmd" -> OK. Then type "ping www.google.com" on the Command Window, the interface will pop up as you can see below. The four-byte number 74.125.127.147 is the current IP for www.google.com. If it is a static IP, you would be able to connect Google at any time by using this static IP address in the web browser if you want to visit Google.

static IP address

What Is DHCP?

What is in contrast with the static IP address is the dynamic IP address. Static vs dynamic IP topic is hotly debated among many IT technicians. Dynamic IP address is an address that keeps on changing. To create dynamic IP addresses, the network must have a DHCP server configured and operating. The DHCP server assigns a vacant IP address to all devices connected to the network. DHCP is a way of dynamically and automatically assigning IP addresses to network devices on a physical network. It provides an automated way to distribute and update IP addresses and other configuration information over a network. To know how DHCP works, read this article: DHCP and DNS: What Are They, What’s Their Difference?

Proper IP addressing is essential for establishing communications among devices on a network. Then DHCP vs static IP, which one is better? This part will discuss it.

Static IP addresses allow network devices to retain the same IP address all the time, A network administrator must keep track of each statically assigned device to avoid using that IP address again. Since static IP address requires manual configurations, it can create network issues if you use it without a good understanding of TCP/IP.

While DHCP is a protocol for automating the task of assigning IP addresses. DHCP is advantageous for network administrators because it removes the repetitive task of assigning multiple IP addresses to each device on the network. It might only take a minute but when you are configuring hundreds of network devices, it really gets annoying. Wireless access points also utilize DHCP so that administrators would not need to configure their devices by themselves. For wireless access points, PoE network switches , which support dynamic binding by users' definition, are commonly used to allocate IP addresses for each device that is connected together. Besides, what makes DHCP appealing is that it is cheaper than static IP addresses with less maintenance required. You can easily find their advantages and disadvantages from the following table.

After comparing DHCP vs static IP, it is undoubtedly that DHCP is the more popular option for most users as they are easier and cheaper to deploy. Having a static IP and guessing which IP address is available is really bothersome and time-consuming, especially for those who are not familiar with the process. However, static IP is still in demand and useful if you host a website from home, have a file server in your network, use networked printers, or if you use a remote access program. Because a static IP address never changes so that other devices can always know exactly how to contact a device that utilizes a static IP.

Related Article: IPv4 vs IPv6: What’s the Difference?

You might be interested in

See profile for Moris.

Email Address

Please enter your email address.

Please make sure you agree to our Privacy Policy and Terms of Use.

FS Same Day Shipping Ensures Your Business Success

Cloud-based Networks Grow with Your Business

assigning static ip addresses using dhcp

Anchor Your Hybrid Cloud Networking Strategy

  • Network Cabling and Wiring
  • Buying Guide
  • Fiber Optic Communication
  • Optics and Transceivers
  • Data Center
  • Ethernet Patch Cords
  • Business Type
  • Routing and Switching
  • Best Practices
  • Optical Networking
  • Gigabit Network
  • 10G Network

Fiber Optic Cable Types: Single Mode vs Multimode Fiber Cable

Fiber Optic Cable Types: Single Mode vs Multimode Fiber Cable

May 10, 2022

Layer 2 vs Layer 3 Switch: Which One Do You Need?

Layer 2 vs Layer 3 Switch: Which One Do You Need?

Oct 6, 2021

Multimode Fiber Types: OM1 vs OM2 vs OM3 vs OM4 vs OM5

Multimode Fiber Types: OM1 vs OM2 vs OM3 vs OM4 vs OM5

Sep 22, 2021

Running 10GBASE-T Over Cat6 vs Cat6a vs Cat7 Cabling?

Running 10GBASE-T Over Cat6 vs Cat6a vs Cat7 Cabling?

Sep 29, 2021

PoE vs PoE+ vs PoE++ Switch: How to Choose?

PoE vs PoE+ vs PoE++ Switch: How to Choose?

Mar 16, 2023

  • Generative AI
  • Cloud Computing
  • CPUs and Processors
  • Data Center
  • Edge Computing
  • Enterprise Storage
  • Virtualization
  • Internet of Things
  • Network Management Software
  • Network Security
  • Artificial Intelligence
  • United States
  • Newsletters
  • Foundry Careers
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Copyright Notice
  • Member Preferences
  • About AdChoices
  • E-commerce Links
  • Your California Privacy Rights

Our Network

  • Computerworld
  • Enterprise Buyer’s Guides

tim_ferrill

IPv6: How to configure static and DHCP IP addressing and deal with DNS

IPv6 offers several ways that aren’t possible in IPv4 to assign IP addresses, and DNS set-up has differences as well.

IPv6 wireless network protocol

As IP technology has matured, the range of devices that the internet protocol supports goes well beyond computers to include cell phones, entertainment systems, and Internet of Things (IoT) devices, which created the need for more IP addresses and the development of IPv6 to provide them.

With more and more device types requiring network connectivity, the demand for addresses in an IPv4-based network is at a premium. It can provide somewhere south of 4,294,967,296 unique addresses. IPv6 , on the other hand, can yield roughly 3.4×10 38 , which should be ample for a very long time.

IPv6 also includes performance enhancements like refined multicasting, stateless address autoconfiguration (SLAAC), simplified headers to streamline router processing, and the option to allow larger packets. Security also gets a potential boost in IPv6 with IPSec, which was initially built for IPv6 and then retrofitted for IPv4.

Dealing with IPv6 includes familiarizing yourself with two important IP concepts: DHCP and DNS. Here are tips on both.

Key IPv6 addressing concepts

IPv6 addressing within a network has a few major differences from IPv4. With IPv4 certain address ranges are reserved for private networks (such as 10.0.0.0/8 or 192.168.0.0/16) and link-local addressing without dynamic host configuration protocol (DHCP) (169.254.0.0/16).

DHCP automatically assigns IP addresses and distributes other information to hosts on a network so they can communicate with other endpoints. At the same time, by assigning active IP addresses only to active devices, DHCP can reuse them to help conserve IPv4 addresses. IPv6 has similar concepts but refines each idea a little further.

Link-local addresses in IPv6 exist on each interface, regardless of whether the interface has an address assigned from DHCP or is configured using another method. Link-local IPv6 addresses have a prefix of fe80::/10 and a 64-bit suffix which can be computed and managed by the host itself without requiring additional networking components. IPv6 hosts can verify the uniqueness of their link-local addresses through a neighbor discovery process, which reaches out to the local network in order to verify that the address is not already in use.

Once a link-local address has been established, the IPv6 host attempts to determine if an IPv6-capable router is available through the use of a router solicitation message. If an IPv6 router is available it will respond with a router advertisement, which includes network configuration information such as a network prefix that is used for automatic address configuration using SLAAC or whether the host should obtain additional configuration information from a DHCPv6 server.

Configuring a Static IPv6 address in Windows

Typical to Windows, there are three ways to configure a static IPv6 address for a network adapter, all of which work in Windows 10 and in both Windows Server 2016 and 2019. The first way uses the classic Control Panel method as follows.

From the Control Panel, navigate to Network and Internet, Network and Sharing Center, and then choose the Change adapter settings link in the left panel. (You can shortcut all the clicking by searching for “View Network Connections” from the Start Menu or the Search bar).

Once you locate the network adapter you wish to configure, you can view the properties and locate the Internet Protocol Version 6 (TCP/IPv6) node and configure the properties for the IPv6 protocol. As with IPv4 you can set the adapter to obtain the IPv6 address automatically or configure your own IPv6 address, subnet, default gateway, and DNS server information. If you need to set multiple IPv6 addresses this can be accomplished by clicking the Advanced button.

The second method of setting a static IP address involves the more modern Settings application. In Settings go to Network & Internet and click the Properties button for the interface you wish to configure. Click the Edit button under IP settings, change the configuration type to Manual, enable IPv6, and populate your settings.

The third way is to use the Windows PowerShell command-line interface. In order to set a static IPv6 address using the New-NetIPAddress cmdlet you will need either the name or the numeric index of the adapter you wish to configure. Both of these values are available using the Get-NetAdapter cmdlet. From an administrative PowerShell prompt enter one of the following commands (on a single line) replacing the details as necessary for your environment:

Managing IPv6 Addressing for a Windows Network

Static IP addresses are generally OK to use when the device is hosting a critical network service that requires retaining a consistent network address, but for general use you’ll want to have a way to automate address configuration.

In an IPv4 network DHCP is the obvious answer for IP configuration and can also provide critical networking details such as the default gateway or DNS-server addresses through DHCP options. IPv6 offers three potential scenarios for managing addressing and network configuration.

SLAAC is a straightforward option assuming your router supports the appropriate router-advertisement messages. DHCP is certainly still in play to handle stateful addressing in the form of DHCPv6. You can also potentially have a hybrid scenario where your router handles addressing, and DHCPv6 simply provides the relevant network-configuration details.

In Windows Server 2016 and 2019, configuring DHCPv6 is extremely straightforward. If your router is configured to handle router advertisements and addressing through SLAAC you can simply manage the IPv6 server options to configure DNS servers or other options. If you prefer to roll with stateful addressing you can add one or more DHCPv6 scopes and configure a prefix, any exclusions, and lease durations. DHCPv6 scopes will maintain a list of leases and their expirations just as an IPv4 scope would, and they also provide an easy path for creating IPv6 reservations from existing leases.

Setting up DNS Name Resolution for IPv6

DNS is incredibly important in an IPv6 network, even moreso than in an IPv4 network because trying to configure connectivity and access resources using only IPv6 addresses is borderline insane. The biggest difference to note in regard to using DNS with IPv6 is that the IPv4 A records, which convert a fully qualified domain name (FQDN) to an IPv4 address, are replaced by AAAA (quad-A) records. All other record types such as CNAME, MX, NS, SOA, and the various DNSSEC-related record types simply reference the FQDN of the AAAA record. Reverse lookup zones, which are used to find a hostname from an IP address, are different in IPv6 simply because they are built on the IP address structure, but the process of creating and using these zones are functionally identical.

The DNS server role in Windows Server supports both IPv4 and IPv6 through a similar set of tools and processes. As with A records, AAAA records can either be created manually for critical systems or the dynamic update process can be leveraged to manage DNS records for the entire enterprise.

AAAA records can be manually created using the DNS console through the same process as A records: Right click the required DNS zone, select the New Host (A or AAAA) option, and populate the Host name and IP address. Dynamic updates are enabled through the DNS console, but most of the work is done by DHCP; the update process is configured within the DHCP console and updates are performed by the DHCP client service on individual hosts. Dynamic updates can also be manually initiated from the command line using the ipconfig command with the /registerdns switch.

Related content

Juniper amps up ai networking plans, unix, linux and epoch time, $15 billion deal with microsoft boosts intel’s chipmaking vision, ibm x-force: stolen credentials a top risk to network infrastructure, newsletter promo module test.

tim_ferrill

Tim Ferrill is an IT professional and writer living in Southern California. He has covered Windows, Windows Phone, and Windows Server for several publications, including CITEworld and InfoWorld.

More from this author

Tips for building a home lab to prep for network certifications, certifications that can land you a job as a network-automation engineer, free training from 8 top vendors to advance your it career, surviving a mastodon stampede, most popular authors.

assigning static ip addresses using dhcp

Show me more

Sase, multicloud spur greater collaboration between network and security teams.

Image

Viewing user accounts and activities on Linux servers

Image

Enterprise-ready private 5G joins Wi-Fi in prime time

Image

Episode 1: Understanding Cisco’s Converged SDN Transport

Image

Episode 2: Pluggable Optics and the Internet for the Future

Image

Episode 3: Looking Forward: 5G, Digital Transformation, and the Network of the Future

Image

How to calculate factorials in Linux

Image

How to use the nohup command

Image

How to use date command options

Image

Sponsored Links

  • Want to justify your IT investments faster? IDC reports on how to measure business impact.
  • Read this IDC spotlight to learn what commonly prevents value realization – and how to solve it
  • iPhone 15 Plus vs. Pro Max
  • 3 Key Tech Trends to Watch in 2024
  • When to Use a Static IP Address

Are static IP addresses better than dynamic addresses?

  • Massachusetts Institute of Technology
  • University of Illinois

assigning static ip addresses using dhcp

In This Article

Jump to a Section

Static IP Address Uses

  • Static vs. Dynamic
  • When Not to Use a Static IP

Static IP Address Assignment on Home Networks

  • Getting a Static Public IP Address

A static IP address, or fixed IP address , is an IP address that never changes. Not everyone needs a static IP address, but knowing how they differ from dynamic IP addresses can help you understand whether you should use a static IP address.

Here are some example situations for when you might need a static IP address:

  • Setting up a home file server .
  • Adding a second router to a network.
  • Enabling access to a computer when away from home or work.
  • Forwarding ports to certain devices.
  • Sharing a printer over a network.
  • Connecting to an IP camera when away from home.

Static & Dynamic: What They Mean

The terms static and dynamic are simple to understand. At the core, the only real change you'll notice between static versus dynamic IP addresses is that the former never changes, while the latter does.

Most people don't care if their IP address changes. If you never know what your IP address is and never have a reason to keep it the same, then dynamic addresses are fine for you.

However, if your network or computer is set up in a specific way where some devices would work easier and set up would be smoother for you as the admin if an IP address always stayed the same, then static addressing is what you want.

Static IP addresses are assigned manually by an administrator. In other words, the device receiving the static IP is given a specific address (such as 192.168.1.2 ), and from then on, the address never changes.

Dynamic IP addresses are not assigned manually. They are assigned automatically by DHCP (Dynamic Host Configuration Protocol).

When Static IP Addresses Are Used

Static IP addresses are necessary for devices that need constant access.

For example, a static IP address is necessary if your computer is configured as a server, such as an FTP server or web server. If you want to ensure that people can always access your computer to download files, force the computer to use a static, never-changing IP address.

If the server was assigned a dynamic IP address, it would change occasionally, preventing your router from knowing which computer on the network is the server.

If you want to access your home computer while you're on a trip or your work computer when you're at home, setting up the computer to use a static IP address lets you reach that computer at any time without fearing that the address will change and block your access to it.

A shared printer is another example of when to use a static IP address. If you have a printer that everyone in your house or office needs to share, give it an IP address that won't change no matter what. That way, when every computer is set up to connect to that printer, those connections remain indefinitely because the address never changes.

Here are some other reasons to use static IPs:

  • They provide slightly better protection against network security problems than DHCP address assignment provides.
  • Some network devices don't support DHCP.
  • They help avoid potential  IP address conflicts where DHCP might supply an address already assigned elsewhere.
  • They provide geolocation that's more accurate than a dynamic IP address.

When Not to Use a Static IP Address

Because a static IP address is assigned manually, it's less efficient for a network admin to give it out, especially in mobile situations. Someone must visit the device in person to give it an IP address instead of letting DHCP assign the address automatically.

For example, you wouldn't set a static IP address on a smartphone because the moment it reaches another Wi-Fi network, the address might not be supported on that network, meaning that it won't be able to access the internet.

Dynamic addressing is more convenient in this situation because it's easy for administrators to set up. DHCP works automatically with minimal intervention needed, allowing mobile devices to move between different networks seamlessly.

Businesses are more likely to use static IP addresses than home networks. Implementing static IP addresses isn't easy and frequently requires a knowledgeable technician.

However, you can have a static IP address for your home network. When making static IP assignments for local devices on home and other private networks, the address numbers should be chosen from the  private IP address  ranges defined by the Internet Protocol standard:

  • 10.0.0.0–10.255.255.255
  • 172.16.0.0–172.31.255.255
  • 192.168.0.0–192.168.255.255

These ranges support thousands of IP addresses. It's common for people to assume they can choose any number in the range and that the specific choice doesn't matter much. This is untrue.

To choose and set specific static IP addresses suitable for your network, follow these guidelines:

  • Do not choose any addresses that end with .0 or .255 . These addresses are usually reserved for use by network protocols .
  • Do not choose the addresses at the beginning of a private range. Addresses like 10.0.0.1 , 192.168.0.1 , and 192.168.0.100 are commonly used by network routers and other consumer devices. These are the first addresses hackers attack when trying to break into a private computer network.
  • Don't choose an IP address that falls outside the range of your local network. For example, to support all addresses in the 10.x.x.x private range, the subnet mask on all devices must be set to 255.0.0.0. If they aren't, some static IP addresses in this range don't work.

How to Get a Static Public IP Address

Internet service providers (ISP) traditionally assign all their IP addresses to customers dynamically, due to historical shortages of available IP numbers.

Contact your service provider if you prefer a static IP address. You can't get a static public IP address without requesting it from your ISP. Customers can sometimes obtain a static IP by subscribing to a special service plan and paying extra fees.

Get the Latest Tech News Delivered Every Day

  • What Is an IP Address?
  • What Is a Public IP Address? (and How to Find Yours)
  • What Is a Static IP Address?
  • How to Find Your IP Address on Windows 10
  • What Is a Dynamic IP Address?
  • How Is 192.168.1.2 Used?
  • What Is DHCP? (Dynamic Host Configuration Protocol)
  • Uses for the 192.168.0.2 and 192.168.0.3 IP Addresses
  • What Is a Private IP Address?
  • How to Work With IP Address 192.168.100.1
  • Understanding the 192.168.1.100 IP Address
  • What Is the 192.168.1.5 IP Address Used For?
  • Cisco Default Password List
  • 192.168.1.4: IP Address for Local Networks
  • How to Change Your IP Address
  • How to Obtain a Fixed IP Address

How to change from static to dynamic IP address on Windows 10

Are you using a static IP address? Here are four ways to switch to a dynamic configuration on Windows 10.

Avatar for Mauro Huculak

On Windows 10, you can configure a network adapter to use a static IP address manually, or you can use an automatically assigned configuration using the local Dynamic Host Configuration Protocol (DHCP) server.

Although using a static IP address is recommended for devices that provide services to network users, as its configuration never changes, it may come a time when you may no longer need this configuration, and a dynamically assigned network configuration will be more suited.

If you use a static IP address and need to switch to a dynamic configuration, it’s possible to perform this task in several ways, including using the Settings app, Control Panel, Command Prompt, and even PowerShell.

In this guide , you’ll learn the steps to remove a static IP address configuration to obtain a dynamic configuration from the DHCP server on Windows 10 .

Change to dynamic IP address (DHCP) from Settings

Change to dynamic ip address (dhcp) from command prompt, change to dynamic ip address (dhcp) from powershell, change to dynamic ip address (dhcp) from control panel.

To enable DHCP to obtain a TCP/IP configuration automatically on Windows 10, use these steps:

Open Settings on Windows 10.

Click on Network & Internet .

Click on Ethernet or Wi-Fi .

Click the network connection.

Under the “IP settings” section, click the Edit button.

Edit IP settings on Windows 10

Use the Edit IP settings drop-down menu and select the Automatic (DHCP) option.

Enable automatic (DHCP) IP address using Settings app

Click the Save button.

Once you complete the steps, the networking stack configuration will reset, and your device will request an IP address from the DHCP server (usually your router).

To switch from a static TCP/IP configuration to a dynamically assigned configuration using DHCP with Command Prompt, use these steps:

Open Start .

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

Type the following command to note the name of the network adapter and press Enter

Network adapter name using Command Prompt

Type the following command to configure the network adapter to obtain its TCP/IP configuration using DHCP and press Enter :

In the command, make sure to change “Ethernet1” for the adapter’s name that you want to configure.

Enable DHCP on Windows 10 using Command Prompt

After completing the steps, the network adapter will stop using a static IP address, and it’ll obtain a configuration automatically from the DHCP server.

To remove a static IP and DNS addresses to use a dynamic configuration using PowerShell, use these steps:

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

Type the following command to note the “InterfaceIndex” number for the network adapter and press Enter :

Network interface information using PowerShell

Type the following command to enable the network adapter to obtain its TCP/IP configuration using DHCP and press Enter :

In the command, make sure to change “Ethernet0” for the adapter’s name that you want to configure.

Type the following command to enable the network adapter to obtain its DNS configuration using DHCP and press Enter :

In the command, change “3” for the InterfaceIndex for the adapter to configure.

Enable DHCP for dynamic IP assignment using PowerShell

Once you complete the steps, the IP and DNS addresses will be reset from the adapter, and your computer will receive a new dynamic configuration from DHCP.

To configure a network adapter to use a dynamic IP address using Control Panel, use these steps:

Open Control Panel .

Click on Network and Internet .

Click on Network and Sharing Center .

On the left pane, click the “Change adapter settings” option.

Network and Sharing Center in Control Panel

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

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

Click the Properties button.

Ethernet1 Properties on Windows 10

Select the “Obtain an IP address automatically” option.

Select the “Obtain the following DNS server address automatically” option.

Enable dynamic IP address (DHCP) using Control Panel

Click the OK button.

After completing the steps, the statically assigned TCP/IP configuration will no longer be available, and the computer will automatically request a dynamic network configuration from the network.

Avatar for Mauro Huculak

Mauro Huculak is a Windows expert and the Editor-in-Chief who started Pureinfotech in 2010 as an independent online publication. He is also been a Windows Central contributor for nearly a decade. Mauro has over 12 years of experience writing comprehensive guides and creating professional videos about Windows, software, and related technologies, including Android and Linux. Before becoming a technology writer, he was an IT administrator for seven years. In total, Mauro has over 20 years of combined experience in technology. Throughout his career, he achieved different professional certifications from Microsoft (MSCA), Cisco (CCNP), VMware (VCP), and CompTIA (A+ and Network+), and he has been recognized as a Microsoft MVP for many years. You can follow him on X (Twitter) , YouTube , LinkedIn and About.me .

  • Windows Subsystem for Android gets January 2023 update
  • How to access Advanced startup (WinRE) on Windows 10

We hate spam as much as you! Unsubscribe any time Powered by follow.it ( Privacy ), our Privacy .

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.

Static IP Address assignment vs DHCP address assignment

I manage a small-ish network that consists of less than 70 nodes. The previous system administrators opted to have a dhcp server and manually set dhcp addess.

I have opted to rather use dhcp address assignment instead of static address assignment except for my domain controllers and EXS hosts. I have been critised for following this scheme, but its way easy for me to manage the address scope with out having to scan the network for available ip addresses. Am i on the right track or have i lost the plot?

masegaloeh's user avatar

7 Answers 7

Why were you criticised for doing it that way? I mean I think it's crazy not to use DHCP for workstations at least, but maybe there is something specific to the environment that changes that equation.

The only issue I can see with DHCP is ensuring that your scope is properly created and doesn't cross over with the pool of static addresses you use (even that can be got around with reservations but its more work than needed).

That aside, users should never ever need to know whether or not you use DHCP because their workstation should 'just work', except for when the DHCP server is not available (and if that's an issue, you just have more than one DHCP server online).

EDIT: Convict makes a good point about documentation, make sure you do have the IP address ranges documented, explaining what you've done, why and how to find it. I don't think people are comfortable with the idea that some tools are "self documenting" (and to an extent they might have a point, how would you easily re-create your DHCP database with all your reservations, if you couldn't restore from backup?).

Rob Moir's user avatar

  • I too am seriously curious! What reasons were given for this criticism? –  quux Jun 10, 2009 at 8:21
  • previous network admins assignment addresses in the dhcp pool to servers, without excluding those addresses. Since 95% of the computers are infact servers offering custom applications i prefer to assign these 'servers' addresses by way of dhcp reservation –  biosFF Jun 10, 2009 at 8:27
  • @biosff - well the way you're doing things there certainly makes sense. I'm still boggling at the idea you'd get criticised for it, few of our users know or care about whether we use DHCP or a dartboard to assign and manage IP addresses and as long as things work they don't care either! –  Rob Moir Jun 10, 2009 at 8:49
  • 1 The documentation is the DHCP database, IMHO. You should back it up and test restoring it. Why keep separate documentation that will fall out of date when you can use the database / config file that drives the DHCP server as the authoritative documentation? –  Evan Anderson Jun 10, 2009 at 12:03
  • Evan, I'm inclined to agree but that makes people who don't understand that uncomfortable. At the very least you need to write a puff piece of documentation explaining what you've done and where to look and how to pick it all up. –  Rob Moir Jun 10, 2009 at 12:31

Yes, I think you're on the right track.

I suspect that you're being criticised because ...

of the lack of documentation about your network, rather than your choice of technology to assign an IP address;

you're doing IP address assignment differently to the way it's always been done . You're challenging the status quo.

Ask more questions to find out the real reason for the criticism. You may have to teach your detractors about DHCP and its benefits to your network administration.

People will come around to your way of configuring the network once they see how much easier it is to add another workstation to the network when the IP address is allocated by DHCP. DHCP should mean the end of those pesky duplicate IP address allocation errors that have plagued your network in the past.

Convict's user avatar

When you say the previous administrators "manually set DHCP address" do you mean static assignments?

If so, this is generally the easier way to manage pools of workstations on a LAN. Statically tie each machine's MAC address to a specific IP and deliver them by DHCP. You get the trade off of knowing exactly where each machine is and being able to change the assignments without visiting each discrete machine.

Dan Carley's user avatar

Adding my vote to DHCP all the way. I can't understand why someone would criticise you for suggesting this, the whole point is to make it easier to manage the address scope, and as soon as you have more than 5 or so workstations, it makes sense.

Maximus Minimus's user avatar

About the critics: there are still people around, that don't know DHCP with StaticIP via the MAC-Adress. They think, that DHCP = CHAOS, so you better tell em whats really in the bag.

I also can recommend different IP-ranges, something like this:

1-9 important Servers (static) 10-99 misc. Servers (static) 100-150 Sales & Marketing (DHCP with MAC) 151-200 Developers (DHCP with MAC) 200-253 Tech.Stuff (DHCP with MAC)

Another vote for DHCP is, that you can handle all IPs from one, central instance.

Phil Swiss's user avatar

  • 1 Tee-hee... I remember when I "cared" what host portions of their IP address were assigned to certain kinds of computers, devices, etc. I'm glad I let go of that. (Which network portion that gets assigned matters a lot, and is related to the VLAN the host lives in. As far as host portions of IP addresses, though, I couldn't care less. I have dynamic DNS, reverse lookup zones, and DHCP reservations... the host portion of the IP address is meaningless to me.) –  Evan Anderson Jun 10, 2009 at 12:05

DHCP is by far the best choice as soon as you have more than a few stations.

Static entries should be for servers and communication devices.

I use IP range: Static .1 - .50 for servers, printers, routers, etc. DHCP .51 - .150 for workstations

Jindrich's user avatar

  • 1 "Static" and "DHCP" are not exclusive. It is very common to use DHCP to deliver static addresses (see mh's reply). –  bortzmeyer Jun 10, 2009 at 19:58

One possible disadvantage to this is that it introduces a startup order dependancy: things which DHCP need to wait for the DHCP server to come up.

pjc50's user avatar

You must log in to answer this question.

Not the answer you're looking for browse other questions tagged networking ip dhcp ip-address ..

  • The Overflow Blog
  • Who owns this tool? You need a software component catalog
  • Down the rabbit hole in the Stack Exchange network
  • Featured on Meta
  • Upcoming privacy updates: removal of the Activity data section and Google...
  • Changing how community leadership works on Stack Exchange: a proposal and...

Hot Network Questions

  • How could a speedster function in real life. Part 1:Acceleration
  • Can people feel the low heat radiation from very cold surfaces?
  • What do we mean when we say something is done "in hardware" versus "in software"?
  • How to prove that the following series converges?
  • What happens when the runway is unusable at an isolated aerodrome?
  • Visualizing the reverse pyramid in a good way
  • Why was the standard distance set to 10 parsec and not simply to 1 parsec?
  • Inverse of a special triangular matrix
  • Newbie: How to identify a chip on a board, what is the best strategy?
  • Were any U.S. founding fathers present at the storming of the Bastille?
  • What is the definition of 909/808/707/etc. percussion?
  • 1990s/2000s live-action show with kids in tribes in a dystopian sci-fi/fantasy setting
  • Will MLE always produce Biased Variance Estimates?
  • How are apps selected to be pre-installed
  • How do I handle white space in cards with varying amounts of information?
  • Will there be another joint International Space Station (ISS) after the current is retired?
  • Abbreviation I haven’t seen before
  • A weird probability question
  • why don’t men have to mourn their dead wife while a woman has to mourn her dead husband
  • Recursive macros revisited
  • Does over refrigerator cabinet need support at both ends?
  • Names in The Water Margin
  • Is there global law that governs Denaturalization to stateless status for children?
  • What are advantages of chaos based image encryption methods over simply treating images as opaque bit strings?

assigning static ip addresses using dhcp

  • Mobile Site
  • Staff Directory
  • Advertise with Ars

Filter by topic

  • Biz & IT
  • Gaming & Culture

Front page layout

binding agreements —

Doing dns and dhcp for your lan the old way—the way that works, are you a sysadmin with control issues who needs a weekend project look no further.

Lee Hutchinson - Feb 16, 2024 11:30 am UTC

All shall tremble before your fully functional forward and reverse lookups!

Here's a short summary of the next 7,000-ish words for folks who hate the thing recipe sites do where the authors babble about their personal lives for pages and pages before getting to the cooking: This article is about how to install bind and dhcpd and tie them together into a functional dynamic DNS setup for your LAN so that DHCP clients self-register with DNS, and you always have working forward and reverse DNS lookups. This article is intended to be part one of a two-part series, and in part two, we'll combine our bind DNS instance with an ACME-enabled LAN certificate authority and set up LetsEncrypt-style auto-renewing certificates for LAN services.

If that sounds like a fun couple of weekend projects, you're in the right place! If you want to fast-forward to where we start installing stuff, skip down a couple of subheds to the tutorial-y bits. Now, excuse me while I babble about my personal life.

My name is Lee, and I have a problem

I am a tinkering homelab sysadmin forever chasing the enterprise dragon. My understanding of what "normal" means, in terms of the things I should be able to do in any minimally functioning networking environment, was formed in the days just before and just after 9/11, when I was a fledgling admin fresh out of college, working at an enormous company that made planes starting with the number "7." I tutored at the knees of a whole bunch of different mentor sysadmins, who ranged on the graybeard scale from "fairly normal, just writes his own custom GURPS campaigns" to "lives in a Unabomber cabin in the woods and will only communicate via GPG." If there was one consistent refrain throughout my formative years marinating in that enterprise IT soup, it was that forward and reverse DNS should always work. Why? Because just like a clean bathroom is generally a sign of a nice restaurant, having good, functional DNS (forward and reverse) is a sign that your IT team knows what it's doing.

Forward and reverse lookups?

Much like a reverse phonebook (old people will understand what that means), a "reverse lookup" is a DNS query that gives the server an IP address and asks for the corresponding hostname.

These lookups come from different DNS zones, and having one type of query working successfully does not mean the other will work. We'll make sure to get both working for this tutorial.

Just look at what the masses have to contend with outside of the datacenter, where madness reigns. Look at the state of the average user's LAN—is there even a search domain configured? Do reverse queries on dynamic hosts work? Do forward queries on dynamic hosts even work? How can anyone live like this?!

I decided long ago that I didn't have to, so I've maintained a linked bind and dhcpd setup on my LAN for more than ten years. Also, I have control issues, and I like my home LAN to function like the well-run enterprise LANs I used to spend my days administering. It's kind of like how car people think: If you're not driving a stick shift, you're not really driving. I have the same kind of dumb hang-up, but for network services.

Honestly, though, running your LAN with bind and dhcpd isn't even that much work—those two applications underpin a huge part of the modern Internet. The packaged versions that come with most modern Linux distros are ready to go out of the box. They certainly beat the pants off of the minimal DNS/DHCP services offered by most SOHO NAT routers. Once you have bind and dhcpd configured, they're bulletproof. The only time I interact with my setup is if I need to add a new static DHCP mapping for a host I want to always grab the same IP address.

So, hey, if the idea of having perfect forward and reverse DNS lookups on your LAN sounds exciting—and, come on, who doesn't want that?!—then pull up your terminal and strap in because we're going make it happen.

(Note that I'm relying a bit on Past Lee and this old blog entry for some of the explanations in this piece, so if any of the three people who read my blog notice any similarities in some of the text, it's because Past Lee wrote it first and I am absolutely stealing from him.)

But wait, there’s more!

This piece is intended to be part one of two. If the idea of having one's own bind and dhcpd servers sounds a little silly (and it's not—it's awesome ), it's actually a prerequisite for an additional future project with serious practical implications: our own fully functioning local ACME-enabled certificate authority capable of answering DNS-01 challenges so we can issue our own certificates to LAN services and not have to deal with TLS warnings like plebes.

("But Lee," you say, "why not just use actual-for-real LetsEncrypt with a real domain on my LAN?" Because that's considerably more complicated to implement if one does it the right way, and it means potentially dealing with split-horizon DNS and hairpinning if you also need to use that domain for any Internet-accessible stuff. Split-horizon DNS is handy and useful if you have requirements that demand it, but if you're a home user, you probably don't. We'll keep this as simple as possible and use LAN-specific DNS zones rather than real public domain names.)

We'll tackle all the certificate stuff in part two—because we have a ways to go before we can get there.

reader comments

Promoted comments.

assigning static ip addresses using dhcp

You "recommend" using a static IP address for a DHCP/DNS server, I would use stronger language and say it's required. For DHCP...are you getting an IP from yourself on boot? I've never tried that, but sounds iffy. For DNS, if anything else on the network is statically configured, well, you need a stable IP for the DNS resolver.

assigning static ip addresses using dhcp

I’d flip that a bit on you. I’ve spent years trying to understand how dns is setup. And have found next to zero good explanations or comprehensive guide as to how it works on the whole. It isn’t well known, because it isn’t well taught, regulated, or documented.

Channel Ars Technica

How-To Geek

How to set static ip addresses on your router.

Routers both modern and antiquated allow users to set static IP addresses for devices on the network, but what's the practical use of static IP addresses for a home user? Read on as we explore when you should, and shouldn't, assign a static IP.

Quick Links

Dhcp versus static ip assignment, when to use static ip addresses, assigning static ip addresses the smart way.

Dear How-To Geek, After reading over your five things to do with a new router article , I was poking around in the control panel of my router. One of the things I found among all the settings is a table to set static IP addresses. I'm pretty sure that section is self explanatory in as much as I get that it allows you to give a computer a permanent IP address, but I don't really understand why? I've never used that section before and everything on my home network seems to work fine. Should I be using it? It's obviously there for some reason, even if I'm not sure what that reason is! Sincerely, IP Curious

To help you understand the application of static IP addresses, let's start with the setup you (and most readers for that matter) have. The vasty majority of modern computer networks, including the little network in your home controlled by your router, use DHCP (Dynamic Host Configuration Protocol). DHCP is a protocol that automatically assigns a new device an IP address from the pool of available IP addresses without any interaction from the user or a system administrator. Let's use an example to illustrate just how wonderful DHCP is and how easy it makes all of our lives.

Related: How to Set Up Static DHCP So Your Computer's IP Address Doesn't Change

Imagine that a friend visits with their iPad. They want to get on your network and update some apps on the iPad. Without DHCP, you would need to hop on a computer, log into your router's admin panel, and manually assign an available address to your friend's device, say 10.0.0.99. That address would be permanently assigned to your friend's iPad unless you went in later and manually released the address.

With DHCP, however, life is so much easier. Your friend visits, they want to jump on your network, so you give them the Wi-Fi password to login and you're done. As soon as the iPad connected to the router, the router's DHCP server checks the available list of IP addresses, and assigns an address with an expiration date built in. Your friend's iPad is given an address, connected to the network, and then when your friend leaves and is no longer using the network that address will return to the pool for available addresses ready to be assigned to another device.

All that happens behind the scenes and, assuming there isn't a critical error in the router's software, you'll never even need to pay attention to the DHCP process as it will be completely invisible to you. For most applications, like adding mobile devices to your network, general computer use, video game consoles, etc., this is a more than satisfactory arrangement and we should all be happy to have DHCP and not be burdened with the hassle of manually managing our IP assignment tables.

assigning static ip addresses using dhcp

Although DHCP is really great and makes our lives easier, there are situations where using a manually assigned static IP address is quite handy. Let's look at a few situations where you would want to assign a static IP address in order to illustrate the benefits of doing so.

You need reliable name resolution on your network for computers that need to be consistently and accurately found. Although networking protocols have advanced over the years, and the majority of the time using a more abstract protocol like SMB (Server Message Block) to visit computers and shared folders on your network using the familiar //officecomputer/shared_music/ style address works just fine, for some applications it falls apart. For example, when setting up media syncing on XBMC it's necessary to use the IP address of your media source instead of the SMB name.

Any time you rely on a computer or a piece of software to accurately and immediately locate another computer on your network (as is the case with our XBMC example - the client devices need to find the media server hosting the material) with the least chance of error, assigning a static IP address is the way to go. Direct IP-based resolution remains the most stable and error free method of communicating on a network.

You want to impose a human-friendly numbering scheme onto your network devices. For network assignments like giving an address to your friend's iPad or your laptop, you probably don't care where in the available address block the IP comes from because you don't really need to know (or care). If you have devices on your network that you regularly access using command line tools or other IP-oriented applications, it can be really useful to assignment permanent addresses to those devices in a scheme that is friendly to the human memory.

For example, if left to its own devices our router would assign any available address to our three Raspberry Pi XBMC units. Because we frequently tinker with those units and access them by their IP addresses, it made sense to permanently assign addresses to them that would be logical and easy to remember:

assigning static ip addresses using dhcp

The .90 unit is in the basement, the .91 unit is on the first floor, and the .92 unit is on the second floor.

You have an application the expressly relies on IP addresses.  Some applications will only allow you to supple an IP address to refer to other computers on the network. In such cases it would be extremely annoying to have to change the IP address in the application every time the IP address of the remote computer was changed in the DHCP table. Assigning a permanent address to the remote computer prevents you from the hassle of frequently updating your applications. This is why it's quite useful to assign any computer that functions as a server of any sort to a permanent address.

Before you just start assigning static IP addresses left and right, let's go over some basic network hygiene tips that will save you from a headache down the road.

First, check what the IP pool available on your router is. Your router will have a total pool and a pool specifically reserved for DHCP assignments. The total pool available to home routers is typically 10.0.0.0 through 10.255.255.255 or 192.168.0.0 through 192.168.255.255 . Then, within those ranges a smaller pool is reserved for the DHCP server, typically around 252 addresses in a range like 10.0.0.2 through 10.0.0.254. Once you know the general pool, you should use the following rules to assign static IP addresses:

  • Never assign an address that ends in .0 or .255 as these addresses are typically reserved for network protocols. This is the reason the example IP address pool above ends at .254.
  • Never assign an address to the very start of the IP pool, e.g. 10.0.0.1 as the start address is always reserved for the router. Even if you've changed the IP address of your router for security purposes , we'd still suggest against assigning a computer.
  • Never assign an address outside of the total available pool of private IP addresses. This means if your router's pool is 10.0.0.0 through 10.255.255.255 every IP you assign (keeping in mind the prior two rules) should fall within that range. Given that there are nearly 17 million addresses in that pool, we're sure you can find one you like.

Some people prefer to only use addresses outside of the DHCP range (e.g. they leave the 10.0.0.2 through 10.0.0.254 block completely untouched) but we don't feel strongly enough about that to consider it an outright rule. Given the improbability of a home user needing 252 device addresses simultaneously, it's perfectly fine to assign a device to one of those addresses if you'd prefer to keep everything in, say, the 10.0.0.x block.

Related: How and Why All Devices in Your Home Share One IP Address

  • Privacy news

Tips & tricks

  • ExpressVPN news

How to configure a static IP address

' src=

Felipe Allende

assigning static ip addresses using dhcp

A static IP address can be very useful in some cases, and can even improve your security. If you want to set up a local server or improve your internet speeds, configuring a static IP address on different devices is a very simple process. In this article, we’ll guide you through the steps so you can have a working static IP address in no time.

Note that ExpressVPN does not offer static IP addresses at the moment. This article is only informational on how you might set one up.

What is a static IP?

An IP address is a unique series of numbers that identifies each device on a local network or the internet. An IP address can be dynamic or static.

Most people use dynamic IP addresses, which change automatically and regularly—most commonly every 24 hours or after a router reset . This means when you go online, your IP address should be different from the one you had the day before.

A static IP address, also called a dedicated IP address, doesn’t change. This means whenever you connect to the internet after disconnecting, you’ll get the same IP address. It usually costs extra to get a static IP address. 

And while dynamic IP addresses generally offer greater privacy and security for the average user, static IP addresses can be useful for certain systems.

Why you may want a static IP address

Most residential internet services use a dynamic IP configuration through DHCP (Dynamic Host Configuration Protocol). While a static IP address could be the best approach in some cases, it’s important that you know what they are good for, and see if you’re in one of these use cases. Here are the most common ones:

You want to host a server For hosting game, web, email, or other types of servers, a static IP provides a consistent address for users to connect to, making connections easy.

Your IoT device requires it Some Internet of Things (IoT) devices require static IPs to function correctly and remain consistently accessible for monitoring and control.

You want a more stable connection File downloads and uploads tend to be slightly faster with a static IP.

You want more security Static IPs facilitate the implementation of security measures like IP whitelisting, ensuring only authorized devices can access certain online services.

You want to simplify your network management

Assigning static IPs to devices makes network management easier, allowing for straightforward identification, troubleshooting, and configuration of networked devices.

How to set up a static IP address

Setting up a static IP address is fairly simple but varies per device. However, the first thing you should sort out before configuring is the static IP address itself. You would inquire with your internet service provider (ISP) about getting a static IP , which usually involves a small extra charge.

How to set a static IP address on a router

You can assign a static IP address through your router for any device on its network. To do this, you’ll need the MAC address of whatever device you want to configure with a static IP address, and that device must be connected to the router. Lastly, note that most routers have different software, so these are general instructions to get you started. 

  • Access the router. Open a web browser and enter your router’s IP address into the address bar. You can usually find this on the back of your router or in the manual.
  • Log in. Enter your username and password to log into the router’s admin panel. If you haven’t changed these from the defaults, they should also be on the router or manual.
  • Navigate to LAN settings. Look for a section in the admin panel labeled “LAN” or “Network Settings”. This might be under “Advanced Settings” depending on your router.
  • Find DHCP or static IP settings. Locate the DHCP settings within the LAN or Network Settings. You may need to switch from DHCP to Manual or Static IP configuration.
  • Fill in the IP address , Gateway , Network prefix length , and DNS fields.
  • Save and apply. After entering all necessary information, save and apply your changes. The router may need to restart for changes to take effect.

How to set a static IP address on Windows 10

Assigning a static IP to your Windows 10 device is much easier than on your router. Just follow these instructions:

  • Go to Settings. Press the Windows key, type “Settings,” and press Enter.
  • Click Network and Internet and then Network and Sharing Center .
  • Click Change adapter settings on the left pane.
  • Right-click your network connection and select Properties .
  • Highlight Internet Protocol Version 4 (TCP/IPv4) and click on Properties .
  • Fill in the IP address, Gateway, Network prefix length, and DNS fields.
  • Click OK to save your changes, then click OK again to exit the properties menu.

How to set a static IP address on Windows 11

The steps for Windows 11 are very similar to those on Windows 10:

  • Open Settings. Click on the Start menu, select Settings, or press Windows + I on your keyboard.
  • In the Settings menu, click on Network & Internet .
  • Choose the network you are connected to. If you are using Wi-Fi, click on “Wi-Fi” and then select your network. For a wired connection, click on “Ethernet” and then on your network connection.
  • Edit IP Assignment. Scroll down and click on “Hardware properties.” Then, find the “IP assignment” section and click the “Edit” button.
  • Change to Manual. In the “Edit IP settings” window, change the setting from “Automatic (DHCP)” to “Manual.” Toggle on the “IPv4” switch to enable manual IP configuration.
  • Click Save to apply your settings.

How to set a static IP address on macOS

To configure a static IP on your Mac, follow these steps:

1. Click on the Apple menu in the top left corner of your screen and select System Preferences .

assigning static ip addresses using dhcp

2. In the System Preferences window, find and click on Network .

3. Select the network connection you wish to configure from the list on the left side. This could be either Wi-Fi or Ethernet, depending on how your Mac is connected to the network.

assigning static ip addresses using dhcp

4. With the network selected, click on the Details button in the top right corner of the window.

assigning static ip addresses using dhcp

5. Click on the TCP/IP tab on the left.

6. Click on the dropdown menu next to “Configure IPv4” and select Manually from the list of options.

assigning static ip addresses using dhcp

7. Fill in the IPv4 Address field with the static IP address you want to assign to your Mac. 

8. Optionally, navigate to the DNS tab in the same window to manually enter DNS server addresses if required.

9. Click OK to close the Details settings window.

How to set a static IP address on Android

Setting up a static IP address on Android is straightforward. Just follow these steps:

  • Tap on the Settings icon on your home screen or app drawer.
  • Scroll down and tap on Wi-Fi . Ensure Wi-Fi is turned on, and you’re connected to the network you want to configure.
  • Select the gear icon beside your current network.
  • Find the IP settings section and change it from DHCP to Static .
  • Scroll down and tap Save to apply your new static IP settings.

How to set a static IP address on iOS

On iOS, the process is quite similar. Follow these instructions:

1. Tap the Settings icon on your home screen or App Library.

assigning static ip addresses using dhcp

2. Next to the Wi-Fi network you’re connected to, tap the i icon to access the network’s settings.

assigning static ip addresses using dhcp

3. Scroll down and tap on Configure IP to change how your device acquires an IP address.

assigning static ip addresses using dhcp

4. Tap Manual to switch from automatic (DHCP) to manual IP settings.

assigning static ip addresses using dhcp

5. Fill in the IP address , Gateway , Network prefix length , and DNS fields.

6. Tap Save in the upper right corner to apply your changes.

How to set a static IP address on Linux

The process for Linux is a little more involved. Bear in mind that while you could do it by running a ip adr command, that change would be reversed with every reboot. To set up the static IP permanently, follow these steps:

  • Press Ctrl + Alt + T to open the terminal on your Linux desktop.
  • Use the command ip addr or ifconfig to identify your network interface.
  • Navigate to Netplan Configuration. Files are typically located in /etc/netplan/. Use ls /etc/netplan/ to list the configuration files.
  • Use a text editor like nano or vim to edit the YAML configuration file found in the previous step.
  • Modify the file to include your static IP settings under the appropriate network interface.
  • Save the file and apply the changes by running sudo netplan apply .

How to set a static IP address on Raspberry Pi

Like with Linux, the process with Raspberry Pi is more involved than with other platforms. To configure the static IP, follow these steps:

  • Access the terminal directly or via SSH if you’re remotely connected to your Raspberry Pi.
  • Type sudo nano /etc/dhcpcd.conf to edit the DHCP client configuration file with nano editor. You can replace nano with your preferred text editor.
  • Scroll to the end of the file and add your static IP configuration.
  • Press Ctrl + O to save the changes, then Ctrl + X to exit nano.
  • To apply the changes, restart the DHCP client daemon with sudo service dhcpcd restart.

The differences between static and dynamic IP addresses

Static and dynamic IP addresses serve the fundamental role of identifying devices on a network, yet they differ in management, purpose, and application. Here’s a comparison:

Does ExpressVPN offer static or dynamic IPs?

ExpressVPN provides dynamic IPs and doesn’t offer static IPs at the moment. 

This means every time you connect to ExpressVPN, you are given a different IP address. (That said, it is possible to repeatedly get the same IP if you happen to connect to the same server multiple times.) The IP you are given should indicate to websites and apps that you are located in the country of your choosing. Moreover, every IP is shared by numerous ExpressVPN users at the same time, increasing your anonymity even more.

Phone protected by ExpressVPN.

Mask your IP address with a VPN

30-day money-back guarantee

A phone with a padlock.

Enjoy a safer online experience with powerful privacy protection

' src=

Like what you have read?

Clap for this post. Or share your thoughts!

Subscribe to the weekly blog newsletter

Get the latest in privacy news, tips, tricks, and security guides to level-up your digital security.

assigning static ip addresses using dhcp

  • Related posts
  • Featured Posts
  • More from the author

assigning static ip addresses using dhcp

4 easy ways to change the location on your iPhone

assigning static ip addresses using dhcp

How to use Private Browsing on your iPhone in 2024

assigning static ip addresses using dhcp

How to change your home address on an iPhone

How to change location on Facebook Marketplace

How to change location on Facebook Marketplace

Tech Friend Edition 2

Tech Friend: My VPN location seems to be wrong

Dynamic MTU to fix VPN browsing issues.

Dynamic MTU: How we fixed a common cause of browsing problems

Alternative apps to Omegle that let you chat with random strangers.

Best Omegle alternatives to chat with strangers

Phone with location pin and luggage handles.

How to track your own luggage

21 best onion and Tor sites on the dark web

Dark Web Links: The best .onion and Tor sites in 2024

streaming push play button

Best new shows and movies to stream in February 2024

Tech Friend talks cheap phones.

Tech Friend: 5 great phones under 400 USD

assigning static ip addresses using dhcp

Can you stop someone from mirroring your phone?

assigning static ip addresses using dhcp

Why is the Chrome browser so slow?

assigning static ip addresses using dhcp

Is someone spying on your phone?

assigning static ip addresses using dhcp

Tech Friend: Help! My phone is overrun with ads

Leave a comment cancel reply.

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

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

ExpressVPN is proudly supporting

logo_1

Subscribe to the blog newsletter

Choose language.

assigning static ip addresses using dhcp

IMAGES

  1. How to set router to assign static IP address automatically to Windows

    assigning static ip addresses using dhcp

  2. DHCP vs Static IP: Set Static IP or Enable DHCP in Windows 10

    assigning static ip addresses using dhcp

  3. Assigning static IP addresses using DHCP

    assigning static ip addresses using dhcp

  4. Port Forwarding: DHCP reservations and static IP addresses

    assigning static ip addresses using dhcp

  5. DHCP and manual IP address configuration

    assigning static ip addresses using dhcp

  6. Setting IP Address Using DHCP Server

    assigning static ip addresses using dhcp

VIDEO

  1. Configure Static IP address on Windows Server Machine

  2. DHCP Protocol 1

  3. How Client can request IP from DHCP server

  4. Configuration of DHCP

  5. ISP DHCP Server Issue And ARP

  6. How to Set a Static IP Address on Windows 11 Settings

COMMENTS

  1. Assigning a fixed IP address to a machine in a DHCP network

    DHCP range starts at IP address : 192.168.1.33 DHCP range ends at IP address : 192.168.1.35 (...) Nota bene: There is also an IPv6 section. When booting any computer, it obtains its IPv4 address in DHCP.

  2. How to Set Up Static DHCP So Your Computer's IP Address Doesn't Change

    Here, my range of IPs would be 192.168.1.100 - 192.168.1.114. Now, click on the Services tab up top. Under the DHCP Server section, you can see that there's a list of "Static Leases" click on the Add button to add a new one. Enter the MAC address of each computer, give each one a name so you know which is which, and then assign them an ...

  3. Static and dynamic IP address configurations for DHCP

    The nmcli process to set a static IP configuration is to create a connection profile and then set the values desired. Red Hat has documentation here. Here is an example of creating a network connection named home-network with an IP address of 192.168.2.200/24, a default gateway of 192.168.2.1, and a name server of 8.8.8.8:

  4. How to Set Up a Static IP Address

    Learn how to assign specific IP addresses to your devices using DHCP reservations or static IP addresses on the device itself. Find out the benefits and drawbacks of each method, and how to set them up for any device on your network.

  5. Setting IP Address Using DHCP Server

    Step 1: Go to the control panel. Step 2: Select the Networking and sharing option. Step 3: Select change adapter setting. Step 4: Select and open your internet, ethernet, or wi-fi connection to which you want to set the IP address using the DHCP server.

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

    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.

  7. How to Assign Static IP Address to Your Devices

    Assigning Static IP address to most devices is easy, just go to its network settings, look for DHCP option and turn it OFF. Once you do that, you'll see a text area to enter Static IP address. Enter the new IP address there, save changes and that's it. So let's see how to Assign Static IP address to various Operating Systems 1.

  8. DHCP

    The DHCP—Static Mapping feature enables assignment of static IP addresses without creating numerous host pools with manual bindings by using a customer-created text file that the DHCP server reads. The benefit of this feature is that it eliminates the need for a long configuration file and reduces the space required in NVRAM to maintain ...

  9. Static and dynamic IP address configurations: DHCP deployment

    First, install the DHCP service on your selected Linux box. This box should have a static IP address. DHCP is a very lightweight service, so feel free to co-locate other services such as name resolution on the same device. Note: By using the -y option, yum will automatically install any dependencies necessary.

  10. Configuring a DHCP server static IP address

    Click Start, click Control Panel, click Network and Internet, click Network and Sharing Center and then click Change Adapter Settings. Right-click the connection to which you want to add a static IP address and then click Properties. Acknowledge the UAC dialog and then double-click Internet Protocol Version 4 (TCP/IP/IPv4).

  11. How to configure a static IP on Windows 10 or 11

    Open Settings. Click on Network & internet. (Optional) Click on Advanced network settings. Under the "More settings" section, click on Hardware and connection properties. Note the current IPv4 ,...

  12. How to set static & DHCP IP addresses in PowerShell

    Set-NetIPInterface The Set-NetIPInterface allows you to modify settings. Set-DnsClientServerAddress This cmdlet lets you set the DNS servers associated with a particular network interface. Remove-NetRoute This cmdlet lets you modify IP routes in the routing table, including wiping out all routes. New-NetIPAddress

  13. How to set router to assign static IP address ...

    Click on LAN from the left pane. Click on the DHCP tab. Under the "Manually Assigned IP around the DHCP list" section, use the drop-down to select the MAC address of the device you want to configure. In the "IP Address" section, specify the static IP address you want the computer to use. Click the Add (+) button.

  14. DHCP IP reservation or Set a Static IP address for a device

    Open the Google Home app . Tap Favorites Wifi Settings Advanced Networking. Tap DHCP IP reservations Add IP reservations . Tap the device for which you'd like to assign a static IP....

  15. networking

    you should tell the router to assign a static ip to that particular client. That way, it will not give out that IP to another device. Depending on the setup, sometimes you don't even need to config the client. e.g.: my server gets its IP via DHCP, but the router has a static IP entry for it, so it ALWAYS gets the same IP. -

  16. DHCP vs Static IP: What's the Difference?

    The DHCP server assigns a vacant IP address to all devices connected to the network. DHCP is a way of dynamically and automatically assigning IP addresses to network devices on a physical network. It provides an automated way to distribute and update IP addresses and other configuration information over a network.

  17. IPv6: How to configure static and DHCP IP addressing and deal with DNS

    In Settings go to Network & Internet and click the Properties button for the interface you wish to configure. Click the Edit button under IP settings, change the configuration type to Manual ...

  18. How to Configure Static IP Address on Ubuntu 20.04

    Static DHCP or DHCP reservation is a feature found on most routers which makes the DHCP server to automatically assign the same IP address to a specific network device, each time the device requests an address from the DHCP server. This works by assigning a static IP to the device's unique MAC address.

  19. Should I assign static IP from within or outside DHCP pool

    1 Answer Sorted by: 1 Both will work. You probably want to assign an static IP from outside the DHCP range though, so that if you ever change the network hardware in your PC (MAC address), it will still have the right IP. Share Improve this answer Follow answered Jan 14, 2020 at 18:21 Eduardo Trápani 1,230 8 12

  20. When to Use a Static IP Address

    Static IP addresses are assigned manually by an administrator. In other words, the device receiving the static IP is given a specific address (such as 192.168.1.2 ), and from then on, the address never changes. Dynamic IP addresses are not assigned manually. They are assigned automatically by DHCP (Dynamic Host Configuration Protocol).

  21. How to change from static to dynamic IP address on Windows 10

    Open Settings on Windows 10. Click on Network & Internet. Click on Ethernet or Wi-Fi. Click the network connection. Under the "IP settings" section, click the Edit button. Use the Edit IP settings drop-down menu and select the Automatic (DHCP) option. Click the Save button. Once you complete the steps, the networking stack configuration ...

  22. Static IP Address assignment vs DHCP address assignment

    I also can recommend different IP-ranges, something like this: 1-9 important Servers (static) 10-99 misc. Servers (static) 100-150 Sales & Marketing (DHCP with MAC) 151-200 Developers (DHCP with MAC) 200-253 Tech.Stuff (DHCP with MAC) Another vote for DHCP is, that you can handle all IPs from one, central instance.

  23. Doing DNS and DHCP for your LAN the old way—the way that works

    The only time I interact with my setup is if I need to add a new static DHCP mapping for a host I want to always grab the same IP address. ... You "recommend" using a static IP address for a DHCP ...

  24. DHCP static address reservation · Cloudflare Magic WAN docs

    DHCP static address reservation. If you configure your Connector to be a DHCP server, you can also assign IP addresses to specific devices on your network. To reserve IP addresses: Configure your Connector to be a DHCP server. Select Add DHCP Reservation. In Hardware Address enter the MAC address

  25. How to Set Static IP Addresses On Your Router

    Without DHCP, you would need to hop on a computer, log into your router's admin panel, and manually assign an available address to your friend's device, say 10.0.0.99. That address would be permanently assigned to your friend's iPad unless you went in later and manually released the address. With DHCP, however, life is so much easier.

  26. How to configure a static IP address

    How to set a static IP address on Windows 10. Assigning a static IP to your Windows 10 device is much easier than on your router. Just follow these instructions: Go to Settings. Press the Windows key, type "Settings," and press Enter. Click Network and Internet and then Network and Sharing Center. Click Change adapter settings on the left pane.