Service Location Protocol, Version 2
updated by
- rfc-3224 — Vendor Extensions for Service Location Protocol, Version 2
updates
- rfc-2165 — Service Location Protocol
Extracted elements (29)
Scopes are administrative strings (not network topology) that allow administrators to provision service visibility to users; a UA configured with no scope uses DA/SA discovery to determine its scope list dynamically, enabling User Selectable Scopes. This separation allows fine-grained service provisioning without DNS or static configuration.
The Directory Agent is designed as a voluntary cache/scalability layer rather than a required component: SLP functions without any DA using multicast convergence, but DAs reduce multicast traffic in larger networks. DAs are optional to deploy but MUST support all message types if present.
The multicast convergence algorithm uses a Previous Responder List (PRList) in retransmitted requests so that agents which already replied suppress further responses, bounding the reply storm. Once the PRList plus the request exceeds the path MTU, multicast convergence stops, accepting 'enough' rather than exhaustive results.
SLPv1 UAs will not receive replies from SLPv2 SAs and vice versa; interoperation requires a SLPv2 DA present on the network. SLPv2 DAs answer SLPv1 requests with SLPv1 replies and SLPv2 requests with SLPv2 replies.
SLPv2 registrations using Language Tags longer than 2 characters are inaccessible to SLPv1 UAs. SLPv2 DAs MUST NOT return abstract service type strings in SrvTypeRply messages to SLPv1 clients, and SLPv1 requests by abstract service type do not match abstract service URLs.
A service reply with zero URL entries MUST be returned in response to a unicast Service Request if no matching URLs are present. A zero-entry SrvRply MUST NOT be sent in response to a multicast or broadcast service request.
A UA MUST issue requests to DAs as they are discovered. An SA MUST reply to appropriate SrvRqsts and MUST also register with DAs as they are discovered.
All SLP agents MUST implement DSA (BSD=0x0002). SAs MUST register services with DSA authentication blocks and MUST use DSA authentication blocks in SrvDeReg messages. DAs MUST use DSA authentication blocks in unsolicited DAAdverts.
Any DA or SA which sees its address in the PRList MUST NOT respond to the request. An SA with multiple interfaces MUST check all its interfaces against PRList entries.
If a SLP message does not fit into a UDP datagram it MUST be truncated to fit, and the OVERFLOW flag is set in the reply message. The reserved listening port for SLP is 427 and the default maximum UDP MTU is 1400 bytes excluding headers.
If the DAAdvert includes the attribute 'min-refresh-interval', SAs MUST NOT refresh any particular service advertisement more frequently than this value, and the DA SHOULD return REFRESH_REJECTED if violated.
Incremental registrations MUST NOT be performed for services registered with Authentication Blocks; these must be registered with ALL attributes and the FRESH flag set. DAs receiving such messages return AUTHENTICATION_FAILED.
Retransmissions MUST be made with exponentially increasing wait intervals (doubling the wait each time). This applies to both unicast and multicast SLP requests.
SAs MUST accept multicast service requests and unicast service requests. SAs MUST listen for multicast DA Advertisements. DAs MUST accept unicast requests and multicast directory agent discovery service requests.
String comparison for order and equality in SLP MUST be case insensitive inside the 0x00-0x7F subrange of UTF-8 (ASCII). Case insensitivity SHOULD be supported throughout the full UTF-8 Unicode character set. URL string comparisons are case sensitive.
The Language Tag in a reply MUST be the same as the Language Tag in the request. Only unsolicited DAAdverts are sent with an XID of 0; retransmitted requests use the same XID as the original.
The SA MUST register consistently with all DAs. A registration with the FRESH flag set replaces entirely any previous registration for the same URL in the same language; if FRESH is not set, the registration is incremental.
Service attributes are encoded as ABNF attr-list strings with typed values: Integer ([-]1*DIGIT in range -2147483648..2147483647), String, Boolean ('true'/'false'), and Opaque (binary prefixed with '\FF'). Stored values must be consistently typed; mixed-type lists return INVALID_REGISTRATION.
SLP Extensions use a 16-bit Extension ID, 24-bit Next Extension Offset, and variable Extension Data. IDs 0x0000-0x3FFF are optional-to-implement standardized; 0x4000-0x7FFF are mandatory-to-implement standardized; 0x8000-0x8FFF are for private use; 0x9000-0xFFFF are reserved.
The Service Request (SrvRqst, Function-ID=1) contains: PRList (previous responder list of IPv4 addresses), service-type string, scope-list, optional LDAPv3 predicate, and optional SLP SPI string. Services match if they belong to a requested scope, support the service type, and satisfy the predicate.
Block Structure Descriptors (BSDs) for Authentication Blocks: values 0x0000-0x7FFF maintained by IANA; 0x8000-0x8FFF for private use. BSD=0x0002 is defined as DSA with SHA-1.
SLP Function-IDs are assigned by IANA: SrvRqst=1, SrvRply=2, SrvReg=3, SrvDeReg=4, SrvAck=5, AttrRqst=6, AttrRply=7, DAAdvert=8, SrvTypeRqst=9, SrvTypeRply=10, SAAdvert=11.
Authentication Blocks use a 32-bit Timestamp (seconds since 1970-01-01) to prevent replay attacks; the authenticator is invalid after this time. The Timestamp wraps in 2106, after which it is relative to the wrap epoch. UAs MUST discard DAAdverts or SAAdverts that fail signature verification.
SLP is intended for networks under cooperative administrative control and is not designed for global Internet deployment. There is no protection against denial-of-service attacks or against rogue DAs in networks without authentication configured.
SLP SPIs deployed at a site MUST be unique across algorithms; an SLP SPI used for BSD=0x0002 must not be reused for another BSD. DAs will reject registrations they cannot verify, returning AUTHENTICATION_UNKNOWN, and UAs configured with SPIs MUST discard unverifiable DAAdverts.
Authentication Blocks contain: Block Structure Descriptor BSD (16-bit), Authentication Block Length (16-bit), Timestamp (32-bit Unix epoch), SLP SPI String Length (16-bit), SLP SPI String (variable), and Structured Authentication Block (variable).
The DAAdvert message contains: SLP header, Error Code (16-bit), DA Stateless Boot Timestamp (32-bit), URL Length (16-bit), URL (variable), scope-list, attr-list, SLP SPI List, and optional Authentication Blocks.
The SLP message header contains: Version (8-bit), Function-ID (8-bit), Length (24-bit), flags byte with OVERFLOW(0x80)/FRESH(0x40)/REQUEST_MCAST(0x20), Next Extension Offset (24-bit), XID (16-bit), Language Tag Length (16-bit), and variable-length Language Tag.
URL Entries contain: Reserved (8-bit), Lifetime (16-bit), URL Length (16-bit), URL (variable), number of URL auth blocks (8-bit), and optional Authentication Blocks. Used in SrvRply and SrvReg.