Two different Gateways in one subnet, Client only has a standard gateway

gatewaynetworkingroutingsubnet

following situation:

  • Subnet A: 192.168.0.0/24

  • Subnet B: 10.1.1.0/24

  • Standard GW (Router) in Subnet A: 192.168.0.254

  • GW leading to subnet 10.1.1.0/24: 192.168.0.100

I want to send traffic from a device in subnet A to a device in subnet B. But the router which is forwarding traffic to subnet B is not my default gw. My actual default GW has a static route to subnet B with gw 192.168.0.100 configured. So I have two gateways in one subnet.

What is best practice for this situation?

  1. Do I send traffic to my default gw, which sends the traffic back out the port where the traffic was received, to forward data to my other router? Are the any potential security features on routers which prevent this from happening?

  2. Do I have to add a static route to all my hosts in subnet A to lead traffic to subnet B via my secondary router directly – so without contacting my default gw first?

I hope my question is clear. Thanks in advance. My Network

Best Answer

Although a router is technically a gateway, the clients only have one Default Gateway.

You have one router that is connected to the 192.168.0.0/24 network and to your ISP. This router is the default gateway for the 192.168.0.0/24 network.

You have another router which is connected to the 192.168.0.0/24 network that is also connected to the 10.1.1.0/24 network. This router is the router/gateway from the 192.168.0.0/24 network to the 10.1.1.0/24 network, but it is not the default gateway for the 192.168.0.0/24 network.

The clients on 192.168.0.0/24 network don't need to explicitly know about the 10.1.1.0/24 network and they don't need an explicit route to the 10.1.1.0/24 network. Your clients will all use the default gateway on the 192.168.0.0/24 network to reach the 10.1.1.0/24 network.

The default gateway on the 192.168.0.0/24 network has a route to the 10.1.1.0/24 network via the other router on the 192.168.0.0/24 network. The default gateway router on the 192.168.0.0/24 network will happily send an ICMP redirect to clients trying to reach the 10.1.1.0/24 network and instruct them to use the other router on the 192.168.0.0/24 network to reach it.

Related Topic