Fortinet Document Library

Version:

Version:

Version:


Table of Contents

New Features

Download PDF
Copy Link

Static route template with support for meta fields

You can provision static routes to FortiGate devices by using a static route template. Both IPv4 and IPv6 are supported. After creating the static route template, you can assign the template to one or more devices, and install the configuration to devices.

For IPv4, you can create static routes for the following destinations:

  • Subnet
  • Internet service
  • Custom Internet service

You can use meta field variables created for an object type of Device VDOM when creating IPv4 static routes for subnets.

For IPv6, you can create a static route:

This topic contains the following sections:

Creating meta field variables

You can create meta field variables for an object type of Device VDOM, and then use the variable in static route templates.

When you create a meta field, a variable name is automatically created, and you can set a value for the variable for each device.

This example describes how to create a meta field named vdom-ip for a Device VDOM object.

To create meta field variables:
  1. Go to System Settings > Advanced > Meta Fields, and click Create New.

    The Create New Meta Fields dialog box is displayed.

  2. In the Object list, select Device VDOM.
  3. In the Name box, type vdom-ip.
    Note

    The name identifies the meta field, and a variable name is automatically created for the meta field. View the Variable option to see the variable name that you can use in interface templates. For example, $(vdom-ip) is the variable name for the vdom-ip meta field.

  4. Beside Importance, select Required.
  5. Define the value:
    1. Under Values, click Create New.

      The Create Meta Field Value dialog box is displayed.

    2. In the Device list, select the device.
    3. In the Value box, type the IP address.
    4. Click OK.

      The value is saved.

  6. Click OK.

    The meta field is created.

Creating static route templates

You can use meta field variables created for an object type of Device VDOM when creating IPv4 static routes for subnets.

To create a new static route template:
  1. Go to Device Manager > Provisioning Templates > Static Route Templates.

  2. Create a static route template:
    1. In the toolbar, click Create New. The Create New Route Template dialog box appears.
    2. In the Name box, type a name for the template, and click OK. The new template is created.

  3. Open the template for editing, and create a static route:
    1. In the content pane, double-click the template. The template opens for editing.

    2. In the toolbar, click Create New. The Create New Static Route pane is displayed.

      For IPv4 subnets, you can use a meta field variable created for an object type of Device VDOM instead of typing an IP address. For example:

    3. Complete the options, and click OK.

      The static route is created.

  4. Assign the template of static routes to one or more devices.
  5. Install the configuration to devices.

Static route template with support for meta fields

You can provision static routes to FortiGate devices by using a static route template. Both IPv4 and IPv6 are supported. After creating the static route template, you can assign the template to one or more devices, and install the configuration to devices.

For IPv4, you can create static routes for the following destinations:

  • Subnet
  • Internet service
  • Custom Internet service

You can use meta field variables created for an object type of Device VDOM when creating IPv4 static routes for subnets.

For IPv6, you can create a static route:

This topic contains the following sections:

Creating meta field variables

You can create meta field variables for an object type of Device VDOM, and then use the variable in static route templates.

When you create a meta field, a variable name is automatically created, and you can set a value for the variable for each device.

This example describes how to create a meta field named vdom-ip for a Device VDOM object.

To create meta field variables:
  1. Go to System Settings > Advanced > Meta Fields, and click Create New.

    The Create New Meta Fields dialog box is displayed.

  2. In the Object list, select Device VDOM.
  3. In the Name box, type vdom-ip.
    Note

    The name identifies the meta field, and a variable name is automatically created for the meta field. View the Variable option to see the variable name that you can use in interface templates. For example, $(vdom-ip) is the variable name for the vdom-ip meta field.

  4. Beside Importance, select Required.
  5. Define the value:
    1. Under Values, click Create New.

      The Create Meta Field Value dialog box is displayed.

    2. In the Device list, select the device.
    3. In the Value box, type the IP address.
    4. Click OK.

      The value is saved.

  6. Click OK.

    The meta field is created.

Creating static route templates

You can use meta field variables created for an object type of Device VDOM when creating IPv4 static routes for subnets.

To create a new static route template:
  1. Go to Device Manager > Provisioning Templates > Static Route Templates.

  2. Create a static route template:
    1. In the toolbar, click Create New. The Create New Route Template dialog box appears.
    2. In the Name box, type a name for the template, and click OK. The new template is created.

  3. Open the template for editing, and create a static route:
    1. In the content pane, double-click the template. The template opens for editing.

    2. In the toolbar, click Create New. The Create New Static Route pane is displayed.

      For IPv4 subnets, you can use a meta field variable created for an object type of Device VDOM instead of typing an IP address. For example:

    3. Complete the options, and click OK.

      The static route is created.

  4. Assign the template of static routes to one or more devices.
  5. Install the configuration to devices.