Valid HTML 4.01 Transitional
Prev: USB Flash Drive Boots ISO Image Next: Bootable USB Flash Drive
(Index)
Jim Carter's Bugfixes

Server Location Protocol (SLP)

James F. Carter
2014-03-04
Symptom:

I always forget how to check for proper functioning of the Server Location Protocol (SLP). Here's an aide-memoire.

Howto:

The purpose of SLP is, service daemons register their service and port on their own host's slpd. Clients send a multicast query for a service and receive responses from slpd on each host where that service is registered. This involves a timeout; default is 5 seconds.

SLP uses port 427/udp and tcp under the name svrloc. Normally it uses multicast UDP. See below for the special handling needed if you have a network bridge.

To check operation of SLP, use these commands:

These are the services registered on my network, showing the response from slptool. (All) means that all hosts respond; otherwise only certain hosts provide the service.

Many of my machines have a network bridge, for hostapd (802.11) support and for virtual machines. For SLP to work you need to tweak the bridge's configuration, as follows. I put this in a boot script so it happens automatically.

Multicast DNS (mdns on port 5353) offers very similar information, and in fact slpd and avahi-daemon I think were developed coordinately by the same person, Lennart Poettering. Do:

dig @$HOST -p 5353 _services._dns-sd._udp.local. PTR

It will give you a list of PTRs to both UDP and TCP services. (_services._dns-sd._tcp.local. gives nothing.) Dig for one of the referents such as _ssh._tcp.local. You get a PTR to the same on a specific host (the one whose mdns server you're using), e.g. jacinth._ssh._tcp.local. The mdns server will gratuitously include all the payload records for it, which in this case is a TXT (content "") and a SVR (0 0 22 jacinth.local.) plus the "A" and two AAAA records for jacinth.local.

Here are some variants on the @$HOST option:


Prev: USB Flash Drive Boots ISO Image Next: Bootable USB Flash Drive
(Index)