cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements

Community Helping Community

913
Views
0
Helpful
3
Replies
Highlighted
Beginner

Subnetting Question

Hey all,

Bit of a random one but I was just wanted clarification, if say i have a range of /22 address so 192.168.0.* - 192.168.3.*. Are those /22 addresses able to communicate with a /24 range so in this case, say i had another network on /24 so 192.168.1.*. Can the addresses in that .1 range communicate with each other or does the subnet mask have to match?

Or would it require routing of some form?

Thanks in advance.

Oli

Everyone's tags (3)
3 REPLIES 3
Contributor

Re: Subnetting Question

As long as hosts with the /22 and /24 addresses both point to the same default router, and as long as that router has a /22 subnet mask, it should work.

Sent from Cisco Technical Support iPad App

Beginner

Re: Subnetting Question

Subnet masks are only significant to each individual device, as a way of telling whether their outgoing traffic can be sent directly to the destination (in which case the source will need to know the destinations MAC address, learned via ARP) or whether the traffic needs to be sent via the default gateway.

In this instance, a host in 192.168.1.0/24 could communicate with a host in the range 192.168.1.1-192.168.1.254 so long as the destination's subnet mask also allowed it to communicate directly with the first host, i.e. a host in that range with a /22 subnet mask would be able to do so.

If you had a host 192.168.1.1/24, it would not however be able to communicate via layer 2 with the host 192.168.1.129/25, because the second host would ignore all packets it saw from the first host that come direct to it, as the IP of the first host doesn't fall into the range defined as local for the second host. If the second host tried to send a packet to 192.168.1.1, it would try to route it to its default gateway. However, if the routers interface to that LAN was 192.168.0.1/22, it would not route the packet from host one to host two, as the router's interface defines those as being in the same network, and therefore it has no reason to route this traffic.

Notably, in the situation I've just described, neither host 1 nor host 2 would be able to receive any traffic fro. The router's interface, as 192.168.0.1 falls outside the LAN range of both hosts, hence they would have to route traffic to get to their default gateway, the purpose of which is to be the first point of router traffic.

It is very bad design to have two devices in the same LAN with different subnet masks, was this question just for the sake of theory or was there a design task that led you to this as a potential solution; if so, what are you trying to achieve and what equipment do you have at your disposal?

Sent from Cisco Technical Support iPad App

Beginner

Re: Subnetting Question

Hi Oliver,

No, you cannot configure both the /22 address and the /24 address on the same router, it wont work because the address will overlap.

Yes, If you configure the /22 address on a router and the /24 address on your PC to telnet the router, it will work as long as the /24 network address are between 192.168.1.1 - 192.168.1.254 as per your question.

Hope that helps

Regards

Please rate useful posts and remember to close any solved questions.

CreatePlease to create content
Content for Community-Ad
FusionCharts will render here