next up previous
Next: Transparent and Opaque Relaying Up: TRIAD: A Scalable Deployable Previous: End-to-end Semantics

WRAP

 

WRAP [1] is a shim protocol that uses a variable-length header between the IP layer and the transport layer, providing NAT with extensible addressing.

A WRAP packet is formatted as in Fig. 2 as the payload of an IPv4 packet.

   figure260
Figure 2: WRAP Packet Format

The protocol field specifies the higher-layer protocol in the ``data'' field using the same types as for IP, e.g 6 for TCP. The length field is the number of 32-bit components in the header. Thus, the WRAP header length in octets is 4 + length * 4. The foffset field is an offset into the list of components where the forwardToken starts, with 0 referring to a null reverseToken, so the forward token starts in the first 32-bit field. The forwardToken is a value used by the next relay agent to determine how to relay the packet to its destination. The reverseToken is a value used by the previous relay agent to refer to where the packet came from.

The data field contains a TCP, UDP, or other transport protocol packet.

A WRAP source sends packets to a destination by forming an IPv4 packet with the IP destination address set to the relay agent address and an appropriate WRAP header. The WRAP forwardToken contains the IRT of the destination relative to this RA, and the reverseToken is null. Thus, the length field is the length of the forwardToken and the foffset field is 0. (The foffset value is also the length of the reverseToken.)

The RA, on receiving an WRAP packet:

  1. maps the (SA,DA) of the packet to a virtual interface (VI) that represents the local endpoint of the realm ``channel'' on which the packet arrived. It maps the next k 32-bit components of forwardToken field (assuming foffset is less than length) to a corresponding relay entry in a relay table associated with this VI.
  2. determines from this entry the next IP source address (the ``egress'' interface), the next relay agent's IP address, the new forward token, and the rewrite of the reverse token to perform.
  3. forwards the modified packet to the next RA, with the IPv4 destination address as that of this next RA and the IP source address determined above, and increments the foffset field.
The relay agent thus ``consumes'' one or more 32-bit components from the forwardToken and adds an equal number of components to the reverseToken. (However, both these fields may be translated according to the information in the relay agent's lookup table.) The reverse token, when component-reversed, must be recognized by this relay agent when used as a forward token, to send packets back toward the source.

Normally, an RA just rewrites the first forward token component and increments the foffset by 1. In the simplest case, the rewritten component is just encodes the IP source address of the incoming packet (that is, the last relay point.) This restricted form of relaying, though less general than WRAP allows, is more amenable to hardware implementation, since less of the packet needs to be rewritten.

If the RA does not recognize the forward token, it drops the packet and may send a WRAMP message back to the previous RA. The relaying state may include filters on sources from which to accept packets and destinations allowed for given sources.

The receiver of a WRAP packet is a node that receives an WRAP packet with a null forwardToken, or receives a packet with a multicast destination and subscribes to that multicast source.

The actual source of the packet is identified by the reverseToken and the last hop RA for the packet. The receiver can contact this last hop RA to do a reverse name lookup on this IRT to determine the name of the actual source, as described in Section 2.

Between relay agents, a packet is routed by the normal IPv4 routing protocols used within the realm, so WRAP is similar to loose source routing with the relay agents as the designated nodes on the path it is to follow. A packet that does not travel outside of a single address realm can (and should) omit the WRAP header entirely.

With WRAP, a packet is reassembled from fragments at each intermediate relay agent, because each relay agent is a destination from the IP standpoint. This feature reduces the risk of carrying packet fragments all the way to the destination only to discover some fragment is missing.




next up previous
Next: Transparent and Opaque Relaying Up: TRIAD: A Scalable Deployable Previous: End-to-end Semantics

Mark Geoffrey Gritter
Wed Mar 8 14:44:36 PST 2000