AskF5 Knowledge Base

Applies To:

Show Versions Show Versions

sol2317: Managing static routes
General SolutionGeneral Solution

Original Publication Date: 04/15/2008
Updated Date: 05/07/2006




Note: The procedure for adding a static route changed in BIG-IP and 3-DNS version 4.5.11 and 4.6.3. For more information, refer to SOL3687: Managing static routes.

Adding static routes to IP subnets on the same physical network segment

By default, BIG-IP and 3-DNS can only route to network addresses that are located on attached segments when they match a BIG-IP self IP address. To add multiple IP subnets on the same physical network segment, you must add a self IP address that belongs to each new network.

To add a static route to IP subnets on the same physical network segment, perform the following steps:

  1. Create a new self IP address on the new network, by typing the following command:

    bigpipe self <address> vlan internal netmask <netmask>

  2. Create a new floating self IP address on the new network, by typing the following command:

    bigpipe self <address> vlan internal netmask <netmask> floating enable

  3. Save the base configuration, by typing the following command:

    bigpipe base save

  4. Save the shared configuration, by typing the following command:

    bigpipe save

  5. Reload the full configuration, by typing the following command:

    bigstart reinit

You should now be able to access the new network.

Note: If you have nodes on the newly added network that use BIG-IP as their default gateway, you must configure those nodes to use the new floating self IP address for their gateway address. For more information about configuring the default gateway for your nodes, refer to your operating system documentation.


Adding static routes to IP subnets on a different physical network segment

By default, BIG-IP and 3-DNS can only route to network addresses that are on attached segments that match a BIG-IP self IP address or to networks that can be reached through the BIG-IP's default gateway. Since the default gateway is generally upstream of BIG-IP, it is often necessary to add static routes to nodes that are reached through a downstream router.

To add a static route to an IP subnet on a different physical network segment, perform the following steps:

  1. Add a static route to the IP subnet, by typing the following command:

    route add -net <subnet> <router>

    Important: BIG-IP and 3-DNS build the routing table by loading static routes and then loading the configuration. If you add routes after you have loaded the configuration, it may result in incorrect routing. Because of this, you should always reload the BIG-IP or 3-DNS configuration using the bigpipe load command after you add new static routes.

  2. If nodes on the new subnet do not route outbound traffic through BIG-IP or 3-DNS, use the following command to create a SNAT so that traffic will return to the BIG-IP or 3-DNS:

    bigpipe snat map external to <address>


Saving static routes

To save static routes and load them when the BIG-IP or 3-DNS reboots, you must create a /config/routes configuration file and save the route commands to that file.

To create the /config/routes file and save the static routes, perform the following steps:

  1. Create the /config/routes file, by typing the following command.

    touch /config/routes

  2. Make the file executable, by typing the following command:

    chmod 755 /config/routes

  3. Add the static routes to the /config/routes file, by typing the following command:

    Important: The double chevron (>>) appends the modifications to the/config/routes file, rather than overwriting the file. If the file does not exist, this command will create it. Use this command with caution; if you use a single chevron (>), this command will overwrite the entire contents of the /config/routes file with the new entry.

    echo 'route add -net <subnet> <router>' >>/config/routes

  4. Load the new routing configuration, by typing the following command:

    bigpipe load

Note: The /config/routes file will synchronize automatically when you use the configsync command.

Modifying the Maximum Transfer Unit (MTU) for BIG-IP and 3-DNS static routes

To lock an MTU value to a specific route in the routing table, log in as root and type the following command where DESTINATION is the route destination, GATEWAY is the next-hop router used to get to the DESTINATION, and PMTU is the MTU value for the path from the host to the route destination:

route [change|add] [-[host|net]]{DESTINATION}{GATEWAY} [-mtu PMTU]

For example:

route add -net 10.0.0.0 192.168.1.1 -mtu 1450

or

route change -net 10.0.0.0 -mtu 400

Was this resource helpful in solving your issue?




NOTE: Please do not provide personal information.



Incorrect answer. Please try again: Please enter the words to the right: Please enter the numbers you hear:

Additional Comments (optional)