Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Complete DHCP Server Configuration

This topic shows a complete DHCP server configuration with address pools, static bindings, and user-defined options.

The following example shows statements at the [edit interfaces] hierarchy level. The interface’s primary address (10.3.3.1/24) has a corresponding address pool (10.3.3.0/24) defined at the [edit system services] hierarchy level.

[edit interfaces]
fe-0/0/1 {unit 0 {family inet {address 10.3.3.1/24;}}}

Note: You can configure a DHCP server only on an interface’s primary IP address.

Statements at the [edit system services] hierarchy level include the following:

[edit system services]
dhcp {domain-name "domain.tld";maximum-lease-time 7200;default-lease-time 3600;name-server {10.6.6.6; 10.6.6.7;}domain-search [ subnet1.domain.tld subnet2.domain.tld ];wins-server { 10.7.7.7;10.7.7.9;}router {10.6.6.1;10.7.7.1;}option 19 flag off; # 19: "IP Forwarding" optionoption 40 string "domain.tld"; # 40: "NIS Domain" optionoption 16 ip-address 10.3.3.33; # 16: "Swap Server" optionpool 10.3.3.0/24 {address-range low 10.3.3.2 high 10.3.3.254;exclude-address {10.3.3.33;}router {10.3.3.1;}server-identifier 10.3.3.1;}pool 10.4.4.0/24 {boot-file "boot.client";boot-server 10.4.4.1;}static-binding 00:0d:56:f4:20:01 {fixed-address 10.4.4.4;host-name "host.domain.tld";}static-binding 00:0d:56:f4:01:ab {fixed-address {10.5.5.5;10.6.6.6;}host-name "another-host.domain.tld";client-identifier "01aa.001a.bc65.3e";}}

Published: 2013-02-22

Supported Platforms

Published: 2013-02-22