RFC 1236

IP to X.121 address mapping for DDN

πŸ“… published June 1991, from ietf

IP to X.121 Address Mapping for DDN ✨

RFC 1236: IP to X.121 Address Mapping for DDN πŸŽ€

  • Group: Network Working Group 🧚
  • Request for Comments: 1236
  • Authors: L. Morales and P. Hasse, both from USAISEC (full names in Section 7 πŸ’…)
  • Date: June 1991 πŸ“…
  • Status: provides information for the Internet community, not an Internet standard (see below) πŸ“œ
  • Obsoletes / Updates: the title block doesn't list anything this one obsoletes or updates 🫢

Status of This Memo πŸ“œ

Okay so this memo is basically the way to turn IP addresses into CCITT X.121 addresses, and it's the RECOMMENDED standard for the Internet, especially for the Defense Data Network (DDN) πŸ”₯. It provides info for the Internet crowd, but it does not specify an Internet standard, fr fr. Distribution of this memo is unlimited 🌈.


1. Overview 🌸

So the Defense Communication Agency (DCA) said that "DDN specifies a standard for mapping Class A addresses to X.121 addresses." 🫠 Then they added that the Class B and C IP to X.121 mapping "standards are the responsibility of the administration of the Class B or C network in question". Which means there is NO defined single standard for converting Class B and Class C IP addresses to X.121 addresses πŸ’€.

This is a big deal, bestie. Right now there's no way for admins to define IP to X.121 mapping at all 😭. Without one standard, in a multi-vendor network, nothing guarantees that devices using IP and DDN X.25 will actually talk to each other.

The IP to X.121 mapping of Class B and Class C IP addresses SHALL be implemented as described below ✨. This translation method is a direct expansion of the algorithm in the "MIL-STD: X.25, DDN X.25 Host Interface Specification" [1]. And the method below is TOTALLY independent of IP subnetting and of any masking that may be used to support IP subnetting πŸ¦‹.


2. Background πŸ“š

Every Internet host gets a four octet (32 bit) address made of a network field and a local address field, which is also called the REST field [2] (see Figure 1 thru 3) 🧚. There are two basic forms:

  • (1) Physical addresses, which correspond to the node number and DCE port number of the node the DTE is connected to.
  • (2) Logical addresses, which are mapped transparently by DCE software into a corresponding physical network address.

To keep things flexible, Internet addresses are split into 3 primary classes: Class A, Class B, and Class C. These classes make room for a large number of small and medium sized networks πŸ’–. The Class A, B, and C network addresses are divided between Research, Defense, Government, (Non-Defense) and Commercial uses.

As the MIL-STD: X25 describes, an IP address is the ASCII text string of four decimal numbers separated by periods, matching the four octets of a thirty-two bit Internet address 🫢. This memo calls those four numbers network (n), host (h), logical address (l), and Interface Message Processor (IMP) or Packet Switch Node (PSN) (i). So an Internet address looks like "n.h.l.i" (Class A), "n.n.h.i" (Class B), or "n.n.n.hi" (Class C), depending on its class. Each of the four numbers has one, two, or three decimal digits and never goes above 255. For example, in the Class A IP address "26.9.0.122", n=26 h=9, l=0, and i=122 ✨.

The different classes of Internet addresses [3] look like this πŸ‘‘:

Class A: 🌷

  • The highest-order bit is set to 0.
  • 7-bits define the network number.
  • 24-bits define the local address.
  • This allows up to 126 class A networks.
  • Networks 0 and 127 are reserved.
      |       n       |       h       |       l       |       i       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |0|   NETWORK   |                 Local Address                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
             7 Bits                  24 Bits (REST Field)

                                   Figure 1

Class B: πŸ“

  • The two highest-order bits are set to 1-0.
  • 14-bits define the network number.
  • 16-bits define the local address.
  • This allows up to 16,384 class B networks.
      |        n      |       n       |       h       |       i       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |1 0|           NETWORK         |          Local Address        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                      14 Bits                 16 Bits (REST Field)

                                   Figure 2

Class C: πŸ¦‹

  • The three highest-order bits are set to 1-1-0.
  • 21-bits define the network number.
  • 8-bits define the local address.
  • This allows up to 2,097,152 class C networks
      |       n       |       n       |       n       |   h   |   i   |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |1 1 0|                 NETWORK                 | Local Address |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                              21 Bits                8 Bits (REST Field)

                                   Figure 3

Class D is the multicast one 🌈. Its four highest-order bits are set to 1-1-1-0. Note: no addresses are allowed with the four highest-order bits set to 1-1-1-1. Those addresses, called "class E", are reserved πŸ™ˆ.

The "MIL-STD: X.25" says "All DDN addresses are either twelve or fourteen BCD (binary-coded decimal) digits in length." πŸ”’ The last two digits are the Sub-Address, and they're not used on the DDN. The Sub-Address gets carried across the network without modification. Its presence is OPTIONAL 🫠. So a DTE MAY generate EITHER a twelve or fourteen BCD X.121 address, but it MUST accept both twelve and fourteen BCD X.121 addresses πŸ’….


3. Standard IP to X.121 Address Mapping πŸŽ€

This section walks through the algorithm that SHOULD be used to convert IP addresses to X.121 addresses [1] 🧚. Notice that "h" is always compared to the number 64, either less than or greater than. That number tells apart PSN physical and logical host port addresses ✨. Also, at the time of writing, the DDN does not use the PSN's logical addressing feature. That feature lets hosts be addressed independently of their physical point of attachment to the network.

3.1 Derivation of DDN X.25 Addresses πŸ¦‹

To convert a Class A IP address to a DDN X.25 address, do the following πŸ’–:

3.1.1 If the host field (h) is less than 64 (h < 64), the address corresponds to the following DDN X.25 physical address:

ZZZZ F III HH ZZ (SS)

Here's what each part means 🌸:

  • ZZZZ = 0000
  • F = 0, because the address is a physical address;
  • III is a three decimal digit representation of "i", right-adjusted and padded with leading zeros if required;
  • HH is a two decimal digit representation of h", right-adjusted and padded with leading zeros if required;
  • ZZ = 00 is OPTIONAL.
  • (SS) is an OPTIONAL Sub-Address field which is ignored in the DDN. This field is either left out or filled with zeros.

The address 26.9.0.122 corresponds to the DDN X.25 physical address 000001220900 🫢.

3.1.2 If the host field (h) is greater than or equal to 64 (h >= 64), the address corresponds to the following DDN X.25 physical address:

ZZZZ F RRRRR ZZ (SS)

Here's the breakdown 🧁:

  • ZZZZ = 0000
  • F = 1, because the address is a logical address;
  • 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 digits)

  • ZZ = 00

and

  • (SS) is OPTIONAL.

The address 26.83.0.207 corresponds to the DDN X.25 logical address 000012145500 ✨.

3.2. For Class B IP addresses 🌷

For Class B, the "h" and "i" fields will ALWAYS consist of 8 bits each, taken from the REST field of the Internet address. The mapping follows the same rules as in 3.1 πŸ’•.

3.3. For Class C IP addresses 🌈

For Class C, the "h" and "i" fields will ALWAYS consist of 4 bits each, taken from the REST field of the Internet address. The mapping follows the same rules as in 3.1 🫢.


4. Examples 🧚

Here are examples of IP to X.121 address mappings for Class A, Class B, and Class C IP addresses. These are the ones to screenshot πŸ“Έ.

4.1 Class A πŸ‘‘

The X.121 address mapping for Class A networks:

          for h < 64

          example: 26.29.0.122   format: n.h.l.i

                   ZZZZ F III HH ZZ (SS)
   X.121 address = 0000 0 122 29 00  00

          for h > or = 64

          example: 26.80.0.122   format: n.h.l.i

                    ZZZZ F RRRRR ZZ (SS)
   X.121 address =  0000 1 20602 00  00

                  where R = H * 256 + I

4.2 Class B πŸ“

The X.121 address mapping for Class B networks:

          for h < 64

          example: 137.80.1.5     format: n.n.h.i

                    ZZZZ F III HH ZZ (SS)
   X.121 address =  0000 0 005 01 00  00

          for h > or = 64

          example: 137.80.75.2    format: n.n.h.i

                    ZZZZ 1 RRRRR ZZ  (SS)
   X.121 address =  0000 1 19202 00  00

                  where R = H * 256 + I

4.3 Class C πŸ¦‹

The X.121 address mapping for Class C networks:

          for h < 64

           example: 192.33.50.19  format: n.n.n.hi

                             H    I
                      n.n.n.0001 0011
                             1    3

              Subnet  1
              Subhost 3

                    ZZZZ F III HH ZZ (SS)
   X.121 address =  0000 0 003 01 00  00

NOTE: The mapping of X.121 address for Class C networks for h > 64 is not applicable since the "h" field can never exceed 15 πŸ’€.


5. References πŸ“š

[1] MIL-STD: X.25 "Defense Data Network X.25 Host Interface Specification", Defence Communications Agency, BBN Communications Corporation, 1983 December, Volume 1 of the "DDN Protocol Handbook" (NIC 50004). Also available online at the DDN NIC as NETINFO:X.25.DOC.

[2] MIL-STD: 1777 "Internet Protocol", 1983 August, Volume 1 of the "DDN Protocol Handbook" (NIC 50004).

[3] Kirkpatrick, S., M. Stahl, and M. Recker, "Internet Numbers", RFC 1166, DDN NIC, July 1990.

(Unless otherwise indicated, copies of federal and military specifications, standards, and handbooks are available from the Naval Publications and Forms Center, (ATTN: NPODS), 5801 Tabor Avenue, Philadelphia, PA 19120-5099.)


6. Security Considerations πŸ’€

Security issues are not discussed in this memo. Like, at all πŸ™ˆ. Don't go assuming it's covered, bestie, because it isn't.


7. Authors' Addresses πŸ¦‹

Luis F. Morales, Jr.
USAISEC
ASQB-SEP-C
Ft. Huachuca, AZ 85613-5300

Phone:  (602) 533-2873

EMail:  lmorales@huachuca-emh8.army.mil


Phillip R. Hasse
USAISEC
ASQB-SEP-C
Ft. Huachuca, AZ 85613-5300

Phone:  (602) 533-2873

EMail:  phasse@huachuca-emh8.army.mil
πŸ“¦ where this page comes from