Web Hosting Talk







View Full Version : Subnets / multiple non-contiguous IP ranges


mpope
01-18-2002, 03:44 PM
Hi!

I am trying to understand some subnetting basics here and have the following question:

I currently have 1 class C on a switch. Now, this class C is being used entirely by 1 server. I now need some more IP's for some boxes that I am going to bring online on the same switch. My upstream provider does not have any more class C's that are contiguous to my current class C. Ie.. if my Ip range was 12.12.12.x , then 12.12.11.x and 12.12.13.x are not available for me to use.

Ok, from what I understand about subnetting, I cannot have 2 non-contiguous IP ranges on a single segment (Ie, my switch). Does anyone know of any ways to get around this without dumping my current IP's and getting a larger range?

I am currently using a netmask of 255.255.255.0 on the class C that I have. Could I not just use 255.255.255.255 on any additional IP ranges that are assigned to me?

I believe this would cause all packets from each IP to be sent through a router and then back even if the 2 IP's were on the same box. On a webserver, the only time I could see this happening is when you send an email from one domain to another domain on the same box. However this rarely happens, so I don't think it should be such a big deal...

Anyways, if anyone could enlighten me a little bit on this subject, it would be much appreciated.

Thanks!

cbaker17
01-18-2002, 03:50 PM
If your provider is running a cisco router and most any good router they should be able to route multiple subnets of ips to you with no problems, now if your going from a switch to a switch without a real router then yes i believe you can only route one subnet in which case you may consider investing in a layer 3 switch which will do routing. extreme 48 is a good layer 3 switch

sigma
01-18-2002, 03:57 PM
Originally posted by mpope
Ok, from what I understand about subnetting, I cannot have 2 non-contiguous IP ranges on a single segment (Ie, my switch). Does anyone know of any ways to get around this without dumping my current IP's and getting a larger range?


Have your router route both blocks to the switch, and the switch shouldn't care. If it does care, configure it for multinetting or some similar feature. Switches that are just doing Layer 2 don't care what the IPs are, usually.


I am currently using a netmask of 255.255.255.0 on the class C that I have. Could I not just use 255.255.255.255 on any additional IP ranges that are assigned to me?


No, a new /24 would still have 255.255.255.0 as its netmask.


I believe this would cause all packets from each IP to be sent through a router and then back even if the 2 IP's were on the same box. On a webserver, the only time I could see this happening is when you send an email from one domain to another domain on the same box. However this rarely happens, so I don't think it should be such a big deal...


That is a big deal, and you need to work around it. Sometimes you have more internal traffic than external, depending on conditions. Moreover, your servers may complain when they see ARP traffic for a netblock they don't consider local. You get around this by adding a route on each server so that it knows both netblocks are "on the wire". So if server A has IP address 1.2.3.4 and the other block is 1.2.8.0/24, setup a route for 1.2.8.0/24 on server A.

Kevin

mpope
01-18-2002, 04:02 PM
Thanks for the quick reply!

Yes, my provider is using cisco 7500 series routers.

So, is my thinking correct: I would have my provider route the 2 different class C's to my switch, and then use a netmask of 255.255.255.255 on the new class C, and use the 255.255.255.0 on the old one?
Or... hmm... now I am thinking I can use 255.255.255.0 for both... :eek:

mpope
01-18-2002, 04:05 PM
Sigma - Ok, so I should be able to use the 255.255.255.0 for all IP ranges, and just let my upstream provider deal with routing the IP's to my switch.

Ok, this is starting to make sense now. Thanks for the help guys!