2

I've just inherited systems administration for a small network, on which we have exclusive access to the first 128 IPs on a private virtual subnet. We have a DHCP server which binds IP addresses to specific MAC addresses, as defined in the /etc/dhcp/dhcpd.conf file on the server (CentOS 6.2), as follows:

host <name>
{
  hardware ethernet <mac address>;
  fixed-address <ip>;
}

However, in that file there's also comments which basically list a set of core infrastructure, designated

# Non-DHCP STATIC. ONLY critical infrastructure

How and where are non-DHCP static address-MAC binding achieved? I assume the logic for this is that if the DHCP server goes down, these systems (NIS,NFS etc) will remain live - does this make sense?

Finally - clearly DHCP is setting what are, for all intents and purposes, static IPs (i.e. a MAC address and an IP address are bound together). However, then the dhcpd.conf file also refers to Non-DHCP static IPs in the comments. Is there a more correct term for ones of these, or are they both different types of static IP?

Alex
  • 451
  • 1
  • 5
  • 14

2 Answers2

3

When a fixed IP is handed out by a DHCP server based on the client's MAC address, that is called a DHCP Reservation and it is not a static IP address.

An address that it hardcoded into an interface's config file with the static option is a static address. It is independent of your DHCP server. The comment is likely there so that people don't make reservations that overlap with statically assigned IPs.

Honestly, it sounds like where you work is a little bit of a mess, you should be doing documentation for used IP addresses or have a proper IPAM system in place. Also, most people would agree that all servers should have static IPs and not have DHCP as a dependency, even with reservations. Of course, to each their own.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
  • So the servers **do** have static IPs and don't use DHCP at all (which,as you suggest, is so people don't set reservations which overlap with the static IPs). So basically does this mean that for the static IP servers, they have a config file somewhere ( /etc/sysconfig/network-scripts/ifcfg-eth[0|1] ?) which just says, "Always use the IP defined here" and then the DNS server binds that IP to that hostname? – Alex Aug 01 '13 at 13:52
  • 1
    Yes, that's how it's commonly configured. – MDMarra Aug 01 '13 at 13:53
1

This sounds like your servers are configured with static IPs -- they do not use DHCP for address assignment. These are achieved simply by modifying the OS to always use the same IP address, and never even bother asking via DHCP.

Using DHCP to hand out the same IP address to a host every time is a DHCP reservation. Avoid using static to refer to reservations, even if the IP handed out doesn't change.

Christopher Karel
  • 6,442
  • 1
  • 26
  • 34