Adding custom static routes to a device

You can add a custom route to an fbond device on the application network, or to a mgt1 device on the management network.

Before you begin

Ensure that you have:
  • IP of the next-hop router through which to route traffic
  • prefixlen of the destination subnet mask (the number of enabled bits which is 24 from the example)
  • Destination gateway IP for the traffic (that is 10.254.100.1 from the example)
  • Exit interface to the next-hop router, that is fbond.XXXX or mgt1.YYYY

    For example, to route traffic that is destined for the network that is represented by 10.10.20.0/24 CIDR through the next-hop router with the IPv4 gateway address of 10.254.100.1 over device interface fbond.4080:

    IP = 10.10.20.0
    prefixlen = 24
    gateway = 10.254.100.1
    interface = fbond.4080

Procedure

  1. Set up the custom_routes entry in the dedicated network variable section of the .yml file, based on the exit device type.

    The custom_routes is a list that consists of comma-separated routes in the format of ["ip/prefixlen via gateway dev interface"] for each custom route. For example: custom_routes: ["10.10.20.0/24 via 10.254.100.1 dev fbond.4080"]

    If you want to add a route through a fbond.XXXX device:
    1. Connect to e1n1 by using the management floating IP.
    2. Update the custom_routes entry by following Shared application network variables.
    If you want to add a route through a mgt1.YYYY device:
    1. Connect to e1n1 by using the application floating IP.
    2. Update the custom_routes entry by following Shared management network variables.
  2. Validate the YAML file.
  3. Test the YAML file and run the playbooks.
  4. Verify that you can ping the remote network and verify that the traffic is over the specific gateway by using traceroute or a similar tool.