peer route-policy export (BGP-EVPN address family view)

Function

The peer route-policy export command specifies a route-policy for filtering routes to be advertised to a peer.

The undo peer route-policy export command deletes a specified route-policy.

By default, no route-policy is configured for filtering routes to be advertised to a peer.

Format

peer peerIpv4Addr route-policy route-policy-name export

undo peer peerIpv4Addr route-policy route-policy-name export

Parameters

Parameter Description Value
peerIpv4Addr

Specifies the IPv4 address of a peer.

It is in dotted decimal notation.

route-policy-name

Specifies the name of a route-policy.

The name is a string of 1 to 200 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.

Views

BGP-EVPN address family view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

After a route-policy is created, the peer route-policy export command is used to apply a Route-Policy to a peer group so that the routes advertised to peer group can be controlled. To be specific, only the necessary routes are advertised to the peer group. In this manner, route management is implemented, the scale of the routing table is reduced, and fewer network resources are consumed.

Prerequisites

If the command specifies a route-policy, use the route-policy command to create the specified route-policy first.

Configuration Impact

Binding a route-policy after a BGP peer relationship is established may cause peer flapping.

Example

# Apply the route-policy named test-policy to the routes advertised to a BGP EVPN peer.
<HUAWEI> system-view
[~HUAWEI] route-policy test-policy permit node 10
[*HUAWEI-route-policy] quit
[*HUAWEI] bgp 100
[*HUAWEI-bgp] peer 10.1.1.9 as-number 100
[*HUAWEI-bgp] l2vpn-family evpn
[*HUAWEI-bgp-af-evpn] peer 10.1.1.9 enable
[*HUAWEI-bgp-af-evpn] peer 10.1.1.9 route-policy test-policy export
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >