RFC 3361
Dynamic Host Configuration Protocol (DHCP-for-IPv4) Option for Session Initiation Protocol (SIP) Servers
RFC 3361 β¨ Dynamic Host Configuration Protocol (DHCP-for-IPv4) Option for Session Initiation Protocol (SIP) Servers
- Network Working Group: this one is from the Network Working Group π
- Author: Henning Schulzrinne, Columbia University π
- Category: Standards Track π
- Date: August 2002 πΈ
- Obsoletes / Updates: the title block doesn't list anything this one obsoletes or updates π«Ά
Status of this Memo β¨
okay so this doc is a standards track protocol spec for the internet community, and it's basically asking everyone to talk about it and suggest fixes π For where this protocol sits in the standardization process, check the current edition of "Internet Official Protocol Standards" (STD 1) π And yes, you're allowed to distribute this memo as much as you want, distribution is unlimited π¦
Copyright Notice π
Copyright (C) The Internet Society (2002). All Rights Reserved. π
Abstract π¦
this doc defines a Dynamic Host Configuration Protocol (DHCP-for-IPv4) option π§ The option holds a list of domain names or IPv4 addresses that can be mapped to one or more Session Initiation Protocol (SIP) outbound proxy servers. It's one of several ways a SIP client can find the address of a local SIP server π₯
1. Terminology π
- DHCP client: a DHCP [1] client is an internet host that uses DHCP to get configuration parameters, like a network address πΈ
- DHCP server: a DHCP server is an internet host that hands configuration parameters out to DHCP clients π
- SIP server: as defined in RFC 3261 [2]. This server MUST be an outbound proxy server, as defined in [3]. In this doc, "SIP server" means the host the SIP server is running on π
- SIP client: as defined in RFC 3261. The client can be a user agent client or the client portion of a proxy server. In this doc, "SIP client" means the host the SIP client is running on π«Ά
In this document, the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" are to be interpreted as described in RFC 2119 [4]. π
2. Introduction π·
okay so SIP [2] is an application-layer control protocol that can set up, change, and end multimedia sessions or calls βοΈ A SIP system has a bunch of logical parts: user agents, proxy servers, redirect servers, and registrars. User agents MAY contain SIP clients, while proxy servers always do π
This doc specifies a DHCP option [1,5] that lets SIP clients find a local SIP server to use for all outbound SIP requests, which is called an outbound proxy server π¦ (SIP clients MAY contact the address in the SIP URL directly, without a local SIP server. But sometimes, like when firewalls are involved, SIP clients need a local server for outbound requests π₯) This is one of many possible ways to find the outbound SIP server. Manual configuration is another one π
3. SIP Server DHCP Option π
The SIP server DHCP option carries either a 32-bit (binary) IPv4 address or, preferably, a DNS (RFC 1035 [6]) fully-qualified domain name that the SIP client uses to find a SIP server π
The option has two encodings, which are picked by the encoding byte ('enc') right after the code byte. If the encoding byte is 0, it's followed by a list of domain names (Section 3.1 below). If it's 1, it's followed by one or more IPv4 addresses (Section 3.2). All implementations MUST support both encodings π The 'Len' field is the total number of octets in the option after the 'Len' field, and that count includes the encoding byte π§
A DHCP server MUST NOT mix the two encodings in the same DHCP message, even if it sends two different instances of the same option. Doing that would lead to incorrect client behavior, since DHCP processing rules say multiple instances of an option get concatenated into one option before processing [7] π
The code for this option is 120. π
3.1 Domain Name List π
If the 'enc' byte is 0, the encoding byte is followed by a sequence of labels, encoded the way Section 3.1 of RFC 1035 [6] describes. Here's the gist of that quoted section: each label is a one-octet length field followed by that many octets. Every domain name ends with the null label of the root, so a domain name finishes with a length byte of zero. The top two bits of every length octet have to be zero, and the other six bits limit a label to 63 octets or less. To keep implementations simple, the total length of a domain name (label octets plus label length octets) is capped at 255 octets or less π§
RFC 1035 encoding was picked so it can handle future internationalized domain name mechanisms π
The minimum length for this encoding is 3. π«Ά
The option MAY contain multiple domain names, but these SHOULD refer to different NAPTR records, not different A records. The client MUST try the records in the order listed, applying the mechanism from Section 4.1 of RFC 3263 [3] to each one. The client only resolves the next domain name if attempts to reach the first one failed, or yielded no common transport protocols between client and server, or the domain is administratively prohibited by client policy π₯
Multiple domain names don't replace NAPTR and SRV records. They just let one DHCP server point to outbound proxy servers run by several providers π
Clients MUST support compression according to the encoding in Section 4.1.4 of "Domain Names - Implementation And Specification" [6] π
Since the domain names are supposed to be different domains, compression will probably not do much, though π
If the domain list is longer than the maximum allowed in a single option (254 octets), then the domain list MUST be represented in the DHCP message as specified in [7] π
The DHCP option for this encoding has the following format:
Code Len enc DNS name of SIP server
+-----+-----+-----+-----+-----+-----+-----+-----+--
| 120 | n | 0 | s1 | s2 | s3 | s4 | s5 | ...
+-----+-----+-----+-----+-----+-----+-----+-----+--
As an example, say the server wants to offer two outbound proxy servers, "example.com" and "example.net". They'd be encoded like this π
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
|120|27 | 0 | 7 |'e'|'x'|'a'|'m'|'p'|'l'|'e'| 3 |'c'|'o'|'m'| 0 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
+---+---+---+---+---+---+---+---+---+---+---+---+---+ | 7
|'e'|'x'|'a'|'m'|'p'|'l'|'e'| 3 |'n'|'e'|'t'| 0 | +---+---+---
+---+---+---+---+---+---+---+---+---+---+
3.2 IPv4 Address List π¦
If the 'enc' byte is 1, the encoding byte is followed by a list of IPv4 addresses for the SIP outbound proxy servers available to the client. Servers MUST be listed in order of preference π
Its minimum length is 5, and the length MUST be a multiple of 4 plus one. The DHCP option for this encoding has the following format: β¨
Code Len enc Address 1 Address 2
+-----+-----+-----+-----+-----+-----+-----+-----+--
| 120 | n | 1 | a1 | a2 | a3 | a4 | a1 | ...
+-----+-----+-----+-----+-----+-----+-----+-----+--
4. Security Considerations π¨
The security considerations in RFC 2131 [1], RFC 2543 [2] and RFC 3263 [3] apply. If an adversary manages to modify the response from a DHCP server or insert its own response, a SIP user agent could be led to contact a rogue SIP server, possibly one that then intercepts call requests or denies service. A modified DHCP answer could also omit host names that translated to TLS-based SIP servers, thus facilitating intercept. π±π
5. IANA Considerations π
IANA has assigned a DHCP option number of 120 for the "SIP Servers DHCP Option" defined in this document. π
6. Acknowledgements π«Ά
Ralph Droms, Robert Elz, Wenyu Jiang, Peter Koch, Gautam Nair, Thomas Narten, Erik Nordmark, Jonathan Rosenberg, Kundan Singh, Sven Ubik, Bernie Volz and Dean Willis provided useful feedback through the evolution of this document. Thank you all, you're literally the reason this is good π
7. Bibliography π
- [1] Droms, R., "Dynamic Host Configuration Protocol", RFC 2131, March 1997.
- [2] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, A., Peterson, J., Sparks, R., Handley, M. and E. Schooler, "SIP: Session Initiation Protocol", RFC 3261, June 2002.
- [3] Rosenberg, J. and H. Schulzrinne, "Session Initiation Protocol (SIP): Locating SIP Servers", RFC 3263, June 2002.
- [4] Bradner, S., "Key words for use in RFCs to indicate requirement levels", BCP 14, RFC 2119, March 1997.
- [5] Alexander, S. and R. Droms, "DHCP options and BOOTP Vendor Extensions", RFC 2132, March 1997.
- [6] Mockapetris, P., "Domain names - implementation and specification", STD 13, RFC 1035, November 1987.
- [7] Lemon, T. and S. Cheshire, "Encoding Long DHCP Options", Work in Progress.
8. Author's Address π‘
Henning Schulzrinne
Dept. of Computer Science
Columbia University
1214 Amsterdam Avenue, MC 0401
New York, NY 10027
USA
EMail: schulzrinne@cs.columbia.edu
9. Full Copyright Statement π
Copyright (C) The Internet Society (2002). All Rights Reserved.
This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.
The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.
This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. π
Acknowledgement πΈ
Funding for the RFC Editor function is currently provided by the Internet Society. π
π¦ where this page comes from
- ietf: rfc3361 2002-08
- π girlified by claude-haiku-5-5 on : a language model's rewrite of the original, under its terms