Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to use "dns-sd" command line tool on my Windows 7 machine.

I can already do something. For example I can register a service using "dns-sd -R ...". I also can browser (see) registered services using "dns-sd -B ...". What I still miss, is how to unregister a service.

At the moment when I type "dns-sd -R ..." the dns-sd does not return me to the command prompt. To return to the command prompt I need to press Ctrl-C. And the service stays registered till I press Ctrl-C.

What I want is to run "dns-sd -R ..." in the background regime and then I would like to have a possibility to unregister a service from the command line.

One more thing which I do not understand yet is what "to look up a service" means. In my picture it should be sufficient to register a service, to see it and then to unregister it. But apparently I need to look up a service. What does it mean and why I need to do it?

ADDED: As it is asked, I clarify. I refer to "dns-sd" command line tool which I use in Windows 7. I think this command is part of Bonjour software for Windows (from Apple). Well, I did not checked if I had this command before I installed Bonjour, but I assume I did not have it. So, my question is about this command.

share|improve this question

1 Answer 1

It's not clear to me exactly what you're trying to accomplish but it sounds like you may be using the wrong tool. dns-sd is a command line testing tool for Multicast DNS and DNS Service Discovery (DNS-SD). The purpose of DNS Service Discovery as the name implies is to advertise network services. The DNS-SD operations are as follows:

Enumerate:

Discover the browse and registration domains configured on the host machine. ".local" will always be returned, Wide-Area domains (eg: example.com) may be available as well:

  • dns-sd -E

Browse:

Browse for service instances (optionally, in a specific domain):

  • dns-sd -B _http._tcp
  • dns-sd -B _http._tcp dns-sd.org

Resolve:

Resolves a service instance (as returned by Browse) to a host and port to connect to along with a text record containing any service specific parameters:

  • dns-sd -L \ *\ Google,\ searching\ the\ Web _http._tcp dns-sd.org

Register:

Registers a service instance so it can be browsed and resolved by other clients browsing a given domain.

  • dns-sd -R Example _http._tcp local 80

Can you be more specific about what is you're trying to accomplish?

share|improve this answer
    
I register a service with "dns-sd -R". After I type this command, service is registered and I do NOT return to the command line. When i type Ctrl+C I unregister the service and return to the command line. I wanted to know if it is possible to register a service and return to the command line and then to unregister the service by another command. Another part of my question was about "dns-sd -L" which "look up a service instance". I do not understand what "look up" means. I am not user in which way I should be more specific. What exactly should I specify? –  Roman Mar 10 '10 at 9:08
    
dns-sd is a testing tool and is not meant to run in the background. The "-L" switch is used to resolve a service. I've added to my post an example of how to use it. Again Bonjour is a network service discovery protocol — it's purpose is to register, browse for and resolve network services. An example use might be to advertise a webserver so that users can use their browser to discover and navigate to the webserver without knowing it's address, port, etc. The process you have outlined doesn't sound like the kind of thing that Bonjour is used for. Are you advertising a network service? –  andrewtj Mar 10 '10 at 10:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.