This question already has an answer here:
In resolver manual, it said:
The address may optionally have a trailing dot followed by a port number.
For example, 10.0.0.17.55 specifies that
the nameserver at 10.0.0.17
uses port 55.
But it doesn't work, in /etc/resolv.conf or files under /etc/resolver/.
Can I specify non-default port number for nameserver in osx?
osx don't use /etc/resolve.conf, but use files under /etc/resolver/. I have wrote a file
dev with content '127.0.0.1' to route all dns queries for *.dev domains to a local dns server (127.0.0.). But I cannot specify dns server's port here. (It uses 53 anyway)
Maybe there is no way to specify port number under osx?