You haven't mentioned ontap version here, b'cos the DNS reachability requirement has changed since 8.3.
Beginning with Data ONTAP 8.3, each Data SVM must be configured with its assigned DNS servers. This includes ensuring that DNS servers configured on the Data SVM are accessible from LIFs hosted by that SVM.
In case the filer is running 8.3 or later, Data SVM can use any available gateway that can reach the DNS server IP? However, the recommended practice is to use one separate mgmt LIF (data protocol=none) per data SVM to talk to DNS (or other external mgmt services) server.
You can verify the DNS reachability via these commands, try both LIFs.
::> network ping -vserver <vserver> -lif <lif> -destination 1.1.1.1 (DNS IP)
::> dns check -vserver <vsever>
Useful kb:
How to configure DNS per SVM for versions later than clustered Data ONTAP 8.2.1
https://kb.netapp.com/Advice_and_Troubleshooting/Data_Storage_Software/ONTAP_OS/How_to_configure_DNS_per_SVM_for_versions_later_than_clustered_Data_ON...