Help Center/ Enterprise Router/ User Guide/ Routes/ Creating a Static Route
Updated on 2024-04-29 GMT+08:00

Creating a Static Route

Scenarios

You can create static routes in a route table of an enterprise router.

Static routes are classified into common routes and blackhole routes. A blackhole route only has a destination and has no next hop. It drops all traffic sent to the specified destination.

Static routes can be created for the following types of attachments:
  • VPC
  • Peering connection
  • CFW instance

Procedure

  1. Go to the enterprise router list.
  2. Search for the target enterprise router by name.
  3. Go to the Route Tables tab using either of the following methods:

    • In the upper right corner of the enterprise router, click Manage Route Table.
    • Click the enterprise router name and click Route Tables.

  4. Click the route table where you want to create a static route. On the Routes tab, click Create Route.

    The Create Route dialog box is displayed.

  5. Configure the parameters based on Table 1.

    Table 1 Parameter description

    Parameter

    Setting

    Example Value

    Destination

    Mandatory

    Enter the IP address or CIDR block of the attachment. For example, if it is a VPC attachment, enter the CIDR block of the VPC or a subnet of the VPC.

    192.168.2.0/24

    Blackhole Route

    Optional

    If Blackhole Route is enabled, you do not need to configure Attachment Type and Next Hop for the route. If the destination of a route is the same as, or is contained in, that of this blackhole route, all packets destined for the destination will be dropped.

    -

    Attachment Type

    • If Blackhole Route is not enabled, you need to configure this parameter.
    • If Blackhole Route is enabled, you do not need to configure this parameter.
    Select an attachment type.
    • VPC: Create a static route for a VPC attachment.
    • Peering connection: Create a static route for an enterprise router in another region.
    • CFW instance: Create a static route for a VPC border firewall that is attached to the enterprise router.

    For more information, see Attachment Overview.

    VPC

    Next Hop

    • If Blackhole Route is not enabled, you need to configure this parameter.
    • If Blackhole Route is enabled, you do not need to configure this parameter.

    In the drop-down list, select the target attachment.

    er-attach-01

  6. Click OK.

    Wait for 2 to 3 seconds, and click to refresh the route list. The created static route is displayed.