The advertise best-route command configures a device to send only optimal routes in a BGP VPN routing table to a BGP VPNv4 routing table.
The undo advertise best-route command restores the default configuration.
The advertise valid-routes command configures a device to send only valid routes in a BGP VPN routing table to a BGP VPNv4 routing table.
The undo advertise valid-routes command restores the default configuration.
By default, a device sends all routes in a BGP VPN routing table to a BGP VPNv4 routing table.
Usage Scenario
By default, when a local device receives a route (route A) having the same prefix as that of a route (route B) in the local VPN routing table from the remote end but route A and route B have different RDs, route B is also sent to a BGP VPNv4 routing table even if the route selection priority of route B is lower than that of route A. If route B meets BGP VPNv4 route sending conditions, it is also sent to other BGP VPNv4 peers. In this scenario, if you want only optimal BGP VPN routes to be transmitted between BGP VPNv4 peers on the network, run the advertise best-route command on the local device to send only optimal routes in the BGP VPN routing table to the BGP VPNv4 routing table.
By default, the device advertises all routes in the BGP VPN routing table to the BGP VPNv4 routing table. For example, the supernet unicast routes are invalid, but VPNv4 routing tables have such routes. In addition, forwarding entries are generated for such routes, and the routes are advertised to peers. You can run the advertise valid-routes command to configure a device to send only valid routes in a BGP VPN routing table to a BGP VPNv4 routing table.<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpn1 [*HUAWEI-vpn-instance-vpn1] ip vpn-instance vpn1 [*HUAWEI-vpn-instance-vpn1-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpn1-af-ipv4] vpn-target 100:1 both [*HUAWEI-vpn-instance-vpn1-af-ipv4] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family vpn-instance vpn1 [*HUAWEI-bgp-vpn1] advertise best-route
<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpn1 [*HUAWEI-vpn-instance-vpn1] ip vpn-instance vpn1 [*HUAWEI-vpn-instance-vpn1-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpn1-af-ipv4] vpn-target 100:1 both [*HUAWEI-vpn-instance-vpn1-af-ipv4] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family vpn-instance vpn1 [*HUAWEI-bgp-vpn1] advertise valid-routes