Subnetting Question

Answered Question
Oct 10th, 2009

I thought I had subnetting basics pretty well under control, until I had a conversation with a few fellow students. Now I am a bit confused.

If I were to create the network 192.168.1.0/24 and then use 4 routers to segment and subnet this network, can I "reuse" network addresses by simply placing them in different subnets? If subnet A, B, C, and D all had 250 hosts on them could I reuse the network 192.168.1.0 on all of these subnets simply by changing the subnet mask on each subnet? A /23, B /22 etc...

This just doesnt seem right to me, I thought that each network address should be unique within the network as a whole not the subnet?

I would appreciate any insight you could give me on this.

I have this problem too.
0 votes
Correct Answer by scottmac about 7 years 3 months ago

To (hopefully) add to Rick's post, you may want to search around (Cisco main site and Google) using "Variable Length Subnet Masking (or Mask)" (VLSM).

Each address must be unique within the realm in which is is visible.

In order to use the same address in multiple places, Network Address Translation (NAT) is used to "hide" the duplicate addresses; it's hard to imagine how many places 192.168.1.0/24 is being used across the entire Internet ... but for each of those 192.168.x.x networks, they are behind a router or firewall that is doing NAT and presenting a single (or group of) unique addresses to the rest of the Internet.

Otherwise, there'd be no way to tell which 192.168.x.x network (of tens of millions 192.168.x.x networks) to route the traffic to.

... and, FWIW, keep in mind that just because you --CAN-- do something, it doesn't necessarily mean that you --SHOULD-- or that it's even a good idea (i.e., "best practice").

Correct Answer by Richard Burts about 7 years 3 months ago

Jason

Either those other students were making some assumptions that you did not mention here or they are mistaken and incorrect.

It is true that it is possible (and possibly correct) for routerA to advertise 192.168.0.0/24 and for routerB to advertise 192.168.0.0/23 and for routerC to advertise 192.168.0.0/22. This would be correct if routerA wants to advertise addresses from 192.168.0.0 through 192.168.0.255 and if routerB wants to advertise addresses from 192.168.0.0 through 192.168.1.255 and if routerC wants to advertise addresses from 192.168.0.0 through 192.168.3.255. Those are 3 unique prefixes and each could be accepted and put into the routing table so that a show ip route would show all 3 subnets.

But you are correct that it is not valid for the same host address to appear in more than one place. If address 192.168.0.6 were to exist on routerA and on either routerB or routerC then it would be a problem and all traffic for 192.168.0.6 would be routed to routerA, since in routing the longest prefix wins.

When you use that kind of overlapping prefixes, each site needs to be very careful that they do not assign host addresses that overlap with another site.

HTH

Rick

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (2 ratings)
Loading.
Correct Answer
Richard Burts Sat, 10/10/2009 - 12:47

Jason

Either those other students were making some assumptions that you did not mention here or they are mistaken and incorrect.

It is true that it is possible (and possibly correct) for routerA to advertise 192.168.0.0/24 and for routerB to advertise 192.168.0.0/23 and for routerC to advertise 192.168.0.0/22. This would be correct if routerA wants to advertise addresses from 192.168.0.0 through 192.168.0.255 and if routerB wants to advertise addresses from 192.168.0.0 through 192.168.1.255 and if routerC wants to advertise addresses from 192.168.0.0 through 192.168.3.255. Those are 3 unique prefixes and each could be accepted and put into the routing table so that a show ip route would show all 3 subnets.

But you are correct that it is not valid for the same host address to appear in more than one place. If address 192.168.0.6 were to exist on routerA and on either routerB or routerC then it would be a problem and all traffic for 192.168.0.6 would be routed to routerA, since in routing the longest prefix wins.

When you use that kind of overlapping prefixes, each site needs to be very careful that they do not assign host addresses that overlap with another site.

HTH

Rick

Correct Answer
scottmac Sun, 10/11/2009 - 05:18

To (hopefully) add to Rick's post, you may want to search around (Cisco main site and Google) using "Variable Length Subnet Masking (or Mask)" (VLSM).

Each address must be unique within the realm in which is is visible.

In order to use the same address in multiple places, Network Address Translation (NAT) is used to "hide" the duplicate addresses; it's hard to imagine how many places 192.168.1.0/24 is being used across the entire Internet ... but for each of those 192.168.x.x networks, they are behind a router or firewall that is doing NAT and presenting a single (or group of) unique addresses to the rest of the Internet.

Otherwise, there'd be no way to tell which 192.168.x.x network (of tens of millions 192.168.x.x networks) to route the traffic to.

... and, FWIW, keep in mind that just because you --CAN-- do something, it doesn't necessarily mean that you --SHOULD-- or that it's even a good idea (i.e., "best practice").

Richard Burts Sun, 10/11/2009 - 07:39

Scott

Very good addition :)

I considered mentioning in my response that NAT was a way to make this situation work with the same subnet in multiple locations and decided to keep my response simple and direct. But you are quite right that configuring Address Translation would be a way that multiple routers could all have 192.168.0.0 subnets and successfully route to each other.

And I absolutely agree that people need to remember the difference between CAN and SHOULD.

HTH

Rick

blittrell Wed, 10/21/2009 - 13:51

One thing that does not make sense about this. It seems to me all traffic for 192.168.0.0-255 would route to RouterA, all traffic for 192.169.1.0-255 would route to Router B and the rest would go to Router C regardless of whether you have duplicates, in other words if there was not 0.6 address off the Router A port but there was one off the Router B port it would never get a routed packet because it was sent to Router A, and because Router A has that as a local subnet it would attempt delivery or drop it if failed.

Am I wrong here?

Richard Burts Thu, 10/22/2009 - 04:33

Brett

You are quite correct about this. A packet with destination address of 192.168.0.6 would be routed to routerA, regardless of whether that address is actually used by a machine in its subnet. And if a machine on routerB had the address 192.168.0.6 there would be no packets routed to it.

That is why my first response discussed the issue of overlap of addresses and said this:"When you use that kind of overlapping prefixes, each site needs to be very careful that they do not assign host addresses that overlap with another site."

HTH

Rick

jarowland Tue, 12/08/2009 - 08:31

Just wanted to thank you all again for your input. Your comments helped me to further understand the concepts I need to be a succesful network technician and also encouraged me to study harder. I took the ICND1/CCENT this morning and passed (first try)! I just wanted you all to know your advice/comments are not "falling on deaf ears".

Thanks again,

Jason

jarowland Wed, 10/14/2009 - 06:58

Thank you both for clarifying that for me. I thought I was on the right track.

Actions

This Discussion