Looking up IPs with mDNS and dns-sd on Mac OS X 10.4 1
I forgot the IP address of my printer on my local area network at home.
And my Mac quite cleverly only had the mdns name in the DeviceURI, but for setting up an older Windows system I really wanted the IP. Here’s how:
- Browse for printers:
dns-sd -B _printers._tcp.. :Timestamp A/R Flags if Domain Service Type Instance Name 21:56:43.972 Add 2 7 local. _printer._tcp. Brother HL-2070N series - Lookup the service info for the printer you’ve found:
dns-sd -L "Brother HL-2070N series" _printer._tcp:21:58:30.695 Brother\032HL-2070N\032series._printer._tcp.local. can be reached at BRN-7E6301.local.:515 ... - Query on the domain name:
dns-sd -Q BRN-7E6301.local.:Timestamp A/R Flags if Name T C Rdata 21:59:52.553 Add 2 7 BRN-7E6301.local. 1 1 192.168.15.103
The reason to bother documenting this? Because the Mac Os X man page for dns-sd doesn’t document the use of the -Q switch.
Grrrrrrrrr.
Comments
-
urls to the latest world news. http://rssnewsdigest.com