Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

remove-private

Syntax

remove-private all replace nearest;

Hierarchy Level

[edit logical-systems logical-system-name protocols bgp],[edit logical-systems logical-system-name protocols bgp group group-name],[edit logical-systems logical-system-name protocols bgp group group-name neighbor address],[edit logical-systems logical-system-name routing-instances routing-instance-name protocols bgp],[edit logical-systems logical-system-name routing-instances routing-instance-name protocols bgp group group-name],[edit logical-systems logical-system-name routing-instances routing-instance-name protocols bgp group group-name neighbor address],[edit protocols bgp],[edit protocols bgp group group-name],[edit protocols bgp group group-name neighbor address],[edit routing-instances routing-instance-name protocols bgp],[edit routing-instances routing-instance-name protocols bgp group group-name],[edit routing-instances routing-instance-name protocols bgp group group-name neighbor address]

Release Information

Statement introduced before Junos OS Release 7.4.

Statement introduced in Junos OS Release 9.0 for EX Series switches.

Statement introduced in Junos OS Release 11.3 for the QFX Series.

Description

When advertising AS paths to remote systems, have the local system strip private AS numbers from the AS path. The numbers are stripped from the AS path starting at the left end of the AS path (the end where AS paths have been most recently added). The routing device stops searching for private ASs when it finds the first nonprivate AS or a peer’s private AS. If the AS path contains the AS number of the external BGP (EBGP) neighbor, BGP does not remove the private AS number.

Note: As of Junos OS 10.0R2 and higher, if there is a need to send prefixes to an EBGP peer that has an AS number that matches an AS number in the AS path, consider using the as-override statement instead of the remove-private statement.

The operation takes place after any confederation member ASs have already been removed from the AS path, if applicable.

The Junos OS recognizes the set of AS numbers that is considered private, a range that is defined in the Internet Assigned Numbers Authority (IANA) assigned numbers document.

The set of reserved AS numbers is in the range from 64,512 through 65,535.

Options

all

Remove all private AS numbers from the original path. Do not stop the process of removing private AS numbers, even if a public AS number is encountered.

nearest

When you use the all and replace options, choose the last (right-most) public AS number encountered in the original AS path for the replacement value, as the AS path is processed from left to right. If no public AS number is enountered, the default replacement value is used. (See the replace option for information about the default replacement value.)

replace

When you use the all option, instead of a removing private AS numbers, perform a replace operation. The default replacement value for the private AS number is the local AS number at the BGP group level for the BGP peer. If you are unsure about the replacement value, check the local AS value displayed in the output of the show bgp group group-name command.

Required Privilege Level

routing—To view this statement in the configuration.

routing-control—To add this statement to the configuration.

Published: 2013-04-03