Setting the AS_Path Attribute

The AS_Path attribute is used to prevent routing loops and control route selection.

Procedure

  • Enable an MBGP device to ignore the AS_Path attribute during route selection.
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run ipv4-family multicast

      The BGP-IPv4 multicast address family view is displayed.

    4. Run bestroute as-path-ignore

      MBGP is configured to ignore the AS_Path attribute during route selection.

  • Enable the device to remove all the private AS numbers from the AS_Path attribute carried in BGP Update messages.
    1. Run system-view

      The system view is displayed.

    2. Run bgp as-number

      The BGP view is displayed.

    3. Run ipv4-family multicast

      The BGP-IPv4 multicast address family view is displayed.

    4. Run peer { ipv4-address | group-name } public-as-only [ force [ replace ] [ include-peer-as ] | limited [ replace ] [ include-peer-as ] ]

      The device is enabled to remove all the private AS numbers from the AS_Path attribute in BGP Update messages to be sent.

      Or run peer { ipv4-address | group-name } public-as-only import [ force ]

      The device is enabled to remove all the private AS numbers from the AS_Path attribute in received BGP Update messages.

      In general, an AS number is an integer ranging from 1 to 4294967295. A public AS number ranges from 1 to 64511, and from 65536 (which represents 1.0 in the x.y format) to 4294967294 (65535.65534 in the x.y format). A private AS number ranges from 64512 to 65534. The AS number 65535 or 4294967295 is reserved for special use.

      Public AS numbers can be used on the Internet. They are assigned and managed by the Internet Assigned Number Authority (IANA). Private AS numbers cannot be advertised to the Internet. They are used only within ASs.

      Usually, routes advertised to MBGP peers carry the AS number information. The AS numbers may be public, private, or both. If the private AS numbers do not need to be advertised, perform this step.

    5. Run commit

      The configuration is committed.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >