RFC 3111

Service Location Protocol Modifications for IPv6

๐Ÿ“… published May 2001, from ietf

RFC 3111: Service Location Protocol Modifications for IPv6 ๐ŸŽ€

Author: E. Guttman (Sun Microsystems) ๐Ÿ’… Category: Standards Track โœจ Date: May 2001 ๐ŸŒธ Obsoletes / Updates: the header doesn't list anything this one obsoletes or updates ๐Ÿฆ‹

Status of This Memo ๐Ÿ“œ

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited. ๐Ÿซถ

Copyright (C) The Internet Society (2001). All Rights Reserved. ๐ŸŒˆ

Abstract ๐Ÿฆ‹

Okay so this document defines how the Service Location Protocol Version 2 (SLPv2) works over IPv6 networks. Because SLP runs on top of UDP and TCP, the changes needed to make it work over IPv6 are pretty minor. โœจ

This document does not describe how to use SLPv1 over IPv6 networks. At the time of publication there is no implementation or deployment of SLPv1 over IPv6, so it's giving "not our problem" ๐Ÿ’€. It is RECOMMENDED that SLPv2 be used in general, and specifically on networks which support IPv6. ๐Ÿ‘‘

Table of Contents ๐Ÿ“

1.   Introduction  . . . . . . . . . . . . . . . . . . . . . .  2
2.   Eliminating support for broadcast SLP requests  . . . . .  3
3.   Address Specification for IPv6 Addresses in URLs  . . . .  3
4.   SLP multicast behavior over IPv6  . . . . . . . . . . . .  4
4.1.    SLPv2 Multicast Group-IDs for IPv6 . . . . . . . . . .  4
4.2.    SLPv2 Scoping Rules for IPv6 . . . . . . . . . . . . .  5
4.2.1   Joining SLPv2 Multicast Groups . . . . . . . . . . . .  5
4.2.2   Sending SLPv2 Multicast Messages . . . . . . . . . . .  6
4.2.3   Rules for Message Processing . . . . . . . . . . . . .  6
4.2.4   SLPv2 Agents with multiple interfaces  . . . . . . . .  7
4.2.4.1 General Rules  . . . . . . . . . . . . . . . . . . . .  7
4.2.4.2 Multihomed UA  . . . . . . . . . . . . . . . . . . . .  8
4.2.4.3 Multihomed SA  . . . . . . . . . . . . . . . . . . . .  8
4.2.4.4 Multihomed DA  . . . . . . . . . . . . . . . . . . . .  9
5.   IANA Considerations . . . . . . . . . . . . . . . . . . . 10
6.   Security Considerations . . . . . . . . . . . . . . . . . 10
     Acknowledgments . . . . . . . . . . . . . . . . . . . . . 10
     References  . . . . . . . . . . . . . . . . . . . . . . . 11
     Author's Address  . . . . . . . . . . . . . . . . . . . . 12
     Full Copyright Statement  . . . . . . . . . . . . . . . . 13

1. Introduction ๐Ÿงš

Okay bestie, so the Service Location Protocol (SLP) gives you a scalable way to discover and select network services. ๐Ÿ’– With it, computers on IP networks don't need nearly as much static configuration of network services for their network apps. This matters more and more as computers get more portable and users are less patient with, or less able to handle, network administration ๐Ÿ˜ญ.

These are the changes required to get SLP working over IPv6: ๐Ÿ”ฅ

  • Eliminating support for broadcast SLP requests
  • Address Specification for IPv6 Addresses in URLs
  • Use of IPv6 multicast addresses and IPv6 address scopes
  • Restricted Propagation of Service Advertisements

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [4]. ๐Ÿฆ‹

2. Eliminating support for broadcast SLP requests ๐Ÿ™ˆ

Service Location over IPv4 lets broadcasts carry Service Location request messages. IPv6 uses link-local multicast instead of broadcast, so it's giving "no more broadcast." Broadcast-only configuration for SLP is not supported under IPv6. If a User Agent wants to make a request to discover Directory Agents or to make a request of multiple Service Agents, the User Agent must multicast the request to the appropriate multicast address. ๐Ÿ“ฃ

This change modifies the requirements described in Section 6.1 (Use of Ports, UDP and Multicast) of the Service Location Protocol [2]. ๐ŸŒธ

3. Address Specification for IPv6 Addresses in URLs ๐Ÿ”—

Whenever possible, the DNS [5] name of the service should be used instead of the numerical representation described in this section. ๐Ÿ’…

Service Location lets you use the protocol without DNS. This comes up when a group of systems gets connected to build a network with no prior server configuration. When Service Location is used this way, numerical addresses must be used to identify where services are. ๐Ÿซถ

The format of a "service:" URL is defined in [6]. This URL is an "absolute URI" as defined by [7]. โœจ

A numerical IPv6 address, like the ones that can show up in a "service:" URL, is specified as in [8]. The textual representation defined for literal IPv6 addresses in [9] looks like this:

   ipv6-addr  =  "[" num-addr "]"
   num-addr   =  ; Text represented IPv6 address syntax is as
                 ; specified in RFC 2373 [8], Section 2.2,

Examples:

This is a site-local scoped address, as could be used in a SLP DAAdvert message. ๐Ÿ™๏ธ

   service:directory-agent://[FEC0::323:A3F9:25ff:fe91:109D]

This is a link-local scoped address, as could be used by a SA to advertise its service on an IPv6 network with no routers or DNS service. ๐ŸŒฟ

   service:printer:ipp://[FE80::a15A:93ff:fe5D:B098]:8080/path

4. SLP multicast and unicast behavior over IPv6 ๐Ÿฆ‹

Section 4.1 describes how different multicast addresses are used for sending and receiving SLPv2 messages over IPv6. Section 4.2 defines the rules for using these addresses and covers scoped address issues in general. ๐Ÿ’œ

4.1 SLPv2 Multicast Group-IDs for IPv6 ๐ŸŒˆ

SLPv2 for IPv4 specifies only one multicast address, relative to an Administratively Scoped Address range [11]. The reason only one address was used is that there are only 256 relative assignments available for this purpose. IPv6, on the other hand, has scoped addresses and enough space for a whole range of assignments. ๐Ÿ‘‘

SLPv2 for IPv6 uses the following multicast group-id assignments: ๐Ÿ“

   FF0X:0:0:0:0:0:0:116     SVRLOC
   FF0X:0:0:0:0:0:0:123     SVRLOC-DA
   FF0X:0:0:0:0:0:1:1000    Service Location
    -FF0X:0:0:0:0:0:1:13FF

These group-ids get combined with the scope prefix of the scope the multicast message is going to. ๐Ÿง 

The SVRLOC group-id is used for Service Type Request and Attribute Request messages. ๐Ÿ“ฌ

The SVRLOC-DA group-id is used for multicast Service Requests for the "service:directory-agent" service type. DAs also send unsolicited DA Advert messages to the SVRLOC-DA multicast group-id. ๐Ÿ””

All other multicast Service Request messages go to the appropriate Service Location multicast group-id. SAs join the groups that match the Service Types of the services they advertise. The group-id is figured out with the algorithm from SLPv1 [3]. The Service Type string used in the SrvRqst gets hashed to a value from 0-1023, and that sets the offset into the FF0X::1:1000-13FF range. ๐Ÿงฎ

The hash algorithm works like this: ๐Ÿงช

An unsigned 32 bit value V starts at 0. Each byte of the Service Type UTF-8 [12] encoded string value gets considered in order. The current value V gets multiplied by 33, then the value of the current string byte gets added. Every byte in the Service Type string goes through this same process. The result is whatever sits in the low order 10 bits of V. For example, this code implements the algorithm: ๐Ÿ’ป

   unsigned long slp_hash(const char *pc, unsigned int len) {
       unsigned long h = 0;
       while (len-- != 0) {
           h *= 33;
           h += *pc++;
       }
       return (0x3FF & h); /* round to a range of 0-1023 */
   }

4.2 SLPv2 Scoping Rules for IPv6 ๐Ÿ”

IPv6 gives you different scopes for interface address configuration and for multicast addresses. Without rules, a SLPv2 Agent might discover services it can't actually use, or fail to discover services it could have used. ๐Ÿ˜ฌ

Say a SLPv2 UA, for example, asks for a service using site-local scope multicast and gets back a service: URL that contains a link-local literal address. If the service isn't on the same link as the SLPv2 UA, nobody can reach it. ๐Ÿšซ

4.2.1 Joining SLPv2 Multicast Groups ๐Ÿค

A SLPv2 Agent MAY send a multicast message using any scope it is allowed to use (see section 4.2.2). An SA and a DA MUST join all groups to which a SLPv2 Agent may send a message. This makes sure the SA or DA can receive every multicast message. ๐Ÿ“ก

Specifically, a SLPv2 Agent MUST NOT join a multicast group with a greater scope for an interface than it's configured with for unicast. For example, an interface that's only configured with a link-local address joins groups in scopes FF01 and FF02. If the interface is configured with a site-local or global address, the scope of every multicast group joined can be no greater than scope FF05. In this case, SLPv2 SAs and DAs MUST join multicast groups in all the following scopes: FF01 - FF05. ๐Ÿงฑ

A DA MUST join the SVRLOC-DA group to receive SrvRqst messages requesting DAAdverts. ๐Ÿ“ฅ

A SA MUST join the SVRLOC-DA group to receive DAAdvert messages. ๐Ÿ“จ

A SA MUST join the groups from the Service Location range of group-ids to receive SrvRqst messages. The SA only joins the groups matching the services it advertises. For example, a service agent that responds to requests for "service:service-agent" (used for SA discovery) would join the group whose group-id comes from the hash function in section 4.1: ๐ŸŽฏ

   group-id to join = slp_hash("service:service-agent") + base address
                    = 0x01d8 + FF0X:0:0:0:0:0:1:1000
                    = FF0X:0:0:0:0:0:1:11d8

The SA MAY join the SVRLOC group to receive SrvTypeRqst and AttrRqst messages. These features are OPTIONAL for the SA to implement. ๐ŸŒŸ

A UA MAY join the SVRLOC-DA group at any or all of these scopes to receive DAAdvert messages. ๐ŸŽˆ

4.2.2 Sending SLPv2 Multicast Messages ๐Ÿš€

The maximum scope for a SLPv2 multicast message is site-local (FF05). ๐Ÿ

Multicast SLPv2 messages are sent using a particular scope. An SLPv2 agent MUST issue this request using a source address with a scope no less than the scope of the multicast group. ๐Ÿ”’

This stops things like a site-local multicast message being sent from a link-local source address. ๐Ÿ™…โ€โ™€๏ธ

For instance, a SLPv2 UA with an interface configured with at least one global address could multicast a SrvRqst to any scope up to and including site-local. โœจ

4.2.3 Rules for Message Processing โœจ

Okay so, SLPv2 SAs and DAs MUST figure out which scope a service: URL address is in ๐Ÿ”. Sometimes you can tell just by looking at the URL, if it has a numerical IPv6 address in it. But if the URL has a host name instead, the SA or DA MUST resolve that name to a set of addresses ๐Ÿ’….

Next, a SLPv2 SA or DA MUST NOT respond to a SrvRqst with a service: URL for a service whose address scope is less than the request's source address scope ๐Ÿ™…โ€โ™€๏ธ. The full rules are in Figure 1 below, and honestly they're iconic ๐ŸŽ€.

                               Request Source Address Scope
                          +------------+------------+---------+
                          | Link-Local | Site-Local | Global  |
            +-------------+------------+------------+---------+
   Service  | Link-Local  |  Respond   |    Drop    |   Drop  |
   Address  +-------------+------------+------------+---------+
   Scope    | Site-Local  |  Respond   |   Respond  |   Drop  |
            +-------------+------------+------------+---------+
            | Global      |  Respond   |   Respond  | Respond |
            +-------------+------------+------------+---------+

                      Figure 1:  Out-of-Scope Rules

Why does this matter? It stops UAs from finding service: URLs for services they can't actually reach ๐Ÿšซ๐Ÿฆ‹. Main character energy for the whole network, fr fr ๐Ÿ’–.

4.2.4 SLPv2 Agents with multiple interfaces ๐Ÿงš

Alright, bestie, so a scope zone (or just a zone) is a connected region of topology with a given scope ๐ŸŒธ. For example, the links connected by routers inside one particular site, plus the interfaces attached to those links, make up a single zone of site-local scope ๐Ÿ . Here's the tea: the topological regions inside two different sites are two DIFFERENT zones, but they're the SAME scope ๐Ÿ‘€. Iykyk.

A host with multiple interfaces attached to different links is, by definition, attached to two link-local zones โœŒ๏ธ. A host can also be attached to multiple zones of other scopes, which is giving versatile ๐Ÿ’œ.

A SLPv2 Agent MUST NOT propagate service advertisements from one zone to another ๐Ÿšง. Said another way, a SLPv2 SA or DA MUST NOT respond to a request from one zone with service information for a service in a different zone ๐Ÿ™ˆ.

The specifics of these rules get unpacked in the sections that follow ๐ŸŽ€.

4.2.4.1 General rules ๐Ÿ“œ

Service Locations (in SrvReg, SrvRply, AttrRst, SAAdvert or DAAdvert messages) whose locations are literal addresses MUST only be sent to SLP agents located on the same zone ๐Ÿ’…. For example, a service: URL containing a link-local address on link A may be sent in a SLPv2 message on link A, but only to a link-local destination address ๐Ÿ”—.

Each interface of a multihomed device is potentially on a separate link ๐Ÿ”Œ. It's often hard to tell whether two interfaces are connected to the same link, so a prudent implementation strategy is to not issue SLP messages containing link-local service locations except on the interface where the service is known to reside ๐Ÿงโœจ.

4.2.4.2 Multihomed UA ๐Ÿ’ป

                   +----+        +----+        +----+
                   | SA |--------| UA |--------| DA |
                   +----+ Link 1 +----+ Link 2 +----+

                      (Zone 1)            (Zone 2)

                       Figure 2:  Multihomed UA

In Figure 2 the UA is multihomed, so it's giving two-zone queen ๐Ÿ‘‘. The UA can issue a service request in Zone 1 and discover services on the SA, or in Zone 2 and discover services advertised by the DA ๐ŸŒˆ. For example, if the request is issued from a link-local source address, the SA will only reply with a service available on link 1, and the DA only with a service available on link 2 ๐ŸŽฏ.

The UA MUST use active discovery to detect DAs before issuing multicast requests, as per SLPv2 [2] ๐Ÿ”Ž. The UA MUST issue requests using increasing multicast scopes, starting at FF01 and increasing to a maximum scope of FF05, to solicit DAAdvertisements ๐Ÿ“ฃ. Note the restrictions in Section 4.2.2 โš ๏ธ.

If the UA is unable to discover any DAs using multicast discovery, it may issue site-local scope (FF05) or less multicast requests ๐Ÿฆ‹. (Quick reminder: the source address of the request must be of at least the scope of the multicast, as described in section 4.2.2 ๐Ÿ’ก.)

If the UA wants to discover all services, it must issue requests into both Zone 1 and 2 ๐ŸŒŸ.

4.2.4.3 Multihomed SA ๐Ÿก

                   +----+        +----+        +----+
                   | UA |--------| SA |--------| DA |
                   +----+ Link 1 +----+ Link 2 +----+

                      (Zone 1)            (Zone 2)

                        Figure 3: Multihomed SA

In Figure 3, the SA is the multihomed one ๐Ÿซถ. The SA may receive a request from the UA on Link 1 (Zone 1). The SA MUST NOT return service information for services offered on a different zone as a request ๐Ÿ™…โ€โ™€๏ธ. For example, the UA could discover services offered in Zone 1, but not Zone 2 ๐Ÿ”’.

The SA may receive a DAAdvert on Link 2 (Zone 2). The SA MUST NOT send a service registration to the DA for a service which is present in Zone 1 ๐Ÿšซ. The SA MUST register a service with the DA which is present in Zone 2 ๐Ÿ“.

The SA MUST NOT include an address in a SAAdvert message which is sent on a zone where the address is not valid ๐Ÿงฑ. For example, the SA MUST NOT send a SAAdvert onto link 2 if the SAADvert contains a service: URL with a literal link-local scoped IPv6 address for Link 1 ๐Ÿ’€.

The SA performs active DA discovery, as described in SLPv2 [2] ๐Ÿ”. The SA MUST issue requests using multicast scope FF02 to solicit DAAdvertisements ๐Ÿ“ก. If the SA has a site-local or global source address, it MUST reissue the request with increasing scopes, up to a maximum scope of FF05 ๐Ÿ“ˆ. Active DA discovery must be attempted in both Zone 1 and 2 ๐ŸŒ. This makes sure the SA discovers as many DAs in its scope as possible ๐ŸŽ‰.

4.2.4.4 Multihomed DA ๐Ÿ—„๏ธ

                   +----+        +----+        +----+
                   | UA |--------| DA |--------| SA |
                   +----+ Link 1 +----+ Link 2 +----+

                      (Zone 1)            (Zone 2)

                        Figure 4: Multihomed DA

In Figure 4, the DA is the multihomed one ๐ŸŽ€. The DA MUST keep track of which interface registrations were made on ๐Ÿ—‚๏ธ. The DA MUST prevent a registration from the SA which contains service information valid in one zone from being discovered in another zone ๐Ÿ›ก๏ธ. For example, services registered by the SA in Zone 2 would not be discoverable by the UA in Zone 1 ๐Ÿ™ˆ.

Care must be taken when issuing DAAdverts ๐Ÿง. The DA must respond to active DA discovery requests using the same scope as the request. For instance, if the SA issues a SrvRqst message for service type "service:directory" from a link-local source address, the DA MUST respond with a link-local (link 2) source address ๐Ÿ’….

The DA MUST multicast unsolicited DAAdverts on each interface, using link-local and site-local source addresses, unless it is only configured with a link-local address ๐Ÿ“ฃ. In that case, the DA MUST issue DAAdverts with link-local scope only ๐Ÿ”—.

The DA URL MUST contain the address of the greatest scope the DA is configured with in the zone ๐ŸŒˆ. For instance, if the DA is configured with a link-local, site-local and global address in Zone 2, it would use the global address in the DA URL (as a literal IPv6 address) ๐Ÿ‘‘.


5. IANA Considerations ๐Ÿงพ

The IPv6 multicast group-id range FF05::1:1000 - FF05::1:13FF was previously assigned by IANA in RFC 2375 for use by SLP [10] ๐ŸŒธ.

This document defines how the range of addresses FF0X::1:1000 - FF0X::1:13FF is used ๐Ÿ’œ. IANA has assigned this range of addresses for use by Service Location Protocol โœจ.

This document fully defines the multicast addresses that this protocol will use ๐Ÿ’…. There is no requirement for the IANA to establish a registry to assign additional addresses, so no registry drama here ๐Ÿ™Œ.

6. Security Considerations ๐Ÿ”

Okay, this section is serious, bestie ๐Ÿ˜ญ, so read carefully. User Agents and Directory Agents MAY ignore all unauthenticated Service Location messages when a valid IPSec association exists ๐Ÿ›ก๏ธ.

Service Agents and Directory Agents MUST be able to use the IP Authentication and IP Encapsulating Security Payload for issuing and processing Service Location messages whenever an appropriate IPSec Security Association exists [13] ๐Ÿ”‘. This one is non-negotiable, periodt ๐Ÿ’€.

SLP allows digital signatures to be produced, so the contents of messages can be verified ๐Ÿ–‹๏ธ. There is nothing in the Modifications for IPv6 document which weakens or strengthens this technique ๐Ÿฆ‹.

Acknowledgments ๐Ÿซถ

Thanks to Dan Harrington, Jim Wood and Alain Durand, Thomas Narten, Dave Thaler and Erik Nordmark for their reviews of this document ๐Ÿ’–. John Veizades contributed to the original version of this document ๐ŸŒท. The hash function is modified from a code fragment attributed to Chris Torek ๐Ÿงš. Text on Scope Zones is taken from writing by Steve Deering, Brian Haberman and Brian Zill โญ.

References ๐Ÿ“š

   [1]  Bradner, S., "The Internet Standards Process -- Version 3", BCP
        9, RFC 2026, October 1996.

   [2]  Guttman, E., Perkins, C., Veizades, J. and M. Day, "Service
        Location Protocol, Version 2", RFC 2608, June 1999.

   [3]  Veizades, J., Guttman, E., Perkins, C. and S. Kaplan, "Service
        Location Protocol", RFC 2165, June 1997.

   [4]  Bradner, S., "Key words for use in RFCs to Indicate Requirement
        Levels", BCP 14, RFC 2119, March 1997.

   [5]  Mockapetris, P., "Domain Names - Concepts and Facilities", STD
        13, RFC 1034, November 1987.

        Mockapetris, P., "Domain Names - Implementation and
        Specification", STD 13, RFC 1035,  November 1987.

   [6]  Guttman, E., Perkins, C. and J. Kempf, "Service Templates and
        URLs", RFC 2609, July 1999.

   [7]  Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource
        Identifiers (URI): Generic Syntax", RFC 2396, August 1998.

   [8]  Hinden, R. and B. Carpenter, "Format for Literal IPv6 Addresses
        in URL's", RFC 2732, December 1999.

   [9]  Hinden, R. and S. Deering, "IP Version 6 Addressing
        Architecture", RFC 2373, July 1998.

   [10] Hinden, R. and S. Deering, "IPv6 Multicast Address Assignments",
        RFC 2375, July 1997.

   [11] Meyer, D., "Administratively Scoped IP Multicast", RFC 2365,
        July 1998.

   [12] Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC
        2279, January 1998.

   [13] Kent, S. and R. Atkinson, "Security Architecture for the
        Internet Protocol", RFC 2401, November 1998.

Author's Address ๐Ÿ–Š๏ธ

   Erik Guttman
   Sun Microsystems
   Eichhoelzelstr. 7
   74915 Waibstadt, Germany

   Phone:  +49 7263 911701
   EMail:  Erik.Guttman@germany.sun.com

Okay bestie, time for the legal bit ๐Ÿ™ˆ but I'm keeping every word, so read it with me.

Copyright (C) The Internet Society (2001). All Rights Reserved. ๐ŸŽ€

So basically, this document and translations of it can be copied and handed to others ๐Ÿฆ‹. Derivative works that comment on or explain it, or help people implement it, can be made, copied, published and distributed, in whole or in part, with no restriction of any kind. The one catch is that the copyright notice and this paragraph have to stay on every copy and every derivative work. BUT the document itself can't be modified in any way. You can't remove the copyright notice or the references to the Internet Society or other Internet organizations. The exceptions are when you're developing Internet standards (then you follow the copyright procedures in the Internet Standards process) or when you're translating it into a language other than English ๐ŸŒธ.

Those permissions are perpetual, which means forever ๐Ÿ’œ. The Internet Society, its successors, and its assigns won't ever revoke them โœจ.

The document and the info inside it is served "AS IS" ๐Ÿ’… and the Internet Society and the Internet Engineering Task Force say NO to all warranties, whether they're express or implied. That includes no promise that using the info won't infringe anyone's rights, and no implied warranties of merchantability or fitness for a particular purpose ๐Ÿ˜ญ.

Acknowledgement ๐Ÿซถ

Funding for the RFC Editor function is currently coming from the Internet Society ๐ŸŒˆ. Shoutout to them, periodt โญ.

๐Ÿ“ฆ where this page comes from