The peer path-attribute-treat command configures the processing mode of the specified path attribute.
The undo peer path-attribute-treat command cancels the processing mode of the specified path attribute.
By default, the specified path attributes are processed according to the standard protocol.
peer peerIpv4Addr path-attribute-treat attribute-id { id [ to id2 ] } &<1-255> { discard | withdraw | treat-as-unknown }
peer peerIpv6Addr path-attribute-treat attribute-id { id [ to id2 ] } &<1-255> { discard | withdraw | treat-as-unknown }
undo peer peerIpv4Addr path-attribute-treat attribute-id { id [ to id2 ] } &<1-255> [ discard | withdraw | treat-as-unknown ]
undo peer peerIpv6Addr path-attribute-treat attribute-id { id [ to id2 ] } &<1-255> [ discard | withdraw | treat-as-unknown ]
Parameter | Description | Value |
---|---|---|
peerIpv4Addr |
Specifies the IPv4 address of a peer. |
The value is in dotted decimal notation. |
attribute-id id |
Specifies the ID of an attribute. |
The value is an integer: 0: Reserved 11: DPA 12: ADVERTISER 13: RCID_PATH / CLUSTER_ID 16: Extended Communities 19: SAFI Specific Attribute (SSA) 20: Connector Attribute 21: AS_PATHLIMIT 22: PMSI_TUNNEL 23: Tunnel Encapsulation Attribute 24: Traffic Engineering 25: IPv6 Address Specific Extended Community 26: AIGP 27: PE Distinguisher Labels 28: ELC 29: LS_TYPE 30: REMOTE_NEXTHOP 32: LARGE_COMMUNITY 40: PREFIX_SID 128: ATTR_SET 129: WIDE_COMMUNITY 255: Reserved for development 31, 33-39, 41-127, 130-254: Unassigned |
to id2 |
Specifies the end attribute ID. |
The value is an integer: 0: Reserved 11: DPA 12: ADVERTISER 13: RCID_PATH / CLUSTER_ID 16: Extended Communities 19: SAFI Specific Attribute (SSA) 20: Connector Attribute 21: AS_PATHLIMIT 22: PMSI_TUNNEL 23: Tunnel Encapsulation Attribute 24: Traffic Engineering 25: IPv6 Address Specific Extended Community 26: AIGP 27: PE Distinguisher Labels 28: ELC 29: LS_TYPE 30: REMOTE_NEXTHOP 32: LARGE_COMMUNITY 40: PREFIX_SID 128: ATTR_SET 129: WIDE_COMMUNITY 255: Reserved for development 31, 33-39, 41-127, 130-254: Unassigned |
discard |
Discards the specified attribute. |
- |
withdraw |
Withdraws routes with specified attributes. |
- |
treat-as-unknown |
The BGP device processes the specified attribute as an unknown attribute. If the specified attribute is optional and transitive, the BGP device accepts this attribute and advertises it to other peers. If the specified attribute is of any other types, the BGP device discards this attribute. |
- |
peerIpv6Addr |
Specifies the address of an IPv6 peer. |
The value is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X. |
Usage Scenario
A BGP Update message contains various path attributes. If the local device receives any Update message in an incorrect format, BGP session flapping may occur. To enhance reliability, you can run this command to perform special processing on the specified BGP path attribute. The processing modes are as follows:
Precautions
Running this command may cause route attributes to be discarded or routes to be withdrawn. Therefore, exercise caution when running this command.
This function takes effect immediately for the routes received after the command is run. The command does not take effect immediately for the routes received before the command is run unless the refresh bgp command is run.<HUAWEI> system-view [~HUAWEI] bgp 100 [*HUAWEI-bgp] peer 10.1.1.1 as-number 100 [*HUAWEI-bgp] ipv6-family mvpn [*HUAWEI-bgp-af-mvpn] peer 10.1.1.1 enable [*HUAWEI-bgp-af-mvpn] peer 10.1.1.1 path-attribute-treat attribute-id 19 to 21 discard
<HUAWEI> system-view [~HUAWEI] bgp 100 [*HUAWEI-bgp] peer 2001:db8:10::1 as-number 100 [*HUAWEI-bgp] ipv6-family mvpn [*HUAWEI-bgp-af-mvpn] peer 2001:db8:10::1 enable [*HUAWEI-bgp-af-mvpn] peer 2001:db8:10::1 path-attribute-treat attribute-id 19 to 21 discard