Another option is to configure a DHCP server on the uplink VLAN. If the MX can't work with the configured IP it falls back to DHCP. IF it is a trunk, do this on the native VLAN.
If you found this post helpful, please give it Kudos. If my answer solves your problem, please click Accept as Solution so others can benefit from it.