If you wish to add a route when ain interface goes up or down you can add it to /etc/network/intefaces

Example: if you want to add a route to network 10.0.0.0/16 trough the gateway 10.0.0.2 you can use

allow-hotplug eth0
iface eth0 inet static
        address 10.0.0.6/24
#        gateway 10.0.0.2 
        up ip route add 10.0.0.0/16 via 10.0.0.2
        down ip route delete 10.0.0.0/16  via 10.0.0.2

Note that the command that is executed is the *ip* command, not the route command You can find more info on the ip command https://access.redhat.com/sites/default/files/attachments/rh_ip_command_cheatsheet_1214_jcs_print.pdf

The down part is to remove the route when the interface goes down