-2

Say I have 4 IPs in a subnet.

Scenario 1 (/24):

Client A: 10.0.0.1/24
Client B: 10.0.0.2/24
Client C: 10.0.0.3/24
Client D: 10.0.0.4/24

Scenario 2 (/16):

Client A: 10.0.1.1/16
Client B: 10.0.2.1/16
Client C: 10.0.3.1/16
Client D: 10.0.4.1/16

Scenario 2 allows for a bit more logical organization so I would rather use that. The broadcast traffic is going to be the same for both subnets.

So which is more efficient?

What do I mean by efficient? Lower latency, more throughput, etc.

Intuition tells me that they should be exactly the same, but experience tells me that there might be cases where routers can make more efficient calculations when certain things are true (e.g. smaller number of bits can change.) Is my intuition correct? Does it only apply when the network pipe is 99% utilized?

Edit:

Some clarification... I am using the term switch loosely to apply switch hardware in general (i.e. could actually be a router.) - My mistake.

What this particular subnet would be used for is routing packets. I have several campuses that would be connected to this subnet to route between each other.

So perhaps the real question should be: is routing packets into/out of a smaller subnet more efficient than a larger one?

12
  • 1
    False dichotomy. Which is more deadly - getting shot in the brainstem by a .45 caliber bullet, or getting shot in the brainstem by a .50 caliber bullet? Oct 13, 2014 at 14:43
  • @HopelessN00b I fail to see how that applies... Oct 13, 2014 at 14:46
  • So which is more efficient? What do I mean by efficient? Lower latency, more throughput, etc. - Neither. The ip addressing scheme has nothing to do with latency or throughput. experience tells me that there might be cases where switches can make more efficient calculations when certain things are true (e.g. smaller number of bits can change.) - Switches don't make any calculations based on the ip address. Switches (in the strict term) are layer 2 devices and don't know nor care about layer 3.
    – joeqwerty
    Oct 13, 2014 at 14:55
  • I think the sole interest here for you is ease of management if you run out of available subnets or fill one.
    – NaeiKinDus
    Oct 13, 2014 at 14:56
  • a) Switches don't care for subnet masks. b) Do you have any reliable example or experience where something like this ever really mattered?
    – Sven
    Oct 13, 2014 at 14:56

1 Answer 1

2

IP is a Layer-3 addressing scheme, so your subnet layout will only matter for routers. Switches work on Layer-2 and do not deal with IP addresses at all. In Short, a workstation wanting to contact another IP will do a bitwise comarison of netmask and local subnet address. When this results in a local address (your target), an ARP broadcast for that address is sent to all hosts on this Layer-2 segment. The target machine answers with its MAC address and the first machine is able to establish communications.

So you should layout your subnets according to organization structure. Bear in mind, that one day you might want to establish routing, where "greater" address space may help, but maybe some day you will need additional address space for new purposes, so you don't want to "pollute" local networks with too few hosts each.

3
  • It bears mentioning that some switches do in fact operate at layer three, providing routing services when desired. That being said, it shouldn't be a concern.
    – Gene
    Oct 13, 2014 at 15:35
  • @Gene correct, and that's what I meant actually (see my updated question.) Oct 13, 2014 at 15:39
  • Can't cite any proof, but IMHO subnet size should not matter for routing, but - starting from a certain point - the size of your routing table will. For each routing decision, the router has to scan the table for the "longest matching prefix" of route entries. OTOH, with a routing table of 4-16 subnets, I wouldn't expect any performance differences on today's routing hardware ;-)
    – matt_gnu
    Oct 14, 2014 at 6:40

Not the answer you're looking for? Browse other questions tagged .