Add a Persistent IPv4 Static Route

Document created by RSA Information Design and Development on Jun 13, 2017Last modified by RSA Information Design and Development on Jun 13, 2017
Version 2Show Document
  • View in full screen mode

Use this procedure to add a persistent IPv4 static route.

Before you begin 

You must access the appliance operating system to add a static route. For information, see Operating System Access.

Procedure 

  1. Log on to the appliance with the user name rsaadmin and the operating system password.

  2. To view the current routing table, type:

    sudo ip -4 route show

  3. To add a persistent IPv4 route entry to a network interface routing file, type:

    sudo bash -c "echo 'destination gateway subnet_mask eth0' >> /etc/sysconfig/network/ifroute-eth0"

    where:

    • destination specifies the IP address of the network or host for which you are adding a static route. Any network traffic to the destination IP address follows the route defined by the entry.

    • gateway specifies the IP address of the node that will route traffic to the destination network or host.

    • subnet_mask specifies the specifies the subnet mask associated with the destination IP address.

    • eth0 specifies the network interface, for example, eth0 or eth1.

    For example, to add a persistent static route that sends all network traffic for any host in the 10.100.212.0 subnet (that uses the subnet mask 255.255.252.0) to the gateway 10.100.219.102, type:

    sudo bash -c "echo '10.100.212.0 10.100.219.102 255.255.252.0 eth0' >> /etc/sysconfig/network/ifroute-eth0"

  4. To add a persistent IPv4 route entry to the corresponding table. Type:

    sudo bash -c "echo 'destination gateway subnet_mask eth0 table Teth0' >> /etc/sysconfig/network/ifroute-eth0 table Teth0"

    where:

    • destination specifies the IP address of the network or host for which you are adding a static route. Any network traffic to the destination IP address follows the route defined by the entry.

    • gateway specifies the IP address of the node that will route traffic to the destination network or host.

    • subnet_mask specifies the subnet mask associated with the destination IP address.

    • eth0 specifies the network interface, for example, eth0 or eth1.

    • Teth0 specifies the table in the network interface routing file, such as Teth0 for the interface eth0.

    For example, to add a persistent static route that sends all network traffic for any host in the 10.100.212.0 subnet (that uses the subnet mask 255.255.252.0) to the gateway 10.100.219.102, type:

    sudo bash -c "echo '10.100.212.0 10.100.219.102 255.255.252.0 Teth0' >> /etc/sysconfig/network/ifroute-Teth0 table Teth0"

  5. Restart the network services to apply the new static route. Type:

    sudo service network restart

    and press ENTER.

 

 

 

 


Attachments

    Outcomes