Could someone please tell me the difference between the two commands?
ip name-server <IP address>
and (in DHCP pool setup)
dns-server <IP address>
I don't understand whether I need both of them or which one does what.
The ip name-server x.x.x.x is for the "router" to use to reslove DNS queries.
In the DHCP Pool, the dns-server x.x.x.x is for the DHCP client to use for DNS queries.
What are you trying to do?