Configuring MBGP to Import Local Routes

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

Usage Scenario

MBGP cannot discover routes by itself. Instead, it imports routes discovered by an IGP or static routes into the MBGP routing table.

Routes imported into the MBGP table can be:
  • Routes statically imported by using the network command
  • Routes imported by using the import-route command
At least one type of routes need to be imported into the MBGP routing table.

Pre-configuration Tasks

Before configuring MBGP to import routes, configure an MBGP peer.

Perform the following steps on the routers that are configured as MBGP peers:

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run bgp as-number

    The BGP view is displayed.

  3. Run ipv4-family multicast

    The BGP-IPv4 multicast address family view is displayed.

  4. Run network ip-address [ mask-length | mask ] [ route-policy route-policy-name | route-filter route-filter-name ]

    MBGP is configured to import routes from the local routing table into the MBGP routing table and then advertise the MBGP routes on the local network.

    • ip-address [ mask-length | mask ]: specifies the IP address, mask length, or mask information of the imported routes.

    • route-policy route-policy-name: specifies a routing policy to control which routes can be imported.

    The destination address and mask length specified in the network command must be the same as those of the entry in the local IP routing table. Otherwise, the specified routes will not be imported.

  5. Run import-route { direct | isis process-id | ospf process-id | rip process-id | static | unr } [ med med-value | [ route-policy route-policy-name | route-filter route-filter-name ] ] *

    IGP routes are imported into the MBGP routing table.

    • med med-value: specifies the MED value assigned to imported routes.

    • route-policy route-policy-name and route-filter route-filter-name are used to filter routes. Only the routes that match the specified rule can be imported into the MBGP routing table.

  6. (Optional) Run default-route imported

    Default routes are imported into the MBGP routing table.

    To import default routes, run the import-route command and the default-route imported command. If only the import-route command is used, default routes will not be imported. In addition, the default-route imported command is used to import only the default routes that exist in the local routing table.

  7. Run commit

    The configuration is committed.

Checking the Configurations

After the configuration is complete, you can check whether the configuration has taken effect.

# Run the display bgp multicast network command. The command output shows routing information advertised by MBGP.

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