Let's suppose we have 2 subnets 10.23.2.0/24 and 192.168.45.0/24. To connect them, you have a Linux router machine with three network interfaces, two for LAN subnets and one for uplink. The router has 2 IP addresses of 2 different subnets i.e. 10.23.2.1 and 192.168.45.1. The hosts on each subnet have router as their default gateway. If a packet is to be sent from anything outside 10.23.2.0, it is passed to the router via an interface and backedout through the router via another interface.
Imagine having two subnets, namely 10.23.2.0/24 and 192.168.45.0/24. Connecting these subnets involves utilizing a Linux router machine equipped with three network interfaces – two designated for LAN subnets and one for the uplink. The router possesses two IP addresses belonging to different subnets, specifically 10.23.2.1 and 192.168.45.1. In each subnet, the hosts configure the router as their default gateway. In the scenario where a packet needs to be transmitted from a source outside the 10.23.2.0 subnet, it is directed to the router through one interface and subsequently forwarded out of the router via another interface.