view Side-By-Side changes
draft-ietf-svrloc-protocol-12.txtInternet Engineering Task Force John VeizadesINTERNET-DRAFT TGV, Inc.INTERNET DRAFT @Home Network 10 June 1996 Erik Guttman Sun Microsystems Charles Perkins IBM Research Scott KaplanMarch 11, 1996Service Location Protocol1.0draft-ietf-svrloc-protocol-13.txt Status ofthis memoThis Memo This draft document is a product of theIETFService Location WorkingGroup;Group of the Internet Engineering Task Force (IETF); it will be submitted to the RFC editor as a standards document. Please respond with comments to the srvloc@tgv.com mailing list. Distribution of this memo is unlimited. This document is an Internet-Draft. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of sixmonths. Internet-Draftsmonths and may be updated, replaced, or obsoleted by other documents at any time. It isnot appropriateinappropriate to use Internet-Drafts as reference material or to cite them other than asa "working draft" or "work``work inprogress."progress.'' To learn the current status of any Internet-Draft, please check the1id-abstracts.txt``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow Directories onds.internic.net, nic.nordu.net, ftp.isi.eduftp.is.co.za (Africa), nic.nordu.net (Europe), munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), ormunnari.oz.au. 2.0ftp.isi.edu (US West Coast). Abstract Theservice locationService Location protocol provides a scalable framework for the discovery and selection of network services.It relies on multicast support at the network layer of the protocol stack it is using. It does not specifically rely upon the TCP/IP protocol stack but makes use of concepts that are found in most TCP/IP protocol implementations. Traditionally, users find servicesUsing this protocol, computers using thenameInternet no longer need so much static configuration ofanetworkhost (a human readable text string) which is an aliasservices foranetworkaddress. The service location protocol eliminates the need for a userbased applications. This is especially important as computers become more portable, and users less tolerant or able toknow the name of a network host supporting a service. Rather,fulfill theuser supplies a setdemands ofattributes which describe the service. The service location protocol allows the user to bind this description to thenetworkaddress of the service. Service Location provides a dynamic configuration mechanism for applications in a tightly coupled set of local area networks. It is not a global resolutionsystemfor the entire Internet, rather it is intended to serve institutional networks with shared services. Service Location WGadministration. Veizades,Guttman,Perkins,Kaplan ExpiresAugust 21,10 December 1996 [Page1] INTERNET-DRAFTi] Internet Draft Service Location ProtocolMarch-96 Table of10 June 1996 Contents1.0Status ofthis memo..............................................1 2.0 Abstract.........................................................1 3.0This Memo i Abstract i 1. Recent Changes 2 2. Introduction 5 3. Terminology 5 3.1. NotationConventions.............................................3 4.0 Terminology......................................................3 5.0 Protocol Overview................................................5 5.1 Protocol Transactions........................................5 5.2Conventions . . . . . . . . . . . . . . . . . . 6 3.2. Service Information and PredicateRepresentation.........................7 5.3 Additional Notes.............................................7 5.3.1 The 'service:' URL scheme.............................7 5.3.2 Interpretation of Service Location Replies............7 5.3.3 Use of TCP and Multicast in Service Location..........7 5.3.4 Multilingual Support..................................7 5.3.5 Standard Attribute Definitions........................8 5.3.6 Naming Authority......................................8 5.3.7 No Synchronous Assumption.............................9 5.4 Service Location PDU header..................................9 5.4.1 Version...............................................9 5.4.2 Functions.............................................9 5.4.3 Length................................................9 5.4.4 Error Codes...........................................9 5.4.5 Transaction Identifier (XID).........................10 5.4.6 Flags................................................10 5.4.7 Time To Live.........................................10 5.4.8 Character Encoding...................................10 5.4.9Representation . . . . 7 3.3. Specification LanguageCode........................................10 5.5 Service Request and Reply...................................10 5.6 Directory Agent Discovery Request...........................13 5.7 Service Type Request........................................14 5.8 Attribute Request and. . . . . . . . . . . . . . . . . 7 4. Protocol Overview 8 4.1. Protocol Transactions . . . . . . . . . . . . . . . . . . 9 4.2. Schemes . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.2.1. The 'service:' URL scheme . . . . . . . . . . . 11 4.3. Standard AttributeReply.......................15 5.9 Service Discovery Request...................................17 6.0 Directory Agents................................................18 6.1 Introduction................................................18 6.2 Directory Agent Discovery...................................18 6.3 Service Registration........................................20 6.4 Service Unregister..........................................22 6.5 SCOPE Discovery and Use.....................................23 6.6Definitions . . . . . . . . . . . . . 11 4.4. Naming Authority . . . . . . . . . . . . . . . . . . . . 12 4.5. Interpretation of Service LocationScalingReplies . . . . . . . 12 4.6. Use of TCP, UDP andOperating Modes................24 7.0Multicast in Service LocationConnections....................................25 8.0 Security Considerations.........................................26 9.0. . . . 13 4.6.1. Multicast vs.Broadcast.........................................26 9.1 Single Subnet...............................................26 9.2 Multiple Subnets............................................26 9.3 Service Multicast Address...................................26 10.0Broadcast . . . . . . . . . . . . 13 4.7. Service Locationin the Internet...............................27 11.0 Protocol Formats...............................................27 11.1 Fields Used inScaling, and Multicast Operating Modes . 14 5. Service LocationPackets....................27 11.1.1 Previous Responders' Address Specification..........27 11.1.2General Message Format 15 5.1. Use of Transaction IDs (XIDs) . . . . . . . . . . . . . . 17 5.2. URL Entry Lifetime . . . . . . . . . . . . . . . . . . . 18 6. Service RequestPredicate...........................28 11.1.3 Reply...............................................31 11.1.4 Service Registration Information....................31 11.1.5 Service Unregister Information......................31 11.1.6 Attribute List......................................31 Veizades, Kaplan, Guttman, Perkins [Page 2] INTERNET-DRAFTMessage Format 18 6.1. ServiceLocation Protocol March-96 11.1.7 Service Type........................................32 11.2 ADDRESS SPECIFICATIONs in Service Location.................32 11.3 Attribute Value encoding rules.............................32 12.0 Implementation Requirements....................................33 13.0 Configuration Parameters and Defaults..........................35 13.1 Multicast vs. Broadcast....................................35 13.2 Multicast Radius...........................................35 13.3 Directory Agent Address....................................35 13.4Request Usage . . . . . . . . . . . . . . . . . . 20 6.2. Directory AgentScope Assignment...........................35 14.0 Interesting Constants..........................................35 15.0 Acknowledgments................................................36 16.0 References.....................................................36 17.0 Author's Addresses.............................................38 18.0 Document Expiration............................................38 Appendix A - Technical contentsDiscovery Request . . . . . . . . . . . . 21 6.3. Explanation ofISO 639:1988.....................39 3.0 Notation Conventions <> Values set off in this manner are fully described in section 11.0. In General, all definitionsTerms ofitems in packets are described in section 11.0. | | \ \ Packet layouts with this notation indicate a variable length | | field. 4.0 Terminology User Agent (UA) A process working on the user's behalf to acquire service attributes and configuration. The User Agent retrieves service information from thePredicate Grammar . . . . . . . . 22 6.4. ServiceAgents or Directory Agents.Request Predicate Grammar . . . . . . . . . . . . 24 6.5. String Matching for Requests . . . . . . . . . . . . . . 25 7. ServiceAgent (SA) A process working on the behalf of one or more services to advertise service attributes and configuration.Reply Message Format 26 8. ServiceApplication A process working on behalf of one or more services to advertise service attributes and configuration. Unlike an SA the application will not directly respond to service queries and will merely register with Directory Agents.Type Request Message Format 27 9. ServiceInformation A collection of attributes and configuration information associated with a single service. TheType Reply Message Format 29 10. ServiceAgents advertise service information for a collection of service instances. Veizades, Kaplan, Guttman, Perkins [Page 3] INTERNET-DRAFTRegistration Message Format 30 11. Service Acknowledgement Message Format 33 Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page ii] Internet Draft Service Location ProtocolMarch-9610 June 1996 12. ServiceThe service is a process or system providing a facility to the network. The goal of service location is to provide sufficient information to the user, via the User Agent, to find the service. The service itself is accessed using a communication mechanism external to the the service location protocol.Deregister 34 13. Attribute Request Message Format 35 14. Attribute Reply Message Format 37 15. Directory Agent(DA) A process which collects information from ServiceAdvertisement Message Format 39 16. Directory Agentsto provide a single repository of service information in order to centralize it for efficient access by User Agents. There can only be one DA present per given host. Service Type Each type of service has a unique Service Type string. The Service Type defines a template including expected attributes, values40 16.1. Introduction . . . . . . . . . . . . . . . . . . . . . . 40 16.2. Finding Directory Agents . . . . . . . . . . . . . . . . 40 17. Scope Discovery andprotocol behavior. Well known Service Types are registered with the IANAUse 42 18. Language andtemplates are available as RFCs. Private Service Types may also be supported. Naming Authority The agency or group which catalogues given Service TypesCharacter Encoding Issues 43 18.1. Character Encoding andAttributes. The default Naming Authority is IANA. Otherwise the Service TypeString Issues . . . . . . . . . . 44 18.1.1. Substitution ofthe service has the Naming Authority appended to the end, following a '.' separator. Attribute A {class, value} pair describing a characteristicCharacter Escape Sequences . . . 45 18.2. Language Dialect . . . . . . . . . . . . . . . . . . . . 45 18.3. Language-Independent Strings . . . . . . . . . . . . . . 46 19. Service Location Transactions 46 19.1. Service Location Connections . . . . . . . . . . . . . . 46 20. Security Considerations 47 21. String Formats used with Service Location Messages 48 21.1. Previous Responders' Address Specification . . . . . . . 49 21.2. Reply and Registration Information . . . . . . . . . . . 49 21.3. Attribute Information . . . . . . . . . . . . . . . . . . 50 21.3.1. Service Type String . . . . . . . . . . . . . . . 50 21.4. Address Specification in Service Location . . . . . . . . 50 21.5. Attribute Value encoding rules . . . . . . . . . . . . . 51 22. Implementation Requirements 52 23. Configurable Parameters and Default Values 55 23.1. Service Agent: Use Predefined Directory Agent(s) . . . . 56 23.2. Time Out Intervals . . . . . . . . . . . . . . . . . . . 57 24. Non-configurable Parameters 58 25. Acknowledgments 58 A. Appendix: Technical contents of ISO 639:1988 (E/F): "Code for the representation of names of languages" 59 B. Appendix: For Further Reading 60 Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 1] Internet Draft Service Location Protocol 10 June 1996 1. Recent Changes After much thought, we decided to change the way service attributes are requested by clients. Whereas before we specified a /Select/ clause within the Service Request as well as another Attribute Request message type, now attributes will be requested only by use of the Attribute Request message type. The Service Request will not have a /Select/ clause, and will return URLs only. Conceptually, this is fairly minor change to the protocol, but it has had a pretty substantial effect on the wording in the document. In addition, we have broken out the Service Type message as a different message type, and the Directory Agent now can make use of an Advertisement message. All of these changes have been made to simplify the protocol as well as the description of the protocol. We reached the decision only after much hand-wringing. We believe that the gain in protocol quality is worth the cost of making modifications at this late date, and that the resulting protocol is powerful yet simple enough that no further such changes will be needed. In addition, and as part of the abovementioned modifications, we have addressed all of the language, consistency, and security concerns that have been brought during the recent last call period. 1. The predicate grammar has changed: - To disambiguate the grammar, parentheses are required for keywords in where-list queries. - The predicate query no longer contains a SELECT clause. The select list has been moved to the AttrRqst. This simplifies the query grammar and functionality of the SrvRqst. 2. The header has changed: - Error codes have been removed from the header. This shrinks the header, and since only half of the PDUs need to carry an Error field: DAAdvert, SrvTypeRply, SrvRply, AttrRply, SrvAck. - TTL has been removed from the header. It has been renamed Lifetime. The name TTL was confusing to people for whom it had other associations. Having the TTL in the header did not allow multiple services which were returned to be given distinct lifetime values. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 2] Internet Draft Service Location Protocol 10 June 1996 3. SrvRqst changed quite a bit. It now merely returns a URL, not attributes. SrvRqst had too much functionality. It allowed Service Type discovery, DA Discovery, Service Discovery and Attribute selection. This made it complex to explain and subtle to specify and code. The elements have been broken into clear and distinct interactions. - The SELECT of the predicate clause has been removed. Attribute information is no longer returned with the SrvRply therefore SELECT is unneeded. It was complex to explain how this feature worked. Removing all attribute information from the SrvRqst <---> SrvRply transaction greatly simplifies the protocol and predicate syntax. - WILD CARD Service Types are no longer possible. This was used to allow Service Type discovery and constituted a special case. This was not at all elegant. One might even use the word kludge here. 4. AttrRqst changed quite a bit. It now does all attribute functions. SrvRqst and the grammar it used were very complicated. This change takes on the attribute functions in a clean and simple fashion which increases the clarity of the protocol. It also makes it possible to ignore attributes entirely if one wishes. - There are more fields. AttrRqst used to have only a ServiceType. It returned all the attributes and values of that Service Type. Now a URL String, Scope String and Select String are included. The URL String can be either merely a Service Type or it can be a complete URL. This returns all attributes and values as before, THAT SATISFY THE PROVIDED SCOPE AND SELECT CLAUSE. - This mechanism is more powerful than the original AttrRqst, in that it allows a Selection of WHICH attributes are to be returned. It also simplifies the protocol by combining all attribute requests into one function. 5. SrvRply changed as a result of changes to SrvReq. It now contains an Error field and it returns URL Entries not URL Strings and Attribute information for each Service in the reply. - An error field included, to make it clear how to handle errors. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 3] Internet Draft Service Location Protocol 10 June 1996 - URL Entries used, no attributes included. Lifetime had to be associated with each entry in the reply not with the entire reply. Attribute info may now only be obtained with the AttrRqst. 6. SrvTypeRqst and SrvTypeRply were created in order to further simplify (and rationalize) SrvReq. - This request now has weaker semantics than before, since it is impossible to specify a SELECT clause in the SrvTypeRqst. This means that you can't say "Give me all service types that start with the letter Q" or "Give me all service types except the following list". Such things are not really needed and add complexity to the wrong part of the protocol. - There is no longer any special case or wild card necessary for doing service type requests. - The Naming Authority and Scope field for the SrvTypeRqst are still included. 7. Created DAAdvert for the reply for a SrvRqst for Service Type "directory-agent". The reply for a DA must include the Scope of the DA. Since Attributes are no longer included in SrvRply messages, a distinct message type was required. This message is also periodically transmitted even if unsolicited. 8. There is now a character escape mechanism almost exactly as used in HTML, so that characters which are part of service location protocol syntax can appear in attribute tags and values. 9. Added rules and conditions for use of multiple character sets to satisfy Harald Alverstrand's rejection of slp draft 12. 10. Added security comments and requirements to satisfy last call issues raised. 11. The SrvDereg message now includes a list of attributes to deregister. In the previous version of the protocol the service had to be deregistered as a whole, which was deemed to coarse and easily correctible. If this field is excluded, the SrvDereg functions exactly as before. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 4] Internet Draft Service Location Protocol 10 June 1996 2. Introduction Traditionally, users find services by using the name of a network host (a human readable text string) which is an alias for a network address. The service location protocol eliminates the need for a user to know the name of a network host supporting a service. Rather, the user supplies a set of attributes which describe the service. The service location protocol allows the user to bind this description to the network address of the service. Service Location provides a dynamic configuration mechanism for applications in local area networks. It is not a global resolution system for the entire Internet; rather it is intended to serve enterprise networks with shared services. Applications are modeled as clients that need to find servers attached to the enterprise network at a possibly distant location. For cases where there are many different clients and/or services available, the protocol is adapted to make use of nearby Directory Agents that offer a centralized repository for advertised services. 3. Terminology User Agent (UA) A process working on the user's behalf to acquire service attributes and configuration. The User Agent retrieves service information from the Service Agents or Directory Agents. Service Agent (SA) A process working on the behalf of one or more services to advertise service attributes and configuration. Service Information A collection of attributes and configuration information associated with a single service. The Service Agents advertise service information for a collection of service instances. Service The service is a process or system providing a facility to the network. The service itself is accessed using a communication mechanism external to the the service location protocol. Directory Agent (DA) A process which collects information from Service Agents to provide a single repository of service information Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 5] Internet Draft Service Location Protocol 10 June 1996 in order to centralize it for efficient access by User Agents. There can only be one DA present per given host. Service Type Each type of service has a unique Service Type string. The Service Type defines a template including expected attributes, values and protocol behavior. Naming Authority The agency or group which catalogues given Service Types and Attributes. The default Naming Authority is IANA. Keyword A string describing a characteristic of a service. Attribute A (class, value-list) pair of strings describing a characteristic of a service. The value string may be interpreted as a boolean, integer or opaque value if it takes specific forms (see section 21.5). Predicate A boolean expression of attributes, relations and logical operators. The predicate is used to find services which satisfy particular requirements. See section 6.3. Scope A collection of services that make up a logical group. See sections 17 and 4.7. Site Network All the hosts accessible within the Agent's multicast radius, which defaults to a value appropriate for reaching all hosts within a site (see section 23). If the site does not support multicast, the agent's site network is restricted to a single subnet. Address Specification This is the network layer protocol dependent mechanism for specifying an Agent. For Internet systems this is part of a URL (Universal Resource Locator - see [7]). 3.1. Notation Conventions CAPS Strings which appear in all capital letters are protocol literal. All string comparison is case insensitive, however, (see section 6.5). Some strings are quoted in Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 6] Internet Draft Service Location Protocol 10 June 1996 this document to indicate they should be used literally. Single characters inside apostrophes should be included literally. <> Values set off in this manner are fully described in section 21. In general, all definitions of items in messages are described in section 21 or immediately following their first use. | | \ \ Message layouts with this notation indicate a variable | | length field. 3.2. Service Information and Predicate Representation Service information is represented in a text format. The goal is that the format be human readable and transmissible via email. The location of network services is encoded as a Universal Resource Locator (URL) which is also human readable and well defined. Only the datagram headers are encoded in a form which is not human readable. Predicates are expressed in a simple boolean notation using keywords, attributes, and logical connectives, as described in Section 6.4. The logical connectives and subexpressions are presented in prefix-order, so that the connective comes first and the expressions it operates on follow afterwards. 3.3. Specification Language In this document, several words are used to signify the requirements of the specification. These words are often capitalized. MUST This word, or the adjective "required", means that the definition is an absolute requirement of the specification. MUST NOT This phrase means that the definition is an absolute prohibition of the specification. SHOULD This word, or the adjective "recommended", means that, in some circumstances, valid reasons may exist to ignore this item, but the full implications must be understood and carefully weighed before choosing a different course. Unexpected results may result otherwise. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 7] Internet Draft Service Location Protocol 10 June 1996 MAY This word, or the adjective "optional", means that this item is one of an allowed set of alternatives. An implementation which does not include this option MUST be prepared to interoperate with another implementation which does include the option. silently discard The implementation discards the datagram without further processing, and without indicating an error to the sender. The implementation SHOULD provide the capability of logging the error, including the contents of the discarded datagram, and SHOULD record the event in a statistics counter. 4. Protocol Overview The basic operation in Service Location is that a client attempts to discover the location of a Service. In smaller installations, each service will be configured to respond individually to each client. In larger installations, services will register their services with one or more Directory Agents, and clients will contact the Directory Agent to fulfill requests for Service Location information. Clients may discover the whereabouts of a Directory Agent by preconfiguration, DHCP [2, 10], or by issuing queries to the Directory Agent Discovery multicast address. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 8] Internet Draft Service Location Protocol 10 June 1996 4.1. Protocol Transactions The diagram below illustrates the relationships described below: +---------------+ we want this info: +-----------+ | Application | - - - - - - - - - - - -> | Service | +---------------+ +-----------+ /|\ | | | +-------------+ | | | | \|/ \|/ \|/ +---------------+ +-----------+ +----------------+ | User Agent |<-------->| Service | | Service | +---------------+ | Agent | | Agent which | | +-----------+ | does not reply | | | | to UA requests | | \|/ +----------------+ | +-------------+ | +------------------>| Directory |<----------+ | Agent | +-------------+ ___________ /|\ / Many other\ +------------>| SA's | \___________/ The following describes the operations a User Agent would employ to find services on the site's network. The User Agent needs no configuration to begin network interaction. The User Agent can acquire information to construct predicates which describe the services that match the user's needs. The User Agent may build on the information received in earlier network requests to find the Service Agents advertising service information. A User Agent will operate two ways: If the User Agent has already obtained the location of a Directory Agent, the User Agent will unicast a request to it in order to resolve a particular request. The Directory Agent will unicast a reply to the User Agent. The User Agent will retry a request to a Directory Agent until it gets a reply, so if the Directory Agent cannot service the request (say it has no information) it must return an response with zero values, possibly with an error code set. If the User Agent does not have knowledge of a Directory Agent or if there are no Directory Agents available on the site network, a second mode of discovery is used. The User Agent multicasts a request to the service-specific multicast address, to which the service it wishes to locate will respond. All the Service Agents which are listening to this multicast address will respond, provided they can Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 9] Internet Draft Service Location Protocol 10 June 1996 satisfy the User Agent's request. A similar mechanism is used for Directory Agent discovery; see section 6.2. Service Agents which have no information for the User Agent MUST NOT respond. When a User Agent wishes to obtain an enumeration of ALL services which satisfy the query, a retransmission/convergence algorithm is used. The User Agent resends the request, together with a list of previous responders. Only those Service Agents which are not on the list respond. Once there are no new responses to the request the accumulation of responses is deemed complete. Depending on the length of the request, around 60 previous responders may be listed in a single datagram. If there are more responders than this, the scaling mechanisms described in section 4.7 should be used. While the multicast/convergence model may be important for discovering services (such as Directory Agents) it is the exception rather than the rule. Once a User Agent knows of the location of a Directory Agent, it will use a unicast request/response transaction. The Service Agent SHOULD listen for multicast requests on the service-specific multicast address, and MUST register with an available Directory Agent. This Directory Agent will resolve requests from User Agents as described above. This means that a Directory Agent must first be discovered, using the multicast mechanism described above. A Service Agent which does not respond to multicast requests will not be useful in the absence of Directory Agents. Some Service Agents may not include this functionality, if an especially light-weight implementation is required. If the service is to become unavailable, it should be deregistered with the Directory Agent. The Directory Agent responds with an acknowledgment to either a registration or deregistration. Service Registrations include a Lifetime value and will eventually expire. Service Registrations need to be refreshed by the Service Agent before their Lifetime runs out. 4.2. Schemes The Service Location Protocol, designed as a way for clients to access resources on the network, is a natural application for Universal Resource Locators (URLs). It is intended that by re-using URL specification and technology from the World Wide Web, clients and servers will be more flexible and able to be written using already existing code. Moreover, it is hoped that browsers will be written to take advantage of the similarity in locator format, so that a Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 10] Internet Draft Service Location Protocol 10 June 1996 client can dynamically formulate requests for services that are resolved differently depending upon the circumstances. There is the possibility for beneficial interaction between Directory Agents and Web Browsers which we wish to facilitate by means of compatible locator format. 4.2.1. The 'service:' URL scheme The service URL scheme is used by Service Location. It is used to specify a Service Location. Many Service Types will be named by including a scheme name after the 'service:' scheme name. Service Types are used by SAs to register and deregister Services with DAs. It is also used by SAs and DAs to return Service Replies to UAs. The formal definition of the 'service:' URL scheme is in section 21. The format of the information which follows the 'service:' scheme should as closely as possible follow the URL structure and semantics as formalized by the IETF standardization process. Well known Service Types are registered with the IANA and templates are available as RFCs. Private Service Types may also be supported. 4.3. Standard Attribute Definitions Service Types used with the service location protocol must describe the following: Service Type string of the service Service-specific multicast address, if used Attributes and Keywords Attribute Descriptions and interpretations Service Types note registered with IANA will use their own Naming Authority string and, possibly, a service-specific multicast address from the unassigned range. This is only an option for a site-specific deployment, as there may be conflicts with this multicast address somewhere, in some other site. If a service-specific multicast address is not supplied by a standards document registered with IANA, nor is a site specific address being used, the Service Location General Multicast address is the default. All Service Agents SHOULD listen to this address, especially if they have not registered their service information with any Directory Agent. The service-specific multicast address is merely used for efficiency and is not strictly needed for correct operation. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 11] Internet Draft Service Location Protocol 10 June 1996 Services which advertise a particular Service Type must support the complete set of standardized attributes. They may support additional attributes, beyond the standardized set. Unrecognized attributes MUST be ignored by User Agents. Service Type names which begin with "x-" are guaranteed not to conflict with any officially registered Service Type names. It is suggested that this prefix be used for experimental or private Service Type names. Similarly, attribute names which begin with "x-" are guaranteed not to be used for any officially registered attribute names. A service of a given Service Type should accept the networking protocol which is implied in its definition. If a Service Type can accept multiple protocols, configuration information SHOULD be included in the Service Type attribute information. This configuration information will enable an application to use the results of a Service Request and Attribute Request to directly connect to a service.Note thatSee section 21.3.1 for the format of aclassService Type String as used in the Service Location Protocol. 4.4. Naming Authority The Naming Authority of a service defines the meaning of the Service Types and attributes registered with and provided by Service Location. The Naming Authority itself is astring. Values are optional. An attribute without a valuestring which uniquely identifies an organization. If no string isa keyword. A valueprovided IANA is the default. Naming Authorities may define Service Types which are experimental, proprietary or for private use. The procedure to use is to create a 'unique' Naming Authority stringwhich may be interpretedand then specify the Standard Attribute Definitions asa string, ordescribed above. This Naming Authority will accompany registration and queries, asa boolean, integer or opaque value ifdescribed in sections 10 and 6. 4.5. Interpretation of Service Location Replies Replies should be considered to be valid at thevalue string takes specific forms (see section 11.3.)time of delivery. The serviceinformation advertised by a Service Agent may include more than one value per class. Predicate A boolean expressionmay, however, fail or change between the time ofattributes, relationsthe reply andlogical operators. The predicate is usedthe moment an application seeks tofind services which satisfy particular requirements. See section 11.1.2. Scope A collection of systems, networks and other network components thatmakeup a logical group. See section 6.5 and 6.6. Campus A campus is a collectionuse ofnetworks, hosts and related network infrastructurethe service. The application making use of service location SHOULD be prepared for the possibility that the service information provided isgrouped together for geographicaleither stale orpolitical reasons. Veizades, Kaplan, Guttman, Perkinsincomplete. In the case where the service information provided Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page4] INTERNET-DRAFT12] Internet Draft Service Location ProtocolMarch-96 Agent's Internet All the hosts accessible within10 June 1996 does not allow a User Agent to connect to a service as desired, theAgent's multicast radiusService Request may be resubmitted. Service specific configuration information (such as whichdefaultsprotocol tothe Agent's site (see section 13.0.) If the network does not support multicast, the agent's internet is defined by its broadcast radius. The discovery methoduse) should be included as attribute information in Service Registrations. These configuration attributes will be used by applications which interpret the Service Location Reply. 4.6. Use of TCP, UDP and Multicast in Service Location The service location protocol requiresthese techniques to start up and provide stable operation. Servers outside oftheAgent's radius are considered "outsideimplementation ofthe user's internet." Address Specification Thisconnectionless and a connection oriented transport protocols. The latter isthe network layer protocol dependent mechanismused forspecifyingbulk transfer, only when necessary. Connections are always initiated by anUser Agent. For Internet systems this isagent request or registration, not by aURL (Universal Resource Locator see RFC 1738). 5.0 Protocol Overview 5.1 Protocol Transactionsreplying Directory Agent. Thediagram below illustrates the relationships described below: +---------------+ we want this info: +-----------+ | Application | - - - - - - - - - - - -> | Service | +---------------+ +-----------+ /|\ | | | +-------------+ | | | | \|/ \|/ \|/ +---------------+ +-----------+ +-------------+ | User Agent |<-------->| Service | |Service| +---------------+ | Agent | | Application | | +-----------+ +-------------+ | | | | \|/ | | +-------------+ | +------------------>| Directory |<----------+ | Agent | +-------------+ ___________ /|\ / Many other\ +------------>| SA's | \___________/Location discovery mechanisms use possibly internetwork-wide multicast. Thefollowing describes the operationsprotocol will operate in aUser Agent employs to find services on the attached Internet.broadcast environment with limitations detailed in section 4.6.1. 4.6.1. Multicast vs. Broadcast TheUser Agent does not need any configuration to beginservice location protocol was designed for use in networks where multicast at the networkinteraction. The User Agentlayer is supported; in some instances multicast maybuild on the information receivednot be supported. To support this protocol inearlier network requests to find the Service Agents advertising service information, and subsequentlynetworks where multicast is not supported theterms usedfollowing modifications are made todescribe services that itsupport the protocol in an environment where network layer broadcast isinterested in.supported. 4.6.1.1. Single Subnet If a network is not connected to any other networks simple network layer broadcasts will work in place of multicast. 4.6.1.2. Multiple Subnets TheUserDirectory Agentcan use thisprovides a central clearing house of informationto construct predicates which describe the services that match the user's needs. Veizades, Kaplan, Guttman, Perkins [Page 5] INTERNET-DRAFT Service Location Protocol March-96 Afor UserAgent will operate two ways:Agents. If theUser Agent has already obtained the location ofnetwork is designed so that a Directory Agent address is statically configured with each User Agent, theUserDirectory Agent willunicast a request to it in order to resolveact as aparticular request.bridge for information that resides on different subnets. The Directory Agent address can be dynamically configured with Agents using DHCP or staticly configured, but Agents willunicast a replynot be able tothe User Agent. The User Agentdiscover DAs on non-bridged subnets. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 13] Internet Draft Service Location Protocol 10 June 1996 As dynamic discovery is not feasible in a broadcast environment with multiple subnets and manual configuration is difficult, deploying multiple DAs in multiple subnets willretryrequire use of multicast discovery with multiple hops (i.e., TTL > 1 in the IP header). 4.6.1.3. Service-Specific Multicast Address Each service type MAY have arequestunique multicast address which is expected toa Directory Agent until it gets a reply,be used for discovering services of that type. This multicast address may be obtained from the naming authority (e.g., IANA). This mechanism is used soifthat theDirectory Agent cannotnumber of datagrams any one service agent receives is minimized. The Service Location General Multicast Address may be used to query for any service, though one should use therequest (say it has no information)service-specific multicast address if itmust return an response with zero values, possibly with an error code set.exists. If theUser Agentsite network does nothave knowledgesupport multicast then the query should be broadcast to the Service Location port. If the underlying hardware will not support the number of needed multicast addresses the service location general multicast address may be used. Service Agents which have not registered with a Directory Agentor if there are no Directory Agents availablelisten on this multicast address as well as theUser Agent's internet,service-specific multicast addresses for the service types they advertise. 4.7. Service Location Scaling, and Multicast Operating Modes In asecond mode of discoveryvery small network, with few nodes, no DA isused. Therequired. A User Agentmulticastscan detect services by multicasting requests. Service Agents will then reply to them. Further, Service Agents which respond to user requests must be used to make service information available. This does not scale to environments with many hosts and services. When scaling service location systems to intermediate sized networks, arequestcentral repository (Directory Agent) may be added to reduce theservice multicast address, whichnumber of Service Location messages transmitted in theservice it wishesnetwork infrastructure. Since the central repository can respond tolocateall Service Requests, fewer Service Replies willrespond to. Allbe needed; for the same reason, there is no need to differentiate between Directory Agents. Service Agentswhich are listening toshould register with thismulticast address will respond, providedDA even if theycan satisfy the User Agent's request. Service Agentsare configured to specifically register with DAs which haveno information for the User Agent DO NOT respond. In the case where the User Agent wishes to obtainacomplete answer, an enumerationspecific scope or set ofALL services which satisfy the query, there is a retransmission/convergence algorithm. Thescopes. UserAgent resends the request, together with a list of previous responders. Only those ServiceAgentswhich are not on the list respond. Once theremay query DAs without scopes, even if they areno new responsesconfigured tothe request the accumulation of responses is deemed complete. Depending on the length of the request, around 60 previous responders may be listed in a single datagram (without exceding the size ofuse DAs with asingle datagram and requiring fragmentation.) If there are more responders than this, the scaling mechanisms described in section 6.6 should be used. Itcertain scope. This isimportant to stress that whilebecause any DA with no Scope will have all themulticast/convergence modelavailable service information. A site maybe important for discovering services (such as Directory Agents) it is the exception rather than the rule. Once a User Agent knows of the location ofalso grow to such aDirectory Agent,size that itwill use a unicast request/response transaction. A serviceis not feasible to maintain only one central repository of service information. In this Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 14] Internet Draft Service Location Protocol 10 June 1996 case more Directory Agents are needed. The services (and service agents) advertised byan application which registerstheservice information with a Directory Agent. Thisseveral DirectoryAgent will resolve requests from UserAgentsas described above. This meansare collected together into logical groupings called "scopes". All Service Registrations that have aDirectory Agentscope mustfirstbediscovered, usingregistered with all DAs (within the appropriate multicastmechanism described above. If the service is to become unavailable, itradius) of that scope which have been or are subsequently discovered. Unscoped services should beunregistered with the Directory Agent. The Directory Agent respondsregistered withan acknowledgmentall DAs as they are implicitly Global in scope. User Agents make requests of DAs whose Scope they are configured toeither a registration or unregistration. Theuse. It is possible to specially configure ServiceAgent or Application mustAgents to register only withana specific set of DAs (see Section 23.1). In that case, services may not be available to User Agents via all DirectoryAgent. The Service Agent must additionally listen for multicast requests on the service specific multicast address. Service Applications will fail in an internet where thereAgents, but some network administrators may deem this appropriate. There are thus 3 distinct operating modes. The first requires noDirectory Agents. Service Applications are present in this protocol to provide a lightweight service registration mechanism. Veizades, Kaplan, Guttman, Perkins [Page 6] INTERNET-DRAFT Service Location Protocol March-96 5.2 Service and Predicate Representation Service information is represented inadministrative intervention. The second requires only that atext format.DA be run. Thegoal islast requires thatthe formatall DAs behuman readableconfigured to have Scope andtransmittable via email. The locationthat a coherent strategy ofnetworkassigning Scopes to servicesis encoded as a Universal Resource Locator (URL)be followed. Users must be instructed whichis also human readable and well defined. Only the datagram headersScopes arein an encoded form which is not human readable. 5.3 Additional Notes 5.3.1 The 'service:' URL scheme The service URL scheme is used by Service Location. It is usedappropriate for them tospecify a Service Location.use. Thisis used by SAs and Service Applications to register and unregister Services with DAs. It is also used by SAsadministrative effort will allow users andDAsapplications toreturnsubsequently dynamically discover services without assistance. A subsequent protocol document will describe mechanisms for supporting a service discovery protocol for the global Internet. 5. ServiceReplies to UAs.Location General Message Format Theformal definition of the 'service:' URL schemefollowing header is used insection 11. The formatall of theinformation which follows the 'service:' scheme should as closely as possible follow the URL structuremessage descriptions below andsemantics as formalizedis abbreviated by using "Service location header =" followed by theIETF standarization process. 5.3.2 Interpretationfunction being used. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Version | Function | Length | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |O|M| rsvd | Dialect | Language Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Char Encoding | XID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Version This protocol document defines version 1 of the service location protocol. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 15] Internet Draft Service LocationReplies Replies shouldProtocol 10 June 1996 Function Service location datagrams can beconsideredidentified as tobe valid attheir operation by thetime of delivery.function field. Theservice may, however, fail or change betweenfollowing are thetimedefined operations: Message Type Abbreviation Function Value Service Request SrvReq 1 Service Reply SrvRply 2 Service Registration SrvReg 3 Service Deregister SrvDereg 4 Service Acknowledge SrvAck 5 Attribute Request AttrRqst 6 Attribute Reply AttrRply 7 DA Advertisement DAAdvert 8 Service Type Request SrvTypeRqst 9 Service Type Reply SrvTypeRply 10 Length The number of bytes in thereply and the moment an application seeks to make use ofmessage, including theservice.Service Location Header. O Theapplication making use of service location must be prepared'Overflow' bit. See Section 19 for thepossibility that the service information provided is either stale or incomplete. In the case whereuse of this field. M The 'Monolingual' bit. Requests with this bit set indicate theservice information provided does not allow aUser Agentto connect to a service as desired, the request may be resubmitted. Service specific configuration information (such as which protocol to use) should be included as attribute information in Service Registrations. These configuration attributeswillbe used by applications which interpret the Service Location Reply. 5.3.3 Use of TCP and Multicastonly accept responses inService Location The service location protocol requirestheimplementation of connectionless and a connection oriented transport protocols. The latterlanguage (see section 18) that isused for bulk transfer, only when necessary. Connections are always initiated by an agent request or registration, not by a replying Directory Agent. Theindicated by the ServiceLocation discovery mechanisms use internetwork wide multicast. The protocol will operateor Attribute Request. rsvd MUST be zero. Dialect Dialect tags are used in Service Location messages to indicate abroadcast environment with limitations detailedvariant of vocabulary used. Language Code Strings within the remainder of the message which follows are to be interpreted insection 9.0. 5.3.4 Multilingual Support All Service Registrations declarethe language encoded (see appendix A) inwhich thethis field. See also section 18. Character Encoding The characters making up stringsinwithin theservice attributes are written by specifyingremainder of theappropriate Veizades, Kaplan, Guttman, Perkinsmessage may be encoded in any standardized encoding (see section 18.1). Transaction Identifier (XID) The XID (transaction ID) field allows the requester to match replies to individual requests (see section 5.1). Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page7] INTERNET-DRAFT16] Internet Draft Service Location ProtocolMarch-96 code in the packet header. For each language the Service advertises a separate registration takes place. The Service needs to be unregistered only once since the information10 June 1996 When URLs are registered, they have lengths and lifetimes. These two values are associated withit will be unique. There can only be one servicethe URL for the duration ofa given type at a given address specification even if itthe registration. The triplet (length, lifetime, URL) isregistered in multiple languages. All Service Requests specifyknown as arequested language in"URL-entry", and has thepacket header.following format when used in Service Replies and Service Registrations: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Lifetime | Length of URL String | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <URL String> \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ TheDirectory Agent or Service Agent will respond in the same language as the request, if it has a registration in the same language as the request. If this language is not supported, a reply can be sent in the default language (which is English.)URL string conforms to RFC 1738 [7]. If the'monolingual bit' flagscheme used in theheader is set and the requested language isURL does notsupported,have aSrvRplystandardized representation, the minimal requirement is: service:<srvtype>://<addr-spec> The "SERVICE" string isnot returned: Instead return a SrvAck withtheerror field set to LANGUAGE_NOT_SUPPORTED. 5.3.5 Standard Attribute DefinitionsURL scheme of all ServiceTypes used with the service location protocol must describe the following:Location Information included in ServiceType string of the service Multicast address, if used Attributes (Tag and values) Attribute DescriptionsRegistrations andinterpretationsServiceTypes defined outside ofReplies. Each entry in theIANA standardization processReply willuse their own Naming Authority string and, possibly,always have amulticast address from<srvtype>. It may also include an <addr-spec> except in theunassigned range. Ifcase of a reply to a Service Typedoes not define its own multicast address,request (see section 8). 5.1. Use of Transaction IDs (XIDs) Retransmission is used to ensure reliable transactions in the Service LocationGeneral Multicast address is used, as the default. Services which advertiseProtocol. If aparticularUser Agent or ServiceType must supportAgent sends a message and fails to receive an expected response, thecomplete setmessage will be sent again. Retransmission ofstandardized attributes. They may support additional attributes, beyondthestandardized set. Unrecognized attributes should be ignored by User Agents. Service Type names which begin with 'x-' are guaranteed not to conflict with any officially registered Service Type names.same service location datagram should not contain an updated XID. It issuggested that this prefix be used for experimentalquite possible the original request reached the DA orprivate Service Type names. Similarly, attribute names which begin with 'x-' are guaranteed notSA, but reply failed to reach the requester. Using the same XID allows the DA or SA to cache its reply to the original request and then send it again, should a duplicate request arrive. This cached information should only beused for any officially registered attribute names. 5.3.6 Naming Authority The Naming Authority ofheld very briefly (CONFIG_INTERVAL_0.) Any registration or deregistration at a Directory Agent, or change of servicedefinesinformation at a SA should flush this cache so that thesemantic meaning ofinformation returned to theService Types and attributes registered with and provided by Service Location. The Naming Authority itself is a string which uniquely identifies an organization. If no string is provided IANAclient is always valid. The requester creates thedefault. Naming Authorities may define Service Types which are experimental, proprietary orXID from an initial random seed and increments it by one forprivate use.each request it makes. TheprocedureXIDs will eventually wrap back to zero and continue incrementing from there. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 17] Internet Draft Service Location Protocol 10 June 1996 Directory Agents use XID values in their DA Advertisements to indicate their state (see section 16.2). 5.2. URL Entry Lifetime The Lifetime field is set tocreatethe number of minutes the reply can be cached by any agent. A value of 0 means the information must not be cached. User Agents MAY cache service information, but if they do, they must provide a'unique' Naming Authority stringway for applications to flush this cached information andthen specifyissue theStandard Veizades, Kaplan, Guttman, Perkins [Page 8] INTERNET-DRAFT Service Location Protocol March-96 Attribute Definitions as described above. This Naming Authorityrequest directly onto the network. Services should be registered with DAs with a Lifetime, the suggested value being CONFIG_INTERVAL_1. The service must be reregistered before this interval elapses, or the service advertisement willaccompany registrationno longer be available. Thus, services which vanish andqueries, as described below. 5.3.7 No Synchronous Assumption Therefail to deregister eventually become automatically deregistered. 6. Service Request Message Format The Service Request isno requirement that one transaction complete beforeused to obtain URLs from agiven host begins another. An agent may have multiple outstanding transactions, initiated either using UDPDirectory Agent orTCP. 5.4ServiceLocation PDU header NOTE:Agents. Thefollowing header is used in allformat of thepacket descriptions below andService Request isabbreviated by using "Service location header" followed by the function being used.as follows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |versionService location header (function =1SrvReq) |function+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length|of prev responder list |<Previous Responders Addr Spec>| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Error Code |O|M| flags|char encoding\ <Previous Responders Addr Spec> \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Time| \ Service Request <predicate> \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The <Previous Responders Addr Spec> is described in sections 8 and 21.1. After a User Agent restarts (say, after rebooting of a system, loading of the network kernel), Service Requests should be delayed for some random time uniformly distributed within a one second Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 18] Internet Draft Service Location Protocol 10 June 1996 interval centered about a configured delay value (by default, CONFIG_INTERVAL_4). The Service Request allows the User Agent to specify the Service Type of the service and a Predicate in a specific language. The general form of a Service Request is shown below: <srvtype>[.<na>]/[<scope>]/[<where>]/ The punctuation is necessary even where the fields are omitted. - The <srvtype> refers toLive | XID | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Language Code | Reserved (Language Dialect) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 5.4.1 Versionthe Service Type. For each type of service available, there is a unique Service type name string. See section 21.3.1. - The <na> is the Naming Authority. Thisprotocol document defines version 1string determines the semantic interpretation of the attribute information in the <where> part of theservice location protocol. 5.4.2 FunctionsServicelocation datagrams can be identified asRequest. - The <scope> is a string used totheir operation byrestrict thefunction field.range of the query. Scope is determined administratively, at a given site. It is not necessarily related to network topology (see Section 17). Leaving this field out means that the request can be satisfied under any scope. - Thefollowing are<where> string is thedefined operations: Packet Type Abbreviation Function Value Service Request SrvRqst 1 Service Reply SrvRply 2 Service Registration SrvReg 3 Service Unregister SrvUnreg 4 Service Acknowledge SrvAck 5 Attribute Request AttrRqst 6 Attribute Reply AttrRply 7 5.4.3 LengthWhere Clause of the request. It contains query which specify which service instances the User Agent is interested in. Thelengthquery includes attributes, boolean operators and relations. (See section 6.3.) In the case of a multicast request, a list of previous responders is sent. This list will prevent those in thenumberlist from responding, to be sure that responses from other sources are not drowned out. The request is multicast repeatedly (with a recommended wait interval ofbytes afterCONFIG_INTERVAL_2) until there are no new responses, or a certain time (CONFIG_INTERVAL_3) has elapsed. In order for a request to succeed in matching registered information, the following conditions must be met: 1. The result must have the same ServiceLocation Header. 5.4.4 Error Codes Error codes may onlyType as the request. 2. It must havea nonzero value in a SrvRply and a SrvAck. Veizades, Kaplan, Guttman, Perkinsthe same Naming Authority. 3. It must have the same Scope (unless the <scope> of the request was omitted.) Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page9] INTERNET-DRAFT19] Internet Draft Service Location ProtocolMarch-96 5.4.5 Transaction Identifier (XID)10 June 1996 4. TheXID (transaction ID) field allowsconditions specified in therequester toWhere Clause must matchreplies to individual requests. A Service Reply will containthesame XID asattributes and keywords registered for the service. 6.1. ServiceRequest. ARequest Usage The User Agent may form ServiceAcknowledge will contain the same XID asRequests using preconfigured knowledge of a Service Type's attributes. It may also issue Attribute Requests to obtain the attribute values for a ServiceRegister or Unregister. Retransmission ofType before issuing Service Requests (see Section 13). Having obtained thesameattributes which describe a particular kind of servicelocation datagram should not contain an updated XID. The requester creates the XIDfrom aninitial random seed and increments it by one for each request it makes. The XIDs will eventually wrap backAttribute Request, (or using configured knowledge of a service's attributes,) the User Agent can build a predicate that describes the service needs of the user. Service Requests may be sent directly tozero and continue incrementing from there. 5.4.6 Flags The flags fielda Directory Agent. Suppose a printer supporting the lpr protocol is needed on the 12th floor which has UNRESTRICTED_ACCESS and prints 12 pages per minute. Suppose further that abit field. Bit 0Attribute Request indicates that there is a printer on the'Overflow bit.' See Section 7.0 for12th floor, a printer that prints 12 pages per minute, and acomplete description forprinter that offers UNRESTRICTED_ACCESS. To check whether they are same printer, issue theuse of this field. Bit 1following request: lpr://(& (PAGES PER MINUTE==12) (UNRESTRICTED_ACCESS) (LOCATION==12TH FLOOR))/ Suppose there isthe 'Monolingual bit.' Requestsno such printer. The Directory Agent responds withthis bit set indicatea Service Reply with 0 in the number of responses and no reply values. The User Agentwill only accept responses in the language that is indicated bythen tries a less restrictive query to find a printer, using theService or Attribute Request. Replies in other languages should not be sent for12th floor as "where" criteria. lpr://(LOCATION==12TH FLOOR)/ In thisrequest. All other bits must be set to zero. 5.4.7 Time to Livecase, there is now only one reply: Returned URL: service:lpr://igore.wco.ftp.com:515 Returned Attrs: ((PAGES PER MINUTE = 3),(PROTOCOL=LPR,PCNFS)) TheTTL fieldAddress Specification for the printer is: igore.wco.ftp.com:515. This isset tothenumberlocation ofminutesthereply canprinter. Files would becachedprinted byany intermediary service. A valuespooling to that port on that host. In the absence of0 meansa Directory Agent, theinformation must notrequest above could becached. User Agents mustmulticast. In this case it would be sent to the printer Multicast Address and notcacheto the Directory Agent. Serviceinformation. Requests by a User Agent must be issued directly ontoVeizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 20] Internet Draft Service Location Protocol 10 June 1996 Agents that can satisfy thenetwork. 5.4.8 Character Encoding The encodingpredicate willdeterminereply. Service Agents which cannot support theinterpretationcharacter set of the request MUST return CHARSET_NOT_UNDERSTOOD in the SrvTypeRply. In allcharacter dataother circumstances, Service Agents whichfollows. There is nocannot satisfy the reply do not send any reply at all. The only wayto mix ASCII and UNICODE, for example. Values for character encodinga User Agent can befound in the Internet Assigned Numbers Authority's (IANA) database http://www.isi.edu/in-notes/iana/assignments/character-sets and havesure there are no services which match thevalues referedquery is by retrying theMIBEnum value. 5.4.9 Language Code The language code (see Appendix A) is encoded in this field. ALL strings withinrequest (CONFIG_INTERVAL_8). If no response comes, thepacket which followsUser Agent gives up and assumes there areto be interpreted in this language. Some strings,no suchasprinters. Another form of query is a simpler 'join' query. Its syntax has no parentheses or logical operators. Each term is conjoined (AND-ed together.) Rewriting the initial query provides an example: lpr://PAGES PER MINUTE==12, UNRESTRICTED_ACCESS, LOCATION==12TH FLOOR/ 6.2. Directory Agent Discovery Request Normally a ServiceType names, have standard definitions. These strings should be considered as tokens and not as words inRequest returns alanguageService Reply. The sole exception tobe translated. This will be noted where appropriate throughoutthisdocument. The language dialect fieldisreserved for future use. 5.5a Service Requestand Reply Thefor the Service Type "directory-agent". This Service Request isused to obtain nearly all information in the Veizades, Kaplan, Guttman, Perkins [Page 10] INTERNET-DRAFTanswered with a DA Advertisement. Without configured knowledge of a Directory Agent (DA), a User Agent or ServiceLocation Protocol March-96Agent uses a ServiceLocation Protocol. It isRequest to discover ageneral mechanismDA. (See section 16.1 for mechanisms by which a client may be configured to have knowledge of a DA.) Such a Service Request used fordeliveringDirectory Agent Discovery includes a predicate of the form: directory-agent:/// This query is always sent toathe Directory AgentorDiscovery multicast address. The ServiceAgents. Depending on the formatType ofthe query, different information can be obtained. There are three ways the Service Query may be used:a Directory AgentDiscovery Request, ais "directory-agent", hence it is the Service TypeRequest and a Services Discovery Request. These are describedused in thesections which follow. Thererequest. No scope isan additional mechanism for determiningincluded in therange of service attributes. Thisrequest, since the query is global in scope. No Naming Authority is included, so "IANA" is assumed. We want to reach all theAttribute Request. Itavailable directory agents. If the scope were supplied, only DAs supporting that scope would reply. Replies may arrive from different sources, similar in form to: URL returned: directory-agent://slp-resolver.catch22.com Scope returned: ACCOUNTING Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 21] Internet Draft Service Location Protocol 10 June 1996 URL returned: directory-agent://204.182.15.66 Scope returned: JANITORIAL SERVICES If the goal isusedmerely toobtaindiscover any Directory Agent, thetags and values of attributes whichfirst reply willbe useddo. If the goal, however, is toformulate Service Discovery Requests. Whilediscover allof these types of queries mayreachable DAs, the request must beuseful,retransmitted after an interval (the recommended time is CONFIG_INTERVAL_5). This retransmitted request will include a list of DAs which have already responded. See sections 8 and 21.1. Directory Agents which receive the request will onlyone which is essential isrespond if they are not on this list. After there are no new replies, all DAs are presumed to have been discovered. If a DA fails to respond after CONFIG_INTERVAL_6 seconds, the UA or ServiceDiscovery Request.Agent should use a different DA. DA addresses may be cached from previous discovery attempts, preconfigured, or by use of DHCP (see section 16.2). If no such DA responds, DA discovery should be used to find aUser Agent has enough a priori knowledge of what it is looking fornew DA. Only after CONFIG_INTERVAL_7 seconds should itcan simply issue a Service Discovery Requestbe assumed that no DA exists and multicast based Service Requests should bedone with it. The pointused. 6.3. Explanation ofthe other requests is to allow a User Agent to formulate a query when itTerms of Predicate Grammar A predicate haslimited or noapriori knowledge of the services availablesimple structure, which depends on parentheses, commas andtheir attributes. The Service Request allows the User Agentslashes tospecifydelimit theService Typeelements. Examples of proper usage are given throughout this document. The terms used in theservice and a Predicategrammar are as follows: predicate: Placed in aspecific language. The general form of aServiceRequestRequest, this isshown below: SERVICE TYPE[.NAMING AUTHORITY]:/SCOPE/SELECT CLAUSE/WHERE CLAUSE/ Briefly, the SERVICE TYPE of the serviceinterpreted by a Service Agent or Directory Agent to determine what information to return. scope: If this is absent in aunique service type name. The NAMING AUTHORITY determinesService Request, thesemantic interpretationrequest will match any service regardless of scope. If it is present, only services registered under that scope will match theSERVICE TYPE and the attributes used inrequest. where-clause: This determines which services theSELECT and WHERE CLAUSE.request matches. An empty where-clause will match all services. TheSCOPE is used for range of the query (SCOPEs are determined administratively, not by network topology asrequest will bedescribed later.) The SELECT CLAUSE lists which attributeslimited toreturn with the reply. The WHERE CLAUSE contains the attributesservices whichdeterminehave theinstances ofspecified Service Type, so theservice (identified bywhere-clause is not theSERVICE TYPE)sole factor in picking out which services match the request.In the case of a multicast request, a list of previous responders is sent. This list will prevent those in the list from responding, to be sure that responses from other sources are not drowned out.Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 22] Internet Draft Service Location Protocol 10 June 1996 where-list: Therequestwhere-list ismulticast repeatedly (witharecommended wait interval oflogical expression. It can be asecond) until there are no new responses, orsingle expression, acertain time has elapsed. The User Agent may configuredisjunction or acertain 'time out' durationconjunction. A single expression must apply forexample, withtheService Location implementation orwhere-clause to match. A disjunction matches if any expression in thecase where the User Agent doesn't need ALLOR list matches. A conjunction matches only if all elements in thereplies, as when any one service will do. In order forAND list match. Note that there is no logical negation operator: This is because there is no notion of returning "everything except" what matches arequest to succeed in matching registered information 4 conditions mustgiven criteria. A where-list can bemet: (1). The result must have the same Service Type as the request. (2). It must havenested and complex. For example, thesame Naming Authority. (3). Itfollowing requires that three subexpressions musthave the same Scope. (4). The conditions specifiedall be true: (& (| <query-item> <query-item>) <query-item> (& <query-item> <query-item> <query-item>) ) Notice that white space, tabs or carriage returns can be added anywhere outside query-items. Each list has 2 or more items in it, and lists can be nested. Services which fulfill theWHERE CLAUSE mustentire logical expression match theattributeswhere-clause. '(' '|' <query-item> ')' andkeywords registered for'(' '&' <query-item> ')' are degenerate expressions but they should be tolerated. They are equivalent to <query-item>. query-item: A query item has theservice. Veizades, Kaplan, Guttman, Perkinsform: '(' <attr-tag> <comp-op> <attr-val> ')' or '(' <keyword> ')' Examples of this would be: (SOME ATTRIBUTE == SOME VALUE) (RESERVED) (QUEUE LENGTH <= 234) Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page11] INTERNET-DRAFT23] Internet Draft Service Location ProtocolMarch-9610 June 1996 query-join: Theformatquery-join is a comma delimited list of conditions which theService Requestservice must satisfy in order to match the query. The items are considered to be logically conjoined. Thus the query-join: ATTR1=VALUE1, KEYWORD1, KEYWORD2, ATTR2>=34 is equivalent to the where-list: (& (ATTR1=VALUE1) (KEYWORD1) (KEYWORD2) (ATTR2>=34)) The query-join cannot be mixed with a where-list. It is provided asfollows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service location header (function = SrvRqst) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |numbera convenient mechanism to provide a statement ofprevious responders |<Previous Responders Addr Spec>| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <Previous Responders Addr Spec> \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <Service Request Predicate> \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+necessary conditions without building a logical expression. 6.4. Service RequestUser Agent requests thatPredicate Grammar Service Requests can precisely describe the services they need by including a Predicate the body of the Request. This Predicate must be constructed according to the grammar below. <predicate> ::= <srvtype>['.'<na>]'/'<scope>'/'<where>'/' <srvtype> ::= string representing type of service. Only 'a' to 'z', 'A' to 'Z', '+' and '-' are allowed. <na> ::= string representing the Naming Authority. Only characters from 'a' to 'z', 'A' to 'z', '+' and '-' aregenerated by a genesis event, i.e.,allowed. If this field is omitted then "IANA" is assumed. <scope> ::= string representing therebootingdirectory agent scope. '/', ',' (comma) and ':' are not allowed in this string. The scopes "LOCAL" and "REMOTE" are reserved. <attr-tag> ::= class name ofa system, loadingan attribute of a given Service Type. This tag cannot include thenetwork kernel, etc. should be sent afterfollowing characters: '(', ')', ',', '=', '!', '>', '<', '/', '*', except where escaped (see 18.1.) <keyword> ::= arandom interval between 0 and 3 seconds. The general formclass name of anindividual reply is as follows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length of URLattribute which will have no values. This string has the same limits as the <attr-tag>. In addition white space internal to the keyword is illegal. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 24] Internet Draft Service Location Protocol 10 June 1996 <where> ::= <where-any> |<URL String> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |<where-list> |\ <URL String>, Continued. \<query-join> <where-any> ::= That is NOTHING or white space. <where-list> ::= '(' '&' <where-list> <query-list> ')' | '(' '|' <where-list> <query-list> ')' |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+'(' <keyword> ')' '(' <attr-tag> <comp-op> <attr-val> ')' <query-list> ::= <where-list> |Length of Attributes String<where-list> <query-list> <query-join> ::= <keyword> |<Attributes String><join-item> |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<query-join> ',' <keyword> | <query-join> ',' <join-item> <join-item> ::= <attr-tag> <comp-op> <attr-val> <comp-op> ::= "!=" |\ <Attributes String>, Continued. \"==" | '<' |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The URL"<=" | '>' | ">=" <attr-val> ::= any stringconforms to RFC 1738. If(see Section 21.5 for theService Type doesways in which attr-vals are interpreted.) Value strings may nothave a standardized representation, the minimal requirement is: service:service-type:// ADDRESS SPECIFICATION / The reply will alwayscontainthe Service Type and the ADDRESS SPECIFICATION. The Keywords'/', ',' '=', '<', '>', except where escaped (see 18.1.). '(' andAttributes String')' maynotbeincluded, if there were no attributes returned asused in attribute values for theresultpurpose of encoding a binary values. Binary encodings (See Section 10.3) may include thequery. Attributesabove reserved characters. 6.5. String Matching for Requests All strings areincluded in the reply dependingcase insensitive, with respect to string matching on queries. All preceding or trailing blanks should not be considered for a match, but blanks internal to a string are relevant. For example " Some String " matches "SOME STRING" but not "some string". String matching may only be performed over the same character sets. If a query cannot be satisfied due to a lack of service information in the"select clause"character set of thequery. A NULL "SELECT CLAUSE" will not include any attribute Veizades, Kaplan, Guttman, Perkinsrequest a CHARSET_NOT_SUPPORTED error is returned. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page12] INTERNET-DRAFT25] Internet Draft Service Location ProtocolMarch-96 information. A LIST selection will specify which attributes to return information about. A WILD selection will return information about all attributes. (See Section 5.7.) If attributes10 June 1996 String comparisons (using comparison operators such as '<' or '>=') arereturneddone using lexical ordering in thestring takescharacter set of theform (with arbitrarily many attributesregistration, not using any language specific rules. The ordering is strictly by the character value, i.e. "0" < "A" is true when the character set is US-ASCII, since "0" has the value of 48 andvalues): (ATTR1 = VAL), Keyword1,(ATTR2 = VAL1, VAL2), KEYWORD2 TTLs are not returned in"A" has the value 65. String matching is done after escape sequences have been substituted. See sections 18, 6.3, 18.1. 7. ServiceReplies.Reply Message Format The format ofathe Service Reply Message is: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service location header (function = SrvRply) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Code | number of replies returned |<Reply 1> |+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |<Reply 1> (cont.)<URL Entry>-1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | . | \ . \ | . | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |<Reply N><URL Entry>-N | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Each Service Reply5.6 Directory Agent Discovery Request Without a priori knowledgemessage is composed of aDirectory Agent (DA), a User Agent, Service Application or Service Agent uses a Service Request to discover a DA. (See section 6.1 for a priori mechanisms for knowledgelist of URL Entries. The Error Code may have one ofa DA.) This request is generated bytheUser Agent or Service Agentfollowing values: 0 Success LANGUAGE_NOT_SUPPORTED A SA orService Application in order to discoverDA returns this when aDirectory Agent. Thisrequest is received from anormal Service Request. The Service Request predicate used for Directory Agent Discovery takes the form: DIRECTORY-AGENT//SCOPE// This queryUA which isto the Directory Agent multicast address. The Service Type ofin aDirectory Agent is 'DIRECTORY-AGENT', hence itlanguage for which there istheno registered ServiceType used in the request. No scope is included in the request, sinceInformation and thequery is GLOBAL in scope. No Naming Authority is included, so 'IANA' is assumed. We want to reach allrequest arrived with theavailable directory agents. The query selects "SCOPE", so SCOPE attribute information will be returned, if there is any. The where clauseMonolingual bit set. See Section 18. PROTOCOL_PARSE_ERROR A SA or DA returns this error when a SrvReq isempty in the query, so all DAs will match the request. Veizades, Kaplan, Guttman, Perkins [Page 13] INTERNET-DRAFT Service Location Protocol March-96 The replies may arrive from different sources. They willreceived which cannot besimilar to: URL returned: SERVICE:DIRECTORY-AGENT://slp-resolver.catch22.com Attrs returned: (SCOPE=Accounting) URL returned: SERVICE:DIRECTORY-AGENT://204.182.15.66 Attrs returned: (SCOPE=Janitorial Services) If the goalparsed. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 26] Internet Draft Service Location Protocol 10 June 1996 SCOPE_NOT_SUPPORTED A DA which ismerelyconfigured todiscover any Directory Agent, the first replyhave a scope willdo. If the goal, however,return this error if it receives a request which is set to have a scope which it does not support. An SA will not return this error, it will simply not reply todiscover all reachable DAs,the multicast request. CHARSET_NOT_UNDERSTOOD If the DA or SA receives a requestmust be retransmitted after an interval (the recommended time is 3 seconds.) This retransmitted request will includeor registration in alist of DAscharacter set whichhave already responded. Thisit does not support, it will return this error. Each <URL Entry> in the listtakeshas thesameformasdefined at thelist of DAs above: a seriesend ofSERVICE:DIRECTORY-AGENT://ADDRESS SPECIFICATION/ strings. Directory Agents which receive Directory Agent requests will only respond if they are not on this list. After there are no new replies, all DAs are presumed toSection 5. The URL strings in the reply havebeen discovered. 5.7no delimiters between them, other than the length fields. The length fields indicate where the strings end. 8. Service Type Request Message Format TheUser Agent may use theService Type Request is used tofinddetermine all the types of servicesthat are availablesupported on a network. Theformat of the Service Type Request is special in that it specifies no Service Type for the service type. Instead a '*' is used to denote a wild card.' Therequestmayshould be sent directly toany Directory Agent. This will return all the Service Types thata DA (though itknows about. The requestmay also be sent to the Service Location General MulticastAddress,Address), in order to find out all services available on theUser Agent's internetsite network (which are advertised by Directory Agents and Service Agents.)A client canIf no DA is available, a User Agent MAY issue more than one request to insure that all replies have been received. In each subsequent request, a User Agentadds the list ofincluded those Service Types that it is aware of. When no new replies arrive within CONFIG_INTERVAL_3 from a request, the User Agent can presume that it has acquired a complete set of available Service Types.*//SA Multicast Address// * is the wild cardVeizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 27] Internet Draft ServiceType.Location Protocol 10 June 1996 TheNamingformat of a Service Type Request is: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service location header (function = SrvTypeRqst) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length of prev resp string |<Previous Responders Addr Spec>| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <Previous Responders Addr Spec> \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length of naming authority | <Naming Authorityis not included so 'IANA' is assumed. There is no scope specified in this example, as theString> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <Naming Authority String>, continued \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length of scopeis GLOBAL (ie. all Service Agents will respond.) The SELECT CLAUSE requestsstring | <Scope String> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <Scope String>, continued \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Note that theSA Multicast Address be returned. This will allow multicast queries in the future. Finally, the WHERE CLAUSE is empty so the request will match all services. Replies are sent by Directory Agents (and Service Agents, in the case where the request<Previous Responders Addr Spec> ismulticast.) These replies takea comma delimited list. (See section 21.1.) The 'length of prev responder list' field indicates theform: Veizades, Kaplan, Guttman, Perkins [Page 14] INTERNET-DRAFT Service Location Protocol March-96 URL returned: service:printer:// Attributes returned: (SA Multicast Address=224.0.3.10) URL returned: service:http:// Attributes returned: (SA Multicast Address=224.0.3.24) URL returned: service:nfs-server:// Attributes returned: (SA Multicast Address=224.0.3.115) NOTE: These multicast addresses are examples only,length of theofficial numbers have not yet been assigned atcomma delimited list string. A previous responder list with 3 elements takes thistime. The service URL defines the type of service.form: <addr-spec>,<addr-spec>,<addr-spec> TheSA Multicast Address attribute definesNaming Authority, if included, will limit themulticast address which can be usedreplies tosend queriesService Type Requests to ServiceAgentsTypes whichadvertisehave theService Type. Onlyspecified Naming Authority. If this field is omitted (i.e., theSA Multicast addresslength field isreturned, since only that was selected. All Service Types were returned sincezero), thewhere-clause was NULL.default Naming Authority ("IANA") is assumed. If theUser Agentlength field isalready aware of certain Service Types, as in the case where it has already received several replies, but wants to be sure that-1, service types from allService Typesnaming authorities arediscovered, another request is multicast, with a selection specifying which Service Type information it is NOT interested in, as: *//SA Multicast Address/(& (SERVICE TYPE != PRINTER) (SERVICE TYPE != HTTP) (SERVICE TYPE != NNTP) (SERVICE TYPE != NFS-SERVER))/ Only Directory Agents or Service Agents which have services other than these four types will respond to the request.requested. TheNaming Authority is implicitly 'IANA' as none was specified, so only services registered under this Naming AuthorityScope String Field, if included, willhave their information returned. To request all services which exist under a different Naming Authority such as, say, IBM, the following query would be used: *.ibm//SA Multicast Address/()/ 5.8 Attribute Request and Attribute Reply Once a User Agent selects a single Service Type, it may issue a "get attributes request"limit replies tofind all the attributes associated with thatServiceType. Since different instances of a given service can, and very likely will,Types which havedifferent values fortheattributes defined by the Service Type, the User Agent must form a union of all attributes returned byspecified Scope. If this field is omitted, allservice Agents. The Attribute information will be used to formServiceQueries. Veizades, Kaplan, Guttman, PerkinsTypes (from the specified Naming Authority) are returned. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page15] INTERNET-DRAFT28] Internet Draft Service Location ProtocolMarch-96 It10 June 1996 9. Service Type Reply Message Format The Service Type Reply has the followingform:format: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service location header (function =AttrRqst)SrvTypeRply) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Multicast Address | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+|number| Error Code | number ofprevious responders |<Previous Responders Addr Spec>|service types | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \<Previous Responders Addr Spec>, continued<Service Type Item>-1 \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | . . . | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <Service TypeString>Item>-N \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Attribute Request If sent to a Directory Agent, the numberThe format ofprevious respondersa Service Type Item iszero and there are no Previous Responder Address Specification. These fields are only used for repeated multicasting, exactlyasfor the Service Request. The replies take the form:follows: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length of Servicelocation header (function = AttrRply)Type String | <Service Type String> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \<Attribute List><Service Type String>, continued \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length of addr spec string | <addr spec> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <addr spec>, continued \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Theattribute list has the same form as the attribute list at the endError Code may have one ofa reply. For example, an Attribute Request for "printer" might elicitthe followingreply (UNRESTRICTED_ACCESS is a keyword): (PAPER COLOR=WHITE,BLUE), (PAPER SIZE=LEGAL,LETTER,ENVELOPE,TRACTOR FEED), UNRESTRICTED_ACCESS, (PAGES PER MINUTE=1,3,12), (LOCATION=12th floor, outside deb's cube), (PROTOCOL=LPR, PCNFS), (QUEUES=LEGAL,LETTER,ENVELOPE,LETTER HEAD) Veizades, Kaplan, Guttman, Perkinsvalues: 0 Success Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page16] INTERNET-DRAFT29] Internet Draft Service Location ProtocolMarch-96 5.9 Service Discovery Request Having obtained the entire list of attributes used to describe a particular kind of service from a Get Attributes Request, (or using a priori knowledge of a service's attributes,) the User Agent can build a predicate that describes the service needs of the user. This query10 June 1996 PROTOCOL_PARSE_ERROR A SA or DA returns this error when a SrvTypeRqst issent directlyreceived which cannot be parsed. SCOPE_NOT_SUPPORTED A DA which is configured to have aDirectory Agent. Following the example of the last section, supposescope will return this error if it receives aprinter is needed on the 12th floorSrvTypeRqst whichhas UNRESTRICTED_ACCESS and prints 12 pages per minute. The response shown above from the Get Attribute Request indicates that thereis set to have aprinter on the 12th floor and that there is one that prints 12 pages per minute, and one that is UNRESTRICTED. To check whether they are one andscope which it does not support. An SA will not return this error, it will simply silently discard thesame printer, issuemulticast request. CHARSET_NOT_UNDERSTOOD If thefollowing request: printer//PROTOCOL/(& (PAGES PER MINUTE==12) UNRESTRICTED_ACCESS (LOCATION==12th floor))/ Suppose there is no such printer. The Directory Agent responds withDA receives aService Reply with 0SrvTypeRqst inthe number of responses and no reply values. The User Agent then tries a less restrictive query to findaprinter, using the 12th floor as "where" criteria, but selecting the PAGES PER MINUTE attribute, to find out how slowcharacter set which itwill be and whetherdoes not support, ithas UNRESTRICTED_ACCESS: printer//PROTOCOL,PAGES PER MINUTE,UNRESTRICTED_ACCESS/ (LOCATION==12th floor)/ InMUST thiscase, there is now only one reply: Returned URL: service:printer://igore.wco.ftp.com:515 Returned Attrs: ((PAGES PER MINUTE = 3),(PROTOCOL=LPR,PCNFS))error. TheAddress Specification for the printer is: igore.wco.ftp.com:515. This is the location of the printer. Files would be printed by spooling to that port on that host. Note that the keyword was not returned. Thisservice type's name is provided in thecase because this particular printer did not have this keyword (it does *not* have UNRESTRICTED_ACCESS.) In<Service Type String>. See section 21.3.1 for theabsenceformal definition ofa Directory Agent, the request above could be multicast. Inthiscase it would be sent tofield. The <addr spec> format is described in 21.4. This field provides theprinterservice specific multicast address. If the service specific multicast address is omitted, the General Service Location Multicast Address is assumed. User Agents may then use this multicast address for issuing Service andnotAttribute Requests directly tothe Directory Agent address above.SAs. Example ServiceAgents that can satisfy the predicate will reply.Type Replies might be: Multicast Address ServiceAgents which cannot satisfyType String 224.0.3.10 service:lpr:// 224.0.3.24 service:http:// 224.0.3.115 service:nfs:// NOTE: These multicast addresses are examples only, thereply doofficial numbers have notsend any reply at all. The only wayyet been assigned. 10. Service Registration Message Format After aUserService Agentcan be sure there are nohas found a Directory Agent, it begins to register its advertised serviceswhich matchone at a time. A Service Agent must wait for some random time uniformly distributed within thequery isrange specified byretrying the request (say 3 times, 3 seconds apart). If no response comes,CONFIG_INTERVAL_11 before registering again. Registration is done using theUserService Registration message specifying all attributes for a service. A Directory Agentgives up and assumes there are no such printers. Veizades, Kaplan, Guttman, Perkinsmust acknowledge each service registration request. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page17] INTERNET-DRAFT30] Internet Draft Service Location Protocol 10 June 1996 The format of a Service Registration is: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ServiceLocation Protocol March-96 Another formlocation header (function = SrvReg) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <URL-Entry> \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length ofquery is a simpler 'join' query. Its syntax has no parentheses or logical operators. Each termAttr List String | <attr-list> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <attr-list>, Continued. \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The <URL-Entry> isconjoined (AND-ed together.) Rewritingdefined at theinitial query provides an example: printer//PROTOCOL/PAGES PER MINUTE==12, UNRESTRICTED_ACCESS, LOCATION==12th floor/ One final note: The select fieldend ofthe query is used to control how much informationSection 5. The <attr-list> isreturned by the Directory Agent or Service Agent. As described in fulldefined in Section11.1.2, there are 3 ] different selections possible. A NULL selection will return no attribute information, merely a21.2. ServiceType, the Address Specification. A LIST selection specifies which attributes should be returned. Finally, a WILD selection can be sent, which will return all attributes/values. This WILD selectionregistration mayproduceuse alarge reply, soconnectionless protocol (e.g. UDP), or aTCPconnection oriented protocol (e.g. TCP). If the registration operation mayneed tocontain more information than can beestablished. Refersent in one datagram, the Service Agent MUST use a connection oriented protocol toSection 7.0register itself with the DA. When a Service Agent registers the same attribute class more than once fordetails. 6.0 Directory Agents 6.1 Introduction Aa service instance, the Directory Agentacts on behalfoverwrites the all the values associated with that attribute class for that service instance. Separate registrations must be made for each language that the service is to be advertised in. An example ofmanyService Registration information is: Lifetime (minutes): 16-bit unsigned integer URL (at least): service:<srvtype>://<addr-spec> Attributes (if any): (ATTR1=VALUE),KEYWORD,(ATTR2 = VAL1, VAL2) In order to offer continuously advertised services, Service Agentsandshould start the reregistration process before the Lifetime they used in the registration expires. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 31] Internet Draft ServiceApplications. It acquires information from them and acts as a single pointLocation Protocol 10 June 1996 An example ofcontact to supply that information to User Agents.a service registration (valid for one day) is as follows: Lifetime: 1440 URL: service:lpr://igore.wco.ftp.com:515 Attributes: (SCOPE=DEVELOPMENT), (PAPER COLOR=WHITE), (PAPER SIZE=LETTER), UNRESTRICTED_ACCESS, (LANGUAGE=POSTSCRIPT, HPGCL), (LOCATION=12 FLOOR) Thequeriessame registration could be done again, as shown below, in German; however, note thata User Agent multicasts to Service Agents (in"lpr", "service", and "SCOPE" are reserved terms and will remain in the language they were originally registered (English). Lifetime: 1440 URL: service:lpr://igore.wco.ftp.com:515 Attributes: (SCOPE=ENTWICKLUNG), (PAPIERFARBE=WEISS), (PAPIERFORMAT=BRIEF), UNBEGRENTZTER_ZUGANG, (DRUECKERSPRACHE=POSTSCRIPT,HPGCL), (STANDORT=11 ETAGE) Registrations must contain anenvironment without a Directory Agent)Attribute of SCOPE unless they are unscoped and then they must be registered with all directory agents. In thesame queries thatexample above, theUser Agent unicastsSCOPE is set to DEVELOPMENT (in English) and ENTWICKLUNG (in German). Recall that all strings in a message must be in one language, which is specified in the header. The string SCOPE is *not* translated, as it is one of the reserved strings in the Service Location Protocol (see section 4.3.) The DirectoryAgent. A UserAgent maycache information aboutreturn a server error in thepresenceacknowledgment. This error is carried in the Error Codes field ofalternatethe service location message header. A DirectoryAgentsAgent MUST decline touse in caseregister aselectedservice if it is specified with an unsupported Scope. A Directory Agentfails. When scaling service location systems to the size of a campus,SHOULD always accept Service Registrations which have no Scope. In this case acentral repositorySCOPE_NOT_SUPPORTED error isadded to limit the amount of general queriesreturned in thenetwork infrastructure.SrvAck. An unscoped service registration will match all requests. Asite may also grow to suchrequest which specifies asizecertain scope will therefore return services which have thatitscope and services which are unscoped. It isnot feasible to maintain onlystrongly suggested that onecentral repository of service information. In this case more Directory Agents are needed. Multiple Directory Agents are supported withinshould use scopes in all registrations or none. See Sections 17 and 4.7 for details. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 32] Internet Draft Service Location Protocol 10 June 1996 11. Service Acknowledgement Message Format A Service Acknowledgement is sent as theframeworkresult ofthis protocol. Each Service Agent or application may register with eacha DA receiving andhosts may chooseprocessing aDA to use. Directory Agents, inService Registration or Service Deregistration. An acknowledgment indicating success must have thefuture, may use mechanisms outside of this protocolerror code set tocoordinate the maintenance ofzero. Once a DA acknowledges adistributed database ofservicelocation information, and thus scaleregistration it makes the information available toenterprise networks or larger administrative domains. 6.2 Directory Agent Discovery A User orclients. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ServiceAgentlocation header (function = SrvAck) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Code | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Error Code may have one of the following values: 0 Success PROTOCOL_PARSE_ERROR A DA returns this error when the SrvReg orService Application maySrvDereg could not bestatically configured to useparsed. INVALID_REGISTRATION A DA returns this error when aparticular DA. ThisSrvReg isdiscouraged unless the application resides on a network where any form of multicastinvalid (it parses badly orVeizades, Kaplan, Guttman, Perkins [Page 18] INTERNET-DRAFT Service Location Protocol March-96 broadcastisimpossible. Alternatively, a hostpoorly formed in some way.) SCOPE_NOT_SUPPORTED A DA whichuses DHCP may use itis configured toobtainhave aDirectory Agent's address. A DHCP optionscope willbe assigned for this purpose. It has not yet been, at the timereturn thisdocument was written. The third way to discover DAs is dynamically. This occurs actively by sending outerror if it receives aDirectory Agent Discovery request. Lastly, the agent may be informed passively as follows: WhenSrvReq which is set to have aDirectory Agent first comes on-linescope which itsends an unsolicited Service Reply to the general service location multicast address.does not support. CHARSET_NOT_UNDERSTOOD Ifathe DAsupportsreceives aparticular scopeSrvReg orset of scopes these are placedSrvDereg inthe reply. The class for this attribute is 'SCOPE'. Every 6 hoursaDirectory Agent will send an unsolicited Service Reply again. This will ensure that eventually it will be discovered by all applicationscharacter set whichare concerned. When a Directory Agent first comes upitbegins with 0 as its XID,does not support, it will return this error. AUTHENTICATION_FAILED If the DA uses IP Security Authentication andincrementsthe SA sending a SrvReg or SrvDereg message fails to be authenticated, the DA will return thisby one each time it sends an unsolicited reply.error. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 33] Internet Draft Service Location Protocol 10 June 1996 12. Service Deregister When a service is no longer available for use, thecounter wraps, it should goService Agent must deregister itself from0xFFFF to 0x0100, not 0. If theDirectoryAgentAgents that it hasstored all of thebeen registered with. A serviceinformation in a nonvolitile store, it should initially setuses theXIDfollowing PDU to256, as it is not coming up 'stateless.' Allderegister itself. 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | ServiceAgents andlocation header (function = SrvDereg) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <URL> of Service to Deregister \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length of tag spec string | <tag spec> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <tag spec>, continued \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The ServiceApplications which receive the unsolicited reply should examine its XID. If the DirectoryAgenthas never before been heard from orshould retry this operation ifthe XIDthere isless than it was previously and less than 256,no response from theServiceDirectory Agent. The Directory Agentor Service Application should register all service informationacknowledges this operation withthe Directory Agent, after waitingarandom interval of between 1 and 3 seconds. An example of what such an unsolicited reply would look like is: URL: service:directory-agent://slp-resolver.catch22.com Attributes: (SCOPE=ADMIN) This directory agent can be reached at the Address Specification specified, and supportsservice acknowledgment. Once theSCOPE called 'ADMIN'. When aService Agentor Application, or User Agent first comes on-linereceives an acknowledgment indicating success, it can assume that the service is no longer advertised by the Directory Agent. The Error Code in the Acknowledgment of the Service Deregistration mayissues a Directory Agent Discovery Request,have the same values asdefineddescribed in5.6 above. Asection 11. The ServiceAgent or Application registers information with ALL newly discovered Directory Agents when either ofDeregister Information sent to theabove two events take place. When scopes are being used onDirectory Agent is acampus,URL followed by aService Agent or Application may choose<tag-list>, where aset<tag-list> is described by the following grammar: <tag-list> ::= <attr-tag> | <keyword> | <attr-tag> ',' <tag-list> | <keyword> ',' <tag-list> For definitions ofscopes to be advertised in<attr-tag> andneed only register with<keyword> see 6.4. This will deregister the specified attributes from the service information from the DirectoryAgents that supportAgent. If no attribute tags are included, thescopesentire service information is deregistered inwhich they wish to be registered. Services may beevery language and every scope it was registeredwith DAs Veizades, Kaplan, Guttman, Perkinsin. To deregister the printer, use: service:lpr://igore.wco.ftp.com:515 Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page19] INTERNET-DRAFT34] Internet Draft Service Location ProtocolMarch-96 which have no scope. Note that while it10 June 1996 13. Attribute Request Message Format The Attribute Request isvery highly recommended that all services are registered withused to obtain attribute information. The UA supplies a request and the appropriate attribute information is returned. If the UA supplies only a Service Type, and the reply includes allunscoped DAsattributes andwithallDAsvalues for that Service Type. The reply includes only those attributes for whichhave a certain (set of) SCOPE values, it is not strictly required. Ifservices exist and are advertised by the DA or SA which received the Attribute Request. Since different instances of a given serviceisn't registered this way,can, and very likely will, have different values for theavailability ofattributes defined by the Service Type, the User Agent must form a union of all attributes returned by all serviceadvertisementAgents. The Attribute information will belimited and possibly inconsistent between DAs.used to form Service Requests. If the UA supplies a URL, the reply will contain service information corresponding to that URL. Attribute Requests include a 'select clause'. Thissituationmay beacceptable if UAs are preconfigured (statically or by DHCP)used toonly use one particular DA in all situations. This approach leaves openlimit thechanceamount offailure ifinformation returned. If thepreconfigured DAselect clause isnot available. Onceempty, all information is returned. Otherwise, the UA supplies aUser Agent becomes awarecomma delimited list ofa Directory Agent it will unicast its queries there. Inattribute tags and keywords. If theevent that more than one Directory Agentattribute or keyword isdetected,defined for a service, it willselect one to communicate with. When scopes are supported, the User Agent will direct its queries to different Directory Agents depending on which scopes are appropriate domains for the query tobeanswered in. The protocol will cause all DAs (ofreturned in thesame scope) to eventually obtain consistent information. Thus one DA should be as good as any otherAttribute Reply, along with all registered values forobtaining service information. There may be temporary inconsistencies between DAs. 6.3 Service Registration After a Service Agentthat attribute. If the attribute selected hasfound a Directory Agent, it begins to register its advertised services one at a time. A Service Agent must waitnot ben registered forsome random interval between 0 and 3 seconds between each registration. Registration is done usingthat URL or Service Type, the attribute or keyword information is simply not returned. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 35] Internet Draft ServiceRegistration packet specifying all attributes for a service. A Directory Agent must acknowledge each service registration request.Location Protocol 10 June 1996 Theformat of a Service Registration is:Attribute Request message has the following form: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service location header (function =SrvReg)AttrRqst) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |length of prev responders list |<Previous Responders Addr Spec>| +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Length| \ <Previous Responders Addr Spec>, continued \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length of URLString|<URL String><URL> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \<URL String><URL>, continued \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |Lengthlength ofAttr List String<scope> |<Attribute String><scope> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \<Attribute List>, Continued.<Scope>, continued \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | length of <select-list> | <select-list> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <select-list>, continued \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Service Registration Veizades, Kaplan, Guttman, Perkins [Page 20] INTERNET-DRAFT Service Location Protocol March-96 Service registration may use a connectionless protocol (e.g. UDP), or a connection oriented protocol (e.g. TCP).Theregistration operation may contain more information than can be sent<Previous Responder Address List> functions exactly as introduced inone datagram. In this case the Service Agent or Application must use a connection oriented protocol to register itself with the DA. WhenSection 8. See also Section 21.1. The URL String can take two forms: Either it is simply a ServiceAgentType, such as "service:http:", orApplication registers the same attribute class more than once for a service instance, the Directory Agent overwrites the all the values associated with that attribute class. Separate registrations must be made for each language that the service is toit can beadvertised in. Service Registration information is sent in exactly the same form as a Service Reply: URL (at least): SERVICE:SERVICE-TYPE://ADDRESS SPECIFICATION Attributes (if any): (ATTR1=VALUE),KEYWORD,(ATTR2 = VAL1, VAL2) An example ofaservice registration isURL, such asfollows: URL: service:printer://igore.wco.ftp.com:515 Attributes: (SCOPE=DEVELOPMENT), (PAPER COLOR=WHITE), (PAPER SIZE=LETTER), UNRESTRICTED_ACCESS, (LANGUAGE=POSTSCRIPT, HPGCL), (LOCATION=12 Floor), (PROTOCOL=LPR,PCNFS) The same registration could be done again, in German (note that 'printer'"service:lpr://igore.wco.ftp.com:515". In theSERVICE TYPE and SCOPE are IANA termsformer case, all attributes andwill remain inthelanguage they were originally registered with IANA, i.e. English): URL: service:printer://igore.wco.ftp.com:515 Attributes: (SCOPE=ENTWICKLUNG), (PAPIERFARBE=WEISS), (PAPIERFORMAT=BRIEF), UNBEGRENTZTER_ZUGANG, (DRUECKERSPRACHE=POSTSCRIPT,HPGCL), (STANDORT=11 Etage), (PROTOKOLL=LPR,PCNFS) Registrations must contain an Attributefull range ofSCOPE unless they are unscoped and then they must be registered with all directory agents.values for each attribute for the Service Type is returned. In theexample above,latter case, only theSCOPEattributes for the service whose URL isset to DEVELOPMENT (in English) and ENTWICKLUNG (in German.) Recalldefined are returned. The Scope String is provided so thatall strings in a packet mustAttribute Requests for Service Types can bein one language, which is specified inmade so that only theheader. The Directory Agent may returnAttribute information pertaining to aserver error in the acknowledgment.specific scope will be returned. Thiserrorfield iscarriedignored in theError Codes field of the service location packet header. A Directory Agent may decline to register a service if it is specified with an unsupported SCOPE. In thiscase when aSCOPE_NOT_SUPPORTED errorfull URL isreturnedsent in theSrvAck. Veizades, Kaplan, Guttman, PerkinsAttribute Request. The rules for encoding of the Scope String are given in Section 6.4. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page21] INTERNET-DRAFT36] Internet Draft Service Location ProtocolMarch-96 An unscoped service registration will match10 June 1996 The select list takes the form: <select-list> ::= <select-item> | <select-item> ',' <select-list> <select-item> ::= <keyword> | <attr-tag> | <partial-tag> '*' <partial-tag> ::= the partial class name of an attribute followed by an '*' matches allrequests. A request which specifies a certain scope will therefore return servicesclass names whichhave that scopebegin with the characters preceding the '*' For definitions of <attr-tag> andservices which are unscoped. It<keyword> see 6.4. An example of a select-list following the printer example is: PAGES PER MINUTE, UNRESTRICTED_ACCESS, LOCATION If sent to a Directory Agent, the number of previous responders isstrongly suggested that one should use scopes in all registrations or none. See Section 6.5zero andSections 6.6there are no Previous Responder Address Specification. These fields are only used for repeated multicasting, exactly as fordetails. A non-error acknowledgment must havetheerror code set to zero. Once a DA acknowledges a service registration it makesService Request. 14. Attribute Reply Message Format An Attribute Reply Message takes theinformation available to clients.form: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service location header (function =SrvAck)AttrRply) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Code | length of <attr-list> string | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <attr-list> \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ The Error Code may have the following values: 0 Success LANGUAGE_NOT_SUPPORTED A SA or DA returns this when a request is received Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 37] Internet Draft ServiceAcknowledgment In order to offer continuously advertised services,Location Protocol 10 June 1996 from a UA which is in a language for which there is no registered ServiceAgentsInformation andApplications should startthereregistration process beforerequest arrived with the Monolingual bit set. See Section 18. PROTOCOL_PARSE_ERROR A DA or SA returns this error when the AttrRqst could not be parsed. SCOPE_NOT_SUPPORTED A DA which is configured to have a scope will return this error if it receives an AttrRqst which is set to have a scope which it does not support. SAs will silently discard multicast AttrRqst messages for scopes they do not support. CHARSET_NOT_UNDERSTOOD If theTTLDA receives an AttrRqst in a character set which it does not support, it will return this error. SAs will silently discard multicast AttrRqst messages which arrive using character sets theyuseddo not support. The <attr-list> (attribute list) has the same form as the attribute list at the end of a reply, see Section 21.2 forregistration expires. 6.4 Service Unregister Whenaservice is no longer availableformal definition of this field. An Attribute Request foruse,"lpr" might elicit the following reply (UNRESTRICTED_ACCESS is a keyword): (PAPER COLOR=WHITE,BLUE), (PAPER SIZE=LEGAL,LETTER,ENVELOPE,TRACTOR FEED), UNRESTRICTED_ACCESS, (PAGES PER MINUTE=1,3,12), (LOCATION=12TH, NEAR ARUNA'S OFFICE), (QUEUES=LEGAL,LETTER,ENVELOPE,LETTER HEAD) Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 38] Internet Draft Service Location Protocol 10 June 1996 15. Directory Agentor Application must unregister itself fromAdvertisement Message Format DirectoryAgents that it has been registered with. A service usesAgent Advertisement Messages have the followingPDU to unregister itself.format: 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Service location header (function =SrvUnreg)DAAdvert) | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Error Code | Length of URL | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \<URL String<URL> \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Length ofService to Unregister><scope-list> | <scope-list> | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | \ <scope-list>, continued \ | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+Service UnregisterTheService Agent should retry this operation if thereError Code isno response fromset when a DA Advertisement is returned as theDirectory Agent.result of a Service Request. It will always be set to 0 in the case of an unsolicited DA Advertisement. The Error Code may take the values specified in Section 7. The URL corresponds to the DirectoryAgent acknowledges this operation withAgent's location. The <scope-list> is aservice acknowledgment. Oncecomma delimited list of Scopes which theService Agent receives this acknowledgment, it can assume thatDA supports, in theservice is no longer advertised byfollowing format: <scope-list> ::= <scope> | <scope-list> ',' <scope> <scope> ::= String representing a scope See Section 6.4 for theDirectory Agent. The Service Unregister Informationlexical rules regarding <scope>. DA Advertisements sent in reply tothea Directory Agent Discovery Request has thefollowing form: SERVICE:SERVICE-TYPE:// ADDRESS SPECIFICATION Veizades, Kaplan, Guttman, Perkinssame format as the unsolicited DA Advertisement, for example: URL: directory-agent://SLP-RESOLVER.CATCH22.COM SCOPE List: ADMIN The Directory Agent can be reached at the Address Specification returned, and supports the SCOPE called "ADMIN". Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page22] INTERNET-DRAFT39] Internet Draft Service Location ProtocolMarch-96 This will unregister the service from the10 June 1996 16. Directory Agents 16.1. Introduction A Directory Agentin every language it was registered in. To unregister the printer above use: service:printer://igore.wco.ftp.com:515 6.5 SCOPE Discoveryacts on behalf of many Service Agents. It acquires information from them andUse The scope mechanism in the service location protocol is an important feature to enhance its scalability. The primary useacts as a single point ofscopes iscontact toprovide the capabilitysupply that information toorganizeUser Agents. The queries that acampus along administrative lines. A set of services can be assignedUser Agent multicasts toa given department ofService Agents (in anorganization, to a certain building or geographical area or forenvironment without acertain purpose. The users ofDirectory Agent) are thesystem can be presented with these organizational elementssame asa top level selection, before services within this domain are sought. A campus that has grown beyond a sizequeries thatcan be reasonably serviced by a few DAs can use the SCOPE mechanism. DAs havetheattribute class "SCOPE". The values for this attribute areUser Agent might unicast to alist of strings that represent the administrative areas for which thisDirectory Agent. A User Agentis an authority. The semantics and language ofmay cache information about thestrings usedpresence of alternate Directory Agents todescribe the SCOPE are entirelyuse in case a selected Directory Agent fails. Aside from enhancing thechoicescalability of theadministrative entityprotocol (see section 4.7), running multiple DAs provides robustness ofthe particular domain in which these SCOPEs exist.operation. ThevaluesDAs have replicated service information which remain accessible even when one ofSCOPE should be configurable, sothesystem administrator can set its value. The SCOPE "LOCAL" is reserved and must not be used,DAs fail. Directory Agents, in the future, may use mechanisms outside of thisreserved value may be defined in a futureprotocoldocument. Services withto coordinate theattribute SCOPE should only be registeredmaintenance of a distributed database of service location information, and thus scale to enterprise networks or larger administrative domains. Each Service Agent must register with all DAswhich supportthey are configured to use. UAs may choose among DAs they are configured to use. Locally, Directory Agent consistency is guaranteed using mechanisms in thesame scope orprotocol. There isn't any Directory to Directory Agent protocol yet. Rather, passive detection of DAswhich have no SCOPE.by SAs ensures that eventually service information will be registered consistently between DAs. Invalid data will age out of the Directory Agentsadvertiseleaving only transient stale registrations even in thelistcase ofall scopes that are available. Aa failure of a ServiceAgentAgent. 16.2. Finding Directory Agents A User or ServiceApplicationAgent maythen choose at least one scope in which toberegistered, and should register with all Directory Agents in that scope, as well as all DAsstatically configured to use a particular DA. This is discouraged unless the application resides on a network where any form of multicast or broadcast is impossible. Alternatively, a host whichhave no scope. Failureuses DHCP [2, 10] may use it to obtain a Directory Agent's address. A DHCP option will becomprehensive in registration according toassigned for thisrule will mean that the service advertisement maypurpose. It has notbe discoverableyet been, at the time this document was written. The third way to discover DAs is dynamically. This occurs actively byall User Agents. A Directory Agent which hassending out aSCOPE will send replies toDirectory Agent Discoveryrequests withrequest (see Section 6.2). Lastly, thescope information included. Note that Directory Agent Requests should always select that SCOPE informationagent may bereturned. Note that the directory-agent Service Type is registered with the IANA naming authority (which is automatically selected by leaving the Naming Authority field empty.) The query: directory-agent//SCOPE// Could receive the following reply: Returned URL: service:directory-agent://diragent.void.com Returned Attribute: (SCOPE=ADMINISTRATION) Veizades, Kaplan, Guttman, Perkinsinformed passively as follows: Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page23] INTERNET-DRAFT40] Internet Draft Service Location ProtocolMarch-96 The same10 June 1996 When a Directory Agentiffirst comes on-line ithad no SCOPE value would reply: Returned URL: service:directory-agent://diragent.void.com Returned Attributes:sends an unsolicited DA Advertisement to the service location general multicast address. If a DA supports a particular scope or set of scopes these are placed in the reply. The class for this attribute is 'SCOPE'. Every CONFIG_INTERVAL_9 a Directory Agentsupported more thanwill send an unsolicited DA Advertisement again. This will ensure that eventually it will be discovered by all applications which are concerned. When a Directory Agent first comes up it begins with 0 as its XID, and increments this by onescopeeach time it sends an unsolicited DA Advertisement. When the counter wraps, itwould reply as: Returned URL: service:directory-agent://123.12.34.56 Returned Attributes: (SCOPE=ADMIN,DEV,SALES) Normally all Directory Agents respondshould go from 0xFFFF toa Directory Agent Request.0x0100, not 0. Ifonlythe DirectoryAgentsAgent has stored all of the service information in aparticularnonvolatile store, it should initially setof scopes are desired, issue a query likethefollowing: directory-agent//SCOPE/(SCOPE=ADMIN,SALES)/ Here the SCOPE field of the request is left blank, but the WHERE clause of the requestXID to 0x100, as it isfillednot coming up 'stateless.' If it stores service registrations inwith a list of the scopes which can be usedmemory only, it will restart without any state. It should indicate this by resetting its XID tosatisfy0. All Service Agents which receive therequest. Normally a single SCOPE would be filled in for a query, inunsolicited DA Advertisement should examine its XID. If theSCOPE field, but inDirectory Agent has never before been heard from or if the XID is less than it was previously and less than 256, the Service Agent should assume thespecial case of aDAquerydoes not have its service registration, even if it once did. If this isnot done. Athe case and the DAwhichhasno scope will reply to anythe proper Scope, the SA should register all service information with the Directory Agent, after waiting a random interval CONFIG_INTERVAL_10. When a Service AgentDiscovery Request. Beingor User Agent first comes on-line it must issue amemberDirectory Agent Discovery Request unless it is using static or DHCP configuration, as described in 6.2. A Service Agent registers information with ALL newly discovered Directory Agents when either ofa scope means that an agentthe above two events take place. When scopes are being used, a Service Agent mayusechoose aspecificset of scopes to be advertised in and need only register with Directory Agents that supportits scope. User Agents send all requests to DAs which supporttheindicated scope.scopes in which they wish to be registered. ServicesareMUST be registered withthe DA(s) in their scope. For a UA to find a serviceDAs thatis registered in a particularsupport their scopethey must send requests to a DAand those whichsupports the indicated scope. There ishave nolimitation on scope membership built into the protocol; that isscope, unless specifically configured not tosay,do so (see section 23.1.) Once a User Agentor Service Agent or Application may be a memberbecomes aware of a Directory Agent it will unicast its queries there. In the event that more than onescope. Membership is open to all, unless some external authorization mechanismDirectory Agent isaddeddetected, it will select one tolimit access. 6.6 Service Location Scaling and Operating Modes In a very small network, with few nodes, no DA is required. Acommunicate with. When scopes are supported, the User Agentcan detect services by multicasting requests. Servicewill direct its queries to different Directory Agents depending on which scopes are appropriate domains for the query to be answered in. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 41] Internet Draft Service Location Protocol 10 June 1996 The protocol willthen replycause all DAs (of the same scope) to eventually obtain consistent information. Thus one DA should be as good as any other for obtaining service information. There may be temporary inconsistencies between DAs. 17. Scope Discovery and Use The scope mechanism in the service location protocol enhances its scalability. The primary use of scopes is tothem. This does not scaleprovide the capability toenvironments with many hosts. Further, Service Agents not Service Applications mustorganize a site network along administrative lines. A set of services can beusedassigned tomake service information available. Inalarger but still administratively simple network,given department of an organization, to asingle DA may suffice. In this network, the DA will not have any SCOPE. DAs that are discovered will return no listcertain building or geographical area or for a certain purpose. The users ofSCOPES. Service Agents and Service Applications should registerthe system can be presented with these organizational elements as a top level selection, before services within thisDA even if theydomain areconfigured to specifically register with DAs which havesought. A site network that has grown beyond aspecific scope or set of scopes. User Agents will querysize that can be reasonably serviced by a few DAswithout scopes, even if they are configured tocan use the Scope mechanism. DAswith a certain scope. This is because when a DA with no SCOPE is discovered, it willhavealltheavailable service informationattribute class "SCOPE". The values for this attribute are a list of strings that represent the administrative areas for which this Directory Agent is an authority. The semantics andno scoped DAs willlanguage of the strings used to describe the Scope are almost entirely the choice of the administrative entity of the particular domain in which these Scopes exist.Veizades, Kaplan, Guttman, Perkins [Page 24] INTERNET-DRAFT Service Location Protocol March-96 In a large campus or organization several DAs willThe values of SCOPE should beused in order to divideconfigurable, so theload of maintaining service informationsystem administrator can set its value. The scopes "LOCAL" and "REMOTE" are reserved and SHOULD NOT be used. Use of these reserved values is toorganize which services shouldbeused by which community. In this case ALL DAs SHOULD HAVE A SCOPE. All Service Registrations that havedefined in ascopefuture protocol document. Services with the attribute SCOPE should only be registered withallDAsof thatwhich support the same scope or DAs which havebeen or are subsequently discovered. Unscoped services should be registeredno Scope. Directory Agents advertise the available scopes. A Service Agent may then choose a scope in which to register, and SHOULD register with allDAs as they are implicitly GLOBAL in scope. UserDirectory Agentsmake requests ofin that scope, as well as all DAs whichwhose SCOPE they are configuredhave no scope. Failure touse. In each case where 'should' is used above, one should keepbe comprehensive inmind that if theregistration according to this ruleis not followed the availability ofwill mean that the serviceinformationadvertisement may not belimited or inconsistent acrossdiscoverable by all User Agents. A Directory Agent which has a Scope will send replies to Directory Agent Discovery requests with theservice location system. There are thus 3 distinct operating modes.scope information included. Note that the directory-agent Service Type is registered with the IANA naming authority (which is automatically selected by leaving the Naming Authority field empty.) Thefirst requires no administrative intervention.query: directory-agent:/MATH DEPT// Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 42] Internet Draft Service Location Protocol 10 June 1996 Could receive the following DA Advertisement: Returned URL: directory-agent://diragent.blah.edu Returned SCOPE: MATH DEPT Thesecond requires only thatsame Directory Agent if it had no Scope value would reply: Returned URL: directory-agent://diragent.void.com Returned SCOPE: If a Directory Agent supported more than one scope it would reply as: Returned URL: directory-agent://srv.domain.org Returned SCOPE: MATH DEPT,ENGLISH DEPT,CS DEPT A DAbe run. The last requires that all DAs be configured to have SCOPE and that a coherent strategy of assigning SCOPES to services be followed. Users must be instructedwhichSCOPES are appropriate for them to use. This administrative costhas no scope willallow users and applicationsreply todynamically discover services without assistance. 7.0 Service Location Connections When a Service Location Request results inany Directory Agent Discovery Request. Being areply frommember of aService orscope means that an agent may use those DirectoryAgentAgents thatwill overflow a datagram, thesupport its scope. UserAgent can open a connectionAgents send all requests to DAs which support theAgent and reissue the request over the connection. The reply will be returnedindicated scope. Services are registered with theoverflow bit set (see section 5.4.6). The reply will contain data, as much as will fit intoDA(s) in their scope. For asingle packet. If no MTU information is available for the route, assume thatUA to find amaximum packet sizeservice that is1400. When a request resultsregistered inoverflowed data that cannot be correctly parsed (say, because of duplicate or dropped IP packets),aUser Agent that wishes to reliably obtain the overflowed dataparticular scope they mustestablishsend requests to aconnection withDA which supports theDirectory Agent or Service Agent withindicated scope. There is no limitation on scope membership built into thedata. The requestprotocol; that issimply sent again (withto say, a User Agent or Service Agent may be anew XID, however.) The replymember of more than one scope. Membership isreturned over the connection stream. Aopen to all, unless some external authorization mechanism is added to limit access. 18. Language and Character Encoding Issues All ServiceregistrationRegistrations declare the language in whichexceeds one packetthe strings inlength should be madethe service attributes are written byestablishing a connection with a Directory Agent and sendingspecifying theregistration overappropriate code in the message header. For each language theconnection stream. Directory Agents andServiceAgents must respond to connection requests and Services whoseadvertises a separate registration takes place. The Service needs to be deregistered only once since the information associated with it will be unique. There canexceedonly be one service of a given type at apacketgiven address specification even if it is registered inlength must be able to connectmultiple languages. Service Registrations in different languages are mutually unintelligible. They share no information except for their service type andsend. User Agents should be able to make requests over a connection. If they fail to implement this,URL string with which theymust be ablewere registered. No attempt is made tointerpret partial replies and/or reissue requestsmatch queries withmore selective criteria"language independence." Instead, queries are handled using string matching against registrations in the same language as the query. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 43] Internet Draft Service Location Protocol 10 June 1996 Service Types which are standardized will have definitions for all attributes and value strings. Official translations toreduceother languages of the attribute tags and values may be created and submitted as part of the standard; this is not feasible for all languages. For those languages which are not defined as part of thesizeService Type, a best effort translation of the standard definitions of thereplies. Veizades, Kaplan, Guttman, Perkins [Page 25] INTERNET-DRAFTServiceLocation Protocol March-96 A connection initiated by an Agent maytype's attribute strings MAY beused forused. All Service Requests specify asingle transaction. It may also be used for multiple transactions. Since there are length fieldsrequested language in thepacket headers,message header. The Directory Agent or Service Agent will respond in theAgents may send multiple requests alongsame language as the request, if it has aconnection and readregistration in thereturn stream for acknowledgmentssame language as the request. If this language is not supported, andreplies. The Agentthe Monolingual bit isresponsible for closingnot specified, a reply can be sent in theTCP connection. The DA should wait at least 30 seconds before closing an idle connection. 8.0 Security Considerations There are no provisionsdefault language (which is English.) If the 'monolingual bit' flag inthis protocolthe header is set and the requested language is not supported, a SrvRply is returned with the error field set toinsure data integrity, data authority or data confidentiality. MechanismsLANGUAGE_NOT_SUPPORTED. If a query is inthe underlying network layer protocola supported language on a SA oratDA, but has a different dialect than the available serviceaccess point mayinformation, the query MUST beused to provide these functions. An Agent may choose to ignore a transaction basedserviced onsecurity information supplied by other (underlying) services. Asa best-effort basis. If possible, the query should be matched against the same dialect. If that is not possible, it MAY be matched against any dialect of the same language. 18.1. Character Encoding and String Issues Values for character encoding can be found in theabsense of Service Location, end-to-end authentication should be used between clientsInternet Assigned Numbers Authority's (IANA) database (http://www.isi.edu/in-notes/iana/assignments/character-sets), andservices. 9.0 Multicast vs. Broadcasthave the values referred by the MIBEnum value. Theservice location protocol was designed for use in networks where multicast atencoding will determine thenetwork layerinterpretation of all character data which follows the Service Location protocol header. There issupported; in some instances multicast may notno way to mix ASCII and UNICODE, for example. All responses must besupported. To support this protocolinnetworks where multicast is not supportedthefollowing modifications are made to supportcharacter set of theprotocol in an environment where network layer broadcast is supported. 9.1 Single Subnetrequest or use US-ASCII. If anetworkrequest isnot connectedsent toany other networks simple network layer broadcasts will work in place of multicast. 9.2 Multiple Subnets The Directory Agent providesacentral clearing house of information for User Agents. If the networkDA or SA or a registration isdesigned so thatsent to aDirectory Agent addressDA, which isstatically configured with each User Agent,unable to manipulate or store theDirectory Agentcharacter set of the incoming message, the request willact as a bridge for information that resides on different subnets.fail. TheDirectory Agent address can be dynamically configured with Agents using DHCPSA orstaticly configured, but Agents will not be able to discover DAs on non-bridged subnets. As dynamic discovery is not feasible inDA returns abroadcast environment and manual configuration is difficult, multiple DAsCHARSET_NOT_UNDERSTOOD error in abroadcast environment maySrvAck message in this case. Requests using US-ASCII will never fail for this reason, since all SAs and DAs must bedifficult to deploy. 9.3 Service Multicast Address Each service MAY have a unique multicast addressable towhich it belongs to. This multicast address may be obtained from IANA. This mechanismaccept this character set. Certain characters are illegal in certain contexts of the protocol. Since the protocol is largely character string based, in some contexts characters are usedso thatas protocol delimiters. In these cases thenumber of datagrams any one service receives is minimized. The Service Location General Multicast Address maydelimiter characters must not be usedto query for any service, though one should use Veizades, Kaplan, Guttman, Perkinsas 'data text.' Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page26] INTERNET-DRAFT44] Internet Draft Service Location Protocol 10 June 1996 18.1.1. Substitution of Character Escape Sequences The Service Location ProtocolMarch-96has an 'escape mechanism' which is consistent with HTTP 2.0 [6] and SGML [13]. If theservice-specific multicast address if it exists. When undirected queriescharacter sequence "&#" is followed by one or more digits, followed by a semicolon ';' the entire sequence is interpreted as a single character. The digits aremade concerning this type of service,interpreted as a decimal value in thequery should be sent tocharacter set of thematching multicast address. Ifrequest, as specified by thesubnet doesheader. Thus, in US-ASCII , would be interpreted as a comma. Substitution of these escape strings must be done in all <attr-list> and strings present in SrvReq and AttrRqst messages. Only numerical character references are accepted, notsupport multicast then the query'Entity References,' as defined in HTML. These escape values should only bebroadcastused tothe Service Location port. If the underlying hardware will not support the numberprovide a mechanism for including reserved characters in attribute tag and value strings. The interpretation ofneed multicast addresses all services can usethese escape values is different than in HTML in one respect: In HTML thegeneral service location multicast address. 10.0escape values are considered to be in the ISO Latin-1 character set. In Service Location they are interpreted in theInternet A subsequent protocol document will describecharacter set defined in the header of the message. This escape mechanismfor supportingallows characters like commas to be included in attribute tags and values, which would otherwise be illegal as the comma is aservice discoveryprotocol delimiter. Attribute tags and values of different languages are considered to be mutually unintelligible. A query ina global Internet. 11.0 Protocol Formats 11.1 Fields Usedone language SHOULD use service information registered in that language. 18.2. Language Dialect Dialect tags are used in Service LocationPackets The following section supplies formal definitions for all protocol elements introduced in the sections above. Protocol Element Used in ----------------------------------- ------------- 11.1.1 <Previous Responders' Addr Spec> SrvRqst 11.1.2 <Service Request Predicate> SrvRqst 11.1.3 <Reply> SrvRply 11.1.4 <Service Registration Information> SrvReg 11.1.5 <Service Unregister Information> SrvUnReg 11.1.6 <Attribute List> AttrRply 11.1.7 <Service Type String> AttrRqst 11.1.1 Previous Responders' Address Specification The previous responders' Address Specificationmessages to indicate a variant of vocabulary used. If one service isspecified as <Previous Responders' Address Specification> ::= <Address Specification>, | <Address Specification>, <Previous Responders' Address Specification> ie.registered in more than one dialect, alist separated and terminated by commasDA or SA SHOULD return the one withno intervening white space. The Address Specification istheaddress ofsame dialect tag as in theDirectory Agent or Service Agent which suppliedquery, but MAY choose to return any registered service that matches theprevious response. The format for Address Specificationscriteria. Dialects (unlike languages) are assumed to be mutually intelligible, but may have variations inService Locationspelling. Since string matching isdefinedused, it is advantageous in11.2. Example: some.corp.com,128.127.203.63, Veizades, Kaplan, Guttman, Perkinssome cases to register service information in multiple dialects. Dialect tags will be assigned as enumerated values to correspond to the official dialects registered with the IANA. There are as of this writing no enumerated dialect values; they will be created as needed. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page27] INTERNET-DRAFT45] Internet Draft Service Location ProtocolMarch-96 11.1.210 June 1996 18.3. Language-Independent Strings Some strings, such as ServiceRequest Predicate The following grammar expressesType names, have standard definitions. These strings should be considered as tokens and not as words in a language to be translated. Reserved String Section Definition --------------- ------- -------------------------------------- SCOPE 4, 16 Used to limit theformscope of requests. SERVICE TYPE 8 Used in Service Type requests. SERVICE 10, 7 The URL scheme of all Service Location information registered with a DA or returned from a ServiceRequest Predicate: <predicate> ::= <srvtype>[.<na>]/<scope>/<select>/<where>/Request. <srvtype>::= string representing type of service. Only 'a' to 'z', '+'21.3.1 Used in all service registrations and'-' are allowed. <na> ::= string representing the Naming Authority. Only characters from 'a' to 'z', '+'replies. domain names 21.4 A fully qualified domain name, used in registrations and'-' are allowed. If this field is omitted 'IANA'replies. SA MULTICAST ADDRESS 8 An attribute whose value isassumed. <scope> ::= string representingthedirectory agent scope. '/' and ':' are not allowed in this string.service-specific multicast address. IANA 4.3 Thescopes 'LOCAL' and 'REMOTE' are reserved. <select> ::= <select-list> | <select-all> | <select-none> <select-list>::= <select-item> | <select-item>, <select-list> <select-item>::= <keyword> | <attr-tag> | <partial-attr-tag>* <attr-tag> ::= class name of an attribute ofdefault naming authority. LOCAL 17 Reserved. REMOTE 17 Reserved. TRUE 21.5 Boolean true. FALSE 21.5 Boolean false. 19. Service Location Transactions 19.1. Service Location Connections When agivenServiceType. This tag cannot includeLocation Request or Attribute Request results in a UDP reply from a Service or Directory Agent that will overflow a datagram, thefollowing characters: '(', ')', ',', '=', '!', '>', '<', '/', '*' <keyword> ::=User Agent can open aclass name of an attribute whichconnection to the Agent and reissue the request over the connection. The reply willhave no values. This string hasbe returned with thesame limitsoverflow bit set (see section 5). The reply will contain as much data as will fit into a single datagram. If no MTU information is available for the<attr-tag>. In addition white space internal toroute, assume that thekeywordMTU isillegal. <partial-tag>::= the partial class name1400; this value is configurable (see section 23). When a request results in overflowed data that cannot be correctly parsed (say, because ofan attribute followed by an '*' matches all class names which beginduplicate or dropped IP datagrams), a User Agent that wishes to reliably obtain the overflowed data must establish a TCP connection with thecharacters precedingDirectory Agent or Service Agent with the'*' <select-all> ::= * <select-none>::= Thatdata. The request isNOTHING or white space. <where> ::= <where-any> | <where-list> | <query-join> <where-any> ::= Thatsent again with a new XID. The reply isNOTHING or white space. <where-list> ::= (& <query-item> <query-list>) | (| <query-item> <query-list>) | <query-item> <query-list> ::= <where-list> | <query-item> | <query-item> <query-list> <query-item> ::= (<attr-tag> <comp-op> <attr-val>) | <keyword> <query-join> ::= <join-item> | <join-item>, <query-join> Veizades, Kaplan, Guttman, Perkinsreturned over the connection stream. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page28] INTERNET-DRAFT46] Internet Draft Service Location Protocol 10 June 1996 When registration data exceeds one datagram in length, the Service Registration should be made by establishing a connection with a Directory Agent and sending the registration over the connection stream. Directory Agents and Service Agents must respond to connection requests; services whose registration data can overflow a datagram must be able to use TCP to send the registration. User Agents should be able to make ServiceLocation Protocol March-96 <join-item> ::= <attr-tag> | <attr-tag> <comp-op> <attr-val> <comp-op> ::= != | == | < | <= | > | >= <attr-val> ::= any string (see Section 10.3 forRequestsequests using TCP. If they fail to implement this, they must be able to interpret partial replies and/or reissue requests with more selective criteria to reduce theways in which attr-vals are interpreted.) Value stringssize of the replies. A connection initiated by an Agent maynot contain '/', ',' '=', '<', '>'. '(' and ')' can onlybe used forthe purpose of encodingabinary values. Binary encodings (See Section 10.3)single transaction. It mayinclude the above reserved characters. Note on string matches: All strings are case insensitive, with respect to string matching on queries. All preceding or trailing blanks should notalso beconsideredused for multiple transactions. Since there are length fields in the message headers, the Agents may send multiple requests along amatch, but blanks internalconnection and read the return stream for acknowledgments and replies. The initiating agent is responsible for closing the TCP connection. The DA should wait at least CONFIG_INTERVAL_12 before closing an idle connection. DAs and SAs SHOULD eventually close idle connections to ensure robust operation, even when the agent which opened a connection neglects to close it. There is no requirement that one transaction complete before astringgiven host begins another. An agent may have multiple outstanding transactions, initiated either using UDP or TCP. All Service Location actions arerelevant. For example " Some String " matches "SOME STRING" but not "some string". A predicate has a simple structure, which depends on the parentheses, commasidempotent. Of course registration andslashes to delimitderegistration will change theelements. Examplesstate ofproper usagea DA, but repeating these actions will havebeen given throughoutexactly thedocument.same effect each time. 20. Security Considerations Theterms used above are described below: predicate: Placed in aServiceRequest,Location protocol does not provide authentication, integrity or confidentiality. Because the objective of this protocol isinterpreted by a Service Agent or Directory Agenttodetermine what informationadvertise services toreturn. scope: Ifa community of users, confidentiality might not generally be needed when this protocol isabsentused in non-sensitive environments. Authentication and integrity are functionally equivalent ina Service Request,therequest will match any service regardlesscontext ofscope. If itthis protocol. Authentication ispresent, onlygenerally needed with this protocol. An adversary can easily use this protocol to advertise servicesregistered under that scope will matchon servers controlled by therequest. select-clause: This determines what informationadversary and thereby gain access toreturn. There are 3 typesusers' private information. Further, an adversary using this protocol will find it much easier to engage in selective denial ofselect-clause: NULL, ANY and LIST. NULL: The reply returns no attribute information for the PARTICULAR services which satisfy the where-clause. ANY: The reply returns all attribute information, as above. LIST: The reply returnsservice Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 47] Internet Draft Service Location Protocol 10 June 1996 attacks. Sites that are in potentially hostile environments (e.g. are directly connected to theattribute information forInternet) should consider theattributes whose class names are listed, as above. Recall that an attribute has a class name and a setsecurity risks ofvalues.deploying this protocol prior to deploying it. Thelist contains a set of class names. Elementssecurity risks inthe listthis protocol can bepartial names, as 'INT*' will match 'INTERFACE 1' and 'INTERNAL'. where-clause: This determines which services the request matches. An empty where-clause will match all services. The request will be limited to services which havesignificantly reduced or eliminated by using the IP Authentication Header [5, 3] with all ServiceType which was defined prior toLocation messages. It is recommended that sites use thepredicate, soIP Authentication header with all Service Location messages. For thewhere-clausesecurity considerations listed above, it isnot the sole factor in picking outrecommended that all nodes whichservices matchimplement Service Location also implement therequest. where-list: The where-listIP Authentication Header. Sites requiring confidentiality should implement the IP Encapsulating Security Payload (ESP) [4] to provide confidentiality for Service Location messages. Service Location is useful as alogical expression.bootstrap protocol. Itcanmay bea single Veizades, Kaplan, Guttman, Perkins [Page 29] INTERNET-DRAFT Service Location Protocol March-96 expression, a disjunction or a conjunction. A single expression must apply for the where-clause to match. A disjunction matches if any expressionused inthe OR list matches. A conjunction matches only if all elementsenvironments inthe AND list match. Note that there iswhich nological negation operator: Thispreconfiguration isbecause therepossible. In such situations, a certain amount of "blind faith" isno notionrequired: Without any prior configuration it is impossible to use any ofreturning "everything except" what matches a given criteria. A where-list can be nested and complex. For example: (& (| <query-item> <query-item> <query-item>) <query-item> (& <query-item> <query-item> <query-item> <query-item>) ) Notice that white space, tabs or carriage returns can be added anywhere outside query-items. Each list has 2 or more items in it, and lists can be nested. Services which fulfilltheentire logical expression matchsecurity mechanisms described above. Service Location will make use of thewhere-clause. (| <query-item>) and (& <query-item>) are degenerate expressions but they should be tolerated. They are equivalent to <query-item>. query-item: A query item hasmechanisms provided by theform: (<attr-tag> <comp-op> <attr-val>) or <keyword> ExamplesSecurity Area of the IETF for key distribution as they become available. At this point it wouldbe: (SOME ATTRIBUTE == SOME VALUE) RESERVED (QUEUE LENGTH <= 234) query-join: The query-join is a comma delimited list of conditions which the service must satisfy in orderonly be possible tomatchdeploy thequery. The items are considered toIP Authentication Header if some certificate information can belogically conjoined. Thuspreconfigured with thequery-join: attr1=value1, keyword1, keyword2, attr2>=34 is equivalent toend systems before they use Service Location. 21. String Formats used with Service Location Messages The following section supplies formal definitions for fields and protocol elements introduced in thewhere-list: (& (attr1=value1) keyword1 keyword2 (attr2>=34))sections indicated. Protocol Element Defined in Used in ----------------------------------- ------------ ------------ <Previous Responders' Addr Spec> 21.1 SrvReq Service Request <predicate> 6.4 SrvReq <URL-String> 21.2 SrvReg, SrvDereg, SrvRply <attr-list> 21.3 SrvReg, SrvRply, AttrRply <Service Registration Information> 10 SrvReg <Service Deregister Information> 12 SrvDereg <Service Type String> 21.3.1 AttrRqst Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 48] Internet Draft Service Location Protocol 10 June 1996 21.1. Previous Responders' Address Specification Thequery-join cannot be mixed with a where-list. Itprevious responders' Address Specification isprovidedspecified as <Previous Responders' Address Specification> ::= <addr-spec>, | <addr-spec>, <Previous Responders' Address Specification> i.e., aconvenient mechanism to provide a statementlist separated and terminated by commas with no intervening white space. The Address Specification is the address ofnecessary conditions without building a logical expression. Veizades, Kaplan, Guttman, Perkins [Page 30] INTERNET-DRAFTthe Directory Agent or Service Agent which supplied the previous response. The format for Address Specifications in Service LocationProtocol March-96 11.1.3is defined in section 21.4. The comma delimiter is required between each <addr-spec>. The use of dotted decimal IP address notation should only be used in environments which have no Domain Name Service. Example: RESOLVO.NEATO.ORG,128.127.203.63 21.2. Reply and Registration Information Service Replies and Service Registrations have twofields,fields -- a URLStringand an attribute list.URL StringsURLs areas perdefined in RFC1738.1738 [7]. They should contain atleast: SERVICE:SERVICE-TYPE:// ADDRESS SPECIFICATION SERVICE isleast: <url> ::= service:<srvtype>://<addr-spec> where: service the URL scheme for service location, to return Replies.SERVICE-TYPE is<srvtype> astring.string; Service Types may be standardized by developing a specification for the "service type"-specific part and registering it with the IANA. See section5.3.4. ADDRESS SPECIFICATION is18. <addr-spec> the service access point of the service. It is the network address or domain name where the service can be accessed. See section 21.4. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 49] Internet Draft Service Location Protocol 10 June 1996 21.3. Attribute Information The <attr-list> is returnedifin theselect-clause ofAttribute Reply if thequery isAttribute Request does notNULL.result in an empty result. <attr-list> ::= <attribute> | <attribute>, <attr-list> <attribute> ::= (<attr-tag>=<attr-val-list>) | <keyword> <attr-val-list> ::= <attr-val> | <attr-val>, <attr-val-list> Anattribute with<attr-list> must be scanned prior to evaluation for all occurrences of the string "&#" followed by one or more digit followed by ';'. See Section 18.1 and specifically Section 18.1.1. A keyword has only anattr-tag<attr-tag>, and novalues is a keyword.values. A comma cannot appear in anattr-val,<attr-val>, as the comma is used as the multiple value delimiter. Examples of anattr-list<attr-list> are: (SCOPE=ADMINISTRATION) (COLOR=RED, WHITE, BLUE) (DELAY=10Mins),BUSY,(MOST RECENTMINS),BUSY,(LATEST BUILD=10-5-95),(PRIORITY=L,M,H) The third example has three attributes in the list. Color can take on the values red, white and blue. There are several other examples of replies throughout the document.11.1.4 Service Registration Information The Service Registration Information has the same form as a Reply in the section above. The attribute list must be complete. 11.1.5 Service Unregister Information The Service Unregister Information takes the form: SERVICE:SERVICE-TYPE:// ADDRESS SPECIFICATION SERVICE-TYPE and ADDRESS SPECIFICATION are described above. 11.1.6 Attribute List The Attribute List is defined in 11.1.3 as <attr-list>. Veizades, Kaplan, Guttman, Perkins [Page 31] INTERNET-DRAFT Service Location Protocol March-96 11.1.721.3.1. Service Type String The Service Type is a string describing the type of service. These strings may only be comprised of 'a' through 'z', '+' and '-'. Upper case is considered equivalent to lower case in Service Type names. If the Service Type name is followed by a '.' and a string (which has the same limitations) the 'suffix' is considered to be the Naming Authority of the service. If the Naming Authority is omitted, IANA is assumed to be the Naming Authority. Service Types developed for in-house or experimental use may have any name and attribute semantics provided that they do not conflict with the standardized Service Types. The Service Type's ServiceDiscoveryspecific Multicast Address used should taken from the range of experimental multicast addresses reserved by the IANA.11.2 ADDRESS SPECIFICATIONs21.4. Address Specification in Service Location The address specificationas describedused inRFC 1738Service Location is://<user>:<password>@<host>:<port>Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 50] Internet Draft Service Location Protocol 10 June 1996 <addr-spec> ::= [<user>:<password>@]<host>[:<port>] <host> ::= Fully qualified domain name | dotted decimal IP address notation It is preferable to use a fully qualified domain name wherever possible as renumbering of host addresses will makeipIP addresses invalid over time. When no Domain Name Server is available SAs and DAs must use dotted decimal conventions for IP addresses.GenerallyGenerally, just the host domain name (or address) is sufficient to return. When there is a non-standard port for the protocol, that should be returned as well. Some applications may make use of the <user>:<password>@ syntax, but its use isdiscouragednot encouraged in this contextas information registereduntil mechanisms are established to maintain confidentiality. Address specification in Service Location isso easily accessible. 11.3consistent with standard URL format [7]. 21.5. Attribute Value encoding rules Attribute values, and attribute tags are CASE INSENSITIVE for purposes of lexical comparison. Attribute values can have be any string with the exception of '(', ')', '=', '>', '<', '/' and ',' (the comma) except in the case described below where opaque values are encoded. These characters may be included using the character value escape mechanism described in section 18.1. While an attribute can take any value, there are three types of values which differentiate themselves from general strings: Booleans, Integers and Opaque values. - Boolean values are either "TRUE" or "FALSE". This is the case regardless of the language (i.e. in French or Telugu, Boolean TRUE is "TRUE", as well as in English.) Boolean attributes can take only one value.Veizades, Kaplan, Guttman, Perkins [Page 32] INTERNET-DRAFT Service Location Protocol March-96- Integer values are expressed as a sequence of numbers. The range of allowable values, for this 32 bit quantity, is "-2147483648" to "2147483647". Note: No other form of numeric representation is interpreted as such, save integers. For example, hexadecimal numbers such as "0x342" are not interpreted as integers, but as strings. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 51] Internet Draft Service Location Protocol 10 June 1996 - Opaque values (i.e. binary values) are expressed in radix-64 notation. The syntax is: <opaque-val> ::= (<len>:<radix-64-data>) <len> ::=integer lengthnumber of bytes of the originalbinarydata <radix-64-data> ::=Anradix-64 encoding of thebinaryoriginal datainto a new format.Radix-64 encodes every 3 bytes of binary data into 4 bytes of ASCII data which is in the range of characters which are fully printable and transferable by mail. For a formal definition of the Radix-64 format see RFC1521,1521 [8], MIME Part One, Section 5.2 Base64 Content Transfer Encoding, page21. Opaque values can pass things such as bitmaps for building a service browsing graphical interface or application specific data. 12.021. 22. Implementation Requirements A User Agent MAY: - Provide a way for the application to configure the default DA, so that it can be used without needing to find it each initially. - Be able to request the address of a DA from DHCP, if configured to do so. - Ignore any unauthenticated Service Reply or Attribute Reply. - Be able to issue requests in any language or character set provided that it can switch to the default language and character set if the request can not be serviced by DAs and SAs at the site. A User Agent SHOULD: - Listen on the Service Location General Multicast address for unsolicitedDirectory Agent Replies.DA Advertisements. This will increase the set of Directory Agents available to it for making replies. See Section6.2.16.2. If this is not done, new DAs will not be passively detected. A UA which does not have a configured DA and has not yet discovered one and is not listening for unsolicitedrepliesDA Advertisements will remain ignorant of DAs. It may then do a DA discovery before each query performed or it may simply use multicasted queries to Service Agents. A User Agent MUST: - Be able to unicast requests and receive replies from a DA. Transactions should be made reliable by using retransmission Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 52] Internet Draft Service Location Protocol 10 June 1996 of the request if the reply does not arrive within a timeout interval. - Be able to detect DAs using a Directory Agent Discovery request issued when the UA starts up. - Be able to send requests to a multicast address. If the multicast address is not known, the UA must be able to use a Service Type query to obtain the multicast address for the Service Type of the request. - Be able to handle numerous replies after a multicast request. The implementation may be configurable so it will either return the first reply, all replies until a timeout or keep trying till theVeizades, Kaplan, Guttman, Perkinsresults converge. - Ignore any unauthenticated Service Reply or Attribute Reply when an appropriate IPSec Security Association for that Reply exists. - Use the IP Authentication Header or IP Encapsulating Payload in all Service Location messages, whenever an appropriate IPSec Security Association exists. - Be able to issue requests using the US-ASCII character set. A Service Agent MAY be able to: - Get the address of a local Directory Agent by way of DHCP. - Accept requests in non-US-ASCII character encodings. This is encouraged, especially for UNICODE [1] and UTF-8 [17] encodings. - Register services with a DA in non-US-ASCII character encodings. This is encouraged, especially for UNICODE [1] and UTF-8 [17] encodings. A Service Agent SHOULD be able to: - Listen to the service-specific multicast address of the service it is advertising. The incoming requests should be filtered: If the Address Specification of the SA is in the Previous Responders Address Specification list, the SA SHOULD NOT respond. Otherwise, a response to the multicast query SHOULD be unicast to the UA which sent the request. - Listen for and respond to broadcast requests and TCP connection requests, to the Service Location port. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page33] INTERNET-DRAFT53] Internet Draft Service Location ProtocolMarch-96 results converge. A10 June 1996 - Listen to the Service Location General Multicast address for queries (e.g., Service Type Requests). If the query can be replied to by the ServiceApplication andAgent, the Service AgentMAY be able to: - Getmust do so. It MUST check first to make sure it is not on theaddress of a local Directory Agent by waylist ofDHCP.'previous responders.' A ServiceApplicationAgent MUST be able to: - Listen to the Service Location General Multicast address for unsolicitedDirectory Agent Replies.DA Advertisements. If one is detected, and the DA has the right scope, all services which are currently being advertisedSHOULDMUST be registered with theDA. See Section 6.2.DA (unless configured to only use a single DA (see section 23.1), or the DA has already been detected, subject to certain rules (see section 16.2)). - Unicast registrations andunregistrationsderegistrations to a DA. Transactions should be made reliable by using retransmission of the request if the reply does not arrive within a timeout interval. - Be able to detect DAs using a Directory Agent Discovery request issued when the SA starts up (unless configured to only use a single DA, see section 23.1.) - Use the IP Authentication Header or IP Encapsulating Payload in all Service Location messages, whenever an appropriate IPSec Security Association exists. - Be able to register service information with a DA using US-ASCII character encoding. It must also be able to reply to requests from UAs which use US-ASCII character encoding. - Reregister with a DA before the Lifetime of registered service information elapses. A Directory Agent MAY: - Ignore any unauthenticated Service Registration or Service Deregistration. - Accept registrations and requests in non-US-ASCII character encodings. This is encouraged, especially for UNICODE [1] and UTF-8 [17] encodings. A Directory Agent MUST be able to: - Send an unsolicited DA Advertisements to the Service Location General Multicast address on startup and repeat it periodically. This reply has an XID which is incremented by one each time. If Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 54] Internet Draft Service Location Protocol 10 June 1996 the DA starts with state, it initializes the XID to 0x0100. If it starts up stateless, it initializes the XID to 0x0000. - Listen on the Directory Agent Discovery Multicast Address for Directory agent discovery requests. Filter these requests if the Previous Responder Address Specification list includes the DA's Address Specification. - Listen for broadcast requests to the ServiceApplication starts up. A Service Agent MUST be able to:Location port. - Listentoon the TCP and UDP Service LocationGeneral Multicast addressPorts forunsolicited Directory Agent Replies. If one is detected,unicast requests, registrations and deregistrations and service them. - Provide a way in which Scope information can be used to configure theDA hasDirectory Agent. - Age out theright scope, allservices whichare currently being advertised SHOULD behave been registeredwithso that when theDA. See Section 6.2.service registration's Lifetime expires, the service advertisement is withdrawn. -UnicastIgnore any unauthenticated Service Location messages when an appropriate IPSec Security Association exists for that request. - Use the IP Authentication and IP Encapsulating Security Payload in Service Location messages whenever an appropriate IPSec Security Association exists. - Accept requests and registrations in US-ASCII. NOTE: Service Agents andunregistrationsUser Agents use ephemeral ports for transmitting information toa DA. Transactions should be made reliable by using retransmission oftherequestservice location port. 23. Configurable Parameters and Default Values There are several configuration parameters for Service Location. The protocol will work fine ifthe reply does not arrive within a timeout interval. - Listenonly default values are used. Due to themulticast addressnature of theserviceprotocol, itis advertising. The incoming requests shouldmay befiltered: If the Address Specificationdeployed in many different environments. The configuration options parameters will allow an implementation ofthe SA isService Location to be useful inthe Previous Responders Address Specification list, the SA should not respond. Otherwise,aresponse to thevariety of different scenarios. Multicast vs. Broadcast All Service Location entities must use multicastquery should be unicastby default. The ability tothe UA which sent the request. - Listen foruse broadcastrequests and TCP connection requests,messages must be configurable. Broadcast messages are tothebe used in environments where not all Service Locationport. - Listen to theentities have hardware or software which supports multicast. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 55] Internet Draft Service LocationGeneralProtocol 10 June 1996 Multicastaddress for queries of any type. If the query canRadius Multicast requests should berepliedsent toby the Service Agent,all subnets in a site. The default multicast radius for a site is 32. This value must be configurable. The value for theServicesite's multicast TTL may be obtained from DHCP. The DHCP option has not yet been assigned. Directory Agent Address The Directory Agent address discovery mechanism mustdo so. It must check first to make sure it is not onbe configurable. There are three possibilities for this configuration: A default address, no default address and thelistuse of'previous responders.' It will receive 'Service Type' requests this way. - Be ableDHCP todetect DAs usinglocate aDirectory Agent Discovery request issued whenDA as described in section 16.2. The default value should be "no default address." In this case the UA or SAstarts up. Amust do a Directory AgentMUST be able to: - Send an unsolicitedDiscovery query. Directory AgentDiscovery replyScope Assignment The scope or scopes of a DA must be configurable. The default value for a DA is to have no scope if not otherwise configured. Default Path MTU The default path MTU is assumed to be 1400. This value may be too large for theService Location General Multicast address on startupinfrastructure of some sites. For this reason this value MUST be configurable for all SAs andrepeat it periodically. ThisDAs. If a UA issues a request which will result in a replyhaswhich is too large, the SA or DA will return an abbreviated response (in aunique XID fordatagram thelifesize of theDA; this XID changes on each reboot (see Section 6.2). - Listen onsite's MTU) which has theDirectory Agent Multicast Address for Directory agent discovery requests. Filter these requests'Overflow' bit flag set. The UA must then issue the request again using a tcp connection. Similarly, if a SA attempts to register a service with a DA and thePrevious Responder Address Specification list includesregistration is larger than theDA's Address Specification. - Listen for broadcast requests tosite path MTU theService Location port. - Listen onDA will reply with a SrvAck, with theTCPerror set to INVALID_REGISTRATION andUDPthe 'Overflow' byte set. 23.1. ServiceLocation Ports for unicast requests, registrationsAgent: Use Predefined Directory Agent(s) A Service Agent's default configuration is to do passive andunregistrationsactive DA discovery andservice them. - Provide a way into register with all DAs whichSCOPE information canare properly scoped. A Service Agent SHOULD beusedconfigurable toconfigure the Directory Agent. Veizades, Kaplan, Guttman, Perkinsallow a special mode of operation: They will use only preconfigured DAs. This means they will *NOT* actively or passively detect DAs. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page34] INTERNET-DRAFT56] Internet Draft Service Location ProtocolMarch-96 - Age out10 June 1996 If a Service Agent is configured this way, knowledge of theservices which have been registered so that whenDA must come through another channel, either static configuration or by theservice registration's TTL expires,use of DHCP. The availability of theservice advertisement is withdrawn. NOTE:ServiceApplications, Service Agents and User Agents use ephemeral ports for transmittinginformationtowill not be consistent between DAs. The mechanisms which achieve eventual consistency between DAs are ignored by the SA, so their servicelocation port. 13.0 Configuration Parameters and Defaults 13.1 Multicast vs. Broadcast All Service Location entities must use multicast by default. The ability to use broadcast messages mustinformation will not beconfigurable. Broadcast messagesdistributed. This leaves the SA open to failure if the DA they are configured to use fails. 23.2. Time Out Intervals These values should beusedconfigurable inenvironments where not allcase the site deploying Service Locationentities have hardware or softwarehas special requirements (such as very slow links.) Interval name Section Default Value Meaning ----------------- ------- ------------- ----------------------- CONFIG_INTERVAL_0 5.1 1 minute Cache replies by XID. CONFIG_INTERVAL_1 5.2 1440 minutes registration Lifetime, (ie. 1 day) after whichsupports multicast. 13.2 Multicast Radius Multicast requests should be sent to all subnets in a site. The defaultad expires CONFIG_INTERVAL_2 6 each second, Retry multicastradiusquery backing off until no new values gradually arrive. CONFIG_INTERVAL_3 6 15 seconds Max time to wait for asite is 32. This value must be configurable. The value for the site'scomplete multicastTTL may be obtained from DHCP. The DHCP option has not yet been assigned. 13.3 Directory Agent Address The Directory Agent address discovery mechanism must be configurable. There are three possibilities for this configuration: A default address, no default address and the use of DHCPquery response (all values.) CONFIG_INTERVAL_4 10 3 seconds Wait to register on reboot. CONFIG_INTERVAL_5 6.2 3 seconds Retransmit DA discovery, try it 3 times. CONFIG_INTERVAL_6 6.2 5 seconds Give up on requests sent tolocatea DA. CONFIG_INTERVAL_7 6.2 15 seconds Give up on DAas described in section 6.2. The default value should be "no default address." Indiscovery CONFIG_INTERVAL_8 6.1 15 seconds Give up on requests sent to SAs. CONFIG_INTERVAL_9 16.2 3 hours DA Heartbeat, so that SAs will passively detect new DAs. CONFIG_INTERVAL_10 16.2 1-3 seconds Wait to register services on passive DA discovery. CONFIG_INTERVAL_11 10 1-3 seconds Wait to register services on active DA discovery. CONFIG_INTERVAL_12 19.1 5 minutes DAs and SAs close idle connections. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 57] Internet Draft Service Location Protocol 10 June 1996 A note on CONFIG_INTERVAL_9: While it might seem advantageous to have frequent heartbeats, thiscase the UA or SA must doposes aDirectory Agent Discovery query. 13.4 Directory Agent Scope Assignment The scope or scopessignificant risk of generating aDA must be configurable. The defaultlot of overhead traffic. This valuefor a DA isshould be kept high tohave no scope if not otherwise configured. 14.0 Interesting Constantsprevent routine protocol operations from using any significant bandwidth. 24. Non-configurable Parameters IP Port number for unicast requests to Directory Agents: UDP and TCP Port Number: 427 Multicast Addresses Service Location General Multicast Address: 224.0.1.22 Directory Agent Discovery Multicast Address: 224.0.1.35 Further service-specific multicast address will beassigned for specific types of service through the IANA. Veizades, Kaplan, Guttman, Perkins [Page 35] INTERNET-DRAFT Service Location Protocol March-96 Error Codes No Error 0 LANGUAGE_NOT_SUPPORTED 1 PROTOCOL_PARSE_ERROR 2 INVALID_REGISTRATION 3 SCOPE_NOT_SUPPORTED 4 15.0 Acknowledgments This protocol owes some of the original ideas to other service location protocols found in many other networking protocols. Leo McLaughlin and Mike Ritter (Metricom) provided much input into early version of this document. Thanks also to Steve Deering (Xerox) for providing his insight into distributed multicast protocols. Harry Harjono and Charlie Perkins supplied the basis for the URL based wire protocol in their Resource Discovery Protocol. Their comments have been very valuable. Thanks also to Peerlogic, Inc. for supporting this work. 16.0 References [1] Freier, A. O. "Network Binding Protocol" Xerox Corporation Unpublished, June 1986. [2] S. Gursharan, R. Andrews, A. Oppenheimer, Inside AppleTalk. Addison-Wesley Publishing. 1990 [3] Deering, S., "Host Extensions for IP Multicasting", RFC 1112, NIC, August 1989. [4] Saltzer, J., "On the Naming and Binding of Network Destinations", RFC 1498, M.I.T. Laboratory for Computer Science, August 1993. [5] Accetta, M. "Resource Location Protocol", RFC 887, NIC, December 1983 [6] Legato Systems, "The Legato Resource Administration Platform", Legato Systems, 1991. [7] C. McManis and R. Rom, "The Zeus Name Service Architecture", Sun Microsystems, 1990. [8] S. Dyer, "The Hesiod Name Server", Winter Usenix Conference, pp. 183-187, Feb 1988. [9] D. Oppen and Y. Dalal, "The Clearinghouse: A Decentralized Agent for Locating Named Objects in a Distributed Environment," Tech. Rep. OPD-78103, Xerox Office Products Division, 1981. [10] B. Lampson, "Designing a Global Name Service", Proceedingsassigned for specific types of service through the5th ACM Symposium on PrinciplesIANA. Error Codes: No Error 0 LANGUAGE_NOT_SUPPORTED 1 PROTOCOL_PARSE_ERROR 2 INVALID_REGISTRATION 3 SCOPE_NOT_SUPPORTED 4 CHARSET_NOT_UNDERSTOOD 5 AUHENTICATION_FAILED 6 25. Acknowledgments This protocol owes some ofDistributed Computing, pp. 1-10, 1986. Veizades, Kaplan, Guttman, Perkins [Page 36] INTERNET-DRAFT Service Location Protocol March-96 [11] D. Cheriton and T. Mann, "Uniform Accessthe original ideas toDistributed Name Interpretationsother service location protocols found inthe V-system". [12] P. Mockapetris. "Domain Names - Concepts and Facilities". RFC 1034, NIC, November 1987 [13] P. Mockapetris. "Domain Names - Implementationmany other networking protocols. Leo McLaughlin andSpecification". RFC 1035, NIC. November 1987 [14] S. Deering. "Router Discovery Protocol". RFC 1256, NIC 1991. [15] ISO 639:1988 (E/F) "Code for the representation of namesMike Ritter (Metricom) provided much input into early version oflanguages"; ISO, Geneve, 1988. [16] T. Berners-Lee, L. Masinter and M. McCahill "Uniform Resource Locators". RFC 1738, NIC 1994. [17] N. Borenstein, N. Freed, "MIME (Multipurpose Internet Mail Extensions) Part One: Mechanismsthis document. Thanks also to Steve Deering (Xerox) forSpecifying and Describing the Format of Internet Message Bodies". RFC 1521, NIC 1993. [18] S. Alexander, R. Droms, "DHCP Optionsproviding his insight into distributed multicast protocols. Harry Harjono andBOOTP Vendor Extensions". RFC 1533, NIC 1993. [19] R. Droms, "Dynamic Host Configuration Protocol". RFC 1541, NIC 1993. Veizades, Kaplan, Guttman, Perkins [Page 37] INTERNET-DRAFT Service Location Protocol March-96 17.0 Author's Addresses John Veizades TGV, Inc. 370A Waller St. San Francisco, CA 94117 Phone: +1 415 252 8203 Fax: +1 415 252 8248 Email: veizades@tgv.com Scott Kaplan 346 Fair Oaks St. San Francisco, CA 94110 Phone: +1 415 285 4526 Email: scott@catch22.com Erik Guttman Sun Microsystems 2550 Garcia Avenue, MS PAL01-550 Mountain View, CA 94043-1100 Phone: +1 415 336 6697 Email: Erik.Guttman@eng.sun.com CharlesCharlie PerkinsIBM Corporation P.O. Box 704 Yorktown Heights NY 10598 Phone: +1 914 784 7350 EMail: perk@watson.ibm.com 18.0 Document Expiration This document expires September 11,supplied the basis for the URL based wire protocol in their Resource Discovery Protocol. Thanks also to Peerlogic, Inc. for supporting this work. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996Veizades, Kaplan, Guttman, Perkins[Page38] INTERNET-DRAFT58] Internet Draft Service Location ProtocolMarch-96 Appendix A -10 June 1996 A. Appendix: Technical contents of ISO 639:1988(E/F)(E/F): "Code for the representation of names oflanguages".languages" Two-letter lower-case symbols are used. The Registration Authority for ISO 639 [12] isInfoterm,OsterreichesInfoterm, Osterreiches Normungsinstitut (ON), Postfach 130, A-1021 Vienna, Austria. Contains additions from ISO 639/RA Newsletter No.1/1989 aa Afar gn Guarani mr Marathi ab Abkhazian gu Gujarati ms Malay af Afrikaans mt Maltese am Amharic ha Hausa my Burmese ar Arabichi Hindihe Hebrew as Assamesehr Croatianhi Hindi na Nauru ay Aymarahu Hungarianhr Croatian ne Nepali az Azerbaijanihy Armenianhu Hungarian nl Dutch hy Armenian no Norwegian ba Bashkiria Interlinguabe Byelorussianie Interlingueia Interlingua oc Occitan bg Bulgarianik Inupiakin Indonesian om (Afan) Oromo bh Bihariin Indonesianie Interlingue or Oriya bi Bislamais Icelandicik Inupiak bn Bengali; Banglait Italianis Icelandic pa Punjabi bo Tibetaniw Hebrewit Italian pl Polish br Breton ps Pashto, Pushtoja Japanesept Portuguese ca Catalanji Yiddishja Japanese co Corsican jw Javanese qu Quechua cs Czech cy Welsh ka Georgian rm Rhaeto-Romance kk Kazakh rn Kirundi da Danish kl Greenlandic ro Romanian de German km Cambodian ru Russian dz Bhutani kn Kannada rw Kinyarwanda ko Korean el Greek ks Kashmiri sa Sanskrit en English ku Kurdish sd Sindhi eo Esperanto ky Kirghiz sg Sangro es Spanish sh Serbo-Croatian et Estonian la Latin si Singhalese eu Basque ln Lingala sk Slovak lo Laothian sl Slovenian fa Persian lt Lithuanian sm Samoan fi Finnish lv Latvian, Lettish sn Shona fj Fiji so Somali fo Faeroese sq Albanian fr French mg Malagasy sr Serbian fy Frisian mi Maori ss Siswati Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 59] Internet Draft Service Location Protocol 10 June 1996 mk Macedonian st Sesotho ga Irish ml Malayalam su Sundanese gd Scots Gaelic mn Mongolian sv Swedish gl Galician mo Moldavian sw SwahiliVeizades, Kaplan, Guttman, Perkinsta Tamil ug Uigar te Telugu uk Ukrainian tg Tajik ur Urdu th Thai uz Uzbek ti Tigrinya tk Turkmen vi Vietnamese tl Tagalog vo Volapuk tn Setswana to Tonga wo Wolof tr Turkish ts Tsonga xh Xhosa tt Tatar tw Twi yi Yiddish yo Yoruba za Zhuang zh Chinese zu Zulu B. Appendix: For Further Reading Three related resource discovery protocols are NBP and ZIP which are part of the AppleTalk protocol family [11], the Legato Resource Administration Platform [18], and the Xerox Clearinghouse system [16]. Domain names and representation of addresses are used extensively in the Service Location Protocol. The references for these are RFCs 1034 and 1035 [14, 15]. An example of service discovery protocol for a specific service is Router Discovery [9]. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page 60] Internet Draft Service Location Protocol 10 June 1996 References [1] Unicode Technical Report #4. The unicode standard, version 1.1 (volumes 1 and 2). Technical Report (ISBN 0-201-56788-1) and (ISBN 0-201-60845-6), Unicode Consortium, 1994. [2] S. Alexander and R. Droms. DHCP Options and BOOTP Vendor Extensions. RFC 1533, October 1993. [3] R. Atkinson. IP Authentication Header. RFC 1826, August 1995. [4] R. Atkinson. IP Encapsulating Security Payload. RFC 1827, August 1995. [5] R. Atkinson. Security Architecture for the Internet Protocol. RFC 1825, August 1995. [6] T. Berners-Lee and D. Connolly. Hypertext Markup Language - 2.0. RFC 1866, November 1995. [7] T. Berners-Lee, L. Masinter, and M. McCahill. Uniform Resource Locators (URL). RFC 1738, December 1994. [8] N. Borenstein and N. Freed. MIME (Multipurpose Internet Mail Extensions) Part One: Mechanisms for Specifying and Describing the Format of Internet Message Bodies. RFC 1521, September 1993. [9] Stephen E. Deering, editor. ICMP Router Discovery Messages. RFC 1256, September 1991. [10] Ralph Droms. Dynamic Host Configuration Protocol. RFC 1541, October 1993. [11] S. Gursharan, R. Andrews, and A. Oppenheimer. Inside AppleTalk. Addison-Wesley, 1990. [12] Geneva ISO. Code for the representation of names of languages. ISO 639:1988 (E/F), 1988. [13] Geneva ISO 8879. Information Processing -- Text and Office Systems - Standard Generalized Markup Language (SGML). <URL:http://www.iso.ch/cate/d16387.html>, 1986. [14] P. Mockapetris. Domain Names - Concepts and Facilities. RFC 1034, November 1987. Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page39] INTERNET-DRAFT61] Internet Draft Service Location ProtocolMarch-96 ta Tamil te Telugu tg Tajik th Thai ti Tigrinya tk Turkmen tl Tagalog tn Setswana to Tonga tr Turkish ts Tsonga tt Tatar tw Twi uk Ukrainian ur Urdu uz Uzbek vi Vietnamese vo Volapuk wo Wolof xh Xhosa yo Yoruba zh Chinese zu Zulu Veizades, Kaplan, Guttman,10 June 1996 [15] P. Mockapetris. DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION. RFC 1035, November 1987. [16] D. Oppen and Y. Dalal. The clearinghouse: A decentralized agent for locating named objects in a distributed environment. Technical Report Tech. Rep. OPD-78103, Xerox Office Products Division, 1981. [17] X/Open Preliminary Specification. File System Safe UCS Transformation Format (FSS_UTF). Technical Report Document Number: P316, X/Open Company Ltd., 1994. [18] Legato Systems. The Legato Resource Administration Platform. Legato Systems, 1991. Authors' Addresses Questions about this memo can be directed to: John Veizades Erik Guttman @Home Network Sun Microsystems 385 Ravendale Dr. 2550 Garcia Avenue, MS PAL01-550 Mountain View, CA 94043 Mountain View, CA 94043-1100 Phone: +1 415 944 7332 Phone: +1 415 336 6697 Fax: +1 415 944 8500 Email: veizades@home.com Email: Erik.Guttman@eng.sun.com Charles Perkins Scott Kaplan IBM Corporation P.O. Box 704 346 Fair Oaks St. Yorktown Heights NY 10598 San Francisco, CA 94110 Phone: +1 914 784 7350 Phone: +1 415 285 4526 Fax: +1 914 784 6205 EMail: perk@watson.ibm.com Email: scott@catch22.com Veizades,Guttman,Perkins,Kaplan Expires 10 December 1996 [Page40]62] ----