How Do I Add a Static Route in Linux?
Contents

How do I create a static route in Linux?

Linux Set Static Route

  1. Get Interface Name: Run an ifconfig or ip addr in order to grab the interface name, that you want to set the route traffic to go through. …
  2. Create Route File: …
  3. Restart the Network Services: …
  4. Verify the route: …
  5. Get Interface Name: …
  6. Edit the interfaces file: …
  7. Restart the Network Services: …
  8. Verify the route:

How do I add a static route?

Add a Static Route to the Windows Routing Table You can use the following syntax:

  1. route ADD destination_network MASK subnet_mask gateway_ip metric_cost.
  2. route add 172.16.121.0 mask 255.255.255.0 10.231.3.1.
  3. route -p add 172.16.121.0 mask 255.255.255.0 10.231.3.1.
  4. route delete destination_network.
  5. route delete 172.16.121.0.

24 окт. 2018 г.

Robert Thorne

Robert Thorne

Automotive & Future Transportation Editor

Robert Thorne covers electric vehicle innovations, autonomous driving systems, global mobility trends, and automotive engineering developments.

Share this article
Twitter Facebook Pinterest