Configuring BGP4+ to Import Routes

BGP4+ can import routes from other protocols. When routes are imported from dynamic routing protocols, the process IDs of the routing protocols must be specified.

Context

BGP4+ cannot discover routes by itself. Instead, it imports routes discovered by other protocols such as OSPFv3 or static routes to the BGP4+ routing table. These imported routes are then transmitted within an AS or between ASs.

BGP can import routes in either Import or Network mode:

  • Import mode: BGP4+ imports routes by protocol type, such as RIP, OSPF, IS-IS, static routes, and direct routes.

  • Network mode: BGP4+ imports a route with the specified prefix and mask to the BGP4+ routing table. Network mode is more precise than Import mode.

Procedure

  • Import mode
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run ipv6-family unicast

      The BGP-IPv6 unicast address family view is displayed.

    4. Run import-route { direct | isis process-id | ospfv3 process-id | ripng process-id | static | unr } [ med med | [ route-policy route-policy-name | route-filter route-filter-name ] ] *

      BGP4+ is configured to import routes from other protocols.

      The process ID of a routing protocol needs to be specified to import IS-IS, OSPF, or RIP routes.

    5. Run commit

      The configuration is committed.

  • Network mode
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run ipv6-family unicast

      The BGP-IPv6 unicast address family view is displayed.

    4. Run network ipv6-address prefix-length [ route-policy route-policy-name | route-filter route-filter-name ]

      The device is configured to advertise a local IPv6 route.

      If no mask or mask length is specified, the address is processed as a classful address.

      The local route to be advertised must exist in the local IP routing table. You can specify a route-policy or an XPL route-filter when running this command to flexibly control the route to be advertised.

      • A route with the destination address and prefix length specified in the network command can be advertised only when the specified items exactly match those of a routing entry in the local IP routing table.

      • When running the undo network command to delete the existing configuration, you need to specify the correct prefix.

    5. Run commit

      The configuration is committed.

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