Add a new route to your network configuration

If you want to add a route to a different network enter the following:

sudo route add -net 192.168.2.0 gw 192.168.1.1 netmask 255.255.255.0 dev eth1
  1. 192.168.2.0 = the network you want to route
  2. gw 192.168.1.1 = your current gateway
  3. netmask 255.255.255.0 = your current netmask
  4. dev eth1 = the interface you want to route the 192.168.2.0 over.

To delete the route, enter the following:

sudo route del -net 192.168.2.0 gw 192.168.1.1 netmask 255.255.255.0 dev eth1