How do I add a static route in Linux?

Ivanesn

New member
How do I add a static route in Linux?
Answer
How to configure Static routing in Linux
  1. To add static route using “route add” in command line: # route add -net 192.168.100.0 netmask 255.255.255.0 gw 192.168.10.1 dev eth0.
  2. To add static route using “ip route” command: # ip route add 192.168.100.0/24 via 192.168.10.1 dev eth1.
  3. Adding Persistent static route:
 

Tìm kiếm

Back
Top