add static route in linux

علی ذوالفقار
1400/02/13 14:43:28 (584)
Add Static Route in linux
use this command to add a new static route to route-table
after reboot the route will be gone and you must add it again
ip route add <NET_IP/24> via <GATEWAY_IP> dev <LAN_DEVICE_NAME>
ip route add via dev ens33
route all trafic to 192.168.177.X to gateway) from ens33(or eth0) NIC