huawei-bgp

Inter-AS routing protocol that exchanges Network Layer Reachability Information (NLRI) with other BGP systems.

  • Version: 2021-08-11

    huawei-bgp@2021-08-11


    
      module huawei-bgp {
    
        yang-version 1;
    
        namespace "urn:huawei:yang:huawei-bgp";
    
        prefix bgp;
    
        import huawei-extension {
          prefix ext;
        }
        import ietf-inet-types {
          prefix inet;
        }
        import ietf-yang-types {
          prefix yang;
        }
        import huawei-network-instance {
          prefix ni;
        }
        import huawei-pub-type {
          prefix pub-type;
        }
        import huawei-routing-policy {
          prefix rtp;
        }
        import huawei-routing {
          prefix rt;
        }
        import huawei-ssl {
          prefix ssl;
        }
        import huawei-tunnel-management {
          prefix tnlm;
        }
        import huawei-l3vpn {
          prefix l3vpn;
        }
        import huawei-ifm {
          prefix ifm;
        }
        import huawei-socket {
          prefix socket;
        }
    
        include huawei-bgp-type;
        include huawei-bgp-common;
        include huawei-bgp-common-multiprotocol;
    
        organization
          "Huawei Technologies Co., Ltd.";
    
        contact
          "Huawei Industrial Base
         Bantian, Longgang
         Shenzhen 518129
         People's Republic of China
         Website: http://www.huawei.com
         Email: support@huawei.com";
    
        description
          "Inter-AS routing protocol that exchanges Network Layer Reachability Information (NLRI) with other BGP systems.";
    
        revision "2021-08-11" {
          description
            "The YANG descriptions are modified according to new standards.";
          reference
            "Huawei private.";
    
        }
    
        revision "2021-02-03" {
          description
            "Add bgp common multiprotocol submodule.";
          reference
            "Huawei private.";
    
        }
    
        revision "2020-02-25" {
          description
            "The YANG descriptions are modified according to new standards.";
          reference
            "Huawei private.";
    
        }
    
        revision "2019-03-22" {
          description "Initial revision.";
          reference
            "Huawei private.";
    
        }
    
        ext:task-name "bgp";
    
        container bgp {
          description
            "Inter-AS routing protocol that exchanges Network Layer Reachability Information (NLRI) with other BGP systems,
          Universal BGP configurations that contain the basic BGP configurations and the query information.";
          container global {
            description
              "Configure the router for BGP globally.";
            leaf yang-enable {
              type boolean;
              default "false";
              description
                "Enable/disable BGP yang mode. To use NETCONF YANG to manage BGP VPN instances in huawei-bgp.yang, enable YANG management for the BGP VPN instances on the device or enable the leaf node globally in the huawei-bgp.yang file.";
            }
    
            leaf memory-overload-exception-discard-route {
              type boolean;
              default "false";
              description
                "Enable/disable BGP to discard routes received from all peers if the memory usage of a device is abnormal.";
            }
          }  // container global
    
          container paf-controls {
            description
              "List of PAF-based limiting disabled for some features.";
            list paf-control {
              key "feature-name";
              description
                "Configure PAF-based limiting disabled for some features.";
              leaf feature-name {
                type paf-control-feature-type;
                description "Feature name.";
              }
            }  // list paf-control
          }  // container paf-controls
    
          container session-car {
            must
              "pir-value >= cir-value and pbs-value >= cbs-value";
            description "Configure session CAR.";
            leaf enable {
              type boolean;
              default "true";
              description
                "Enable/disable session CAR.";
            }
    
            leaf cir-value {
              type uint32 {
                range "12..1200";
              }
              units "kbit/s";
              default "24";
              description
                "Specify the session CAR CIR value.";
            }
    
            leaf cbs-value {
              type uint32 {
                range "15000..1500000";
              }
              units "Byte";
              default "15000";
              description
                "Specify the session CAR CBS value.";
            }
    
            leaf pir-value {
              type uint32 {
                range "12000..60000";
              }
              units "kbit/s";
              default "48000";
              description
                "Specify the session CAR PIR value.";
            }
    
            leaf pbs-value {
              type uint32 {
                range "1500000..7500000";
              }
              units "Byte";
              default "6000000";
              description
                "Specify the session CAR PBS value.";
            }
          }  // container session-car
    
          container micro-car {
            must
              "pir-value >= cir-value and pbs-value >= cbs-value";
            description "Configure micro CAR.";
            leaf enable {
              type boolean;
              default "true";
              description
                "Enable/disable micro CAR.";
            }
    
            leaf cir-value {
              type uint32 {
                range "12..1200";
              }
              units "kbit/s";
              default "24";
              description
                "Specify the micro CAR CIR value.";
            }
    
            leaf cbs-value {
              type uint32 {
                range "15000..1500000";
              }
              units "Byte";
              default "15000";
              description
                "Specify the micro CAR CBS value.";
            }
    
            leaf pir-value {
              type uint32 {
                range "12000..60000";
              }
              units "kbit/s";
              default "48000";
              description
                "Specify the micro CAR PIR value.";
            }
    
            leaf pbs-value {
              type uint32 {
                range "1500000..7500000";
              }
              units "Byte";
              default "6000000";
              description
                "Specify the micro CAR PBS value.";
            }
          }  // container micro-car
    
          container base-process {
            description
              "Configure the global BGP information, such as the protocol version, AS number, and system identifier.";
            leaf enable {
              type boolean;
              must
                "(../enable='true' and ../as) or (../enable='false' and not(../as))";
              default "false";
              description
                "Enable/disable BGP function.";
            }
    
            leaf as {
              ext:operation-exclude "update" {
                description "The node cannot be modified when BGP is enabled.";
              }
              when "../enable='true'";
              type as-number-validate;
              description
                "Local AS number, which can be in either of the two formats:
               The two-byte format is X. X is an integer ranging from 1 to 65535.
               The four-byte format is X.Y and X. When the format is X.Y, X and Y are both integers, with the value of X ranging from 1 to 65535, and the value of Y ranging from 0 to 65535; when the format is X, X is an interger, with the value ranging from 1 to 4294967295.
               An AS consists of multiple routers managed based on the same techniques. Interior Gateway Protocol (IGP) and universal routing metric packets are used inside an AS, and Exterior Gateway Protocol (EGP) is used outside to send packets to other ASs. With the development of this definition, one AS usually uses multiple IGPs and metrics. Even though multiple IGPs and metrics are used, the routing plan and destination reachability of an AS are consistent with those of another AS. The local AS number cannot be configured same as the confederation sub-ASs. The object cannot be deleted or modified.";
            }
    
            leaf keep-all-routes {
              when "../enable='true'";
              type boolean;
              default "false";
              description
                "Enable/disable saving all the updated information about BGP routes from a peer or peer group after a BGP connection is established, even though these BGP routes fail to match the routing policy on the ingress. Save all the updated information about BGP routes from a peer or peer group after a BGP connection is established, even though these BGP routes fail to match the routing policy on the ingress. By default, only the updated information about BGP routes from a specified peer is saved on condition that the routes match the routing policy on the ingress. If a router supports route refreshing, this option is not required.";
            }
    
            leaf check-first-as {
              when "../enable='true'";
              type boolean;
              default "true";
              description
                "Enable/disable checking the first AS in the AS_Path of the update messages from EBGP peers.";
            }
    
            leaf router-id-auto-select {
              when "../enable='true'";
              type boolean;
              default "false";
              description
                "Enable/disable router ID auto select. If a BGP VPN instance is not enabled to select a router ID, a router ID can be configured for the BGP VPN instance. If no router ID is configured for the BGP VPN instance, the BGP VPN instance inherits the router ID of the public network instance. If a BGP VPN instance is enabled to select a router ID, it uses the address of an interface bound to a VPN as the router ID based on the following rules: 
              1. If Loopback interfaces configured with IP addresses exist, the largest IP address among the IP addresses of the Loopback interfaces is selected as the router ID. 
              2. If there is no Loopback interface configured with an IP address, the largest IP address among the IP addresses of other interfaces is selected as the router ID, regardless of whether the interface is Up.";
            }
    
            leaf shutdown {
              when "../enable='true'";
              type boolean;
              default "false";
              description
                "Enable/disable interrupting BGP all neighbour.";
            }
    
            leaf local-ifnet-mtu {
              when "../enable='true'";
              type uint16 {
                range "46..65535";
              }
              default "1500";
              description "BGP LOCALIFNET MTU.";
            }
    
            leaf private-4byte-as {
              when "../enable='true'";
              type boolean;
              default "false";
              description
                "Enable/disable BGP private 4 byte AS. With BGP private-4-byte-as, BGP private as is from 64512 to 65535 and from 4200000000 to 4294967294.";
            }
    
            leaf local-cross-no-med {
              when "../enable='true'";
              type boolean;
              default "false";
              description
                "Enable/disable local cross routing non-med.";
            }
    
            leaf as-path-limit {
              when "../enable='true'";
              type uint16 {
                range "1..2000";
              }
              description
                "Maximum number of AS numbers in the AS_Path attribute.";
            }
    
            leaf dynamic-session-limit {
              ext:dynamic-default;
              when "../enable='true'";
              type uint32 {
                range "1..4294967295";
              }
              description
                "Upper limit on the number of dynamic peer sessions.";
            }
    
            leaf peer-up-route-lowest-priority {
              when "../enable='true'";
              type boolean;
              default "false";
              description
                "Enable/disable reducing route priority to lowest.";
            }
    
            leaf delay-time {
              when
                "../peer-up-route-lowest-priority='true'";
              type uint32 {
                range "1..864000";
              }
              units "s";
              description
                "Specifies the delay time.";
            }
    
            leaf route-loop-detect-enable {
              type boolean;
              default "false";
              description
                "Enable/disable BGP route loop-detect control.";
            }
    
            container confederation {
              when "../enable='true'";
              description
                "Configure confederation.";
              leaf id {
                type as-number-validate;
                description
                  "Configure the confederation ID.";
              }
    
              leaf nonstanded {
                type boolean;
                default "false";
                description
                  "Enable/disable nonstanded. Configure the device to be compatible with devices in a nonstandard confederation.";
              }
    
              leaf-list as {
                when "../id";
                type as-number-validate;
                max-elements 32;
                description
                  "Configure the confederation AS number. The confederation AS number can be in either of the two formats:
                The two-byte format is X. X is an integer ranging from 1 to 65535.
                The four-byte format is X.Y and X. When the format is X.Y, X and Y are both integers, with the value of X ranging from 1 to 65535, and the value of Y ranging from 0 to 65535; when the format is X, X is an interger, with the value of X ranging from 1 to 4294967295. The confederation sub-ASs cannot be configured same as the local AS number.";
              }
            }  // container confederation
    
            container graceful-restart {
              when "../enable='true'";
              description
                "Configure the graceful-restart.";
              leaf enable {
                type boolean;
                default "false";
                description
                  "Enable/disable GR of the BGP speaker in the specified address family, peer address, or peer group. When GR is enabled, the BGP speaker enabled with GR keeps the forwarding state and sends the End-Of-RIB flag during the restart. In this case, however, the BGP speaker may not maintain the forwarding table. Enabling or disabling GR may delete and re-establish all sessions and instances.";
              }
    
              leaf time-wait-for-rib {
                type uint32 {
                  range "3..3000";
                }
                units "s";
                default "600";
                description
                  "Period of waiting for the End-Of-RIB flag. The value is an integer. When a BGP session is established or re-established, the router enabled with GR should receive the End-Of-RIB flag in this period. If the router does not receive the End-Of-RIB flag in this period, ensure that the router can exit from the GR process.";
              }
    
              leaf restart-time {
                type uint16 {
                  range "3..3600";
                }
                units "s";
                default "150";
                description
                  "Specifies the maximum time during which a peer waits for a BGP session reestablishment.";
              }
    
              leaf peer-reset {
                type boolean;
                default "false";
                description
                  "Enable/disable peer disconnection through GR.";
              }
            }  // container graceful-restart
    
            container remote-prefix-sid-states {
              config false;
              description
                "List of remote prefix SID.";
              list remote-prefix-sid-state {
                key "prefix-sid";
                description
                  "Operational state of the remote BGP prefix SID.";
                leaf prefix-sid {
                  type inet:ipv6-address-no-zone;
                  description
                    "Prefix SID value.";
                }
    
                leaf locator-sid {
                  type inet:ipv6-address-no-zone;
                  description
                    "Prefix SID value of the mirrored locator.";
                }
    
                leaf locator-mask-length {
                  type uint8 {
                    range "0..128";
                  }
                  description
                    "Mask length of the SID of the mirrored locator.";
                }
    
                leaf vpn-name {
                  type string {
                    length "1..31";
                  }
                  description
                    "Name of the VPN instance that contains the prefix SID.";
                }
              }  // list remote-prefix-sid-state
            }  // container remote-prefix-sid-states
    
            container reference-period {
              when "../enable='true'";
              must
                "hold-interval>suppress-interval";
              must
                "clear-interval>hold-interval";
              description
                "Configure the reference period.";
              leaf suppress-interval {
                type uint32 {
                  range "1..65535";
                }
                units "s";
                default "60";
                description
                  "Specifies the reference period used to add penalty in case of next hop flapping.";
              }
    
              leaf hold-interval {
                type uint32 {
                  range "1..65535";
                }
                units "s";
                default "120";
                description
                  "Specifies the reference period used to hold penalty in case of next hop flapping.";
              }
    
              leaf clear-interval {
                type uint32 {
                  range "1..65535";
                }
                units "s";
                default "600";
                description
                  "Specifies the reference period used to clear penalty in case of next hop flapping.";
              }
            }  // container reference-period
    
            container timer {
              when "../enable='true'";
              description
                "Configure BGP global timer parameters.";
              leaf connect-retry-time {
                type uint16 {
                  range "1..65535";
                }
                units "s";
                default "32";
                description
                  "ConnectRetry interval.";
              }
    
              leaf keep-alive-time {
                type uint32 {
                  range "0..21845";
                }
                units "s";
                must
                  "(../keep-alive-time != 0 and (../hold-time>=../keep-alive-time * 3) and ../hold-time != ../keep-alive-time ) or (../hold-time = 0 and ../keep-alive-time = 0)";
                default "60";
                description
                  "Specify the Keepalive time of a peer or peer group. The value is an integer. If the value of a timer changes, the peers need to re-negotiate the interval value for the keepalive-time and hold-time. This disconnects the BGP peer relationship between the routers. Therefore, you need to double check whether it is a must to change the value of the timer. Ensure that the hold time is at least three times longer than the keepalive time when you configure the BGP timer.";
              }
    
              leaf hold-time {
                type uint32 {
                  range "0 | 3..65535";
                }
                units "s";
                must
                  "(((../hold-time>=../keep-alive-time * 3) and ../hold-time != ../keep-alive-time ) or (../hold-time = 0 and ../keep-alive-time = 0)) and ../hold-time>=../min-hold-time";
                default "180";
                description
                  "Specify the Hold time of a peer or peer group. When setting the timer values of keepalive-time and hold-time, avoid the following settings: 1.The interval values of keepalive-time and hold-time are both set to 0. This will cause BGP timer to become invalid, and BGP will not detect link faults based on the timer.
    2. The interval value of hold-time is much greater than that of keepalive-time. For example, the interval value of keepalive-time is 1, and that of hold-time is 65535. If the interval value of hold-time is too large, BGP will not be able to detect link faults in time. The priority of the timer configured here is lower than that of timer configured with interval values of keepalive-time and hold-time of a peer. After a connection is established between peers, the interval values of keepalive-time and hold-time are negotiated by the peers. The smaller interval value of hold-time contained in Open packets of both peers is taken as the interval value of hold-time. The smaller interval value of one third of the interval value of hold-time and the locally set interval value of keepalive-time is taken as the interval value of keepalive-time.";
              }
    
              leaf min-hold-time {
                type uint32 {
                  range "0 | 20..65535";
                }
                units "s";
                must
                  "../hold-time>=../min-hold-time";
                default "0";
                description
                  "The default value of zero means that the minimum hold time check does not take effect. If the value is changed, the new value takes effect since the next peer relationship establishment. During the peer relationship establishment, the local device checks the hold time of the remote end. If the hold time is less than the minimum hold time, the local device sends an error packet with error code 02 and subcode 06, and the peer relationship fails to be established.";
              }
            }  // container timer
    
            container graceful-restart-status {
              config false;
              description
                "Statistics of the GR status of a BGP speaker.";
              leaf enable {
                type boolean;
                description
                  "The GR capability of a BGP speaker.";
              }
    
              leaf restart-timer {
                type uint32;
                units "s";
                description
                  "Period during which a BGP speaker waits for the peer relationship reestablishment.";
              }
    
              leaf eor-timer {
                type uint32;
                units "s";
                description
                  "Period during which a BGP speaker waits for the End-Of-RIB flag.";
              }
    
              container peers {
                description
                  "List of display the GR statistics for a BGP peer.";
                list peer {
                  key "vpn-name af address";
                  description
                    "Statistics of the GR status of a BGP peer.";
                  leaf vpn-name {
                    type string {
                      length "1..31";
                    }
                    description
                      "VPN name of a BGP instance.";
                  }
    
                  leaf af {
                    type string {
                      length "1..300";
                    }
                    description
                      "BGP address-family type.";
                  }
    
                  leaf address {
                    type inet:ip-address-no-zone;
                    description
                      "Address of a peer.";
                  }
    
                  leaf peer-capability {
                    type string {
                      length "1..300";
                    }
                    description
                      "GR capability of a neighbor.";
                  }
    
                  leaf gr-capability-enable {
                    type boolean;
                    description
                      "Whether GR capability is negotiated.";
                  }
    
                  leaf bgp-peer-state {
                    type peer-state-type;
                    description
                      "Status of the peer.";
                  }
    
                  leaf gr-state {
                    type boolean;
                    description
                      "GR status of a neighbor.";
                  }
    
                  leaf restart-left-timer {
                    type uint32;
                    units "s";
                    description
                      "Restart left timer.";
                  }
    
                  leaf eor-sent {
                    type boolean;
                    description
                      "Whether error is sent.";
                  }
    
                  leaf stale-route-num {
                    type uint32;
                    description
                      "Stale route number.";
                  }
                }  // list peer
              }  // container peers
            }  // container graceful-restart-status
    
            container error-discard-info {
              config false;
              description
                "Statistics of BGP error message.";
              leaf cluster-id-loop-count {
                type uint32;
                description
                  "Count of routes discarded because cluster IDs are the same.";
              }
    
              leaf receive-as-over-limit-count {
                type uint32;
                description
                  "Count of received routes discarded because the number of AS numbers in the AS_Path exceeds the upper limit.";
              }
    
              leaf advertise-as-over-limit-count {
                type uint32;
                description
                  "Count of advertised routes discarded because the number of AS numbers in the AS_Path exceeds the upper limit.";
              }
    
              leaf as-loop-count {
                type uint32;
                description
                  "Count of routes discarded because AS numbers are the same.";
              }
    
              leaf zero-rd-count {
                type uint32;
                description
                  "Count of routes discarded because of the RD 0:0.";
              }
    
              leaf no-prefix-count {
                type uint32;
                description
                  "Count of routes discarded because no prefix exists.";
              }
    
              leaf path-attribute-error-count {
                type uint32;
                description
                  "Count of routes with error path attributes.";
              }
    
              leaf originator-id-loop-count {
                type uint32;
                description
                  "Count of routes with an Originator ID conflict.";
              }
    
              leaf md5-count {
                type uint32;
                description "MD5 count.";
              }
    
              container afs {
                description
                  "List of BGP routes discarded in the address family.";
                list af {
                  key "address-family";
                  description
                    "Statistics of BGP route discarded in the address family.";
                  leaf address-family {
                    type af-type;
                    description
                      "Address family type.";
                  }
    
                  leaf cluster-id-loop-count {
                    type uint32;
                    description
                      "Count of routes discarded because cluster IDs are the same.";
                  }
    
                  leaf receive-as-over-limit-count {
                    type uint32;
                    description
                      "Count of received routes discarded because the number of AS numbers in the AS_Path exceeds the upper limit.";
                  }
    
                  leaf advertise-as-over-limit-count {
                    type uint32;
                    description
                      "Count of advertised routes discarded because the number of AS numbers in the AS_Path exceeds the upper limit.";
                  }
    
                  leaf as-loop-count {
                    type uint32;
                    description
                      "Count of routes discarded because AS numbers are the same.";
                  }
    
                  leaf zero-rd-count {
                    type uint32;
                    description
                      "Count of routes discarded because of the RD 0:0.";
                  }
    
                  leaf path-attribute-error-count {
                    type uint32;
                    description
                      "Count of routes discarded because no prefix exists.";
                  }
    
                  leaf originator-id-loop-count {
                    type uint32;
                    description
                      "Count of routes with an Originator ID conflict.";
                  }
    
                  leaf peer-record-count {
                    type uint32;
                    description
                      "Peer record count.";
                  }
    
                  container peers {
                    description
                      "List of BGP peer error information.";
                    list peer {
                      key "vpn-name address";
                      description
                        "Statistics of BGP peer error information. The display error discard command displays statistics about all address families and packets discarded by peers. The NMS supports query based on the following filtering modes:
    (1) Statistics query about the specified address family and statistics about the packets discarded by peers. Such query is not supported by the preceding command.
    (2) Query of the information about the discarded packets filtered based on the specified peer or VPN instance. The query result is different from that in the command output. The command displays the statistics of the address family in which packet loss occurs and the information about the packets discarded by the peer.";
                      leaf vpn-name {
                        type string {
                          length "1..31";
                        }
                        description "VPN name.";
                      }
    
                      leaf address {
                        type inet:ip-address-no-zone;
                        description
                          "Peer address.";
                      }
    
                      leaf record-time {
                        type yang:date-and-time;
                        description
                          "Record time.";
                      }
    
                      leaf reason {
                        type string {
                          length "1..300";
                        }
                        description
                          "Packet loss reason.";
                      }
    
                      leaf error-data {
                        type string {
                          length "1..300";
                        }
                        description
                          "Error data.";
                      }
    
                      leaf vpn-id {
                        type uint32;
                        description "VPN index.";
                      }
                    }  // list peer
                  }  // container peers
                }  // list af
              }  // container afs
            }  // container error-discard-info
    
            container vpn-brief-infos {
              config false;
              description
                "List of BGP VPN brief informations.";
              list vpn-brief-info {
                key "vpn-name address-family";
                description
                  "Statistics of VPN brief information.";
                leaf vpn-name {
                  type leafref {
                    path "/ni:network-instance/ni:instances/ni:instance/ni:name";
                  }
                  description
                    "VPN name of a BGP instance.";
                }
    
                leaf address-family {
                  type af-type;
                  description
                    "Address family type.";
                }
    
                leaf peer-number {
                  type uint32;
                  description
                    "Set the number of peers in a specified address family.";
                }
    
                leaf route-number {
                  type uint32;
                  description
                    "Set the number of routes in a specified address family.";
                }
    
                leaf route-distinguisher-number {
                  type uint32;
                  description "Number of RDs.";
                }
              }  // list vpn-brief-info
            }  // container vpn-brief-infos
    
            container default-parameter {
              config false;
              description
                "Statistics of default parameter of BGP.";
              leaf version {
                type uint8;
                description
                  "BGP protocol version.";
              }
    
              leaf connect-retry-time {
                type uint16;
                units "s";
                description
                  "Value of connect retry timer.";
              }
    
              leaf hold-time {
                type uint32;
                units "s";
                description
                  "The holdtime interval.";
              }
    
              leaf keepalive-time {
                type uint32;
                units "s";
                description
                  "The keepalive interval.";
              }
            }  // container default-parameter
    
            container srgbs {
              description
                "List of segment routing global block.";
              list srgb {
                must "lower-bound < upper-bound";
                key "lower-bound";
                max-elements 1;
                description
                  "Configure segment routing global block.";
                leaf lower-bound {
                  type uint32 {
                    range "16..1048575";
                  }
                  description
                    "SRGB begin value. The range of specific values is dynamic and is also affected by paf.";
                }
    
                leaf upper-bound {
                  type uint32 {
                    range "16..1048575";
                  }
                  mandatory true;
                  description
                    "SRGB end value. The range of specific values is dynamic and is also affected by paf. The ending value of SRGB must be greater than the configured value.";
                }
              }  // list srgb
            }  // container srgbs
          }  // container base-process
    
          container instance-processs {
            description
              "List of the global BGP information for the list of all BGP instances, such as the protocol version, AS number, and system identifier.";
            list instance-process {
              key "name";
              max-elements 1;
              description
                "Configure the global BGP information for the BGP instances, such as the protocol version, AS number, and system identifier.";
              leaf name {
                type string {
                  length "1..31";
                }
                must "../name != 'default'";
                description "Name of BGP Site.";
              }
    
              leaf as-number {
                ext:operation-exclude "update" {
                  description "The node cannot be modified when BGP is enabled.";
                }
                type as-number-validate;
                mandatory true;
                description
                  "Local AS number, which can be in either of the two formats:
                The two-byte format is X. X is an integer ranging from 1 to 65535.
                The four-byte format is X.Y and X. When the format is X.Y, X and Y are both integers, with the value of X ranging from 1 to 65535, and the value of Y ranging from 0 to 65535; when the format is X, X is an interger, with the value ranging from 1 to 4294967295.
                An AS consists of instance routers managed based on the same techniques. Interior Gateway Protocol (IGP) and universal routing metric packets are used inside an AS, and Exterior Gateway Protocol (EGP) is used outside to send packets to other ASs. With the development of this definition, one AS usually uses instance IGPs and metrics. Even though instance IGPs and metrics are used, the routing plan and destination reachability of an AS are consistent with those of another AS. The local AS number cannot be configured same as the confederation sub-ASs.";
              }
    
              leaf check-first-as {
                type boolean;
                default "true";
                description
                  "Enable/disable checking the first AS in the AS_Path of the update messages from EBGP peers.";
              }
    
              leaf shutdown {
                type boolean;
                default "false";
                description
                  "Enable/disable interrupting BGP all neighbour.";
              }
    
              leaf private-4byte-as {
                type boolean;
                default "false";
                description
                  "Enable/disable BGP private 4 byte AS. With BGP private-4-byte-as, BGP private as is from 64512 to 65535 and from 4200000000 to 4294967294.";
              }
    
              leaf peer-up-route-lowest-priority {
                type boolean;
                default "false";
                description
                  "Enable/disable reducing route priority to lowest.";
              }
    
              leaf delay-time {
                when
                  "../peer-up-route-lowest-priority='true'";
                type uint32 {
                  range "1..864000";
                }
                units "s";
                description
                  "Specifies the delay time.";
              }
    
              leaf memory-limit {
                type boolean;
                default "false";
                description
                  "Enable/disable using the prefix memory-limit command, you can configure the capability of BGP about memory limit when the system memory usage exceeded.";
              }
    
              container graceful-restart {
                description
                  "Configure the graceful-restart.";
                leaf enable {
                  type boolean;
                  default "false";
                  description
                    "Enable/disable GR of the BGP speaker in the specified address family, peer address, or peer group. When GR is enabled, the BGP speaker enabled with GR keeps the forwarding state and sends the End-Of-RIB flag during the restart. In this case, however, the BGP speaker may not maintain the forwarding table. Enabling or disabling GR may delete and re-establish all sessions and instances.";
                }
    
                leaf time-wait-for-rib {
                  type uint32 {
                    range "3..3000";
                  }
                  units "s";
                  default "600";
                  description
                    "Period of waiting for the End-Of-RIB flag. The value is an integer. When a BGP session is established or re-established, the router enabled with GR should receive the End-Of-RIB flag in this period. If the router does not receive the End-Of-RIB flag in this period, ensure that the router can exit from the GR process.";
                }
    
                leaf restart-time {
                  type uint16 {
                    range "3..3600";
                  }
                  units "s";
                  default "150";
                  description
                    "Specifies the maximum time during which a peer waits for a BGP session reestablishment.";
                }
    
                leaf peer-reset {
                  type boolean;
                  default "false";
                  description
                    "Enable/disable peer disconnection through GR.";
                }
              }  // container graceful-restart
    
              container reference-period {
                must
                  "hold-interval>suppress-interval";
                must
                  "clear-interval>hold-interval";
                description
                  "Configure the reference period.";
                leaf suppress-interval {
                  type uint32 {
                    range "1..65535";
                  }
                  units "s";
                  default "60";
                  description
                    "Specifies the reference period used to add penalty in case of next hop flapping.";
                }
    
                leaf hold-interval {
                  type uint32 {
                    range "1..65535";
                  }
                  units "s";
                  default "120";
                  description
                    "Specifies the reference period used to hold penalty in case of next hop flapping.";
                }
    
                leaf clear-interval {
                  type uint32 {
                    range "1..65535";
                  }
                  units "s";
                  default "600";
                  description
                    "Specifies the reference period used to clear penalty in case of next hop flapping.";
                }
              }  // container reference-period
    
              container timer {
                description
                  "Configure BGP global timer parameters.";
                leaf connect-retry-time {
                  type uint16 {
                    range "1..65535";
                  }
                  units "s";
                  default "32";
                  description
                    "ConnectRetry interval.";
                }
    
                leaf keep-alive-time {
                  type uint32 {
                    range "0..21845";
                  }
                  units "s";
                  must
                    "(../keep-alive-time != 0 and (../hold-time>=../keep-alive-time * 3) and ../hold-time != ../keep-alive-time ) or (../hold-time = 0 and ../keep-alive-time = 0)";
                  default "60";
                  description
                    "Specify the Keepalive time of a peer or peer group. The value is an integer. If the value of a timer changes, the peers need to re-negotiate the interval value for the keepalive-time and hold-time. This disconnects the BGP peer relationship between the routers. Therefore, you need to double check whether it is a must to change the value of the timer. Ensure that the hold time is at least three times longer than the keepalive time when you configure the BGP timer.";
                }
    
                leaf hold-time {
                  type uint32 {
                    range "0 | 3..65535";
                  }
                  units "s";
                  must
                    "(((../hold-time>=../keep-alive-time * 3) and ../hold-time != ../keep-alive-time ) or (../hold-time = 0 and ../keep-alive-time = 0)) and ../hold-time>=../min-hold-time";
                  default "180";
                  description
                    "Specify the Hold time of a peer or peer group. When setting the timer values of keepalive-time and hold-time, avoid the following settings: 1.The interval values of keepalive-time and hold-time are both set to 0. This will cause BGP timer to become invalid, and BGP will not detect link faults based on the timer.
    2. The interval value of hold-time is much greater than that of keepalive-time. For example, the interval value of keepalive-time is 1, and that of hold-time is 65535. If the interval value of hold-time is too large, BGP will not be able to detect link faults in time. The priority of the timer configured here is lower than that of timer configured with interval values of keepalive-time and hold-time of a peer. After a connection is established between peers, the interval values of keepalive-time and hold-time are negotiated by the peers. The smaller interval value of hold-time contained in Open packets of both peers is taken as the interval value of hold-time. The smaller interval value of one third of the interval value of hold-time and the locally set interval value of keepalive-time is taken as the interval value of keepalive-time.";
                }
    
                leaf min-hold-time {
                  type uint32 {
                    range "0 | 20..65535";
                  }
                  units "s";
                  must
                    "../hold-time>=../min-hold-time";
                  default "0";
                  description
                    "The default value of zero means that the minimum hold time check does not take effect. If the value is changed, the new value takes effect since the next peer relationship establishment. During the peer relationship establishment, the local device checks the hold time of the remote end. If the hold time is less than the minimum hold time, the local device sends an error packet with error code 02 and subcode 06, and the peer relationship fails to be established.";
                }
              }  // container timer
            }  // list instance-process
          }  // container instance-processs
        }  // container bgp
      }  // module huawei-bgp
    

© 2023 YumaWorks, Inc. All rights reserved.