Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know within IPv4 subnet masking, the network is determined by either the 1st, 2nd or 3rd set of octets. Being there are so many more characters in IPv6, how do you determine the subnet mask?

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

The network is not related to the octets. Octets were substantive many, many years ago - now they're just for readability for us humans. IP addresses are just numbers; representing them as we do is just easier. Try ping 134744072 (which is 8.8.8.8, Google's public DNS server), for instance.

The length of the subnet mask is simply a number of bits - a mask of 8, 16, or 24 bits will align with octets, but a mask of any length, any number of bits, is valid. Review the answers to this question for all that you need to know and more.

In IPv6, the same is true; a valid mask is of any length, and does not need to align to one of the 16-bit colon-separated fields (which are, again, only for our human readability).

share|improve this answer
1  
Worth noting that I haven't yet seen an IPv6 implementation that actually asks for a subnet mask (e.g. ff:ff:ff:ff:ff:ff::), they all use CIDR notation, so /48, /64, /128 etc which makes it really easy to determine the network/host part of the address –  Mark Henderson Dec 27 '11 at 5:49
    
Thank you for the clarification as well as the link, it will definitely be helpful for future reference. –  Christopher Chipps Dec 27 '11 at 6:03
1  
And an IPv6 network is (almost) always a /64. Technically you could use other sizes, but not everything will work. If you don't have a good reason to do otherwise: use a /64 per network. –  Sander Steffann Dec 27 '11 at 8:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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