

The routes we have just added are temporary and will not survive a reboot. Permanently adding static route (RHEL, Fedora, CentOS) Once again, you can check the routing changes to see if the changes exist using the ip route show command: $ ip route show To add the specific IP of the backup server, say 10.0.2.15 run the command: $ sudo ip route add 10.0.2.15 via 192.168.43.223 dev enp0s3 You can confirm whether new static route add been in route table using “ ip route show” command. 192.168.43.223 -> is the IP through which we will reach the server.10.0.2.0 -> is the network you want to connect to.The command for this will be $ sudo ip route add 10.0.2.0/24 via 192.168.43.223 dev enp0s3

In this case, you will have to create a new route for backup server subnet via another IP, say 192.168.43.223 via the interface enp0s3. However, for one reason or the other, you cannot reach the backup server via the default gateway. Suppose you want to take a backup of a Linux machine and push the backup file to another backup server in the subnet 10.0.2.0/24. With the default routing statistics in mind, let’s now move a step further and add some routes to our system. Similar statistics can be displayed using route command, $ route -nĪlso, you can use the good old netstat command, which is usually used for printing interface statistics as well as the routing table to achieve the same result.
