Count_Down said:
192.168.0.X/255.255.255.0 setup works for me. Haven't tried other subnet masks as never felt any reason to change that setting. You seems to be an expert. Would love to know your take on this.
no friend you should try different things if you want to learn. Nothing goes wrong. Just experiment with the netmasks i posted above. after that you can always revert back to original settings.
In first case:
PC I NIC II >> 192.168.0.1/255.255.255.
252 and
PC II >> 192.168.0.2/255.255.255.
252
Yes PC I can ping PC II. In the above network only two hosts can be connected.
In second case:
PC I NIC II >> 192.168.0.1/255.255.255.252 and
PC II >> 192.168.0.5/255.255.255.252
No PC I cannot ping PC II
Bcoz they are different:
Subnet ID: 192.168.0.0 Boradcast: 192.168.0.3 Mask: 255.255.255.
252
Max Hosts: 192.168.0.1 and 192.168.0.2
Subnet ID: 192.168.0.4 Boadcast: 192.168.0.7 Mask: 255.255.255.
252
Hosts: 192.168.0.5 and 192.168.0.6
How to calculate? => IPv4
Mask: 255.255.255.255
Binary: 11111111 11111111 11111111 11111111 = 32 bits
~~~
Mask: 255.255.255.0
Binary: 11111111 11111111 11111111 00000000 = 24 bits
In above the last 8 bits (0) are not covered. Therefore we get 2^8 = 256 addresses. So 256 - 256 = 0
So,
Network ID: 192.168.0.0 cannot be assigned to hosts
Hosts IP Range: 192.168.0.1 - 192.168.0.254 can be assigned to hosts
Broadcast: 192.168.0.255 cannot be assigned to hosts
~~~~
Mask: 255.255.255.252
Binary: 11111111 11111111 11111111 11111100 = 30 bits
In above the last 2 bits (0) are not covered. Therefore we get 2^2 = 4 addresses. So 256 - 4 = 252
So,
1) 192.168.0.0 is the network ID so cannot assigned to hosts
2) 192.168.0.1 IP can be assigned to host
3) 192.168.0.2 IP can be assigned to host
4) 192.168.0.3 Boradcast IP so cannot assigned to hosts
One more example:
Mask: 255.255.255.248
Binary: 11111111 11111111 11111111 11111000 = 29 bits
In above the last 3 bits (0) are not covered. Therefore we get 2^3 = 8 addresses. So 256 - 8 = 248
So,
192.168.0.0 is the network ID so cannot assigned to hosts
Range: 192.168.0.1 - 192.168.0.6 IP's can be assigned to host
192.168.0.7 Boradcast IP so cannot assigned to hosts
~~~
192.168.0.0/255.255.255.0 == CIDR(Classless Interdomain routing) format 192.168.0.0/24
192.168.0.0/255.255.255.252 == CIDR format 192.168.0.0/30
192.168.0.0/255.255.255.248 == CIDR format 192.168.0.0/29
Hope you got it
You may download this tool to understand different possible subnets:
Code:
http://www.radmin.com/download/ipcalc11.exe