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 trough the gateway you can use

allow-hotplug eth0
iface eth0 inet static
#        gateway 
        up ip route add via
        down ip route delete  via

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