{"id":13834,"date":"2022-09-03T13:19:49","date_gmt":"2022-09-03T10:19:49","guid":{"rendered":"https:\/\/kifarunix.com\/?p=13834"},"modified":"2022-09-03T13:19:54","modified_gmt":"2022-09-03T10:19:54","slug":"set-static-routes-via-an-interface-ip-on-centos-ubuntu","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/set-static-routes-via-an-interface-ip-on-centos-ubuntu\/","title":{"rendered":"Set Static Routes via an Interface\/IP on CentOS\/Ubuntu"},"content":{"rendered":"\n

In this tutorial, you will learn how to set static routes via an interface\/IP on CentOS\/Ubuntu systems. In a network, a route<\/a> is a path between networks. Routes through which a packet, in a packet-switching network, uses to travel from one network to the other is decided by a router in a specific network. So, how can one set static routes via an interface\/IP on CentOS\/Ubuntu systems?<\/p>\n\n\n\n

Set Static Routes via an Interface\/IP on CentOS\/Ubuntu<\/h2>\n\n\n\n

Now, you may want to set static routes for one reason or another. This simple guide will show you how you can be able to set static routes via an interface\/IP on CentOS\/Ubuntu systems.<\/p>\n\n\n\n

The following is the network architecture that we will use in this guide.<\/p>\n\n\n\n

                                +-----------------+\n                                | [ MAIN ROUTER ] |\n           +--------------------+-------+---------+---------------+\n           |                    | [ 11.12.13.1 ]  |               |\n           +                    | [ 21.22.23.1 ]  |               |\n           |                    +-----------------+               +\n           |                                                      |\n           |                                                      |\n+----------+----------+                               +----------+---------+\n|      ROUTER A       |                               |       ROUTER B     |\n+   [ 11.12.13.10 ]   +                               +  [ 21.22.23.10 ]   +\n|   [ 10.163.10.1 ]   |                               |  [ 172.16.10.1 ]   |\n+----------+----------+                               +----------+---------+\n           |                                                      |\n           +                                                      +\n           |                                                      |\n           +                                                      +\n           |                                                      |\n +---------+---------+                                  +---------+---------+\n |      [ LAN A ]    |                                  |     [ LAN B ]     |\n +  [ 10.163.10.10 ] +                                  +  [ 172.16.10.10 ] +\n +-------------------+                                  +-------------------+\n<\/code><\/pre>\n\n\n\n

So how can you set static routes via an interface\/IP on CentOS\/Ubuntu?<\/p>\n\n\n\n

Considering an example network architecture above;<\/p>\n\n\n\n