add static route in linux

علی ذوالفقار
1400/02/13 14:43:28 (114)
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 192.168.177.0/24 via 192.168.0.80 dev ens33
route all trafic to 192.168.177.X to 192.168.0.80(as gateway) from ens33(or eth0) NIC
Back