DHCP Client

From OpenBSD-Wiki

Jump to: navigation, search
Written for: OpenBSD Version 4.2

Contents

[edit] Overview

The default DHCP client daemon is dhclient(8). Its config file is /etc/dhclient.conf, see dhclient.conf(5).

[edit] Startup

The config files for interfaces are named /etc/hostname.*, see hostname.if(5). To let the system request an IP address on startup simply add the keyword DHCP.

To run the daemon manually just pass it the right interface:

/sbin/dhclient if0

[edit] Configuration

[edit] Built-in defaults

If your dhclient.conf is empty or everything is commented out, the default parameters requested by dhclient are:

  • subnet-mask
  • broadcast-address
  • time-offset
  • routers
  • domain-name
  • domain-name-servers
  • host-name

The initial interval (the time between the first and the second request when no answer is received) is 10 seconds.

[edit] OpenBSD defaults

If during the installation DHCP is selected on an interface, the install script writes some slightly different, but better values:

initial-interval 1;
send host-name "<your chosen name>"
request subnet-mask, broadcast-address, routers, domain-name,
	domain-name-servers, host-name;

[edit] More change

You might want to streamline this configuration even further, for instance sending a different hostname to not let your ISP know your creativity in naming and not requesting domainname and hostname information, if you manage them by yourself.

initial-interval 1;
send host-name "Host";
request subnet-mask, broadcast-address, routers;

[edit] Links

[edit] Comments

Place your comments here.

Personal tools