I've started the basic of computer networks at college and i am in doubt about how to use the "route add". The professor gave us this scenario:
Machine 1 (M1) with the ip address 192.168.1.1/24 (/24 = netmask 255.255.255.0)
Machine 2 (M2) with two network cards:
-- first ip address: 192.168.1.12/24
-- second ip address: 192.168.3.1/24
Both machines are connected to each other with a network cable.
M1 can ping the first ip address on M2 (they're on the same network). However, the second ip address on M2 is in another network and i can't ping it from M1.
My professor said that i should use the first ip address in M2 as a gateway to the second. I think that i could use this command on M1, to access the 192.168.3 network:
route ADD 192.168.3.0 MASK 255.255.255.0 192.168.1.12
Is it the right thing to do?