I made some editorial comments about Section 5.1 the other day. I have a substantive comment now, and a text proposal to pull it all together.

Comment: the statement

     "For a = 0, A MAY be 0 to
      allow for the provisioning of the system ports."

just below Figure 2 is illogical, since if a = 0, the value A does not exist. In fact, a = 0 returns us to the naive approach in the second paragraph of Section 5.1. Hence I propose alternative text for the section. Note two changes to Figure 2: removed extra bit 16 and changed the title.


Proposed text:

5.1.  Port Mapping Algorithm

The port mapping algorithm is used to represent the port numbers allocated to a given CE if the CE has been given a shared IPv4 address.

The simplest way to allocate ports is to allocate one range of consecutive ports to each CE sharing an address. The Port-Set Identifier (PSID) is an index over the sequence of allocated ranges, starting from zero. In this case, assuming that the number of port numbers in each allocated range is a power of 2, the set of port numbers allocated to a given CE can be represented using a notation similar to CIDR [RFC4632], but with 16 bits instead of 32. For example, assuming a range size of 256 port numbers, the first 256 ports are
represented as port prefix 0.0/8, the last 256 ports as 255.0/8.  In
hexadecimal, 0x0000/8 (PSID = 0) and 0xFF00/8 (PSID = 0xFF).

It can be seen from the example that the lowest PSID values allocate ports in the system port range [I-D.ietf-tsvwg-iana-ports] to one or more CEs. To avoid this, the lowest PSID values (0x00 to 0x03 in the example) should not be used.

A more sophisticated approach allocates ports in a series of blocks, where each CE sharing an address receives one range from each block. This can be represented as shown in Figure 2.

                     0                    1
                     0 1 2 3 4 5 6 7 8 9  0 1 2 3 4 5
                     +-------+-----------+----------+
       Ports in      |   A   |    PSID   |     M    |
    the CE port set  |  > 0  |           |any value |
                     +-------+-----------+----------+
                     |a bits |  k bits   |  m bits  |

       Figure 2: Three-Part Decomposition of Allocated Port Numbers

A     Indexes the blocks of port numbers. The lowest block number
      (A = 0) and possibly others contain the system port numbers,
      and hence should not be used if port numbers 0-1023 are to
      be avoided.

a     Width of the field containing the block index A. Indirectly
      a determines the block size, by the formula:
            Block size = 65536 / 2^a

      a = 0 brings us back to the simple (single block) model
      described above, where the PSID value rather than the value
      of A must be restricted to avoid the system ports. The value
      of a is optionally provisioned as part of the mapping rule.
      The default value for a is 4, to place the start of the PSID
      on a nibble boundary. This leaves ports in the range 0-4095
      unallocated.

PSID  Indexes the position of the allocated range for a given CE
      within each block. In the more general model, where A > 0,
      PSID values can begin at 0 without causing system ports to
      be allocated.

k     Width of the field containing the PSID. The number of CEs
      sharing the same IPv4 address is given by 2^k, except when
      a = 0 and the lowest PSID values are excluded.

M     Indexes a specific port number within a range determined by
      the values of A and the PSID.

m     Width of the port index field. The number of ports in each
      allocated range is given by 2^m.
_______________________________________________
Softwires mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/softwires

Reply via email to