Hello @Handian Sudianto ,
The DHCP service is automatic in the Azure Virtual Network (VNet) and it hands out private IP addresses to resources. You can change the private IP address of a VM by editing the configuration of the VM's virtual network adapter.
You can find more about how that works here:
https://learn.microsoft.com/en-us/azure/virtual-network/virtual-networks-faq
ICMP echo requests are automatically blocked within the subnets, and it needs to be allowed in order to work. You can allow this by creating a new rule to allow ICMP protocol on your Network Security Group or Firewall. This should apply to all devices in the VNet or Subnet (wherever is NSG attached), including the subnet gateway.
Please let us know if this helped answer your question.
Vukasin