Is it safe to use a single switch for multiple subnets?

For a moment, forget about whether the following is typical or easy to explain, is it safe and sound?

 Internet
    |
ISP supplied router x.x.x.1 (public subnet)
    |
  switch-------------------------------------+
  | (public subnet)                          | (public subnet)
BVI router (switch with an access list)      NAT router
  | (public subnet)                          | (private subnet 192.168.50.1)
  +--------------------------------switch----+ (both subnets)
                                    |  |
computer with IP 192.168.50.2 ------+  +----computer with IP x.x.x.2

I don't plan to implement this setup, but I am curious about it.

  • The 50.2 computer may send a packet to the x.2 computer, but it will use 50.1 as the router, since 50.2 knows that the subnet is different. Would this result in the packet being received twice by the x.2 machine, first directly through the switch, second by way of the two routers?
  • Do you see any problems with this aside from how confusing it is, and that it would put one switch doing the work of two subnets?

Additional details:

  • There will not be DHCP involved. (that would be truly confusing)
  • I am aware that I have totally eliminated whatever security/separation I would normally have between x.x.x.* and 192.168.50.*.
  • I am not interested in accomplishing a direct link between x.x.x.* and 192.168.50.*. I am just interested in preventing endless loops, or double-delivery of all the packets.
  • My switches are unmanaged/dumb switches - except for the BVI router. The "router" is set up with BVI (similar to bridge-route). It works just like a switch, except for its dropping of packets based on source and destination IP address and port.

Would this result in the packet being received twice by the x.2 machine, first directly through the switch, second by way of the two routers?

No, because a switch is not a hub. A switch sends unicast packets only to those ports that have the receiving MAC address registered.

•Do you see any problems with this aside from how confusing it is, and that it would put one switch doing the work of two subnets?

No, but remember your security is as thin as it gets. Access the ports - no security. Hack a machine - no security. It works better if your switch is no totally stupid (unmanaged) and you can at least set multicast groups or VLAN settings.


From a technical standpoint there isn't much to stop a network administrator from having two IP networks on a single L2 broadcast domain -- some administrators do it unknowingly and aren't even aware of how proxy-arp is saving them.

With your x.x.x.2 node and the 192.168.50.2 node on the same L2 broadcast domain, they will attempt local (direct) delivery for IP's within their IP network and use a configured gateway for IP addresses outside of their IP network.

While the two devices in different IP networks, but on the same broadcast domain would normally not attempt local (direct) delivery to eachother (they would instead use their respective gateways as a next hop), local (direct) delivery can be achieved with static routes on each of the nodes -- enabling them to communicate at L3 without the use of an intermediate gateway.

An obstacle that arises when running multiple IP networks on a single L2 broadcast domain exists around dynamic addressing (DHCP/BOOTP) -- as those services rely on L2 broadcasts for addressing.

Another major obstacle, as noted in other replies, is security. Man-in-the-middle (MITM) attacks, ARP Poison Routing (APR), and a slew of others are possible.


You're looking for what is called a "VLAN". The exact implementation depends on the switch. What a VLAN-based setup does is create separate "virtual" broadcast domains within your switch. You can separate these out however you want on the switch, or even create what is called a "trunk" that can handle multiple VLANs simultaneously on one port.