Partager via


6.1.1.2.2.2.1 Subnet Object

Subnet objects define network subnets in the directory. Subnets group computers in a way that identifies their physical proximity on the network. subnet objects are used to map computers to sites.

  • name: The name of the subnet object identifies the set of IP addresses that fall in this subnet. An IP address that falls in this subnet is considered to be in the site specified by the siteObject attribute of this object.

    A valid subnet name MUST satisfy the following constraints:

    Let s be the subnet name.

    Let l be the length of the subnet name.

    Let BitMask[] = {0x00000000, 0x00000080, 0x000000C0, 0x000000E0, 0x000000F0, 0x000000F8, 0x000000FC, 0x000000FE, 0x000000FF, 0x000080FF, 0x0000C0FF, 0x0000E0FF, 0x0000F0FF, 0x0000F8FF, 0x0000FCFF, 0x0000FEFF, 0x0000FFFF, 0x0080FFFF, 0x00C0FFFF, 0x00E0FFFF, 0x00F0FFFF, 0x00F8FFFF, 0x00FCFFFF, 0x00FEFFFF, 0x00FFFFFF, 0x80FFFFFF, 0xC0FFFFFF, 0xE0FFFFFF, 0xF0FFFFFF, 0xF8FFFFFF, 0xFCFFFFFF, 0xFEFFFFFF, 0xFFFFFFFF };

    s is a valid subnet name if:

    1. There is only one occurrence of the character "/" in s. Let i be the index of the character "/" in s.

    2. The substring s[0, i-1] is either a valid IPv4 address in dotted decimal notation (as specified in [RFC1166]) or a valid IPv6 address in colon-hexadecimal form or compressed form (as specified in [RFC4291]), and MUST meet the following constraints:

    • IPv4 addresses MUST not have any leading zeros in any individual component of the address.

    • IPv6 addresses MUST be in canonical text representation format (as specified in [RFC5952] section 4), except that the addresses are treated as case insensitive.

    Examples:

          Valid IPv4 subnet names:

    • 10.2.1.0/24

    • 10.20.1.0/24

          Invalid IPv4 subnet names:

    • 10.02.0.0/16

          Valid IPv6 subnet names:

    • A:A:A:A::/64

    • a:b::c:d:0:0/64

    • 0:0:e0::/48

    • A:b:C::/128

    • A:B::F:0/128

    • 12AB:0:0:CD30::/60

    • A:a:e:b:0:d:e:f/128

          Invalid IPv6 subnet names:

    • A:B:0C:D::/64

    • A:B:0:0:0:0:E:F/128

    • 12AB::CD30:0:0:0:0/60

    • 12AB:0:0:CD30::F:0/60

    • A:a:e:b::d:e:f/128

    Let b be the binary representation of the address in little-endian format.

    3. The substring s[i+1, l-1] does not have any leading zeros and can be converted to an unsigned integer n.

    4. When the address is in IPv4 format, 0 < n <= 32. When the address is in IPv6 format, 0 < n <= 128.

    5. When the address is in IPv4 format, b & (~BitMask[n]) = 0.

    6. When the address is in IPv4 format, b ≠ BitMask[n].

    Based on the subnet object name, the range of the IP addresses that the subnet contains can be determined. For example, if the IPv4 subnet object name is 10.121.0.0/22, then according the above definition, b will be 00001010.01111001.00000000.00000000 and n will be 22. This means that the first 22 bits of b will be fixed for the range of the IP addresses the subnet contains. Then the IP address range of the subnet is from 00001010.01111001.00000000.00000000 to 00001010.01111001.00000011.11111111, namely from 10.121.0.0 to 10.121.3.255. Similarly, an IPv6 subnet object name 2001:DA8::/48 represents the IPv6 addresses from 2001:DA8:0:0:0:0:0:0 to 2001:DA8:0:FFFF:FFFF:FFFF:FFFF:FFFF.

  • parent: Subnets container

  • objectClass: subnet

  • systemFlags: FLAG_CONFIG_ALLOW_RENAME

  • siteObject: The DSName of the site object for the site that covers this subnet.