peer advertise dependent-filter

Function

The peer advertise dependent-filter command configures a conditional BGP route advertisement policy.

The undo peer advertise dependent-filter command cancels the configuration of a conditional BGP route advertisement policy.

The peer advertise dependent-filter-disable command disables a conditional BGP route advertisement policy.

The undo peer advertise dependent-filter-disable command removes the configuration of disabling a conditional BGP route advertisement policy.

By default, conditional advertisement is not enabled.

Format

peer { peerIpv4Addr | peerIpv6Addr } advertise dependent-filter dependent-filter-list outDependType [ condition-filter condition-filter-list ]

peer { peerIpv4Addr | peerIpv6Addr } advertise dependent-filter-disable

undo peer { peerIpv4Addr | peerIpv6Addr } advertise dependent-filter dependent-filter-list outDependType [ condition-filter condition-filter-list ]

undo peer { peerIpv4Addr | peerIpv6Addr } advertise dependent-filter

undo peer { peerIpv4Addr | peerIpv6Addr } advertise dependent-filter-disable

Parameters

Parameter Description Value
peerIpv4Addr

Specifies the IPv4 address of a peer.

It is in dotted decimal notation.

peerIpv6Addr

Specifies the IPv6 address of a peer.

The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.

dependent-filter dependent-filter-list

Specifies the name of a dependent route prefix list.

The value is a string of 1 to 63 case-sensitive characters. It cannot contain spaces.

outDependType

Specifies the matching type.

The value is an enumerated type, which can be:

  • match-all: Matches all active routes;
  • match-one: Matches one active route;
  • match-none: Matches all inactive routes.
condition-filter condition-filter-list

Specifies the name of the prefix list for conditional route advertisement.

The value is a string of 1 to 63 case-sensitive characters. It cannot contain spaces.

Views

BGP-IPv4 unicast address family view, BGP view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

Usage Scenario

Conditional advertisement provides additional control over BGP route advertisement. Before advertising routes, the system checks whether the specified dependent routes exist in the BGP routing table and determines whether to advertise BGP routes accordingly.

The condition-filter parameter is optional and is used to specify the routes for which conditional advertisement is enabled.

  • If condition-filter is specified, the system checks whether the route to be advertised exists in the condition-filter-list. If yes, the system checks dependent routes. Otherwise, the route is directly advertised.
  • If condition-filter is not specified, the system checks the dependent routes for all routes to be advertised by default.

The outDependType parameter specifies the dependency check type.

  • match-all: indicates that the route is advertised only when all the routes specified in the dependent-filter-list are active.
  • match-one: indicates that the route is advertised as long as there is an active route in the dependent filter list.
  • match-none: indicates that the route is advertised only when all routes in the dependent-filter-list are inactive.

Prerequisites

An IP prefix list has been created using the filter-list ip-prefix command.

Configuration Impact

If you run this command for the same peer, the latest configuration overwrites the previous one.

Example

# Enable the conditional advertisement policy for the route 172.16.1.0/24 so that it is advertised when the 172.16.4.0/24 and 172.16.5.0/24 routes are active in the BGP routing table.
<HUAWEI> system-view
[~HUAWEI] filter-list ip-prefix cond-list
[*HUAWEI-ip-prefix-list-cond-list] prefix 172.16.1.0 24
[*HUAWEI-ip-prefix-list-cond-list] quit
[*HUAWEI] filter-list ip-prefix depend-list
[*HUAWEI-ip-prefix-list-depend-list] prefix 172.16.4.0 24
[*HUAWEI-ip-prefix-list-depend-list] prefix 172.16.5.0 24
[*HUAWEI-ip-prefix-list-depend-list] quit
[*HUAWEI] bgp 100
[*HUAWEI-bgp] peer 192.168.1.1 as-number 100
[*HUAWEI-bgp] ipv4-family unicast
[*HUAWEI-bgp-af-ipv4] peer 192.168.1.1 advertise dependent-filter depend-list match-all condition-filter cond-list
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >