Hello, friend!
1. You can run the ont ipconfig command on the MA5800 to configure the HG8145 IP address to be dynamically obtained through DHCP.
Command format:
ont ipconfig portid ontid [ip-index ip-index] {dhcp [vlan vlanid [priority {dscp-mapping defaultval | priority}] | reset] | static [ip-address ip-address mask mask | vlan vlanid [priority {dscp-mapping defaultval | priority}] | gateway gateway | pri-dns pri-dns | slave-dns slave-dns] * | pppoe [[vlan vlanid [priority {dscp-mapping defaultval | priority}]] | user-account {ont-input | username username password password | null}] *}
2. You can also log in to the HG8145 WebUI to configure the following parameters:
In the navigation tree on the left, choose WAN > WAN Configuration.

Thanks!