routing

APTI

Active Member
Joined
Dec 20, 2022
Messages
258
Reaction score
161
Credits
2,242
how do I make a network with 192.168.1.x also route to 192.168.2.x
 


how do I make a network with 192.168.1.x also route to 192.168.2.x
You can set up a network route between the two networks by adding a route to the routing table of the device that needs to communicate between the two networks.

Assuming that the device you are configuring is Linux-based, you can add the route by executing the following command:

Code:
sudo route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.X

In the above command, replace 192.168.1.X with the IP address of the default gateway on the 192.168.1.x network.

This command adds a route to the 192.168.2.0/24 network via the default gateway on the 192.168.1.x network.

Once this route is added, the device should be able to communicate with hosts on the 192.168.2.x network.
 

Members online


Top