热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

RFC2771AnAbstractAPIforMulticastAddressAllocation

NetworkWorkingGroupR.FinlaysonRequestforComments:2771LIVE.COMCategory:InformationalFebruar

Network Working Group R. Finlayson
Request for Comments: 2771 LIVE.COM
Category: Informational February 2000
An Abstract API for Multicast Address Allocation
Status of this Memo
This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2000). All Rights Reserved.
Abstract
This document describes the "abstract service interface" for the
dynamic multicast address allocation service, as seen by
applications. While it does not describe a concrete API (i.e., for a
specific programming language), it describes - in abstract terms -
the semantics of this service, including the guarantees that it makes
to applications.
Additional documents (not necessarily prodUCts of the IETF) would
describe concrete APIs for this service.
1. Introduction
Applications are the customers of a multicast address allocation
service, so a definition of this service should include not only the
inter-node network protocols that are used to implement it, but also
the "protocol" that applications use to Access the service. While
APIs ("application programming interfaces") for specific programming
languages (or operating systems) are outside the domain of the IETF,
it is appropriate for us to define - in abstract terms - the semantic
interface that this service presents to applications. Specific APIs
would then be based upon this abstract service interface.
Note that it is possible to implement the multicast address
allocation service in at least two different ways. The first (and
perhaps most common) way is for end nodes to allocate addresses by
communicating with a separate "Address Allocation Server" node, using
the "Host to Address Allocation Server" network protocol (MADCAP)
[1][7]. Alternatively, an "Address Allocation Server" implementation
might be co-located (along with one or more applications) on an end
node, in which case some other, internal, mechanism might be used to
access the server. In either case, however, the abstract service
interface (and, presumably, any specific APIs) would remain the same.
The remainder of this document describes the abstract interface.
Note that this interface is intended only for the allocation of
dynamic multicast addresses, as used by the traditional multicast
service model [2]. Future multicast service models might allocate or
assign multicast addresses in other ways, but this is outside the
scope of this document.
2. Abstract Data Types
The interface described below uses the following abstract data types:
- AddressFamily: e.g., IPv4 or IPv6
- MulticastAddress: An actual multicast address (i.e., that could
subsequently be used as the destination of a datagram)
- MulticastAddressSet: A set of "MulticastAddress"es
- LanguageTag: The code for a (human) language, as defined in [4]
- Scope: An "administrative scope" [3] from which multicast
addresses are to be allocated. Each scope is a
"MulticastAddressSet", with an associated set of
(character-string) names - indexed by "LanguageTag". (Each
language tag has at most one corresponding name, per
scope.) For each scope, a (language tag, name) pair may be
defined to be the "default" name for this scope. (See the
section "Querying the name of a scope" below.)
(An implementation of this abstract data type might also
include other information, such as a default TTL for the
scope.)
- Time: An (absolute) event time. This is used for specifying the
"lifetime" of multicast addresses: the period of time during
which allocated multicast addresses are guaranteed to be
available. (It is also used to specify the desired start
time for an "advance allocation".)
Note that a concrete API might prefer to specify some of
these times as relative times (i.e., relative to the current
time-of-day), rather than absolute time. (Relative times
have the advantage of not requiring clock synchronization.)
- Lease: A compound data type that describes the result of a
(successful) multicast address allocation. It consists of:
- [MulticastAddressSet] The set of addresses that were
allocated;
- [AddressFamily] The address family of these addresses
- [Time] The lifetime of these addresses (the same for
each address)
- [Time] The "start time" of the allocation. (See the
discussion of "advance allocation" below.) (A concrete
API would likely also include a MADCAP "Lease
Identifier" [1].)
- NestingRelationship: A binary data type that describes whether or
not two scopes nest. Two scopes nest if
traffic sent sent to a multicast group within
one scope could be seen by all hosts present
within the other scope were they to join the
multicast group within the first scope. This
value would be "False" for overlapping scopes
where only some (or none) of the hosts within
the second scope could see traffic sent to an
address due to the presence of an
administratively scoped boundary. In cases
where the first and second scopes are
topologically identical this value would be
"True."
- Status: A result code.
3. The Abstract Interface
3.1 Allocating multicast addresses:
alloc_multicast_addr(in AddressFamily family,
in Scope scope,
in Integer minDesiredAddresses,
in Integer maxDesiredAddresses,
in Time minDesiredStartTime,
in Time maxDesiredStartTime,
in Time minDesiredLifetime,
in Time maxDesiredLifetime,
out Lease multicastAddressSetLease,
out Status status)
This operation attempts to allocate a set of multicast addresses (the
size of this set is in the range [minDesiredAddresses,
maxDesiredAddresses]) within the given address family and scope, and
within a given range of desired lifetimes. ("minDesiredStartTime"
and "maxDesiredStartTime" are used to specify "advance allocation";
this is described in more detail below.)
If the address allocation succeeds, the result is returned in
"multicastAddressSetLease" (with "status" = OK).
During the lifetime of this lease, the allocation service will make a
"best-effort" attempt to not allocate any of these addresses to
others. (However, once the lease"s lifetime has eXPired, any of its
addresses can be allocated to others.)
Multicast addresses are allocated for a limited lifetime. An
application may attempt to extend this lifetime, but this operation
may fail. Therefore, an application must be prepared for the
possibility it will not be able to use the same addresses for as long
as it desires. In particular, the application must be prepared to
either quit early (because its original multicast address assignments
have expired), or, alternatively, to occasionally "renumber" its
multicast addresses (in some application or higher-level-protocol
dependent way), by making a new allocation. However, if an
application needs to consider "renumbering", it will always know this
in advance, at the time it acquired its current address(es) - by
checking the lifetime in the returned lease. An application will
never need to be notified asynchronously of the need to "renumber".
Possible errors:
- bad address family
- bad scope
- bad desired number of addresses (e.g., max - bad desired lifetimes (e.g., max - errors with the two "start time" parameters (see
"Advance allocation" below)
- no addresses can be allocated (for the requested parameters)
An allocation attempt can also fail with a result "status" code of
TRY_LATER, indicating that the requested allocation cannot be made at
this time, but that it might succeed if the caller retries the
attempt at some future time. (This future time is returned in the
"start time" field of the
"multicastAddressSetLease";
the other parts of this lease are undefined.)
Note that a concrete (i.e., programming language-specific) API for
multicast address allocation will probably include additional,
specialized variants of this general allocation operation. For
instance, it may include separate operations for:
- allocating only a single address
(i.e., minDesiredAddresses = maxDesiredAddresses = 1);
- (attempting to) allocate an address with a single, fixed
lifetime (i.e., minDesiredLifetime = maxDesiredLifetime);
- (attempting to) allocate an address for immediate use
(i.e., minDesiredStartTime = maxDesiredStartTime = "now")
3.2 Changing multicast addresses" lifetime:
change_multicast_addr_lifetime(in Lease multicastAddressSetLease,
in Time minDesiredLifetime,
in Time maxDesiredLifetime,
out Time lifetime)
This operation attempts to change the lifetime of previously
allocated multicast addresses. Unless an error occurs, it returns
the new lifetime (which might remain unchanged).
Possible errors:
- bad address family
- bad durations (e.g., max - the addresses" lifetime could not be changed
(and the existing lifetime was not in the requested range
[minDesiredLifetime,maxDesiredLifetime])
- the addresses were not ones that we had allocated
(see section 5.9) - or they have already expired
3.3 Deallocating multicast addresses:
deallocate_multicast_addr(in Lease multicastAddressSetLease) This
operation attempts to deallocate previously allocated multicast
addresses.
Possible errors:
- bad address family
- the addresses were not ones that we had allocated
(or they have already expired)
3.4 Querying the set of usable multicast address scopes:
get_multicast_addr_scopes(in AddressFamily family,
out "set of" Scope)
This operation returns the set of administrative multicast address
scopes that are defined for this node.
Possible errors:
- bad address family
3.5 Querying the name of a scope:
get_scope_name(in Scope scope,
in LanguageTag language,
out String name,
out LanguageTag languageForName)
This operation returns a character-string name for a given scope. If
the scope has a name in the specified "language", then this name (and
language) is returned. Otherwise, the scope"s default (language,
name) pair is returned.
Possible errors:
- bad scope.
3.6 Querying the nesting state of known usable multicast address scopes:
get_scope_nesting_state(in "set of" Scope,
out "matrix of" NestingRelationship)
Possible errors:
- bad scope.
- nesting state undetermined at this time.
This operation would return a matrix that shows the
current nesting relationships between the supplied
set of scopes which would have previously been supplied
via the get_multicast_addr_scopes(...) function.
3.7 Querying the set of scopes that a given scope is known to nest inside:
get_larger_scopes(in Scope,
out "set of" Scope)
This operation returns the set of administrative multicast
address scopes that are known to encompass the supplied
Scope.
Possible errors:
- bad scope.
- nesting state undetermined at this time.
3.8 Querying the set of scopes that are known to nest inside a given scope:
get_smaller_scopes(in Scope,
out "set of" Scope)
This operation returns the set of administrative multicast address
scopes that are known to nest inside the supplied Scope (NB this
would include those scopes that are topologically identical to the
supplied scope).
Possible errors:
- bad scope.
- nesting state undetermined at this time.
3.9 Note: The decision as to who is allowed to deallocate (or change
the lifetime of) a previously allocated multicast address set lease
is implementation-specific, and depends upon the security policy of
the host system. Thus it is not specified in this abstract API.
One possible starting point, however, is the following:
A previously allocated multicast address can be deallocated (or
have its lifetime queried or changed) by the same "principal", and
on the same node, as that which originally allocated it.
("principal" might, for example, be a "user" in the host operating
system.)
3.10 Advance allocation
By specifying "minDesiredStartTime = maxDesiredStartTime = "now"",
the address allocation operation - "alloc_multicast_addr" -
described above can be used to request a set of multicast
addresses that can be used *immediately* (and until their lifetime
expires). During this whole time, the addresses are not available
for allocation to others.
It is also possible - using the "minDesiredStartTime" and
"maxDesiredStartTime" parameters - to allocate multicast addresses
*in advance* - i.e., so that they have a future "start time" as
well as an expiration time. Before the start time, the multicast
addresses may be allocated to others.
Advance allocation is convenient for allocating addresses for
events that begin far in the future - e.g., several weeks or
months away. Without advance allocation, it would be necessary to
allocate addresses for a long period of time - even when it will
not be used. Such a request would not only be a wasteful use of
the multicast address space, but it may also be difficult to
implement (especially since address allocations are expected to
remain valid in spite of topology changes).
Advance allocation requests can produce the following errors (in
addition to those defined earlier):
- bad start time durations (e.g., max - requested start times conflict with requested lifetimes
(i.e., min start time > max lifetime)
The following operation is also defined:
change_multicast_addr_start_time(in Lease multicastAddressSetLease,
in Time minDesiredStartTime,
in Time maxDesiredStartTime,
out Time startTime)
This operation attempts to change the start time of previously
allocated multicast addresses. Unless an error occurs, it returns
the new start time (which might remain unchanged).
Possible errors: the same as "change_multicast_addr_lifetime"
4. Security Considerations
As noted in section 5.9 above, each implementation of this abstract
API should define a security policy that specifies when (and by whom)
previously allocated multicast addresses can be deallocated (or
queried, or have their lifetime changed).
Because multicast addresses are a finite resource, there is a
potential for a "denial of service" attack by allocating a large
number of multicast addresses without deallocating them. Preventing
such an attack, however, is not the role of the API, but rather by
the underlying MAAS ("Multicast Address Allocation Server(s)" [6]).
5. Acknowledgements
Many thanks to other participants in the "MALLOC" working group - in
particular Steve Hanna, Dave Thaler, Roger Kermode, and Pavlin
Radoslavov - for their valuable comments.
6. References
[1] Hanna, S., Patel, B. and M. Shah, "Multicast Address Dynamic
Client Allocation Protocol (MADCAP)", RFC2730, December 1999.
[2] Deering, S., "Host Extensions for IP Multicasting", STD 5, RFC
1112, August 1989.
[3] Meyer, D., "Administratively Scoped IP Multicast", BCP 23, RFC
2365, July, 1998.
[4] Alvestrand, H., "Tags for the Identification of Languages", RFC
1766, March 1995.
[5] Handley, M. and V. Jacobson, "SDP: Session Description Protocol",
RFC2327, April 1998.
[6] Estrin, D., Handley, M. and D. Thaler, "The Internet Multicast
Address Allocation Architecture", Work in Progress.
[7] Kermode, R., "MADCAP Multicast Scope Nesting State Option", Work
in Progress.
7. Author"s Address
Ross Finlayson,
Live Networks, Inc. (LIVE.COM)
EMail: finlayson@live.com
WWW: http://www.live.com/
8. Full Copyright Statement
Copyright (C) The Internet Society (2000). 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 RFCEditor function is currently provided by the
Internet Society.


推荐阅读
  • 深入理解Kafka服务端请求队列中请求的处理
    本文深入分析了Kafka服务端请求队列中请求的处理过程,详细介绍了请求的封装和放入请求队列的过程,以及处理请求的线程池的创建和容量设置。通过场景分析、图示说明和源码分析,帮助读者更好地理解Kafka服务端的工作原理。 ... [详细]
  • Go Cobra命令行工具入门教程
    本文介绍了Go语言实现的命令行工具Cobra的基本概念、安装方法和入门实践。Cobra被广泛应用于各种项目中,如Kubernetes、Hugo和Github CLI等。通过使用Cobra,我们可以快速创建命令行工具,适用于写测试脚本和各种服务的Admin CLI。文章还通过一个简单的demo演示了Cobra的使用方法。 ... [详细]
  • WebSocket与Socket.io的理解
    WebSocketprotocol是HTML5一种新的协议。它的最大特点就是,服务器可以主动向客户端推送信息,客户端也可以主动向服务器发送信息,是真正的双向平等对话,属于服务器推送 ... [详细]
  • 本文介绍了使用Spark实现低配版高斯朴素贝叶斯模型的原因和原理。随着数据量的增大,单机上运行高斯朴素贝叶斯模型会变得很慢,因此考虑使用Spark来加速运行。然而,Spark的MLlib并没有实现高斯朴素贝叶斯模型,因此需要自己动手实现。文章还介绍了朴素贝叶斯的原理和公式,并对具有多个特征和类别的模型进行了讨论。最后,作者总结了实现低配版高斯朴素贝叶斯模型的步骤。 ... [详细]
  • Servlet多用户登录时HttpSession会话信息覆盖问题的解决方案
    本文讨论了在Servlet多用户登录时可能出现的HttpSession会话信息覆盖问题,并提供了解决方案。通过分析JSESSIONID的作用机制和编码方式,我们可以得出每个HttpSession对象都是通过客户端发送的唯一JSESSIONID来识别的,因此无需担心会话信息被覆盖的问题。需要注意的是,本文讨论的是多个客户端级别上的多用户登录,而非同一个浏览器级别上的多用户登录。 ... [详细]
  • 问题描述:域名已经备案,我全部都有,也在后台配置了,但是手机预览,还是请求失败,PC端是可以请求 ... [详细]
  • 本文详细介绍了Java中vector的使用方法和相关知识,包括vector类的功能、构造方法和使用注意事项。通过使用vector类,可以方便地实现动态数组的功能,并且可以随意插入不同类型的对象,进行查找、插入和删除操作。这篇文章对于需要频繁进行查找、插入和删除操作的情况下,使用vector类是一个很好的选择。 ... [详细]
  • Python瓦片图下载、合并、绘图、标记的代码示例
    本文提供了Python瓦片图下载、合并、绘图、标记的代码示例,包括下载代码、多线程下载、图像处理等功能。通过参考geoserver,使用PIL、cv2、numpy、gdal、osr等库实现了瓦片图的下载、合并、绘图和标记功能。代码示例详细介绍了各个功能的实现方法,供读者参考使用。 ... [详细]
  • 本文讨论了clone的fork与pthread_create创建线程的不同之处。进程是一个指令执行流及其执行环境,其执行环境是一个系统资源的集合。在调用系统调用fork创建一个进程时,子进程只是完全复制父进程的资源,这样得到的子进程独立于父进程,具有良好的并发性。但是二者之间的通讯需要通过专门的通讯机制,另外通过fork创建子进程系统开销很大。因此,在某些情况下,使用clone或pthread_create创建线程可能更加高效。 ... [详细]
  • 本文介绍了Windows操作系统的版本及其特点,包括Windows 7系统的6个版本:Starter、Home Basic、Home Premium、Professional、Enterprise、Ultimate。Windows操作系统是微软公司研发的一套操作系统,具有人机操作性优异、支持的应用软件较多、对硬件支持良好等优点。Windows 7 Starter是功能最少的版本,缺乏Aero特效功能,没有64位支持,最初设计不能同时运行三个以上应用程序。 ... [详细]
  • 本文介绍了Python爬虫技术基础篇面向对象高级编程(中)中的多重继承概念。通过继承,子类可以扩展父类的功能。文章以动物类层次的设计为例,讨论了按照不同分类方式设计类层次的复杂性和多重继承的优势。最后给出了哺乳动物和鸟类的设计示例,以及能跑、能飞、宠物类和非宠物类的增加对类数量的影响。 ... [详细]
  • Imtryingtofigureoutawaytogeneratetorrentfilesfromabucket,usingtheAWSSDKforGo.我正 ... [详细]
  • 本文讨论了如何在codeigniter中识别来自angularjs的请求,并提供了两种方法的代码示例。作者尝试了$this->input->is_ajax_request()和自定义函数is_ajax(),但都没有成功。最后,作者展示了一个ajax请求的示例代码。 ... [详细]
  • 本文介绍了使用哈夫曼树实现文件压缩和解压的方法。首先对数据结构课程设计中的代码进行了分析,包括使用时间调用、常量定义和统计文件中各个字符时相关的结构体。然后讨论了哈夫曼树的实现原理和算法。最后介绍了文件压缩和解压的具体步骤,包括字符统计、构建哈夫曼树、生成编码表、编码和解码过程。通过实例演示了文件压缩和解压的效果。本文的内容对于理解哈夫曼树的实现原理和应用具有一定的参考价值。 ... [详细]
  • Ihaveaworkfolderdirectory.我有一个工作文件夹目录。holderDir.glob(*)>holder[ProjectOne, ... [详细]
author-avatar
我以为我疯叻_219
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有