3

I have an ipv6 address FC00::50, and the subnet mask length is 64. How to calculate an subnet address? I want address FC00::50 in the scope of this calculated subnet address.

Here is the description:

Description: The subnet address is specified by the IP address together with the Subnet mask length. For user equipments in this subnet, the SGC uses the associated media site profile (see Section 4.10.1.1) to select a BGF for media.

Default IPv4 subnet address is 0.0.0.0.

Note:
The default subnet address can be used to catch all addresses not covered by the configured IP address mappings.

Default IPv6 subnet address is 0000:0000:0000:0000:0000:0000:0000:0000.
  • Did any of the answers help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively you can answer your own question and accept the answer. – Ron Maupin Aug 6 '17 at 2:59
3

Since there are 128 bits in an IPv6 network address, it is easy. IPv6 addresses, with a few exceptions, have a 64-bit network portion and a 64-bit interface (host) portion. Basically, you are taking the first half (high-order bits) of the address for the network portion, and the second half (low-order bits) of the address for the interface portion.

The general format for IPv6 Global Unicast addresses is as follows:

|         n bits         |   m bits  |       128-n-m bits         |
+------------------------+-----------+----------------------------+
| global routing prefix  | subnet ID |       interface ID         |
+------------------------+-----------+----------------------------+

RFC 4291, IP Version 6 Addressing Architecture will give you the basics, and RFC 5952, A Recommendation for IPv6 Address Text Representation will give you the canonical representation.

FYI, the IPv6 address 0000:0000:0000:0000:0000:0000:0000:0000 is canonically represented as :: and is called the Unspecified address. Also, the address you list, FC00::50 is in the part of the Unique Local address range that is currently undefined; FD00::50 would be in the part of the Unique Local address range that is defined, but it would be missing the required Global ID.

  • "ipv6 usually has a 64-bit network portion and 64-bit interface (host) portion..." but what if it doesn't? Is that a fair assumption you made? How does that compare to IPv4, which, so far as I understand, can have a bit border between any of the octets (?). – Thufir Feb 26 '18 at 18:23
  • 1
    Not using /64 for IPv6 breaks some IPv6 features. See this answer. There are multiple RFCs that depend on an IPv6 network being /64, and you can run into problems by using a different network size. – Ron Maupin Feb 26 '18 at 18:27
  • 1
    @Thufir, also, please forget about IPv4 octets. The IPv4 dotted-decimal notation is simply for human readability, and it plays no part in subnetting. An IPv4 address is 32 bits, and you can subnet on any of the bits, not just at octet boundaries. – Ron Maupin Feb 26 '18 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.