- {X-HTML Replaced}

How to Set Up a Static IP Address
DHCP is fine, unless you're looking to perform advanced networking tasks. Here's how to set a Static IP address (or DHCP reservation) for any device on your network.

An IP address is a unique identifier for a specific device on your network. Your router assigns them to these devices using Dynamic Host Configuration Protocol (DHCP). As you connect new devices to the network, they will be assigned the next IP address in the pool, and if a device hasn't connected in a few days, its IP address will "expire" so it can be assigned to something else.
For everyday use, this is perfectly fine, and you will never even notice it happening in the background. But if you regularly SSH into your Raspberry Pi , turn your computer on from across the house with Wake-on-LAN , or perform other advanced networking tasks, DHCP can become an annoyance.
It's hard to remember which IP address is assigned to which device, and if they ever expire, you have to look it up all over again. This is where a static IP address comes in handy. Here's how to set them up.
What is a Static IP Address?
Instead of letting your router assign whatever IP address is free at any given time, you can assign specific IP addresses to the devices you access frequently. For example, I have my home server set to 192.168.1.10, my main desktop to 192.168.1.11, and so on—easy to remember, sequential, and unchanging.
You can assign these static IP addresses on the device itself—using, say, Windows' network settings on each computer—or you can do it at the router level. If you do it through the router, it will likely be called a DHCP reservation, though many people (and even some routers ) still refer to it as a "static IP address."
DHCP reservations allow you to easily set everything up in one place with all your computers left at their default settings. Your computer will ask for an IP address via DHCP, and your router will assign it the one you reserved, with your computer being none the wiser.
How to Set Up a DHCP Reservation
To set up a DHCP reservation, you need to know your IP address , which is easy enough to find out. You must then head to your router's configuration page —usually by typing its IP address in your browser's navigation bar—and log in. (For mesh Wi-Fi systems , you would use an app instead of a config page.)
The location is different for every config page, but you're looking for something called "DHCP reservations," "static IP addresses," or similar. On my Asus router, for instance, it's in the LAN settings category.
To assign a reservation, you need the MAC address of the device in question. This is a unique string of characters that identifies a particular network adapter, and you can usually find it in your router's list of connected devices . Make sure you're getting the MAC address for the correct network adapter—if you have both Ethernet and Wi-Fi on your computer, you have one MAC address for each.
On your router's config page, enter an easy-to-remember label for the device (like "Whitson's Desktop PC"), the MAC address, and your desired IP address. Save your changes, and repeat the process for any other IP addresses you want to reserve.
From then on, those devices should have your reserved IP addresses assigned to them, and you will never have to look them up again.
Like What You're Reading?
Sign up for Tips & Tricks newsletter for expert advice to get the most out of your technology.
This newsletter may contain advertising, deals, or affiliate links. Subscribing to a newsletter indicates your consent to our Terms of Use and Privacy Policy . You may unsubscribe from the newsletters at any time.
Your subscription has been confirmed. Keep an eye on your inbox!
Dig Deeper With Related Stories
Pcmag stories you’ll like, about whitson gordon, contributing writer.

Whitson Gordon is a writer, gamer, and tech nerd who has been building PCs for 10 years. He eats potato chips with chopsticks so he doesn't get grease on his mechanical keyboard.
Read Whitson's full bio
Read the latest from Whitson Gordon
- How to Switch Between Games With Quick Resume on Xbox Series X/S
- Don't Start Over: How to Transfer PS4 Games and Save Data to a PlayStation 5
- How to Turn on Your Computer From Across the House With Wake-on-LAN
- What Graphics Card Do I Have?
- Not Dead Yet: What to Do When Your Computer Won't Start
- More from Whitson Gordon
- Buying Guides
Complete Guides by How-To Geek
Our latest product roundups, reader favorites, more from how-to geek, latest geek news, latest reviews, across lifesavvy media.
Join 425,000 subscribers and get a daily digest of news, geek trivia, and our feature articles.
By submitting your email, you agree to the Terms of Use and Privacy Policy .
How to Set Up Static DHCP So Your Computer’s IP Address Doesn’t Change
Read more...

DHCP makes it simple to configure network access for your home network, and port forwarding makes it easy to those computers from anywhere. By configuring static DHCP on your router, you can combine the best of both worlds.
The Problem with DHCP and Port Forwarding
DHCP is great. You configure your router to automatically assign IP addresses and the computers on your network just plain work. Port forwarding is useful because you can access your router from outside of your network and be redirected to the computer you need inside of your network. The problem is that these two wonderful things rely on one premise: your internal IP addresses don’t change. If your router changes the IP that is assigned to a machine by DHCP, then you have to reconfigure Port Forwarding. Many programs try to get around this fact by offering Universal Plug and Play (UPnP) port forwarding features, but not everything does.
Newer routers often have the ability to remember which IP address was assigned to which computer, so if they disconnect and reconnect their IP doesn’t change. Often, though, a router reset will wipe this cache and start assigning IPs on a first-come, first-served basis. Tons of older routers don’t even have this ability, and immediately assign new IP addresses. With IP addresses changing, you have to reconfigure your port forwarding settings often, otherwise you may lose the ability to connect to your home computers.
You can do this on plenty of modern routers, but we’re going to use DD-WRT for this guide. We’ve touted DD-WRT’s ability many times before, and it’s not for nothing. This amazing custom router firmware has a solution to this mess: static DHCP, also known as DHCP reservation. While configuring your router for DHCP, you have the ability to enter the MAC addresses of your computers’ network cards and enter which IP address to assign them. DD-WRT will automatically take care of the rest! If you have a different router, you can try following along using your router’s own admin page–the instructions should be somewhat similar.
Finding Your MAC Address
The only real work you’ll have to do is find the MAC address of each computer’s attached networking card. If you’re using wireless then you should find the MAC of your wireless card, and if you’re wired then use the Ethernet card.
Just go down to the icon in your system tray for your connection and click it. Mine is wireless.
Right-click on your current active connection and click on Status.
Click on the “Details…” button.
Your MAC address for this device is listed as “Physical Address.”
OS X users can check under their System Settings and click on Network. If you click on the various tabs for your connection, you should find a “Physical ID,” “Ethernet ID,” or “MAC Address.” Ubuntu users can type “ifconfig” in Terminal. You’ll see various network adapters, each displaying its own hardware address. Do this for all of the computers in your network that you need port forwarding for. The others will just get their IPs assigned automatically by DHCP.
DD-WRT and Static DHCP
Now that you have a list of MAC addresses for each of your computers, open up a browser tab and head over to your router’s DD-WRT interface. Click on Setup, and under Basic Setup, make sure DHCP is turned on.
Scroll down to “Network Address Server Settings (DHCP)” and make a note of the starting IP address and the maximum number of users. The addresses you configure should fall within this range. 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 IP address. You won’t be able to add the same IP address to two different MAC address, so make sure each MAC has a unique IP. If your version of DD-WRT also has a space to enter the “Client Lease Time,” a safe setting would 24 hours, or 1440 minutes.
That’s it! Be sure to click on both the Save button and the Apply Settings button, and wait for the changes to take effect. The settings should automatically change when each computer’s lease expires, though you can reconnect from each computer if you want the changes to take effect immediately.
Now, whether your computer loses its connect, the router gets power cycled, or the DHCP lease expires, each computer you entered into the list will stick to its assigned IP. Furthermore, you won’t have to manually configure static IPs on each machine! Port forwarding won’t have to be a pain ever again.
Does your router support DHCP reservations? Do you have a more clever use for this system? Share your thoughts in the comments!
- › How to Change the IP Address on iPhone
- › How To Access Your Machines Using DNS Names with DD-WRT
- › How to Set Static IP Addresses On Your Router
- › How to Configure Your Raspberry Pi for Remote Shell, Desktop, and File Transfer
- › How to Start Your Own Minecraft Server for Multiplayer Gaming
- › How to Port Forward on Your Router
- › How to Stream Live TV from NextPVR to Any Computer in the House
- › We Let ChatGPT Create AI Art, Here’s What It Made
Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Assigning a fixed IP address to a machine in a DHCP network
I want to assign a fixed private IP address to a server so that local computers can always access it.
Currently, the DHCP address of the server is something like 192.168.1.66 .
Should I simply assign the server this same IP as fixed and configure the router so that it will exclude this IP from the ones available for DHCP? Or are there some ranges of IP that are traditionally reserved for static addresses?
My beginner's question doesn't relate to commands but to general principles and good practices.
Practical case (Edit 1 of 2)
Thank you for the many good answers, especially the very detailed one from Liam.
I could access the router's configuration.
When booting any computer, it obtains its IPv4 address in DHCP.
The IP and the MAC addresses that I can see with the ipconfig all command in Windows match those in the list of connected devices that the router displays, so that I can confirm who is who.
The list of connected devices is something like
Things that I don't understand:
- Although all IP addresses are all obtained in DCHP, they are displayed as by the router as if they are static addresses.
- The router's setting "Enable DHCP on LAN" is set on "Off" but the IP addresses are obtained in DHCP.
- IP addresses attributed to the computers are outside of the very narrow DHCP range of 192.168.1.33 to 192.68.1.35
On any Windows computer connected in DCHP, ipconfig /all shows something like:
I'm missing something, but what?
Practical case (Edit 2 of 2)
Solution found.
For details, see my answer to Michal's comment at the bottom of this message.
I must admit that the way the router display things keeps some parts a mystery. The router seems to be using DHCP by default, but remembers the devices that were connected to it (probably using their mac address). It could be the reason why it lists the IPs as static although they're dynamic. There was also Cisco router at 192.168.1.4 which appeared for some business communications service, but I had no credentials to access it.
- There's no standard governing DHCP reservation ranges, but it would be kinda nice. – LawrenceC Apr 5, 2018 at 2:43
- Some routers allow you to define an IP for a chosen mac-address. Use that and DHCP will keep that address for your server. You could also set a DHCP range to e.g. 192.168.0.128 - 192.168.0.254 in a 192.168.0.1/255.255.255.0 network and set all static addresses on the "static" servers from within 192.168.0.2 - 192.168.0.127 range. – Michal B. Apr 5, 2018 at 7:29
- @Michal B.: I agree and did it meanwhile.: 1. Obtain the server's mac address. 2. Observe which IPs the router assigns to computers (eg. 192.168.0.50 to 192.168.1.70 ) 3. Start the server in DHCP. In the router panel, name it, basing on its mac address so that the router will remember it. 4. In the server switch IP from DHCP mode to manual and assign an IP that is beyond the ones that the router would assign to other devices (eg. 192.168.1.100 ). You can use nmtui and then edit the config file where you can replace PREFIX=32 by NETMASK=255.255.255.0 . 6. Restart the network service. – OuzoPower Apr 6, 2018 at 9:58
7 Answers 7
Determine the IP address that is assigned to your server and then go onto the DHCP and set a DHCP reservation for that server.
- 1 Reservations are essentially self-documenting. ++ – mfinni Apr 4, 2018 at 21:30
- 5 @mfinni ++ only works for programmers. -- for your comment :P – Canadian Luke Apr 4, 2018 at 23:59
- ..and yes he should also use a fixed IP, and label it. Document it. Maybe even reserve a range for this. In an enterprise using internal VPN it is common for these IP's to be hard coded in HOSTS files and SSH config files so it is a big deal when they suddenly change. – mckenzm Apr 5, 2018 at 1:30
DHCP services differ across many possible implementations, and there are no ranges of IP that are traditionally reserved for static addresses; it depends what is configured in your environment. I'll assume we're looking at a typical home / SOHO setup since you mention your router is providing the DHCP service.
Should I simply assign the server this same IP as fixed and configure the router so that it will exclude this IP from the ones available for DHCP?
I would say that is not best practice. Many consumer routers will not have the ability to exclude a single address from within the DHCP range of addresses for lease (known as a 'pool'). In addition, because DHCP is not aware that you have "fixed" the IP address at the server you run the risk of a conflict. You would normally either:
- set a reservation in DHCP configuration so that the server device is always allocated the same address by the DHCP service, or
- set the server device with a static address that is outside the pool of addresses allocated by the DHCP service.
To expand on these options:

Reservation in DHCP
If your router allows reservations, then the first, DHCP reservation option effectively achieves what you have planned. Note the significant difference: address assignment is still managed by the DHCP service, not "fixed" on the server. The server still requests a DHCP address, it just gets the same one every time.
Static IP address
If you prefer to set a static address, you should check your router's (default) configuration to determine the block of addresses used for DHCP leases. You will normally be able to see the configuration as a first address and last address, or first address and a maximum number of clients. Once you know this, you can pick a static address for your server.
An example would be: the router is set to allow a maximum of 128 DHCP clients with a first DHCP IP address of 192.168.1.32. Therefore a device could be assigned any address from 192.168.1.32 up to and including 192.168.1.159. Your router will use a static address outside this range (generally the first or last address .1 or .254) and you can now pick any other available address for your server.
It depends on the configuration of your DHCP service. Check the settings available to you for DHCP then either reserve an address in DHCP or pick a static address that is not used by DHCP - don't cross the streams.
- 1 Double++ on this. – ivanivan Apr 5, 2018 at 3:26
- 1 Thank you Liam for your very detailed and useful answer. After accessing the router's configuration, other issues arised that I added in the original message. – OuzoPower Apr 5, 2018 at 9:45
- @OuzoPower I'm new to responding here so don't have enough rep to comment on the question. Your update shows your router is not providing the DHCP service. The setting is off on the router, and your Windows ipconfig output shows the DHCP service is provided from a device at 192.168.1.5 . Do you have Pi-Hole or another similar device providing DHCP? That's where you'll find your DHCP configuration. NB: This also explains why the router shows the addresses as static and why DHCP assigned addresses are outside the range configured on the router. – Liam Apr 6, 2018 at 9:52
- @Liam: No Pi-Hole or similar thing as far as I know. Solution found: As I could not set DHCP ranges in the router but could register the mac address of the server in the router and then attribute to the server a fixed IP address that is far beyond the range that the router is naturally assigning to existing devices. Thanks to the registration of the server's mac address, the router keeps it in memory and shows the server as missing when thus is off. For details, see my answer to Michal B. in the original post. This solution seems working like a charm. – OuzoPower Apr 6, 2018 at 10:11
- @OuzoPower That approach may work in the short term but how do you know that the address you have picked is outside the DHCP range? Many DHCP systems pick addresses at random from the available pool. At some point you will need to know what your DHCP configuration actually is, rather than estimating by observation (!) otherwise you will experience some conflict. Your question asked about best practice. Here, best practice would be to know what system is handling DHCP for your LAN. I would start by visiting 192.168.1.5 or https://192.168.1.5/ for clues. – Liam Apr 6, 2018 at 10:48
It's not a bad habit to divide your subnet to DHCP pool range and static ranges, but of course you can do what JohnA wrote - use reservation for your server, but first case is IMHO clearer, because you are not messing up your DHCP server with unused extra settings (it could be confusing then for another admins who are not aware of that the server is static). if using DHCP pool + static pool, then just don't forget to add your static server to DNS (create A/AAAA record for it).
- I would like to add that the downside of DHCP reservations for servers is that if your DHCP environment is not sufficient fault tolerant, a DHCP server outage could cause all manner of problems. Monitor the DHCP closely and set leases that are long enough to be able respond to problems even after a long weekend. – JohnA Apr 5, 2018 at 2:06
I prefer to set my network devices, servers, printers, etc. that require a static IP address out of range of the DHCP pool. For example, xx.xx.xx.0 to xx.xx.xx.99 would be set aside for fixed IP assignments and xx.xx.xx.100 to xx.xx.xx.250 would be set as the DHCP pool.

- I like this approach as well. This way I can still access the servers even if the DHCP server takes the morning off or decides to start handing out invalid leases! – ErikF Apr 5, 2018 at 1:24
- Using isc-dhcp-server this is required (this is what my pi does, along with DNS caching, a fake domain for my LAN, and some traffic shaping for some wireless stuff). Unfortunately, I've seen browser based router config pages (both factory and replacement) that either require a reserved address to be in the dynamic pool... or out of it. – ivanivan Apr 5, 2018 at 3:30
In addition to the other answers I want to concentrate on the fact that your router configuration does not seem to fit the IP address configuration on your server.
Please have a look on the output of ipconfig /all:
IPv4 Address ........ 192.168.1.xx(prefered)
Default Gateway ........ 192.168.1.1 (= IP of the router)
DHCP server ............ 192.168.1.5
The clients in the network don't get the IP address from the router, but a different DHCP server in the network (192.168.1.5 instead of 192.168.1.1). You have to find this server and check it's configuration instead of the router's DHCP server config, which is seemingly only used for Wireless.
My router ( OpenWRT ) allows for static DHCP leases.
Static leases are used to assign fixed IP addresses and symbolic hostnames to DHCP clients.
So, you supply the MAC address of the server and it's desired IP address as a "static lease", and DHCP will always allocate the same IP. The client machine (the server in this case) requires no configuration changes and still picks up its IP address (the configured address) from DHCP.

Note that you can't assign a fixed IP addresses in 192.168 so that clients can "always access it" unless you also give each client a fixed IP address and subnet. Because if the clients use DHCP, then they get whatever subnect the DHCP server gives them, and if they use automatic addressing, then they won't be in a 192.168 subnet.
Once you realise that the system can't be easily perfected, you can see that your best options depend on what you are trying to do. Upnp is a common way of making devices visible. DNS is a common way of making devices visible. WINS is a common way of making devices visible. DHCP is a common way of making devices visible.
All of my printers have reservations: my printers aren't critical infrastructure, I want to be able to manage them, many of the clients use UPNP or mDNS for discovery anyway.
My gateway and DNS servers have fixed IP address in a reserved range: My DHCP server provides gateway and DNS addresses, and my DHCP server does not have the capacity to do dynamic discovery or DNS lookup.
None of my streaming devices have fixed or reserved IP values at all: if the network is so broken that DHCP and DNS aren't working, there is no way that the clients will be able to connect to fixed IP addresses anyway.
- This literally makes no sense. Are you asserting that you can’t mix static and dynamic in a /16? – Gaius Apr 5, 2018 at 12:59
- I have asserted that if you use static, you haven't gauaranteed that clients can "always access it"Not at all. I've just asserted that I've mixed static and dynamic in my setup. – user165568 Apr 6, 2018 at 9:46
- @Gaius I have asserted that if you use static, you haven't guaranteed that clients can "always access it". I'm sorry that doesn't make sense to you: it's one of the primary reasons the world moved away from static. I've also asserted that I've mixed static and dynamic in my setup: see: "none of my streaming devices have fixed or reserved" and "DNS servers have fixed IP": the DNS servers are indeed in the same subnet as the clients. – user165568 Apr 6, 2018 at 9:52
- Sorry, but I must admin not understanding most of your answer. As far as I know, DNS are domain name servers and are useful when you want to name servers, like when assigning domain names to web sites. As I don't need domain names, DNS appears me useless. Accessing the server is not an issue without DNS. See my answer to Michal B. in the original post for the solution that I found. – OuzoPower Apr 6, 2018 at 10:18
Your Answer
Sign up or log in, post as a guest.
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service , privacy policy and cookie policy
Not the answer you're looking for? Browse other questions tagged dhcp ip-address or ask your own question .
- The Overflow Blog
- How Intuit democratizes AI development across teams through reusability sponsored post
- The nature of simulating nature: A Q&A with IBM Quantum researcher Dr. Jamie...
- Featured on Meta
- We've added a "Necessary cookies only" option to the cookie consent popup
Hot Network Questions
- Finite abelian groups with fewer automorphisms than a subgroup
- Checking system vs. SEPA and the like
- Follow Up: struct sockaddr storage initialization by network format-string
- Partner is not responding when their writing is needed in European project application
- Do new devs get fired if they can't solve a certain bug?
- remove package from CTAN
- Why are physically impossible and logically impossible concepts considered separate in terms of probability?
- Confusion About Entropy
- Copyright issues when journal is defunct
- What is a word for the arcane equivalent of a monastery? A place where magic is studied and practiced?
- How do I align things in the following tabular environment?
- Why are trials on "Law & Order" in the New York Supreme Court?
- Can I tell police to wait and call a lawyer when served with a search warrant?
- A limit involving the quotient of two sums
- Tips for golfing in SVG
- How do particle accelerators like the LHC bend beams of particles?
- Who owns code in a GitHub organization?
- How to follow the signal when reading the schematic?
- Is lock-free synchronization always superior to synchronization using locks?
- Coasting Along the Coast
- Why are Suriname, Belize, and Guinea-Bissau classified as "Small Island Developing States"?
- What is pictured in this SHERLOC camera?
- Has 90% of ice around Antarctica disappeared in less than a decade?
- Is there a proper earth ground point in this switch box?
Your privacy
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .
- Articles Automation Career Cloud Containers Kubernetes Linux Programming Security
- About About Enable Sysadmin Email newsletter Join the community Sudoers program Meet the team FAQs
Static and dynamic IP address configurations for DHCP
%t min read | by Damon Garn

IP address configuration is one of the most critical, if simple, settings on your network devices. Workstations, servers, routers, and other components must have properly assigned IP address settings to participate on the network.
This two-part article series covers static and dynamic IP address settings and the configuration of a DHCP server. This article (part one) defines network identities, contrasts static and dynamic configurations, and covers the commands needed to manage the settings. Part two covers the deployment of a DHCP server, DHCP scope configuration, and client-side management of dynamic IP addresses.
[ You might also enjoy: The name game: Naming network interfaces in Linux ]
Three identities
Network nodes have three identities: Hostname, logical address, and physical address. These three addresses provide different types of connectivity and are used in various ways during network communication.
The three identities are:
- Hostname - descriptive, easy to remember names for the benefit of humans
- IP address - logical address to uniquely identify a network node, primarily used by routers
- MAC address - physical address encoded on the network interface card (NIC), used mainly by switches
Hostnames are configured when the OS is installed, and MAC addresses are hard-coded on NICs. Sysadmins typically configure IP address information on servers, workstations, portable systems, and network devices.
I’ll cover the two primary ways that IP address information is provided to the nodes: Static and dynamic configurations.
Static and dynamic configurations:
- Static - manually configured by sysadmins
- Dynamic - automatically leased by clients from a Dynamic Host Configuration Protocol (DHCP) server
The standard settings are IP addresses, subnet masks, default gateways, and nameservers.
Static configuration
NetworkManager primarily handles network configuration. NetworkManager can be used in a GUI, TUI, or CLI environment.
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:
The GUI configuration can be accomplished by selecting the Manual button and then filling in the blanks with the appropriate information.

Recall that you can make no typographical errors when configuring IP addresses, and duplicate addresses will cause network connection problems.
Why static configurations?
Static IP addresses do not change unless the administrator actively reconfigures them. This is an important fact when it comes to servers because most client computers need to be able to find servers consistently.
For example, an NFS file server hosting department directories needs to keep the same IP address over time as configuration files such as a client computer’s /etc/fstab file may use the IP address for connectivity.
Other network nodes also may need an unchanging network identity. Appliance devices such as firewalls or proxies, print servers, name resolution servers, web servers, and virtually all other infrastructure devices need a consistent identity. Sysadmins will almost always configure these systems with static IP address information.
Tracking IPs
It is essential to track your statically assigned IP addresses. Depending on the size of your environment, this might be so simple as a text document or a spreadsheet, all the way up to specialized software that integrates with directory services and DHCP. I find it’s best to at least track IP address (and subnet mask), MAC address (not essential), hostname, role on the network (justifies why the devices have a static IP), and any additional notes.

Dynamic configurations
The devices that require a static IP configuration are a relatively small percentage of your network. Most network devices are end-user systems such as workstations, laptops, phones, tablets, and other transient devices. In addition, these systems do not usually host network services that need to be discoverable by other computers.
IP address configurations are unforgiving when it comes to duplicates and typos. In addition, static IP address settings are fairly time-consuming. Finally, IP address settings tend to be temporary, especially with the advent of portable devices like laptops, phones, and tablets. To save time and reduce the chances of a mistake, dynamic IP address allocation is preferable for these kinds of nodes.
Linux systems are configured as DHCP clients by using NetworkManager.
Here is an example of adding a network connection profile configured to lease an IP address from DHCP:
By not specifying an address NetworkManager assumes the DHCP client role.
Here is a screenshot of a dynamic IP address configuration from the GUI:

The dhclient command
The dhclient command is also used to manage dynamic IP address configurations. However, in RHEL 8, network configurations, including DHCP, are handled by NetworkManager. Older RHEL versions rely on dhclient , as do some other distributions.
The ip route command displays lease information.
The second article in this series goes over the dhclient command in more detail.
[ Free cheat sheet: Get a list of Linux utilities and commands for managing servers and networks . ]
IP address settings are crucial to network communications. Values such as the IP address, subnet mask, default gateway, and nameservers can be manually managed, but sysadmins must be very careful not to make any mistakes. Static settings don’t change unless the administrator reconfigures them, so they are essential for servers whose services are made available across the network.
Dynamic IP configurations are far more convenient for systems that don’t host network services, such as end-user devices. Furthermore, many of these devices enter and leave the network regularly, and it would be very time-consuming to set IP values each time manually. Instead, a DHCP server is used to host a pool of available addresses that client systems can lease.
Understanding the difference between static and dynamic IP addresses is straightforward but essential for administrators. As a general rule, servers and network devices utilize static, unchanging IPs, while client devices rely on dynamically allocated IP configurations.
Check out these related articles on Enable Sysadmin

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.

OUR BEST CONTENT, DELIVERED TO YOUR INBOX
Privacy Statement

IMAGES
VIDEO
COMMENTS
To set up a DHCP reservation, you need to know your IP address, which is easy enough to find out. You must then head to your router's configuration page —usually by typing its IP address in...
Click on Setup, and under Basic Setup, make sure DHCP is turned on. Scroll down to “Network Address Server Settings (DHCP)” and make a note of the starting IP address and the maximum number of users. The addresses you configure should fall within this range. Here, my range of IPs would be 192.168.1.100 – 192.168.1.114.
Start the server in DHCP. In the router panel, name it, basing on its mac address so that the router will remember it. 4. In the server switch IP from DHCP mode to manual and assign an IP that is beyond the ones that the router would assign to other devices (eg. 192.168.1.100 ).