Configuring Route Import Between VPN Instances

Route import between VPN instances enables users in different VPNs to communicate.

Context

The following steps must be performed for all target VPN instances.

If you do not want a VPN instance to change the next hops of routes imported from the public network instance or other VPN instances when advertising these routes to its IBGP peers, run the import-rib route next-hop-invariable command for the VPN instance.

Procedure

  • Configure the device to import direct routes, static routes, or IGP routes from one VPN instance to another VPN instance's corresponding routing table.
    1. Run system-view

      The system view is displayed.

    2. Run ip vpn-instance vpn-instance-name

      A VPN instance is created, and the VPN instance view is displayed.

    3. Run ipv4-family

      The VPN instance IPv4 address family view is displayed.

    4. Run import-rib vpn-instance vpn-instance-name protocol { direct | vlink-direct-route | { static | isis process-id | ospf process-id } [ valid-route ] } [ route-policy route-policy-name | route-filter route-filter-name ]

      Direct routes, Vlink direct routes, IGP routes, or static routes are imported from another VPN instance to the specified VPN instance's corresponding routing table.

    5. Run commit

      The configuration is committed.

  • Configure the device to import BGP routes from another VPN instance to the specified VPN instance's BGP routing table for the BGP VPN instance IPv4 address family.
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run ipv4-family vpn-instance vpn-instance-name

      The BGP VPN instance IPv4 address family view is displayed.

    4. Run import-rib { vpn-instance vpn-instance-name } [ include-label-route ] [ valid-route ] [ route-policy route-policy-name | route-filter route-filter-name ]

      The device is configured to import BGP routes from another VPN instance to the specified VPN instance's BGP routing table for the BGP VPN instance IPv4 address family.

    5. Run commit

      The configuration is committed.

  • Configure the device to import BGP labeled routes from a VPN instance's labeled address family to the specified VPN instance's BGP routing table.
    1. Run system-view

      The system view is displayed.

    2. Run bgp { as-number-plain | as-number-dot }

      The BGP view is displayed.

    3. Run ipv4-family vpn-instance vpn-instance-name

      The BGP VPN instance IPv4 address family view is displayed.

    4. Run import-rib vpn-instance vpn-instance-name labeled-unicast [ valid-route ] { route-policy route-policy-name | route-filter route-filter-name }

      The device is enabled to import BGP labeled routes from the VPN instance's labeled address family to another VPN instance's BGP routing table.

    5. Run commit

      The configuration is committed.

  • Configure the device to import BGP labeled routes from a VPN instance's labeled address family to the specified VPN instance's routing table for the BGP labeled address family.
    1. Run system-view

      The system view is displayed.

    2. Run bgp { as-number-plain | as-number-dot }

      The BGP view is displayed.

    3. Run ipv4-labeled-unicast vpn-instance vpn-instance-name

      The BGP labeled VPN instance IPv4 address family view is displayed.

    4. Run import-rib vpn-instance vpn-instance-name labeled-unicast [ valid-route ] { route-policy route-policy-name | route-filter route-filter-name }

      The device is configured to import BGP labeled routes from a VPN instance's labeled address family to the specified VPN instance's routing table for the BGP labeled address family.

    5. Run commit

      The configuration is committed.

  • Configure the device to import BGP routes from another VPN instance to the specified VPN instance's routing table for the BGP labeled address family.
    1. Run system-view

      The system view is displayed.

    2. Run bgp { as-number-plain | as-number-dot }

      The BGP view is displayed.

    3. Run ipv4-labeled-unicast vpn-instance vpn-instance-name

      The BGP labeled VPN instance IPv4 address family view is displayed.

    4. Run import-rib vpn-instance vpn-instance-name [ include-label-route ] [ valid-route ] [ route-policy route-policy-name | route-filter route-filter-name ]

      The device is configured to import BGP routes from another VPN instance to the specified VPN instance's routing table for the BGP labeled address family.

    5. Run commit

      The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >