Help Center/ Enterprise Router/ Best Practices/ Using Enterprise Router to Migrate the Network Set Up Through Direct Connect/ Procedure for Using Enterprise Router to Migrate the Network Set Up Through Direct Connect
Updated on 2024-10-25 GMT+08:00

Procedure for Using Enterprise Router to Migrate the Network Set Up Through Direct Connect

Step 1: Create an Enterprise Router and a VPC Attachment

  1. Create an enterprise router ER-X in the same region as the service VPC.

    When creating the enterprise router, enable Default Route Table Association and Default Route Table Propagation. For details, see Table 4.

    For details, see Creating an Enterprise Router.

  2. Create a VPC attachment er-attach-VPC-X to attach the service VPC to the enterprise router.

    Do not enable Auto Add Routes and manually add routes with destinations set to the large CIDR block in the VPC route table.

    For details, see Creating VPC Attachments for the Enterprise Router.

  3. In the enterprise router route table, check the route points to the VPC attachment.

    In this example, Default Route Table Association and Default Route Table Propagation are enabled for the enterprise router, and routes with destinations set to VPC CIDR blocks are automatically added when you attach the VPCs to the enterprise router.

    If Default Route Table Propagation is not enabled when creating the enterprise router, you need to manually add routes with destinations set to the VPC CIDR blocks to the enterprise router route table. For details, see Creating a Static Route.

    For enterprise router route details, see Table 1 and Table 3.

    To view enterprise routes, see Viewing Routes.

  4. In the VPC route table, add a route destined for the large CIDR block through the enterprise router.

    For VPC route details, see Table 1 and Table 2.

    In this example, the large CIDR block is 172.16.0.0/15, and the next hop is the enterprise router.

    For details, see Adding Routes to VPC Route Tables.

Step 2: Create a Virtual Gateway Attachment

  1. Create a virtual gateway VGW-B and attach it to the enterprise router.

    VGW-B is used to replace VGW-A after the migration.

    1. On the Direct Connect console, create a virtual gateway.

      For details, see Step 2: Create a Virtual Gateway.

    2. On the Enterprise Router console, check whether the virtual gateway attachment has been added to the enterprise router.

      For details, see Viewing Details About an Attachment.

      If the status of the virtual gateway attachment is Normal, the attachment has been added.

      Default Route Table Association and Default Route Table Propagation are enabled when you create the enterprise router. After the virtual gateway is attached to the enterprise router, Enterprise Router will automatically:
      • Associate the virtual gateway attachment with the default route table of the enterprise router.
      • Propagate the virtual gateway attachment to the default route table of the enterprise router. The routes destined for the on-premises network CIDR block are propagated to the route table.

        You can view routes to the on-premises network CIDR block in the route table of the enterprise router only after creating a virtual interface by performing 3.

  2. Delete virtual interface VIF-A02 on the on-premises network device and the Direct Connect console in sequence:

    1. Log in to the on-premises network device and delete the configuration of VIF-A02.

      Before deleting virtual interface VIF-A02 on the Direct Connect console, complete configuration on the on-premises network device to ensure that traffic does not pass through this virtual interface.

    2. Delete virtual interface VIF-A02 on the Direct Connect console.

      For details, see Deleting a Virtual Interface.

      After the virtual interface is deleted, the system route pointing to VGW-A and destined for the local and remote gateways of VIF-A02 will be deleted from the VPC route table. For VPC route details, see Table 2.

      In this example, the route whose destination is 10.1.0.0/30 and next hop is the virtual gateway will be automatically deleted.

  3. Create virtual interface VIF-B02 for virtual gateway VGW-B.

    VIF-B02 is used to replace VIF-A02 after the migration.

    Create a virtual interface to connect the virtual gateway with the on-premises data center. For details, see Step 3: Create a Virtual Interface.

    In the enterprise router route table, two routes pointing to VGW-B are automatically added. One route is destined for the on-premises network CIDR block, and the other route for the local and remote gateways of VIF-B02. For enterprise router route details, see Table 3.

    In this example, the route destinations are 172.16.0.0/16 and 10.1.0.0/30 and next hops are the virtual gateway.

  4. Complete configuration on the on-premises network device to ensure that traffic can pass through virtual interface VIF-B02.

Step 3: Verify Communications Between the VPC and On-Premises Data Center Through the Enterprise Router

  1. In the VPC route table, add a route destined for any on-premises server to verify communications between the VPC and on-premises data center.

    For VPC route details, see Table 2.

    In this example, the route destination is 172.16.0.12/32 and next hop is the enterprise router.

    For details, see Adding Routes to VPC Route Tables.

  2. Create an ECS in the VPC subnet that needs to communicate with the on-premises data center.

    For more resource details, see Table 4.

    For details, see Purchasing a Custom ECS.

  3. Verify communications between the VPC and enterprise router.

    Multiple methods are available for logging in to an ECS. For details, see Logging In to an ECS.

    ping IP address of an on-premises server

    Add the IP address of an on-premises server to the VPC route table and run the following command:

    ping 172.16.0.12

    If information similar to the following is displayed, VPC-X can communicate with the on-premises data center through the enterprise router:
    [root@ecs-X ~]# ping 172.16.0.12
    PING 172.16.0.12 (172.16.0.12) 56(84) bytes of data.
    64 bytes from 172.16.0.12: icmp_seq=1 ttl=64 time=0.849 ms
    64 bytes from 172.16.0.12: icmp_seq=2 ttl=64 time=0.455 ms
    64 bytes from 172.16.0.12: icmp_seq=3 ttl=64 time=0.385 ms
    64 bytes from 172.16.0.12: icmp_seq=4 ttl=64 time=0.372 ms
    ...
    --- 172.16.0.12 ping statistics ---

  4. Delete the route and ECS used for verifying communications.

    1. Delete the route from the VPC route table.

      To delete a route, refer to Deleting a Route.

    2. Delete the ECS.

      To delete an ECS, refer to How Can I Delete or Restart an ECS?

Step 4: Complete Migration

  1. Delete virtual interface VIF-A01 on the on-premises network device and the Direct Connect console in sequence:

    1. Log in to the on-premises network device and delete the configuration of VIF-A01.

      Before deleting VIF-A01 on the Direct Connect console, complete configuration on the on-premises network device to ensure that traffic does not pass through this virtual interface.

    2. Delete virtual interface VIF-A01 on the Direct Connect console.

      For details, see Deleting a Virtual Interface.

      After the virtual interface is deleted, the two routes pointing to virtual gateway VGW-A are deleted from the VPC route table. For VPC route details, Table 2.
      • The system route whose destination is the local and remote gateways of virtual interface VIF-A01.

        In this example, the route whose destination is 10.0.0.0/30 and next hop is the virtual gateway will be automatically deleted.

      • The system route destined for the on-premises data center.

        In this example, the route whose destination is 172.16.0.0/16 and next hop is the virtual gateway will be automatically deleted.

  2. Create virtual interface VIF-B01 for virtual gateway VGW-B.

    VIF-B01 is used to replace VIF-A01 after the migration.

    Create a virtual interface to connect the virtual gateway with the on-premises data center. For details, see Step 3: Create a Virtual Interface.

    In the enterprise router route table, a route pointing to VGW-B is automatically added. The route destination is the local and remote gateways of virtual interface VIF-B02. For enterprise router route details, see Table 3.

    In this example, the route destination is 10.0.0.0/30 and next hop is the virtual gateway attachment.

  3. Complete configuration on the on-premises network device to ensure that traffic can pass through virtual interface VIF-B01.

Step 5: Delete the Original Virtual Gateway

After the migration is complete, ensure that VPC-X and the on-premises data center can communicate with each other through the enterprise router. After services run for a period of time, delete the original virtual gateway.

  1. Delete virtual gateway VGW-A.

    For details, see Deleting a Virtual Gateway.