Updated on 2024-12-18 GMT+08:00

Configuring an Enterprise Router

This section describes how to associate a firewall with an enterprise router and configure traffic diversion.

How to Configure

The process of configuring an enterprise router is as follows.

Figure 1 Process of configuring an enterprise router

Prerequisites

A firewall has been created.

Constraints

  • Default Route Table Association, Default Route Table Propagation, and Auto Accept Shared Attachments must be disabled.
  • Only the professional edition supports inter-VPC firewall protection.

Procedure

  1. Log in to the management console.
  2. Click in the upper left corner of the management console and select a region or project.
  3. In the navigation pane on the left, click and choose Security & Compliance > Cloud Firewall. The Dashboard page will be displayed.
  4. (Optional) Switch firewall instance: Select a firewall from the drop-down list in the upper left corner of the page.
  5. In the navigation pane, choose Assets > Inter-VPC Border Firewalls.
  6. Click Configure Enterprise Router. On the displayed page, add attachments to an enterprise router. For details about the attachment types that can be added, see Attachment Overview.

    Assume you want to protect two VPCs. (At least two VPC attachments are required to connect the two VPCs to the enterprise router.) For details, see Adding VPC Attachments to an Enterprise Router.

    • Add at least three connections, for example, the firewall connection cfw-er-auto (automatically generated after the firewall is created), the VPC1 connection vpc-1, and the VPC2 connection vpc-2.
    • To use the enterprise router of account A to protect VPCs under account B, share the router with account B, and add an attachment in account B. For details, see Creating a Sharing. Subsequent configurations should still be performed on account A.

  7. Create two route tables to connect to the firewall and the VPC to be protected, respectively.

    Click the Route Tables tab. Click Create Route Table.

    Create a route table, as shown in Figure 2. For more information, see Route table parameters.

    Figure 2 Creating a route table
    Table 1 Route table parameters

    Parameter

    Description

    Example Value

    Name

    Route table name.

    It must meet the following requirements:
    • Must contain 1 to 64 characters.
    • Can contain letters, digits, underscores (_), hyphens (-), and periods (.).

    er-rlb-4cd1

    Description

    Route table description

    -

    Tag

    During the route table creation, you can tag the route table resources. Tags identify cloud resources for purposes of easy categorization and quick search.

    For details about tags, see Tag Overview.

    -

  8. Configure the association and routing.

    1. Select the route table to be connected to the VPC. Click the Associations tab and click Create Association.
      For more information, see Association parameters.
      Figure 3 Creating an association
      Table 2 Association parameters

      Parameter

      Description

      Example Value

      Attachment Type

      Select VPC.

      VPC

      Attachment

      Select an item from the Attachment drop-down list.

      er-attach-01

    2. Create a route for the route table. Click the Routes tab and click Create Route. You can create one or more routes as needed.

      Create a route table, as shown in Figure 4. For more information, see Route parameters.

      Figure 4 Creating a route
      Table 3 Route parameters

      Parameter

      Description

      Example Value

      Destination

      Set the destination address.

      It can be a VPC CIDR block or subnet CIDR block.

      NOTE:

      If your ECS is bound to an EIP, you need to specify the network segment when configuring the route. The value 0.0.0.0/0 is not allowed.

      192.168.2.0/24

      Attachment Type

      Select VPC.

      VPC

      Next Hop

      Select the VPC attachment of the firewall.

      er-Inspection

  9. Configure the association and propagation.

    1. Select the route table to be connected to the firewall. Click the Associations tab and click Create Association.

      For more information, see Association parameters.

      Figure 5 Creating an association
      Table 4 Association parameters

      Parameter

      Description

      Example Value

      Attachment Type

      Select VPC.

      VPC

      Attachment

      Select an item from the Attachment drop-down list.

      er-Inspection

    2. Create a propagation for the route table. Click the Propagations tab and click Create Propagation.

      For more information, see Propagation parameters.

      Figure 6 Creating a propagation
      Table 5 Propagation parameters

      Parameter

      Description

      Example Value

      Attachment Type

      Select VPC.

      VPC

      Attachment

      Select an item from the Attachment drop-down list.

      er-attach-02

      • After a propagation is created, its route information will be extracted to the route table of the enterprise router, and a propagation route will be generated. In the same route table, the destinations of different propagation routes may be the same, and cannot be modified or deleted.
      • You can add static routes for the attachments in a route table. The destinations of static routes in a table must be unique, and can be modified or deleted.
      • If a static route and a propagation route in the same route table happen to use the same destination, the static route takes effect first.

Verifying Configurations

Prerequisites

  • You have completed configuration.
  • Each of the two VPCs has an ECS.

Method

Ping ECSs in the VPC from each other to check whether they can properly communication if there is no traffic passing through the firewall.

Troubleshooting

  1. Check whether the two route tables of the enterprise router are correctly configured. For details, see 8 and 9.
  2. Check whether the default route table of the VPC directs routes to the enterprise router.

    Procedure

    1. In the service list, click Virtual Private Cloud under Networking. In the navigation pane, choose Route Tables. In the Name/ID column, click the route table name of the VPC to be protected.

    2. Check whether there is a route whose Next Hop Type is Enterprise Router. If there are no such routes, click Add Route. The following table describes the parameters.

    Table 6 Route parameters

    Parameter

    Description

    Example Value

    Destination

    Destination CIDR block.

    A route destination must be unique, and cannot overlap with any subnets in the VPC.

    NOTE:

    The value cannot conflict with existing routes or subnet CIDR blocks in the VPC.

    192.168.0.0/16

    Next Hop Type

    Select Enterprise Router from the drop-down list.

    Enterprise Router

    Next Hop

    Select a resource for the next hop.

    Only the resources of the next hop type you selected are displayed in the drop-down list.

    er-01

    Description

    (Optional) Supplementary information about the route.

    NOTE:

    Enter up to 255 characters. Angle brackets (< or >) are not allowed.

    -