Saturday, October 15, 2016

Anomany while creating 128 subnets for class C IP address



I am creating 128 sub nets for a organisation which has class C IP address, so i thought to chose 7 bits from the last octet of the IP address , and the rest that i am left with is one "0" which will be the host for each subnet , but the valid hosts are practically counting to zero.



If i chose a sub net mask : 255.255.255.254 for a class C address , then total sub nets that i will have is 2^7 = 128 and hosts per sub net = 2 and valid hosts per sub net = 2-2 = 0.




So my question is what should we do if we want to have a 128 sub nets in our organisation? If i use the above method then i will have no valid IP in my sub net.


Answer



When using 255.255.255.254 (31-bits) netmasks your "valid hosts per subnet" math sort of goes out the window here, because 31-bit masks are treated specially.



They're mostly used for point-to-point links, where there's no need for either a network address, or a broadcast, because each IP knows exactly where it's going to be sending all it's traffic.



It's actually even got it's own RFC (3021).


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...