Adding routes to Debian

This adds the route immediately to the Kernel IP routing table (after reboot it will be erased).

# route add -net 172.31.0.0 netmask 255.255.0.0 gw 192.168.1.1

to print the Kernel IP Routing table:

# netstat -rn

To keep the Static Route persistent you need to edit the file: /etc/network/interfaces

and the static routes in the following format:

up route add [-net/-host] <host/net>/<mask> gw <host/ip> dev <interface>

up route add -net 172.31.0.0/16 gw 192.168.1.1 dev eno1