Joseph W. Doherty Wed, 04/09/2008 - 04:29
User Badges:
  • Super Bronze, 10000 points or more

If they are on the same shared wire, the host using the /16 can accept all the /24 traffic since it appears within the /16 address block. The /24 host should only accept the /16 traffic that falls within its /24 address space. Also the /24's broadcast address and subnet address will be seen as host addresses by the /16 host; and the converse for the /24 host.

carl_townshend Thu, 04/10/2008 - 02:57
User Badges:

Can someone please explain a little more on this, if the pc looks at the subnet mask, then how does it work ?

Hi Carl


The PC can work out the size of the network/subnet it is on from the netmask configured on its NIC.


Reading from left to right (in binary), all the contiguous "1's" define the network portion of the hosts IP address configured and all the remaining contiguous "0's" define the scope of the network/subnet or how many hosts are on that network/subnet.


In the example you provided, you have 1 PC with an IP address in the range 100.1.0.0/16 and 1 PC with an IP address in the range 100.1.3.0/24.


The PC on the /16 sees from its mask that it is comprised of (from left to right) 16 contiguous "1's" followed by 16 contiguous "0's". So the PC knows that the first 16 bits of its IP address define the network that it is on. The 100.1 network.


The PC also knows that if 16 bits define the network there are 16 bits left for host addressing. So this network has (16^2)-2 available IP addresses. So as far as this PC is concerned it is sharing a network with 32,766 other hosts and can communicate with all hosts with IP addresses between 100.1 0.1 and 100.1.255.254.


The second PC sees from it's netmask that, reading from left to right in binary, there are 24 contiguous "1's" followed by 8 contiguous "0's". So it knows that the network portion of it's IP address is 24 bits in length or 100.1.3 and the remaining bits set to zero define the scope of the subnet. (8^2) -2 = 254, so as far as the second PC is concerned it is sharing a subnet with 254 other hosts and the range of the subnet the second PC is on is 100.1.3.1 to 100.1.3.254.


So as the PC on the /16 subnet considers all host IP addresses between 100.1.0.1 and 100.1.255.254 as neighbours on the /16 subnet, it could communicate with hosts in the /24 subnet as they fall within the range of this /16 subnet. However the second PC in the /24 subnet only considers hosts with IP addresses between 100.1.3.1 adn 100.1.3.254 as its neighbours and so can only communicate with IP addresses which fall within the range 100.1.3.1 to 100.1.3.254.


Also as a router will not allow you to configure 2 different interfaces with IP addresses which over lap (are part of the same major network, in this case 100.1), you can not configure routing between this subnets. And the second PC on the /24 network would not accept 100.1.0.1 as a default gateway, as that IP address is outside the scope of the network configuration on its NIC.



HTH


Best Regards,


Michael



carl_townshend Thu, 04/10/2008 - 11:17
User Badges:

thats brilliant,


so to clarify, would they communicate? or would it be one way communication from pc in the 100.1 to the 100.1.3.x but not the other way around?

Actions

This Discussion