dhcp ( the SRX is the client & EX the Server)

https://www.juniper.net/documentation/en_US/junos/topics/example/security-device-dhcp-server-configuring.html


On the EX:  DHCP Server


root@EX4200_TOR_SELab> show arp | match 30:b6:4f:21:02:80
30:b6:4f:21:02:80 172.30.95.208 172.30.95.208 vlan.141 permanent


root@EX4200_TOR_SELab> show configuration | display set | match vlan.141
set system services dhcp-local-server group SE_OOB interface vlan.141
set vlans SE_OOB l3-interface vlan.141


root@EX4200_TOR_SELab> show configuration interfaces ge-3/0/16 | display set
set interfaces ge-3/0/16 description SRX300-1
set interfaces ge-3/0/16 unit 0 family ethernet-switching vlan members SE_OOB


set access address-assignment pool SkyEntDHCP family inet network 172.30.95.128/25
set access address-assignment pool SkyEntDHCP family inet range RANGE low 172.30.95.208
set access address-assignment pool SkyEntDHCP family inet range RANGE high 172.30.95.208
set access address-assignment pool SkyEntDHCP family inet dhcp-attributes name-server 8.8.8.8
set access address-assignment pool SkyEntDHCP family inet dhcp-attributes router 172.30.95.129
set access address-assignment pool SkyEntDHCP family inet host SkyEntSRX300-1 hardware-address 30:b6:4f:21:02:80
set access address-assignment pool SkyEntDHCP family inet host SkyEntSRX300-1 ip-address 172.30.95.208
set access address-assignment pool SkyEntDHCP family inet host SkyEntSRX300-2 hardware-address 30:b6:4f:21:a5:00
set access address-assignment pool SkyEntDHCP family inet host SkyEntSRX300-2 ip-address 172.30.95.213
set access address-assignment pool SkyEntDHCP family inet host SkyEntSRX300-3 hardware-address 30:b6:4f:21:de:80
set access address-assignment pool SkyEntDHCP family inet host SkyEntSRX300-3 ip-address 172.30.95.214


Show the DHCP binding:

root@EX4200_TOR_SELab> show dhcp server binding

IP address Session Id Hardware address Expires State Interface
172.30.95.208 2185 30:b6:4f:21:02:80 38636 BOUND vlan.141


Clear the DHCP binding:

root@EX4200_TOR_SELab> clear dhcp server binding 172.30.95.208

On the SRX:

set interfaces ge-0/0/2 unit 0 family inet dhcp

set security zones security-zone untrust screen untrust-screen;
interfaces fe-0/0/2.0 host-inbound-traffic system-services dhcp