Hi Mehnihma,
Were are you seeing the old IP address for the nameserver ns2? Is it in Main >> DNS Functions >> Nameserver IPs? Can you paste the output of the following commands here?
---
cat /etc/nameserverips
grep ns2 /var/cpanel/nameserverips.yaml
---
You can assign the correct the IP address by clicking the "Assign IP addess" button in the basic WHM/cpanel settings. It will open a new window and you can put the new IP address in the box there, save the configuration and that should work.
If still the "Nameserver IPs" in the WHM is showing old IP, try renaming the file /var/cpanel/nameserverips.yaml to /var/cpanel/nameserverips.yaml_bkp and reload the section Main >> DNS Functions >> Nameserver IPs. This has worked for me once. Also make sure that the ns2 is pointing(in dig command) to the server to the correct P address.
Regards,
Phincy