0

I known in dhcpd.conf, I can use following config to assigned a fixed ipv4 address to a client.

  host h1{
    hardware ethernet 11:22:33:44:55:66;
    fixed-address 192.0.2.2;
  }
  range 192.0.2.100 192.0.2.199;

But what should I do if I just want to block the host 11:22:33:44:55:66 (send DHCPDECLINE to host).

My situation is: In my datacenter, I use iLO (shared NIC with OS, aka NCSI) for server management. And I only know iLO MAC address where server is delivered.

I need use fixed IPv6 address (assigned by DHCPv6) on iLO and dynamic IPv4 address on OS. Because of lack of IPv4 address, iLO shouldn't get an IPv4 address. So I need send DHCPDECLINE to iLO.

qin
  • 171
  • 1
  • 4

1 Answers1

0
  1. Turn off DHCP on the client.

  2. Add the fixed address as you've shown above.

  3. Firewall rule to block UDP port 68 from the client

If the client address is in your DHCP scope range, I recommend you do the first two suggestions - turn off DHCP on the client AND also add a fixed address in case it gets turned on again. It prevents other clients in the range from getting that address as well.

LeeM
  • 1,218
  • 9
  • 13
  • DHCP on the client can't be turn off. (Because in datacenter there are ten thousand of bare-metal servers). – qin Dec 03 '19 at 12:53
  • Block UDP 68 is also impossiable because I need it on the same physical port (different mac address). – qin Dec 03 '19 at 13:00
  • It's not very clear what you are trying to achieve, so it's hard to provide advice. Assuming you have virtual adapters on a host, when you create the virtual adapter, give it a static IP. If you have multiple NICs, either again configure a static address or connect non-DHCP NICs to a router that is configured with no DHCP relay, or uses relay classes to select DHCP routing pool. That will be a question for Cisco, Juniper, etc. – LeeM Dec 04 '19 at 09:31
  • Maybe tag question with "datacenter" or "virtualisation" if these topics are relevant. – LeeM Dec 04 '19 at 09:33
  • Question is update with my situation. – qin Dec 04 '19 at 13:59