route -p add 10.152.212.0 mask 255.255.255.0 10.224.5.1
This will permanently (-p) add a static route so that any request going to an IP in the 10.152.212.0/24 (255.255.255.0) network goes through the network gateway 10.224.5.1 of the other network card
In case you need only one specifc IP, use the exact IP instead of 10.152.212.0 and change the mask to 255.255.255.255 or remove it completely, e.g.
route -p add 10.152.212.5 mask 255.255.255.255 10.224.5.1
- To delete a route, use the command route delete
- To avoid making it permanent, remove the -p
That’s it, Enjoy!