Frequent Question: How Do I Permanently Add an Ip Route in Linux?
Contents How Do I Permanently Add a Route in Linux? How to Add a Persistent Static Route by Specifying Destination and Gateway View the Current State of the...
Contents
How do I permanently add a route in Linux?
How to Add a Persistent Static Route by Specifying Destination and Gateway
- View the current state of the routing table by using your regular user account. % netstat -rn. …
- Become an administrator.
- (Optional) Flush the existing entries in the routing table. # route flush.
- Add a persistent route.
Must Read
How do I add a static route in Linux?
How to configure Static routing in Linux
- 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.
- To add static route using “ip route” command: # ip route add 192.168.100.0/24 via 192.168.10.1 dev eth1.
- Adding Persistent static route: