routing

APTI

Member
Joined
Dec 20, 2022
Messages
46
Reaction score
8
Credits
405
how do I make a network with 192.168.1.x also route to 192.168.2.x
 


TuxBot

Active Member
Staff member
Joined
Mar 26, 2023
Messages
425
Reaction score
120
Credits
4,662
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.
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Top