Sunday 3 June 2018

networking - What is a subnet mask, and the difference between a subnet mask of 255.255.255.0 and 255.0.0.0?


My DSL/WiFi router provided by my ISP has an internal IP address of 10.0.0.138, the addresses provided by DHCP are in the format of 10.0.0.xxx.


Now, I want to start using static IP addresses on my local network, and I don't know what to provide for the subnet mask.


What is a subnet mask?


Should I be using 255.255.255.0 or 255.0.0.0 as my subnet mask? What is the difference?



Answer



The zero in the subnet mask will correspond to the xxx of your IP address. If you need more than 255 different addresses, you'll have to change the DHCP IP's to 10.0.xxx.xxx (broadcast IP of 10.0.255.255) and the subnet mask to 255.255.0.0.


Theoretically, 255.0.0.0 is a valid subnet mask for 10.0.0.0 to 10.255.255.255 addresses. This wikipedia article shows the valid addresses for private networks.


But in your case (10.0.0.xxx), you should use 255.255.255.0.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...