When i view the config to verify, the device says the DHCP code block is disabled because it is unsupported in the EX2300-C. Then, according to this list, DHCP is available on the EX2300 but not the EX2300-C
https://pathfinder.juniper.net/feature-explorer/feature-info.html?fKey=1345&fn=DHCP+Server