How can I configure Linux to reject a specific IP from DHCP server?
I mean I do not want my lan interface to get assigned 192.168.0.12 under any circumstances.
Is it possible? I have found on /etc/dhcp/dhclient.conf on can add a reject statement, but I think this meansto reject the whole DHCP server? I am a bit confused on this explanation:
reject cidr-ip-address [, ... cidr-ip-address ] ;
The reject statement causes the DHCP client to reject offers from
servers whose server identifier matches any of the specified hosts or
subnets. This can be used to avoid being configured by rogue or mis‐
configured dhcp servers, although it should be a last resort - better
to track down the bad DHCP server and fix it.
.
.
.
reject 192.168.0.0/16, 10.0.0.5;
The above example would cause offers from any server identifier in the entire
RFC 1918 "Class C" network 192.168.0.0/16, or the specific single address
10.0.0.5, to be rejected.
All I want is regardless of the DHCP server base address, the lan port never gets assigned by 192.168.0.12
What would be the correct line that I need to add to this conf file? something like this:
reject 192.168.0.0, 192.168.0.12;
Another problem is, I do not know the subnetmask that DHCP server uses.