RFC1045 - VMTP: Versatile Message Transaction Protocol: Prot(2)

时间:2005-02-12 来源: 作者: 点击:
and the server to "push up" against the maximum rate (and thus lose packets) without significant penalty. That is, every time that packet transmission exceeds the rate of the channel or receiver, the
  
and the server to "push up" against the maximum rate (and thus lose
packets) without significant penalty. That is, every time that packet
transmission exceeds the rate of the channel or receiver, the recovery
cost to retransmit the dropped packets is generally far less than
retransmitting from the first dropped packet.

The interpacket gap is expressed in 1/32nd's of the MTU packet
transmission time. The minimum interpacket gap is 0 and the maximum gap
that can be described in the protocol is 8 packet times. This places a
limit on the slowest receivers that can be efficiently used on a
network, at least those handling multi-packet Requests and Responses.
This scheme also limits the granularity of adjustment. However, the
granularity is relative to the speed of the network, as opposed to an
absolute time. For entities on different networks of significantly
different speed, we assume the interconnecting gateways can buffer
packets to compensate<2>. With different network speeds and intermediary
nodes subject to packet loss, a node must adjust the interpacket gap
based on packet loss. The interpacket gap parameter may be of limited
use.

2.6. Security

VMTP provides an (optional) secure mode that protects against the usual
security threats of peeking, impostoring, message tampering and replays.
Secure VMTP must be used to guarantee any of the transport-level
reliability properties unless it is guaranteed that there are no
intruders or agents that can modify packets and update the packet
checksums. That is, non-secure VMTP provides no guarantees in the
presence of an intelligent intruder.

The design closely follows that described by Birrell [1]. Authenticated
information about a remote entity, including an encryption/decryption
key, is obtained and maintained using a VMTP management operation, the
authenticated Probe operation, which is executed as a non-secure VMTP
message transaction. If a server receives a secure Request for which
the server has no entity state, it sends a Probe request to the VMTP

_______________

<2> Gateways must also employ techniques to preserve or intelligently
modify (if appropriate) the interpacket gaps. In particular, they must
be sure not to arbitrarily remove interpacket gaps as a result of their
forwarding of packets.

Cheriton [page 19]

RFC1045 VMTP February 1988

management module of the client, "challenging" it to provide an
authenticator that both authenticates the client as being associated
with a particular principal as well as providing a key for
encryption/decryption. The principal can include a real and effective
principal, as used in UNIX <3>. Namely, the real principal is the
principal on whose behalf the Request is being performed whereas the
effective principal is the principal of the module invoking the request
or remote procedure call.

Peeking is prevented by encrypting every Request and Response packet
with a working Key that is shared between Client and Server.
Impostoring and replays are detected by comparing the Transaction
identifier with that stored in the corresponding entity state record
(which is created and updated by VMTP as needed). Message tampering is
detected by encryption of the packet including the Checksum field. An
intruder cannot update the checksum after modifying the packet without
knowing the Key. The cost of fully encrypting a packet is close to the
cost of generating a cryptographic checksum (and of course, encryption
is needed in the general case), so there is no explicit provision for
cryptographic checksum without packet encryption.

A Client determines the Principal of the Server and acquires an
authenticator for this Server and Principal using a higher level
protocol. The Server cannot decrypt the authenticator or the Request
packets unless it is in fact the Principal expected by the Client.

An encrypted VMTP packet is flagged by the EPG bit in the VMTP packet
header. Thus, encrypted packets are easily detected and demultiplexed
from unencrypted packets. An encrypted VMTP packet is entirely
encrypted except for the Client, Version, Domain, Length and Packet
Flags fields at the beginning of the packet. Client identifiers can be
assigned, changed and used to have no real meaning to an intruder or to
only communicate public information (such as the host Internet address).
They are otherwise just a random means of identification and
demultiplexing and do not therefore divulge any sensitive information.
Further secure measures must be taken at the network or data link levels
if this information or traffic behavior is considered sensitive.

VMTP provides multiple authentication domains as well as an encryption
qualifier to accommodate different encryption algorithms and their

_______________

<3> Principal group membership must be obtained, if needed, by a
higher level protocol.

Cheriton [page 20]

RFC1045 VMTP February 1988

corresponding security/performance trade-offs. (See Appendix V.) A
separate key distribution and authentication protocol is required to
handle generation and distribution of authenticators and keys. This
protocol can be implemented on top of VMTP and can closely follow the
Birrell design as well.

Security is optional in the sense that messages may be secure or
non-secure, even between consecutive message transactions from the same
client. It is also optional in that VMTP clients and servers are not
required to implement secure VMTP (although they are required to respond
intelligently to attempts to use secure VMTP). At worst, a Client may
fail to communicate with a Server if the Server insists on secure
communication and the Client does not implement security or vice versa.
However, a failure to communicate in this case is necessary from a
security standpoint.

2.7. Multicast

The Server entity identifier in a message transaction can identify an
entity group, in which case the Request is multicast to every Entity in
this group (on a best-efforts basis). The Request is retransmitted
until at least one Response is received (or an error timeout occurs)
unless it is a datagram Request. The Client can receive multiple
Responses to the Request.

The VMTP service interface does not directly provide reliable multicast
because it is expensive to provide, rarely needed by applications, and
can be implemented by applications using the multiple Response feature.
However, the protocol itself is adequate for reliable multicast using
positive acknowledgments. In particular, a sophisticated Client
implementation could maintain a list of members for each entity group of
interest and retransmit the Request until acknowledged by all members.
No modifications are required to the Server implementations.

VMTP supports a simple form of subgroup addressing. If the CRE bit is
set in a Request, the Request is delivered to the subgroup of entities
in the Server group that are co-resident with one or more entities in
the group (or individual entity) identified by the CoresidentEntity
field of the Request. This is commonly used to send to the manager
entity for a particular entity, where Server specifies the group of such
managers. Co-resident means "using the same VMTP module", and logically
on the same network host. In particular, a Probe request can be sent to
the particular VMTP management module for an entity by specifying the
VMTP management group as the Server and the entity in question as the
CoResidentEntity.

Cheriton [page 21]

RFC1045 VMTP February 1988

As an experimental aspect of the protocol, VMTP supports the Server
sending a group Response which is sent to the Client as well as members
of the destination group of Servers to which the original Request was
sent. The MDG bit indicates whether the Client is a member of this
group, allowing the Server module to determine whether separately
addressed packet groups are required to send the Response to both the
Client and the Server group. Normally, a Server accepts a group
Response only if it has received the Request and not yet responded to
the Client. Also, the Server must explicitly indicate it wants to
accept group Responses. Logically, this facility is analogous to
responding to a mail message sent to a distribution list by sending a
copy of the Response to the distribution list.

2.8. Real-time Communication

VMTP provides three forms of support for real-time communication, in
addition to its standard facilities, which make it applicable to a wide
range of real-time applications. First, a priority is transmitted in
each Request and Response which governs the priority of its handling.
The priority levels are intended to correspond roughly to:

- urgent/emergency.

- important

- normal

- background.

with additional gradations for each level. The interpretation and
implementation of these priority levels is otherwise host-specific, e.g.
the assignment to host processing priorities.

Second, datagram Requests allow the Client to send a datagram to another
entity or entity group using the VMTP naming, transmission and delivery
mechanism, but without blocking, retransmissions or acknowledgment.
(The client can still request acknowledgment using the APG bit although
the Server does not expect missing portions of a multi-packet datagram
Request to be retransmitted even if some are not received.) A datagram
Request in non-streamed mode supersedes all previous Requests from the
same Client. A datagram Request in stream mode is queued (if necessary)
after previous datagram Requests on the same stream. (See Section
2.11.)

Finally, VMTP provides several control bit flags to modify the handling
of Requests and Responses for real-time requirements. First, the

Cheriton [page 22]

RFC1045 VMTP February 1988

conditional message delivery (CMD) flag causes a Request to be discarded
if the recipient is not waiting for it when it arrives, similarly for
the Response. This option allows a client to send a Request that is
contingent on the server being able to process it immediately. The
header checksum only (HCO) flag indicates that the checksum has been
calculated only on the VMTP header and not on the data segment.
Applications such as voice and video can avoid the overhead of
calculating the checksum on data whose utility is insensitive to typical
bit errors without losing protection on the header information.
Finally, the No Retransmission (NRT) flag indicates that the recipient
of a message should not ask for retransmission if part of the message is
missing but rather either use what was received or discard it.

None of these facilities introduce new protocol states. In fact, the
total processing overhead in the normal case is a bit flag test for CMD,
HCO or NRT plus assignment of priority on packet transmission and
reception. (In fact, CMD and NRT are not tested in the normal case.)
The additional code complexity is minimal. We feel that the overhead
for providing these real-time facilities is minimal and that these
facilities are both important and adequate for a wide class of real-time
applications.

Several of the normal facilities of VMTP appear useful for real-time
applications. First, multicast is useful for distributed, replicated
(fault-tolerant) real-time applications, allowing efficient state query
and update for (for example) sensors and control state. Second, the DGM
or idempotent flag for Responses has some real-time benefits, namely: a
Request is redone to get the latest values when the Response is lost,
rather than just returning the old values. The desirability of this
behavior is illustrated by considering a request for the current time of
day. An idempotent handling of this request gives better accuracy in
returning the current time in the case that a retransmission is
necessary. Finally, the request-response semantics (in the absence of
streaming) of each new Request from a Client terminating the previous
message transactions from that Client, if any, provides the "most recent
is most important" handling of processing that most real-time
applications require.

In general, a key design goal of VMTP was provide an efficient
general-purpose transport protocol with the features required for
real-time communication. Further experience is required to determine
whether this goal has been achieved.

Cheriton [page 23]

RFC1045 VMTP February 1988

2.9. Forwarded Message Transactions

A Server may invoke another Server to handle a Request. It is fairly
common for the invocation of the second Server to be the last action
performed by the first Server as part of handling the Request. For
example, the original Server may function primarily to select a process
to handle the Request. Also, the Server may simply check the
authorization on the Request. Describing this situation in the context
of RPC, a nested remote procedure call may be the last action in the
remote procedure and the return parameters are exactly those of the
nested call. (This situation is analogous to tail recursion.)

As an optimization to support this case, VMTP provides a Forward
operation that allows the server to send the nested Request to the other
server and have this other server respond directly to the Client.

If the message transaction being forwarded was not multicast, not secure
or the two Servers are the same principal and the ForwardCount of the
Request is less than the maximum forward count of 15, the Forward
operation is implemented by the Server sending a Request onto the next
Server with the forwarded Request identified by the same Client and
Transaction as the original Request and a ForwardCount one greater than
the Request received from the Client. In this case, the new Server
responds directly to the Client. A forwarded Request is illustrated in
the following figure.

+---------+ Request +----------+
| Client +---------------->| Server 1 |
+---------+ +----------+
^ |
| | forwarded Request
| V
| Response +----------+
+----------------------| Server 2 |
+----------+

If the message transaction does not meet the above requirements, the
Server's VMTP module issues a nested call and simply maps the returned
Response to a Response to original Request without further Server-level
processing. In this case, the only optimization over a user-level
nested call is one fewer VMTP service operation; the VMTP module handles
the return to the invoking call directly. The Server may also use this
form of forwarding when the Request is part of a stream of message
transactions. Otherwise, it must wait until the forwarded message
transaction completes before proceeding with the subsequent message
transactions in the stream.

Cheriton [page 24]

RFC1045 VMTP February 1988

Implementation of the user-level Forward operation is optional,
depending on whether the server modules require this facility. Handling
an incoming forwarded Request is a minor modification of handling a
normal incoming Request. In particular, it is only necessary to examine
the ForwardCount field when the Transaction of the Request matches that
of the last message transaction received from the Client. Thus, the
additional complexity in the VMTP module for the required forwarding
support is minimal; the complexity is concentrated in providing a highly
optimized user-level Forward primitive, and that is optional.

2.10. VMTP Management

VMTP management includes operations for creating, deleting, modifying
and querying VMTP entities and entity groups. VMTP management is
logically implemented by a VMTP management server module that is invoked
using a message transaction addressed to the Server, VMTP_MANAGER_GROUP,
a well-known group entity identifier, in conjunction with Coresident
Entity mechanism introduced in Section 2.7. A particular Request may
address the local module, the module managing a particular entity, the
set of modules managing those entities contained in a specific group or
all management modules, as appropriate.

The VMTP management procedures are specified in Appendix III.

2.11. Streamed Message Transactions

Streamed message transactions refer to two or more message transactions
initiated by a Client before it receives the response to the first
message transaction, with each transaction being processed and responded
to in order but asynchronous relative to the initiation of the
transactions. A Client streams messages transactions, and thereby has
multiple message transactions outstanding, by sending them as part of a
single run of message transactions. A run of message transactions is a
sequence of message transactions with the same Client and Server and
consecutive Transaction identifiers, with all but the first and last
Requests and Responses flagged with the NSR (Not Start Run) and NER
(Not End Run) control bits. (Conversely, the first Request and
Response does not have the NSR set and the last Request and Response
does not have the NER bit set.) The message transactions in a run use

Cheriton [page 25]

RFC1045 VMTP February 1988

consecutive transaction identifiers (except if the STI bit <4> is used
in one, in which case the transaction identifier for the next message
transaction is 256 greater, rather than 1).

The Client retains a record for each outstanding transaction until it
gets a Response or is timed out in error. The record provides the
information required to retransmit the Request. On retransmission
timeout, the client retransmits the last Request for which it has not
received a Response the same as is done with non-streamed communication.
(I.e. there need be only one timeout for all the outstanding message
transactions associated with a single client.)

The consecutive transaction identifiers within a run of message
transactions are used as sequence numbers for error control. The Server
handles each message transaction in the sequence specified by its
transaction identifier. When it receives a message transaction that is
not marked as the beginning of a run, it checks that it previously
received a message transaction with the predecessor transaction
identifier, either 1 less than the current one or 256 less if the
previous one had the STI bit set. If not, the Server sends a
NotifyVmtpClient operation to the Client's manager indicating either:
(1) the first message transaction was not fully received, or else (2) it
has no record of the last one received. If the NRT control flag is set,
it does not await nor expect retransmission but proceeds with handling
this Request. This flag is used primarily when datagram Requests are
used as part of a stream of message transactions. If NRT was not
specified, the Client must retransmit from the first message transaction
not fully received (either at all or in part) before the Server can
proceed with handling this run of Requests or else restart the run of
message transactions.

The Client expects to receive the Responses in a consecutive sequence,
using the Transaction identifier to detect missing Responses. Thus, the
Server must return Responses in sequence except possibly for some gaps,
as follows. The Server can specify in the PGcount field in a Response,
the number of consecutively previous Responses that this Response

_______________

<4> The STI bit is used by the Client to effectively allocate 255
transaction identifiers for use by the Server in returning a large
Response or stream of Responses.

Cheriton [page 26]

RFC1045 VMTP February 1988

corresponds to, up to a maximum of 255 previous Responses <5>. Thus,
for example, a Response with Transaction identifier 46 and PGcount 3
represents Responses 43, 44, 45 and 46. This facility allows the Server
to eliminate sending Responses to Requests that require no Response,
effectively batching the Responses into one. It also allows the Server
to effectively maintain strictly consecutive sequencing when the Client
has skipped 256 Transaction identifiers using the STI bit and the Server
does not have that many Responses to return.

If the Client receives a Response that is not consecutive, it
retransmits the Request(s) for which the Response(s) is/are missing
(unless, of course, the corresponding Requests were sent as datagrams).
The Client should wait at the end of a run of message transactions for
the last one to complete.

When a Server receives a Request with the NSR bit clear and a higher
transaction identifier than it currently has for the Client, it
terminates all processing and discards Responses associated with the
previous Requests. Thus, a stream of message transactions is
effectively aborted by starting a new run, even if the Server was in the
middle of handling the previous run.

Using a mixture of datagram and normal Requests as part of a stream of
message transactions, particularly with the use of the NRT bit, can lead
to complex behavior under packet loss. It is recommended that a run of
message transactions be all of one type to avoid problems, i.e. all
normal or all datagrams. Finally, when a Server forwards a Request that
is part of a run, it must suspend further processing of the subsequent
Requests until the forwarded Request has been handled, to preserve order
of processing. The simplest handling of this situation is to use a real
nested call when forwarding with streamed message transactions.

Flow control of streamed message transactions relies on rate control at
the Client plus receipt (or non-receipt) of management notify operations
indicating the presence of overrunning. A Client must reduce the number
of outstanding message transactions at the Server when it receives a
NotifyVmtpServer operation with the MSGTRANS_OVERFLOW ResponseCode. The
transact parameter indicates the last packet group that was accepted.

_______________

<5> PGcount actually corresponds to packet groups which are described
in Section 2.13. This (simplified) description is accurate when there
is one Request or Response per packet group.

Cheriton [page 27]

RFC1045 VMTP February 1988

The implementation of multiple outstanding message transactions requires
the ability to record, timeout and buffer multiple outstanding message
transactions at the Client end as well as the Server end. However, this
facility is optional for both the Client and the Server. Client systems
with heavy-weight processes and high network access cost are most likely
to benefit from this facility. Servers that serve a wide variety of
client machines should implement streaming to accommodate these types of
clients.

2.12. Fault-Tolerant Applications

One approach to fault-tolerant systems is to maintain a log of all
messages sent at each node and replay the messages at a node when the
node fails, after restarting it from the last checkpoint <6>. As an
experimental facility, VMTP provides a Receive Sequence Number field in
the NotifyVmtpClient and NotifyVmtpServer operations as well as the Next
Receive Sequence (NRS) flag in the Response packet to allow a sender to
log a receive sequence number with each message sent, allowing the
packets to be replayed at a recovering node in the same sequence as they
were originally received, thereby recovering to the same state as
before.

Basically, each sending node maintains a receive sequence number for
each receiving node. On sending a Request to a node, it presume that
the receive sequence number is one greater than the one it has recorded
for that node. If not, the receiving node sends a notify operation
indicating the receive sequence number assigned the Request. The NRS in
the Response confirms that the Request message was the next receive
sequence number, so the sender can detect if it failed to receive the
notify operation in the previous case. With Responses, the packets are
ordered by the Transaction identifier except for multicast message
transactions, in which there may be multiple Responses with the same
identification. In this case, NotifyVmtpServer operations are used to
provide receive sequence numbers.

This experimental extension of the protocol is focused on support for
fault-tolerant real-time distributed systems required in various
critical applications. It may be removed or extended, depending on
further investigations.

_______________

<6> The sender-based logging is being investigated by Willy Zwaenepoel
of Rice University.

Cheriton [page 28]

RFC1045 VMTP February 1988

2.13. Packet Groups

A message (whether Request or Response) is sent as one or more packet
groups. A packet group is one or more packets, each containing the same
transaction identification and message control block. Each packet is
formatted as below with the message control block logically embedded in
the VMTP header.

+------------------------------------++---------------------+
| VMTP Header || |
+------------+-----------------------|| segment data |
|VMTP Control| Message Control Block || |
+------------+-----------------------++---------------------+

The some fields of the VMTP control portion of the packet and data
segment portion can differ between packets within the same packet group.

The segment data portion of a packet group represents up to 16
kilooctets of the segment specified in the message control block. The
portion contained in each packet is indicated by the PacketDelivery
field contained in the VMTP header. The PacketDelivery field as a bit
mask has a similar interpretation to the MsgDelivery field in that each
bit corresponds to a segment data block of 512 octets. The
PacketDelivery field limits a packet group to 16 kilooctets and a
maximum of 32 VMTP packets (with a minimum of 1 packet). Data can be
sent in fewer packets by sending multiple data blocks per packet. We
require that the underlying datagram service support delivery of (at
minimum) the basic 580 octet VMTP packet <7>. To illustrate the use of
the PacketDelivery field, consider for example the Ethernet which has a
MTU of 1536 octets. so one would send 2 512-octet segment data blocks
per packet. (In fact, if a third block is last in the segment and less
than 512 octets and fits in the packet without making it too big, an
Ethernet packet could contain three data blocks. Thus, an Ethernet
packet group for a segment of size 0x1D00 octets (14.5 blocks) and
MsgDelivery 0x000074FF consists of 6 packets indicated as follows <8>.

_______________

<7> Note that with a 20 octet IP header, a VMTP packet is 600
octets. We propose the convention that any host implementing VMTP
implicitly agrees to accept IP/VMTP packets of at least 600 octets.

<8> We use the C notation 0xHHHH to represent a hexadecimal number.

Cheriton [page 29]

RFC1045 VMTP February 1988

Packet
Delivery 1 1 1 1 1 1 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 . . .
0000 0400 0800 0C00 1000 1400 1800 1C00
+----+----+----+----+----+----+----+-+
Segment |....|....|....|....|....|....|....|.|
+----+----+----+----+----+----+----+-+
: : : : : : : / / :
v v v v v v v /| v
+----+----+----+----+ +----+ +---+
Packets | 1 | 2 | 3 | 4 | | 5 | | 6 |
+----+----+----+----+ +----+ +---+

Each '.' is 256 octets of data. The PacketDelivery masks for the 6
packets are: 0x00000003, 0x0000000C, 0x00000030, 0x000000C0, 0x00001400
and 0x00006000, indicating the segment blocks contained in each of the
packets. (Note that the delivery bits are in little endian order.)

A packet group is sent as a single "blast" of packets with no explicit
flow control. However, the sender should estimate and transmit at a
rate of packet transmission to avoid congesting the network or
overwhelming the receiver, as described in Section 2.5.6. Packets in a
packet group can be sent in any order with no change in semantics.

When the first packet of a packet group is received (assuming the Server
does not decide to discard the packet group), the Server saves a copy of
the VMTP packet header, indicates it is currently receiving a packet
group, initializes a "current delivery mask" (indicating the data in the
segment received so far) to 0, accepts this packet (updating the current
delivery mask) and sets the timer for the packet group. Subsequent
packets in the packet group update the current delivery mask.

Reception of a packet group is terminated when either the current
delivery mask indicates that all the packets in the packet group have
been received or the packet group reception timer expires (set to TC3 or
TS1). If the packet group reception timer expires, if the NRT bit is
set in the Control flags then the packet group is discarded if not
complete unless MDM is set. In this case, the MsgDelivery field in the
message control block is set to indicate the segment data blocks
actually received and the message control block and segment data
received is delivered to application level.

If NRT is not set and not all data blocks have been received, a
NotifyVmtpClient (if a Request) or NotifyVmtpServer (if a Response) is
sent back with a PacketDelivery field indicating the blocks received.
The source of the packet group is then expected to retransmit the
missing blocks. If not all blocks of a Request are received after
RequestAckRetries(Client) retransmissions, the Request is discarded and

Cheriton [page 30]

RFC1045 VMTP February 1988

a NotifyVmtpClient operation with an error response code is sent to the
client's manager unless MDM is set. With a Response, there are
ResponseAckRetries(Server) retransmissions and then, if MDM is not set,
the requesting entity is returned the message control block with an
indication of the amount of segment data received extending contiguously
from the start of the segment. E.g. if the sender sent 6 512-octet
blocks and only the first two and the last two arrived, the receiver
would be told that 1024 octets were received. The ResponseCode field is
set to BAD_REPLY_SEGMENT. (Note that VMTP is only able to indicate the
specific segment blocks received if MDM is set.)

The parameters RequestAckRetries(Client) and ResponseAckRetries(Server)
could be set on a per-client and per-server basis in a sophisticated
implementation based on knowledge of packet loss.

If the APG flag is set, a NotifyVmtpClient or NotifyVmtpServer
operation is sent back at the end of the packet group reception,
depending on whether it is a Request or a Response.

At minimum, a Server should check that each packet in the packet group
contains the same Client, Server, Transaction identifier and SegmentSize
fields. It is a protocol error for any field other than the Checksum,
packet group control flags, Length and PacketDelivery in the VMTP header
to differ between any two packets in one packet group. A packet group
containing a protocol error of this nature should be discarded.

Notify operations should be sent (or invoked) in the manager whenever
there is a problem with a unicast packet. i.e. negative acknowledgments
are always sent in this case. In the case of problems with multicast
packets, the default is to send nothing in response to an error
condition unless there is some clear reason why no other node can
respond positively. For example, the packet might be a Probe for an
entity that is known to have been recently existing on the receiving
host but now invalid and could not have migrated. In this case, the
receiving host responds to the Probe indicating the entity is
nonexistent, knowing that no other host can respond to the Probe. For
packets and packet groups that are received and processed without
problems, a Notify operation is invoked only if the APG bit is set.

2.14. Runs of Packet Groups

A run of packet groups is a sequence of packet groups, all Request
packets or all Response packets, with the same Client and consecutive
transaction identifiers, all but the first and last packets flagged with
the NSR (Not Start Run) and NER (Not End Run) control bits. When each
packet group in the run corresponds to a single Request or Response, it

Cheriton [page 31]

RFC1045 VMTP February 1988

is identical to a run of message transactions. (See Section 2.11)
However, a Request message or a Response message may consists of up to
256 packet groups within a run, for a maximum of 4 megaoctets of segment
data. A message that is continued in the next packet group in the run
is flagged in the current packet group by the CMG flag. Otherwise, the
next packet group in the run (if any) is treated as a separate Request
or Response.

Normally, each Request and Response message is sent as a single packet
group and each run consists of a single packet group. In this case
neither NSR or NER are set. For multi-packet group messages, the
PacketDelivery mask in the i-th packet group of a message corresponds to
the portion of the segment offset by i-1 times 16 kilooctets,
designating the the first packet group to have i = 1.

2.15. Byte Order

For purposes of transmission and reception, the MCB is treated as
consisting of 8 32-bit fields and the segment is a sequence of bytes.
VMTP transmits the MCB in big-endian order, performing byte-swapping, if
necessary, before transmission. A little-endian host must byte-swap the
MCB on reception. (The data segment is transmitted as a sequence of
bytes with no reordering.) The byte order of the sender of a message is
indicated by the LEE bit in the entity identifier for the sender, the
Client field if a Request and the Server field if a Response. The
sender and receiver of a message are required to agree in some higher
level protocol (such as an RPC presentation protocol) on who does
further swapping of the MCB and data segment if required by the types of
the data actually being transmitted. For example, the segment data may
contain a record with 8-bit, 16-bit and 32-bit fields, so additional
transformation is required to move the segment from a host of one byte
order to another.

VMTP to date has used a higher-level presentation protocol in which
segment data is sent in the native order of the sending host and
byte-swapped as necessary by the receiving host. This approach
minimizes the byte-swapping overhead between machines of common byte
order (including when the communication is transparently local to one
host), avoids a strong bias in the protocol to one byte-order, and
allows for the sending entity to be sending to a group of hosts with
different byte orders. (Note that the byte-swap overhead for the MCB is
minimal.) The presentation-level overhead is minimal because most
common operations, such as file access operations, have parameters that
fit the MCB and data segment data types exactly.

Cheriton [page 32]

RFC1045 VMTP February 1988

2.16. Minimal VMTP Implementation

A minimal VMTP client needs to be able to send a Request packet group
and receive a Response packet group as well as accept and respond to
Requests sent to its management module, including Probe and NotifyClient
operations. It may also require the ability to invoke Probe and Notify
operations to locate a Server and acknowledge responses. (the latter
only if it is involved in transactions that are not idempotent or
datagram message transactions. However, a simple sensor, for example,
can transmit VMTP datagram Requests indicating its current state with
even less mechanism.) The minimal client thus requires very little code
and is suitable as a basis for (e.g.) a network boot loader.

A minimal VMTP server implements idempotent, non-encrypted message
transactions, possibly with no segment data support. It should use an
entity state record for each Request but need only retain it while
processing the Request. Without segment data larger than a packet,
there is no need for any timers, buffering (outside of immediate request
processing) or queuing. In particular, it needs only as many records as
message transactions it handles simultaneously (e.g. 1). The entity
state record is required to recognize and respond to Request
retransmissions during request processing.

The minimal server need only receive Requests and and be able to send
Response packets. It need have only a minimal management module
supporting Probe operations. (Support for the NotifyVmtpClient
operation is only required if it does not respond immediately to a
Request.) Thus the VMTP support for say a time server, sensor, or
actuator can be extremely simple. Note that the server need never issue
a Probe operation if it uses the host address of the Request for the
Response and does not require the Client information returned by the
Probe operation. The minimal server should also support reception of
forwarded Requests.

2.17. Message vs. Procedural Request Handling

A request-response protocol can be used to implement two forms of
semantics on reception. With procedural handling of a Request, a
Request is handled by a process associated with the Server that
effectively takes on the identity of the calling process, treating the
Request message as invoking a procedure, and relinquishing its
association to the calling process on return. VMTP supports multiple
nested calls spanning multiple machines. In this case, the distributed
call stack that results is associated with a single process from the
standpoint of authentication and resource management, using the
ProcessId field supported by VMTP. The entity identifiers effectively

Cheriton [page 33]

RFC1045 VMTP February 1988

link these call frames together. That is, the Client field in a Request
is effectively the return link to the previous call frame.

With message handling of a Request, a Request message is queued for a
server process. The server process dequeues, reads, processes and
responds to the Request message, executing as a separate process.
Subsequent Requests to the same server are queued until the server asks
to receive the next Request.

Procedural semantics have the advantage of allowing each Request (up to
the resource limits of the Server) to execute concurrently at the
Server, with Request-specific synchronization. Message semantics have
the advantage that Requests are serialized at the Server and that the
request processing logically executes with the priority, protection and
independent execution of a separate process. Note that procedural and
message handling of a request appear no differently to the client
invoking the message transaction, except possibly for differences in
performance.

We view the two Request handling approaches as appropriate under
different circumstances. VMTP supports both models.

2.18. Bibliography

The basic protocol is similar to that used in the original form of the V
kernel [3, 4] as well as the transport protocol of Birrell and
Nelson's [2] remote procedure call mechanism. An earlier version of the
protocol was described in SIGCOMM'86 [6]. The rate-based flow control
is similar to the techniques of Netblt [9]. The support for idempotency
draws, in part, on the favorable experience with idempotency in the V
distributed system. Its use was originally inspired by the Woodstock
File Server [11]. The multicast support draws on the multicast
facilities in V [5] and is designed to work with, and is now implemented
using, the multicast extensions to the Internet [8] described in RFC966
and 988. The secure version of the protocol is similar to that
described by Birrell [1] for secure RPC. The use of runs of packet
groups is similar to Fletcher and Watson's delta-T protocol [10]. The
use of "management" operations implemented using VMTP in place of
specialized packet types is viewed as part of a general strategy of
using recursion to simplify protocol architectures [7].

Finally, this protocol was designed, in part, to respond to the
requirements identified by Braden in RFC955. We believe that VMTP
satisfies the requirements stated in RFC955.

Cheriton [page 34]

RFC1045 VMTP February 1988

[1] A.D. Birrell, "Secure Communication using Remote Procedure
Calls", ACM. Trans. on Computer Systems 3(1), February, 1985.

[2] A. Birrell and B. Nelson, "Implementing Remote Procedure Calls",
ACM Trans. on Computer Systems 2(1), February, 1984.

[3] D.R. Cheriton and W. Zwaenepoel, "The Distributed V Kernel and its
Performance for Diskless Workstations", In Proceedings of the 9th
Symposium on Operating System Principles, ACM, 1983.

[4] D.R. Cheriton, "The V Kernel: A Software Base for Distributed
Systems", IEEE Software 1(2), April, 1984.

[5] D.R. Cheriton and W. Zwaenepoel, "Distributed Process Groups in
the V Kernel", ACM Trans. on Computer Systems 3(2), May, 1985.

[6] D.R. Cheriton, "VMTP: A Transport Protocol for the Next
Generation of Communication Systems", In Proceedings of
SIGCOMM'86, ACM, Aug 5-7, 1986.

[7] D.R. Cheriton, "Exploiting Recursion to Simplify an RPC
Communication Architecture", in preparation, 1988.

[8] D.R. Cheriton and S.E. Deering, "Host Groups: A Multicast
Extension for Datagram Internetworks", In 9th Data Communication
Symposium, IEEE Computer Society and ACM SIGCOMM, September, 1985.

[9] D.D. Clark and M. Lambert and L. Zhang, "NETBLT: A Bulk Data
Transfer Protocol", Technical Report RFC969, Defense Advanced
Research Projects Agency, 1985.

[10] J.G. Fletcher and R.W. Watson, "Mechanism for a Reliable Timer-
based Protocol", Computer Networks 2:271-290, 1978.

Cheriton [page 35]

RFC1045 VMTP February 1988

[11] D. Swinehart and G. McDaniel and D. Boggs, "WFS: A Simple File
System for a Distributed Environment", In Proc. 7th Symp.
Operating Systems Principles, 1979.

Cheriton [page 36]

RFC1045 VMTP February 1988

3. VMTP Packet Formats

VMTP uses 2 basic packet formats corresponding to Request packets and
Response packets. These packet formats are identical in most of the
fields to simplify the implementation.

We first describe the entity identifier format and the packet fields
that are used in general, followed by a detailed description of each of
the packet formats. These fields are described below in detail. The
individual packet formats are described in the following subsections.
The reader and VMTP implementor may wish to refer to Chapters 4 and 5
for a description of VMTP event handling and only refer to this detailed
description as needed.

3.1. Entity Identifier Format

The 64-bit non-group entity identifiers have the following substructure.

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|R| |L|R|
|A|0|E|E| Domain-specific structure
|E| |E|S|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Domain-specific structure |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The field meanings are as follows:

RAE Remote Alias Entity - the entity identifier identifies
an entity that is acting as an alias for some entity
outside this entity domain. This bit is used by
higher-level protocols. For instance, servers may take
extra security and protection measures with aliases.

GRP Group - 0, for non-group entity identifiers.

LEE Little-Endian Entity - the entity transmits data in
little-endian (VAX) order.

RES Reserved - must be 0.

The 64-bit entity group identifiers have the following substructure.

Cheriton [page 37]

RFC1045 VMTP February 1988

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|R| |U|R|
|A|1|G|E| Domain-specific structure
|E| |P|S|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Domain-specific structure |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The field meanings are as follows:

RAE Remote Alias Entity - same as for non-group entity
identifier.

GRP Group - 1, for entity group identifiers.

UGP Unrestricted Group - no restrictions are placed on
joining this group. I.e. any entity can join limited
only by implementation resources.

RES Reserved - must be 0.

The all-zero entity identifier is reserved and guaranteed to be
unallocated in all domains. In addition, a domain may reserve part of
the entity identifier space for statically allocated identifiers.
However, this is domain-specific.

Description of currently defined entity identifier domains is provided
in Appendix IV.

3.2. Packet Fields

Client 64-bit identifier for the client entity associated with
this packet. The structure, allocation and binding of
this identifier is specific to the specified Domain. An
entity identifier always includes 4 types bits as
specified in Section 3.1.

Version The 3-bit identifier specifying the version of the
protocol. Current version is version 0.

Domain The 13-bit identifier specifying the naming and
administration domain for the client and server named in
the packet.

Cheriton [page 38]

RFC1045 VMTP February 1988

Packet Flags: 3 bits. (The normal case has none of the flags set.)

HCO Header checksum only - checksum has only been calculated
on the header. This is used in some real-time
applications where the strict correctness of the data is
not needed.

EPG Encrypted packet group - part of a secure message
transaction.

MPG Multicast packet group - packet was multicast on
transmission.

Length A 13-bit field that specifies the number of 32-bit words
in the segment data portion of the packet (if any),
excluding the checksum field. (Every VMTP packet is
required to be a multiple of 64 bits, possibly by
padding out the segment data.) The minimum legal Length
is 0, the maximum length is 4096 and it must be an even
number.

Control Flags: 9 bits. (The normal case has none of the flags set.)

NRS Next Receive Sequence - the associated Request message
(in a Response) or previous Response (if a Request) was
received consecutive with the last Request from this
entity. That is, there was no interfering messages
received.

APG Acknowledge Packet Group - Acknowledge packet group on
receipt. If a Request, send back a Request to the
client's manager providing an update on the state of the
transaction as soon as the request packet group is
received, independent of the response being available.
If a Response, send an update to the server's manager as
soon as possible after response packet group is received
providing an update on the state of the transaction at
the client

NSR Not Start Run - 1 if this packet is not part of the
first packet group of a run of packet groups.

NER Not End Run - 1 if this packet is not part of the last
packet group of a run of packet groups.
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容