🚀 Executive Summary
TL;DR: Bare metal servers require explicit IP address assignment within defined subnets, unlike cloud VMs which abstract this complexity. Methods range from risky manual static configuration to scalable DHCP reservations and fully automated provisioning systems, with DHCP reservations being the recommended default for stability and manageability.
🎯 Key Takeaways
- Subnets are fundamental and non-negotiable for bare metal server IP assignment, logically dividing the network and enabling communication.
- Manual static IP assignment is prone to IP conflicts and does not scale, making it suitable only for single, critical servers or emergency situations.
- DHCP reservations (static leases) provide a stable, scalable, and centralized method for assigning predictable IP addresses to bare metal servers based on their unique MAC addresses.
- Automated provisioning systems integrated with IP Address Management (IPAM) tools represent the most mature solution for managing large bare metal fleets, ensuring conflict-free and documented IP assignments.
Confused about how physical servers get IP addresses in a data center? We break down the core methods, from manual static IP configuration to scalable DHCP reservations and fully automated provisioning, explaining the critical role of subnets in the process.
From the Trenches: How Do Bare Metal Servers Actually Get an IP Address?
I remember it like it was yesterday. 2 AM, the on-call pager screams to life. A critical batch processing job for our main analytics platform had fallen over, dead. The error? “Cannot connect to host prod-db-04.” My first thought was that the server crashed. But the DC ops team said the lights were on, and they could ping it… on a totally different IP address. A junior engineer had provisioned that new bare-metal box earlier in the day, and in the rush, they’d let it grab a random IP from the DHCP pool. The lease expired mid-job, the server got a new IP, and our entire data pipeline came to a screeching halt. That night, fueled by bad coffee and adrenaline, I realized this is a topic we cloud-native folks often forget: on bare metal, the network isn’t magic. You have to build it.
The “Why” Behind the Confusion: Physical vs. Virtual
So, to answer the core question from that Reddit thread: “How do IPs get assigned for bare metal servers? Are there subnets involved?” Yes, absolutely. Subnets are non-negotiable.
In the cloud, you click a button, and an EC2 or Azure VM appears with a private IP already attached. The cloud provider’s massive Software-Defined Networking (SDN) layer handles all the complex DHCP, DNS, and routing for you. You live entirely in a world of logical constructs.
Bare metal is different. You are dealing with the physical world. A server is just a box with a Network Interface Card (NIC). That NIC has a unique, burned-in MAC address (its physical identity). When you plug that server into a physical switch port, it knows nothing about your network. It’s like a new employee on their first day with no ID badge and no office assignment. It’s up to you, the engineer, to give it a name and a place to live—an IP address within a specific subnet.
A subnet is simply a logical division of your network. Think of it as a street name. The IP address is the house number on that street. Without both, packets get lost. Your server needs an IP address (e.g., 10.40.20.15) and a subnet mask (e.g., 255.255.255.0 or /24) to understand which “street” it’s on and who its neighbors are.
So how do we give it that address? You have three main paths, ranging from a quick fix to a proper enterprise solution.
Solution 1: The “Get It Done Now” Static Assignment
This is the most direct method. You connect to the server’s console (using a KVM or a physical keyboard/monitor) and manually edit the operating system’s network configuration files. You are explicitly telling the server, “Your name is 10.40.20.51, your gateway is 10.40.20.1, and you will never forget it.”
For a modern Ubuntu server using Netplan, the configuration in /etc/netplan/01-netcfg.yaml might look like this:
network:
version: 2
ethernets:
eno1:
addresses:
- 10.40.20.51/24
gateway4: 10.40.20.1
nameservers:
addresses: [8.8.8.8, 1.1.1.1]
When to use it: For a single, critical server that absolutely cannot change its IP, or in an emergency when you need to get a machine online right now. It’s fast and explicit.
Warning: The Path to IP Conflict Hell. This method is brittle and doesn’t scale. There’s no central source of truth. Someone else on your team could accidentally assign
10.40.20.51to another machine, leading to a nasty IP conflict that will drive you nuts trying to debug. Use a spreadsheet at the bare minimum, but please, read on.
Solution 2: The Sane & Scalable Way – Reserved DHCP
This is the sweet spot for most teams and what we should have done for prod-db-04. It gives you the stability of a static IP with the manageability of DHCP. We call this a “static lease” or “DHCP reservation.”
Here’s the workflow:
- You find the MAC address of your server’s NIC (e.g.,
00:1B:21:C0:DE:88). - In your DHCP server’s configuration (whether it’s on a router, a firewall, or a dedicated Linux server), you create a rule that says: “Anytime you see a request from MAC address
00:1B:21:C0:DE:88, you MUST give it the IP address10.40.20.52.”
The server itself is configured to just use standard DHCP. It boots up, asks for an IP, and the DHCP server gives it the special one you reserved. It’s predictable, every single time.
A sample ISC DHCP server config snippet looks like this:
# Reservation for our new production database server
host prod-db-04 {
hardware ethernet 00:1B:21:C0:DE:88;
fixed-address 10.40.20.52;
option host-name "prod-db-04.techresolve.local";
}
When to use it: This should be your default for 90% of bare-metal deployments. It centralizes your IP management, prevents conflicts, and is easily version-controlled if you keep your DHCP config in Git.
Solution 3: The “We’re All Grown Up” Automated Provisioning
When you’re managing dozens or hundreds of bare-metal servers, manual methods become impossible. This is where dedicated lifecycle management and IP Address Management (IPAM) tools come in. Think tools like Canonical’s MAAS (Metal as a Service), Foreman, or Cobbler, often integrated with an IPAM solution like NetBox or Infoblox.
In this world, the process is fully automated:
- The IPAM system is your single source of truth for all available IP addresses in every subnet.
- When you trigger a new server build, the provisioning tool (like MAAS) talks to the IPAM.
- It requests the next available IP from the correct subnet (e.g., the “database server” subnet).
- The tool then uses PXE boot to automatically install the OS and injects the network configuration (as a static config, ironically) as part of the build process.
You never touch a config file. You never look up a MAC address. The system handles the entire workflow, ensuring there are no conflicts and everything is perfectly documented.
Pro Tip: This is the endgame for mature infrastructure. It’s more complex to set up initially, but it makes provisioning new hardware as easy as spinning up a VM in the cloud. It turns a manual, error-prone task into a reliable, repeatable science.
Quick Comparison
| Method | Speed (Initial Setup) | Scalability | Risk of Error |
|---|---|---|---|
| 1. Manual Static | Very Fast | Very Low | High (Typos, IP conflicts) |
| 2. DHCP Reservation | Fast | High | Low (Centralized management) |
| 3. Automated Provisioning | Slow (Complex setup) | Very High | Very Low (System-managed) |
Ultimately, understanding how the sausage is made at the physical layer is what separates a good engineer from a great one. Don’t let the magic of the cloud make you forget the fundamentals. After that 2 AM incident, you can bet we made DHCP reservations a mandatory part of our bare-metal provisioning checklist.
👉 Read the original article on TechResolve.blog
☕ Support my work
If this article helped you, you can buy me a coffee:

Top comments (0)