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.
MBGP cannot discover routes by itself. Instead, it imports routes discovered by an IGP or static routes into the MBGP routing table.
Before configuring MBGP to import routes, configure an MBGP peer.
Perform the following steps on the routers that are configured as MBGP peers:
The system view is displayed.
The BGP view is displayed.
The BGP-IPv4 multicast address family view is displayed.
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.
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.
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.
The configuration is committed.
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.