Page MenuHomeVyOS Platform

dhclient reject option
Closed, ResolvedPublicENHANCEMENT

Description

Allow adding a reject option to the dhclient config. This is useful if you have a failover route and a modem that assigns an IP to 192.168.100.x with a default route that makes your failover route no longer work.

From the dhclient.conf man page

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 misconfigured dhcp servers, although it should be a last resort - better to track down the bad DHCP server and fix it.

The cidr-ip-address configuration type is of the form ip-address[/prefixlen], where ip-address is a dotted quad IP address, and prefixlen is the CIDR prefix length of the subnet, counting the number of significant bits in the netmask starting from the leftmost end. Example configuration syntax:

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.

Details

Version
-
Is it a breaking change?
Perfectly compatible
Issue type
Feature (new functionality)

Event Timeline

c-po closed this task as Unknown Status.Apr 5 2021, 2:54 PM
c-po triaged this task as Low priority.
c-po added a project: VyOS 1.3 Equuleus.
c-po changed the task status from Unknown Status to Resolved.Apr 12 2021, 7:53 PM
c-po moved this task from Need Triage to Finished on the VyOS 1.3 Equuleus board.
c-po moved this task from Backport Candidates to Finished on the VyOS 1.4 Sagitta board.

@SrividyaA What was the reason for adding (missing useful functionality) to the issue type? This is useful if you are in a dual wan environment with a DOCSIS cable modem that is failing, which will attempt to give you a DHCP lease on 192.168.100.0/24

@scj643 'Missing useful functionality' doesn't mean 'this ticket doesn't have a useful functionality' but rather 'a useful functionality that's missing from the codebase'.

Ok thanks for clarifying that.

dmbaturin set Issue type to Feature (new functionality).Nov 8 2024, 10:50 AM