Article number
000003546
Affected Versions
All
Source Hypervisor
All
Target Hypervisor
All

How to permanently add a static route to a VRA

Viewed 329 times

Summary

When using the route add command to add a static route to a VRA, the route will not be permanently added to the VRA, and during the next reboot or shut down the static route will be removed.

Steps

  In order to permanently add a static route to a VRA, follow these steps:
  1. Log into the VRA, you can use this KB to do so.
  2. Use the following command to add the static route:  echo "up route add -net x.x.x.x/zz gw y.y.y.y dev eth0" >> /etc/network/interfaces
Example: to add a static route for network 10.10.0.0/16 via 10.10.5.5 on eth0, we'll use this command: echo "up route add -net 10.10.0.0/16 gw 10.10.5.5 dev eth0" >> /etc/network/interfaces

Another possible way to add the static route, is to edit the interfaces file and add the line to the file. Just use vi or nano to edit the file (vi or nano /etc/network/interfaces and then add the line a new line at the end of the file).