Re: IP class B and C to X.25 address translation

Barry D. Hassler (
Tue Jan 26 14:55:47 1988

Its been some time since I sent out my original message concern-
ing the subject, and I have received a few responses to my ques-
tion, but noone answered the question I asked (maybe I asked it

My original question concerned the translation from IP addresses
to X.25 addresses for X.25 links, such as those on MILNET (each
answer I received told me about subnetting, which I do under-
stand). The X.25 standard used by DDN contains an appendix out-
lining the address translation, but it only works properly for
Class A addresses. The algorithm itself can be found in

The algorithm used is as follows (copied out of X25.DOC, appendix

A-5 Derivation of DDN X.25 Addresses

        All DDN hosts are assigned addresses by the Administration.
  The address of a DDN host may be obtained from the Network
  Information Center (NIC), represented as an ASCII text string in
  what is called "host table format". This section describes the
  process by which DDN X.25 addresses in the format described in
  Section 2.1.1 may be derived from addresses in NIC host table

        A NIC host table address consists of the ASCII text string
  representations of four decimal numbers separated by periods,
  corresponding to the four octets of a thirty-two bit Internet
  address. The four decimal numbers are referred to in this
  section as "n", "h", "l", and "i." Thus, a host table address
  may be represented as "n.h.l.i" Each of these four numbers will
  have either one, two, or three decimal digits and will never have
  a value greater than 255. For example, in the host table address
  "", n=10, h=2, l=0, and i=124. To convert a host table
  address to a DDN X.25 address:

        1. If h < 64, the host table address corresponds to
            the DDN X.25 physical address

                           ZZZZ F IIIHHZZ (SS)


                 ZZZZ = 0000
                         as required in Section;

                 F = 0 because the address is a physical

                 III is a three decimal digit
                         representation of "i", right-adjusted
                         and padded with leading zeros if

                 HH is a two decimal digit representation
                         of "h", right-adjusted and padded
                         with leading zeros if required;,

                 ZZ = 00

                 (SS) is optional, as described in Section

          In the example given above, the host table address
 corresponds to the DDN X.25 physical
          address 000001240200.

      2. If h > 64 or h = 64, the host table address
          corresponds to the DDN X.25 logical address

                      ZZZZ F RRRRRZZ (SS)


               ZZZZ = 0000
                      as required in Section;

               F = 1 because the address is a logical

               RRRRR is a five decimal digit
                      representation of the result "r" of
                      the calculation

                                 r = h * 256 + i

                      (note that the decimal representation
                      of "r" will always require five

               ZZ = 00

               (SS) is optional, as described in Section

          Thus, the host table address
          corresponds to the DDN X.25 logical address

     In both cases, the "n" and "l" fields of the host table
address are not used.

Note that while this algorithm can be used on class B and C ad-
dresses, it maps out to duplicate X.25 addresses for certain
Class B and C addresses, since it only takes into account the
second and fourth octets of the address.

Are there any other standards being used for this translation
that will provide a one-to-one mapping of both class B and C ad-
dresses to X.25 addresses? I am running a quickly growing net-
work of hosts, and have receiveed several requests already for
X.25 connections to our gateway. I am very concered about the
address translations for our class B network addresses (subnetted
of course). I use portions of the third octet (depending upon the
size of the subnet, and whether or not it needs to be subnetted
further) for the subnetwork number and find that that octet does
not enter in the X.25 address at all. Therefore, If I would have
two X.25 hosts behind my gateway with addresses and, they would both have the same X.25 address:


This archive was generated by hypermail 2.0b3 on Thu Mar 09 2000 - 14:40:41 GMT