I have 2 subnets 192.168.1.0/24 and 192.168.2.0/24 and one suse linux server. The linux has 2 interfaces, eth0 and eth1. I want to configure the suse linux server as a router so that I can make these 2 subnets communicate with each other.
These are my steps：
set the linux eth0 ip as 220.127.116.11，eth1 ip 192.168.2.254
add route in linux：
route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0 route add -net 192.168.2.0 netmask 255.255.255.0 dev eth1
- set 192.168.1.0/24 gw as 192.168.1.254，and 192.168.2.0/24 gw as 192.168.2.254
I am not sure if this will work or not? Or is there some step I'm missing?