Example: Configuring the Device as a DHCP Server - TechLibrary - Jun... [Link]
set access commit
set interfaces ge-0/0/2 unit 0 family inet address [Link]/24
set system services dhcp-local-server group g1 interface ge-0/0/2.0
set access address-assignment pool p1 family inet network [Link]/24
set access address-assignment pool p1 family inet range r1 low [Link]
set access address-assignment pool p1 family inet range r1 high [Link]
set access address-assignment pool p1 family inet dhcp-attributes maximum-lease-time 2419200
set access address-assignment pool p1 family inet dhcp-attributes name-server [Link]
Add
[Link]/24
[Link]
[Link]
[Link]/24
1 of 5 05/10/2018, 17:19
Example: Configuring the Device as a DHCP Server - TechLibrary - Jun... [Link]
[Link]
2419200
[edit]
user@host# set interfaces ge-0/0/2 unit 0 family inet address [Link]/24
[edit]
user@host# set system services dhcp-local-server group g1 interface ge-0/0/2.0
[edit]]
user@host# set access address-assignment pool p1 family inet network [Link]/24
[edit]]
user@host# set access address-assignment pool p1 [Link]/24 address-range low [Link] high [Link]
[edit]
user@host# set access address-assignment pool p1 family inet dhcp-attributes router [Link]
2 of 5 05/10/2018, 17:19
Example: Configuring the Device as a DHCP Server - TechLibrary - Jun... [Link]
[edit]
user@host# set access address-assignment pool pool1 family inet dhcp-attributes server-identifier [Link]
[edit]
user@host# set access address-assignment pool pool1 family inet dhcp-attributes maximum-lease-time 2419200
[edit]
user@host# set access address-assignment pool pool1 family inet dhcp-attributes option 98 string test98
[edit]
user@host# set access address-assignment pool pool1 family inet host host1 ip-address [Link] hardware-address [Link]
show access address-assignment
[edit]
user@host# show access address-assignment
pool p1 {
family inet {
network [Link]/24;
range r1 {
low [Link];
high [Link];
}
dhcp-attributes {
maximum-lease-time 2419200;
name-server {
[Link];
}
}
}
}
}
show system services dhcp-local-server
[edit]
user@host# show system services dhcp-local-server
group g1 {
interface ge-0/0/2.0;
3 of 5 05/10/2018, 17:19
Example: Configuring the Device as a DHCP Server - TechLibrary - Jun... [Link]
commit
show dhcp server binding
show dhcp server binding address detail
user@host> show dhcp server binding
IP Address Hardware Address Type Lease expires at
[Link] [Link] dynamic 2007-05-11 [Link] PDT
user@host> show dhcp server binding address detail
IP address [Link]
Hardware address [Link]
Pool [Link]/24
Interface fe-0/0/0, relayed by [Link]
Lease information:
Type DHCP
Obtained at 2004-05-02 [Link] PDT
Expires at 2004-05-03 [Link] PDT
State active
DHCP options:
Name: name-server, Value: { [Link], [Link] }
Name: domain-name, Value: [Link]
Code: 32, Type: ip-address, Value: [Link]
show dhcp server statistics
user@host> show dhcp server statistics
4 of 5 05/10/2018, 17:19
Example: Configuring the Device as a DHCP Server - TechLibrary - Jun... [Link]
Packets dropped:
Total 0
Messages received:
BOOTREQUEST 45
DHCPDECLINE 0
DHCPDISCOVER 1
DHCPINFORM 39
DHCPRELEASE 0
DHCPREQUEST 5
DHCPLEASEQUERY 0
DHCPBULKLEASEQUERY 0
Messages sent:
BOOTREPLY 6
DHCPOFFER 1
DHCPACK 3
DHCPNAK 2
DHCPFORCERENEW 0
DHCPLEASEUNASSIGNED 0
DHCPLEASEUNKNOWN 0
DHCPLEASEACTIVE 0
DHCPLEASEQUERYDONE 0
5 of 5 05/10/2018, 17:19