I got two Comcast routers with two different subnets on each. Every subnet contains 5 static IPs. Two questions:

  1. Are there any problems if both routers and machines from both subnets are connected into one switch? Security issues doesn't matter there. I need to know if there are some performance or other problems.
  2. Is it possible to make machines from different subnets to see each other if they all are connected into one switch? Some static routing, add ARP records or somethig else ...

I just want to avoid configuring second ethernet adaptors, third router or something. And I need to connect these subnets vai high-speed local network.

  • What are you trying to achieve by doing this? dual WAN? – Jacob Feb 11 '11 at 2:26
  • 1
    You mention not wanting to add a second adapter. Have you considering just adding a second IP address to your existing adapters? – Zoredache Feb 11 '11 at 2:29
  • @Jacob Actually I do have dual WAN. I want internal machines from that different subnets (each subnet connected to different WAN) to communicate directly through gigabit switch. As far as I understand, they will use both routers (100Mb) and probably some comcast's router (WAN speed) if they are just connected with switch. – Shcheklein Feb 11 '11 at 4:19
  • @Zoredache Can you give me some starting point? I haven't done something like that before. – Shcheklein Feb 11 '11 at 4:21
  • Pick a subnet from your favorite RFC1918 address space, go into the network properties for every computer and assign a unique address to that computer. technet.microsoft.com/en-us/library/cc722518.aspx – Zoredache Feb 11 '11 at 7:05
  1. Generally speaking the largest concerns when two subnets exist on the same layer 2 domain are related to security, and broadcast domain size. Since you've stated security isn't a concern in your environment, and there's only a dozen or so devices in question, I would not anticipate a performance hit for your proposal.
  2. What you're trying to accomplish is no different than trying to route a specific subnet to a gateway other than your default. In this scenario you need to instruct the device that the destination in question is available through it's Ethernet port. This will cause the device to resolve the layer 3 address to it's layer 2 destination with ARP.

On Windows this is accomplished with the following command:

route add mask if 1

Replace the destination address and subnet mask accordingly. The number following "if" represents an internal representation of the interface you wish to use. On the hosts I tried 1 always found my first Ethernet adapter, but your mileage may vary.

On Linux this is accomplished with the following command:

route add -net netmask dev eth0

Again, replacing the address and netmask where applicable. The designation of the Ethernet interface to use is much easier to ascertain here.

  • Tnx, it seems reasonable, will try to add static routes ASAP – Shcheklein Feb 11 '11 at 10:29

There are no problems with having multiple subnets on the same switch, performance or otherwise.

In order for the machines to talk to eachother they either need

  1. a router which is on both subnets (but you said this wasnt an option)
  2. each machine has to have an IP on both subnets (all OSs let you assign multiple IPs to a single interface)
  • Ok, thanks. Is it possible to assign IPs from the local subnet, e.g. – Shcheklein Feb 11 '11 at 4:24
  • I'm not quite sure what youre asking. If you want to know if you do something like use 192.168.0.X and 192.168.1.X for each subnet, and add an IP from both to each machine, then yes it is possible. If you have control over the comcast routers, it would be easier to put both routers on the same subnet with one of them being and the other being, then all you would have to do is choose which you want as the default gateway for each computer on the network – Patrick Feb 11 '11 at 15:11
  • No, I don't have control over routers. Each has its own public IP from the different subnets. I have also a number of machines from the first and the second subnets (again, each of these machines has public IP from one of the subnets and I can't change this). I'm asking if it's possible to create a third private subnet (say shared among all machines. I want to do this as easy as possible (withoud second NIC, third router or something). – Shcheklein Feb 11 '11 at 16:27
  • Oh, yes, you can do this and it would work without any side effects. – Patrick Feb 11 '11 at 17:19
  1. There's really no problem with everything being connected to the same switch.
  1. The two subnets should co-exist on the same physical wire without issue as long as they are static IPs.
  2. You can set up explicit static rules for the subnet that the node is not on telling it that it is a directly-attached destination reachable via a specific ethernet device. As long as the nodes on the other subnet are similarly setup, it should work.
  • 2. As long as the router supports setting a route to a particular interface rather than an ip address. – joeqwerty Feb 11 '11 at 3:46
  • You should be able to apply the rules to the nodes directly without having to mess with the routers. – David Mackintosh Feb 11 '11 at 23:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.