This Article 
 Bibliographic References 
 Add to: 
Algorithms for Variable Length Subnet Address Assignment
June 1998 (vol. 47 no. 6)
pp. 693-699

Abstract—In a computer network that consists of M subnetworks, the L-bit address of a machine consists of two parts: A prefix si that contains the address of the subnetwork to which the machine belongs, and a suffix (of length L$-$ |si|) containing the address of that particular machine within its subnetwork. In fixed-length subnetwork addressing, |si| is independent of i, whereas, in variable-length subnetwork addressing, |si| varies from one subnetwork to another. To avoid ambiguity when decoding addresses, there is a requirement that no si be a prefix of another sj. The practical problem is how to find a suitable set of sis in order to maximize the total number of addressable machines, when the ith subnetwork contains ni machines. Not all of the ni machines of a subnetwork i need be addressable in a solution: If $n_i > 2^{L-|s_i|},$ then only $2^{L-|s_i|}$ machines of that subnetwork are addressable (none is addressable if the solution assigns no address si to that subnetwork). The abstract problem implied by this formulation is: Given an integer L, and given M (not necessarily distinct) positive integers $n_1, \cdots, n_M,$ find M binary strings $s_1, \cdots, s_M$ (some of which may be empty) such that 1) no nonempty string si is prefix of another string sj, 2) no si is more than L bits long, and 3) the quantity $\sum \nolimits _{|s_k|\ne0} \min \left\{ n_k, 2^{L-|s_k|} \right\}$ is maximized. We generalize the algorithm to the case where each ni also has a priority pi associated with it and there is an additional constraint involving priorities: Some subnetworks are then more important than others and are treated preferentially when assigning addresses. The algorithms can be used to solve the case when L itself is a variable; that is, when the input no longer specifies L but, rather, gives a target integer γ for the number of addressable machines, and the goal is to find the smallest L whose corresponding optimal solution results in at least γ addressable machines.

[1] Combinatorial Algorithms on Words, A. Apostolico and Z. Galil, eds. Springer, 1985.
[2] T.H. Cormen,C.E. Leiserson, and R.L. Rivest,Introduction to Algorithms.Cambridge, Mass.: MIT Press/McGraw-Hill, 1990.
[3] M. Crochemore and W. Rytter, Text Algorithms. Oxford Univ. Press, 1994.
[4] Internet Assigned Numbers Authority (IANA), "Class A Subnet Experiment," RFC 1797, Apr.25 1995.
[5] D. Knox and S. Panchanathan, "Parallel Searching Techniques for Routing Table Lookup," Proc. 12th Ann. Joint Conf. IEEE Computer and Comm. Soc.—IEEE INFOCOM '93, vol. 3, pp. 1,400-1,405,San Francisco, 1993.
[6] B. Manning, "Class A Subnet Experiment Results and Recommendations," RFC 1879, Jan.15 1996.
[7] A.J. McAuley and P.J. Francis, "Fast Routing Table Lookup Using CAMs," Proc. 12th Ann. Joint Conf. IEEE Computer and Comm. Soc.—IEEE INFOCOM '93, vol. 3, pp. 1,382-1,891,San Francisco, 1993.
[8] J. Mogul and J. Postel, "Internet Standard Subnetting Procedure," RFC 0950, Aug.1 1985.
[9] J. Mogul, "Broadcasting Internet Datagrams in the Presence of Subnets," RFC 0922, Oct.1 1984.
[10] J. Mogul, "Internet Subnets," RFC 0917, Oct.1 1984.
[11] T. Pummill and B. Manning, "Variable Length Subnet Table For IPv4," RFC 1878, Dec.26 1995.
[12] P. Tsuchiya, "On the Assignment of Subnet Numbers," RFC 1219, Apr.16 1991.

Index Terms:
Addressing, algorithms, computer networks, prefix codes.
Mikhail J. Atallah, Douglas E. Comer, "Algorithms for Variable Length Subnet Address Assignment," IEEE Transactions on Computers, vol. 47, no. 6, pp. 693-699, June 1998, doi:10.1109/12.689648
Usage of this product signifies your acceptance of the Terms of Use.