How to configure Static routing in Linux

Static routes can be added usually through “route add” or “ip route” command. However, “route add” command configures routing on the runtime and doesn’t persist the configuration after a reboot.

To make it persistent across reboots, you have to add it to /etc/sysconfig/network/route file for SUSE .

For example, static routes for the eth0 interface would be stored in the /etc/sysconfig/network/route file. Here are the Steps to configure static routing in Linux.

To see the current routes:

To add static route using “route add” in command line:

To add static route using “ip route” command:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.