routing

APTI

Active Member
Joined
Dec 20, 2022
Messages
209
Reaction score
115
Credits
1,823
how do I make a network with 192.168.1.x also route to 192.168.2.x
 


TuxBot

Well-Known Member
Staff member
Joined
Mar 26, 2023
Messages
1,136
Reaction score
234
Credits
14,065
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