--- /dev/null
+module bgp {
+ namespace "urn:cisco:params:xml:ns:yang:bgp";
+ // replace with IANA namespace when assigned
+ prefix bgp;
+
+ import ietf-inet-types {
+ prefix inet;
+ }
+ import ietf-yang-types {
+ prefix yang;
+ }
+
+ organization
+ "Cisco Systems
+ 170 West Tasman Drive
+ San Jose, CA 95134-1706
+ USA";
+ contact
+ "Aleksandr Zhdankin azhdanki@cisco.com
+ Keyur Patel keyupate@cisco.com
+ Alexander Clemm alex@cisco.com";
+ description
+ "This YANG module defines the generic configuration
+ data for BGP, which is common across all of the vendor
+ implementations of the protocol. It is intended that the module
+ will be extended by vendors to define vendor-specific
+ BGP configuration parameters and policies,
+ for example route maps or route policies.
+
+
+ Terms and Acronyms
+
+ BGP (bgp): Border Gateway Protocol
+
+ IP (ip): Internet Protocol
+
+ IPv4 (ipv4):Internet Protocol Version 4
+
+ IPv6 (ipv6): Internet Protocol Version 6
+
+ MED(med): Multi Exit Discriminator
+
+ IGP (igp): Interior Gateway Protocol
+
+ MTU (mtu) Maximum Transmission Unit
+ ";
+
+ revision 2013-07-15 {
+ description
+ "Initial revision.";
+ }
+
+ typedef prefix-list-ref {
+ description
+ "A reference to the prefix list which a bgp-neighbor can use.";
+ type leafref {
+ path "/prefix-lists/prefix-list/prefix-list-name";
+ }
+ }
+
+ typedef neigbour-ref {
+ description
+ "A reference to the bgp-neighbor.";
+ type leafref {
+ path "/bgp-neighbors/bgp-neighbor/as-number";
+ }
+ }
+
+ typedef bgp-peer-admin-status {
+ description
+ "Administartive status of a BGP peer.";
+ type enumeration {
+ enum "unknown";
+ enum "up";
+ enum "down";
+ }
+ }
+
+ typedef actions-enum {
+ description
+ "Permit/deny action.";
+ type enumeration {
+ enum "permit";
+ enum "deny";
+ }
+ }
+
+ grouping ACTIONS {
+ description
+ "Permit/deny action.";
+ leaf action {
+ type actions-enum;
+ mandatory true;
+ }
+ }
+
+ grouping slow-peer-config {
+ description
+ "Configure a slow-peer.";
+ container detection {
+ leaf enable {
+ type boolean;
+ default "true";
+ }
+ leaf threshold {
+ type uint16 {
+ range "120..3600";
+ }
+ }
+ }
+ leaf split-update-group {
+ type enumeration {
+ enum "dynamic";
+ enum "static";
+ }
+ }
+ }
+ grouping update-group-management {
+ description
+ "Manage peers in BGP update group.";
+ leaf split-as-override {
+ description
+ "Keeps peers with as-override in different update groups.";
+ type boolean;
+ }
+ }
+
+ grouping neighbour-base-af-config {
+ description
+ "A set of configuration parameters that is applicable to all neighbour address families.";
+ leaf active {
+ description
+ "Enable the address family for this neighbor.";
+ type boolean;
+ default "false";
+ }
+ leaf advertisement-interval {
+ description
+ "Minimum interval between sending BGP routing updates.";
+ type uint32;
+ }
+ leaf allowas-in {
+ description
+ "Accept as-path with my AS present in it.";
+ type boolean;
+ default "false";
+ }
+ leaf maximum-prefix {
+ description
+ "Maximum number of prefixes accepted from this peer.";
+ type uint32;
+ }
+ leaf next-hop-self {
+ description
+ "Enable the next hop calculation for this neighbor.";
+ type boolean;
+ default "true";
+ }
+ leaf next-hop-unchanged {
+ description
+ "Propagate next hop unchanged for iBGP paths to this neighbour.";
+ type boolean;
+ default "true";
+ }
+ container remove-private-as {
+ leaf remove-private-as-number {
+ description
+ "Remove private AS number from outbound updates.";
+ type boolean;
+ }
+ leaf replace-with-local-as {
+ description
+ "Replace private AS number with local AS.";
+ type boolean;
+ }
+ }
+ leaf route-reflector-client {
+ description
+ "Configure a neighbor as Route Reflector client.";
+ type boolean;
+ default "false";
+ }
+ leaf send-community {
+ description
+ "Send Community attribute to this neighbor.";
+ type enumeration {
+ enum "both";
+ enum "extended";
+ enum "standard";
+ }
+ default "standard";
+ }
+ uses slow-peer-config;
+ leaf soo {
+ description
+ "Site-of-Origin extended community. Format is ASN:nn or IP-address:nn";
+ type string;
+ }
+ leaf weight {
+ description
+ "Set default weight for routes from this neighbor.";
+ type uint16;
+ }
+ }
+
+ grouping neighbour-common-af-config {
+ description
+ "A set of configuration parameters that is applicable to all neighbour address families,
+ except of nsap and rtfilter.";
+ uses neighbour-base-af-config;
+ leaf prefix-list {
+ description
+ "Reference to the prefix list of this neighbour.";
+ type prefix-list-ref;
+ }
+ leaf soft-reconfiguration {
+ description
+ "Allow inbound soft reconfiguration.";
+ type boolean;
+ }
+ }
+
+ grouping neighbour-cast-af-config {
+ description
+ "A set of configuration parameters that is applicable to both unicast and multicast sub-address families.";
+ uses neighbour-common-af-config;
+ leaf propagate-dmzlink-bw {
+ description
+ "Propagate the DMZ link bandwidth.";
+ type boolean;
+ }
+ container default-originate {
+ description
+ "Originate default route to this neighbor.";
+ leaf enable {
+ type boolean;
+ default "false";
+ }
+ }
+ }
+
+ grouping neighbour-ip-multicast-af-config {
+ description
+ "A set of configuration parameters that is applicable to ip multicast.";
+ uses neighbour-cast-af-config;
+ leaf route-server-client-context {
+ description
+ "Specifies Route Server client context name.";
+ type string;
+ }
+ }
+
+ grouping neighbour-ip-unicast-af-config {
+ description
+ "A set of configuration parameters that is applicable to ip unicast.
+ This grouping is intended to be extended by vendors as necessary to describe the vendor-specific configuration parameters.";
+ uses neighbour-ip-multicast-af-config;
+ }
+
+ grouping bgp-af-config {
+ description
+ "A set of configuration parameters that is applicable to all address families of the BFP router.";
+ leaf additional-paths {
+ description
+ "Additional paths in the BGP table.";
+ type enumeration {
+ enum "all";
+ enum "best-n";
+ enum "group-best";
+ }
+ }
+ leaf advertise-best-external {
+ description
+ "Advertise best external path to internal peers.";
+ type boolean;
+ }
+ container aggregate-timer {
+ description
+ "Configure aggregation timer.";
+ leaf enable {
+ type boolean;
+ default "true";
+ }
+ leaf threshold {
+ type uint16 {
+ range "6..60";
+ }
+ }
+ }
+ container bestpath {
+ description
+ "Change the default bestpath selection.";
+ choice bestpath-selection {
+ case as-path {
+ description
+ "Configures a BGP routrer to not consider the autonomous system (AS) path during best path route selection.";
+ leaf ignore-as-path {
+ type boolean;
+ default "false";
+ }
+ }
+ case compare-routerid {
+ description
+ "Configures a BGP routrer to compare identical routes received from different external peers
+ during the best path selection process and to select the route with the lowest router ID as the best path.";
+ leaf ignore-routerid {
+ type boolean;
+ default "false";
+ }
+ }
+ case cost-community {
+ description
+ "Configures a BGP router to not evaluate the cost community attribute
+ during the best path selection process.";
+ leaf ignore-cost-community {
+ type boolean;
+ default "false";
+ }
+ }
+ case igp-metric {
+ description
+ "Configures the system to ignore the IGP metric during BGP best path selection.";
+ leaf ignore-igp-metric {
+ type boolean;
+ default "false";
+ }
+ }
+ case mad-confed {
+ description
+ "Configure a BGP routing process to compare the Multi Exit Discriminator (MED)
+ between paths learned from confederation peers.";
+ leaf enable {
+ type boolean;
+ default "false";
+ }
+ leaf missing-as-worst {
+ description
+ "Assigns a value of infinity to routes that are missing
+ the Multi Exit Discriminator (MED) attribute,
+ making the path without a MED value the least desirable path";
+ type boolean;
+ default "false";
+ }
+ }
+ }
+ }
+ leaf dampening {
+ description
+ "Enable route-flap dampening.";
+ type boolean;
+ default "false";
+ }
+ leaf propagate-dmzlink-bw {
+ description
+ "Use DMZ Link Bandwidth as weight for BGP multipaths.";
+ type boolean;
+ }
+ leaf redistribute-internal {
+ description
+ "Allow redistribution of iBGP into IGPs (dangerous)";
+ type boolean;
+ }
+ leaf scan-time {
+ description
+ "Configure background scanner interval in seconds.";
+ type uint8 {
+ range "5..60";
+ }
+ }
+ uses slow-peer-config;
+ leaf soft-reconfig-backup {
+ description
+ "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
+ type boolean;
+ }
+ }
+
+ grouping bgp-af-vpn-config {
+ description
+ "A set of configuration parameters that is applicable to vpn sub-address family on the BGP router.";
+ uses bgp-af-config;
+ uses update-group-management;
+ }
+
+ grouping bgp-af-mvpn-config {
+ description
+ "A set of configuration parameters that is applicable to mvpn sub-address family on the BGP router.";
+ leaf scan-time {
+ description
+ "Configure background scanner interval in seconds.";
+ type uint8 {
+ range "5..60";
+ }
+ }
+ uses slow-peer-config;
+ leaf soft-reconfig-backup {
+ description
+ "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
+ type boolean;
+ }
+ leaf propagate-dmzlink-bw {
+ description
+ "Use DMZ Link Bandwidth as weight for BGP multipaths.";
+ type boolean;
+ }
+ leaf rr-group {
+ description
+ "Extended community list name.";
+ type string;
+ }
+ uses update-group-management;
+ }
+
+ grouping redistribute {
+ description
+ "Redistribute information from another routing protocol.
+ This grouping is intended to be augmented by vendors to implement vendor-specific protocol redistribution configuration options.";
+ choice protocol {
+ case bgp {
+ leaf enable-bgp {
+ type boolean;
+ }
+ }
+ case ospf {
+ leaf enable-ospf {
+ type boolean;
+ }
+ }
+ case isis {
+ leaf enable-isis {
+ type boolean;
+ }
+ }
+ case connected {
+ leaf enable-connected {
+ type boolean;
+ }
+ }
+ case eigrp {
+ leaf enable-eigrp {
+ type boolean;
+ }
+ }
+ case mobile {
+ leaf enable-mobile {
+ type boolean;
+ }
+ }
+ case static {
+ leaf enable-static {
+ type boolean;
+ }
+ }
+ case rip {
+ leaf enable-rip {
+ type boolean;
+ }
+ }
+ }
+ }
+
+ grouping router-af-config {
+ description
+ "A set of configuration parameters that is applicable to all address families on the BGP router.";
+ leaf aggregate-address {
+ description
+ "Configure BGP aggregate address.";
+ type inet:ip-address;
+ }
+ leaf distance {
+ description
+ "Define an administrative distance.";
+ type uint8 {
+ range "1..255";
+ }
+ }
+ leaf network {
+ description
+ "Specify a network to announce via BGP.";
+ type inet:ip-address;
+ }
+ uses redistribute;
+ }
+
+ grouping maximum-paths {
+ description
+ "Configures packet forwarding over multiple paths.";
+ leaf number-of-path {
+ type uint8 {
+ range "1..32";
+ }
+ }
+ leaf ibgp-number-of-path {
+ type uint8 {
+ range "1..32";
+ }
+ }
+ }
+
+ container bgp-router {
+ description
+ "This is a top-level container for the BGP router.";
+ leaf local-as-number {
+ type uint32;
+ }
+ leaf local-as-identifier {
+ type inet:ip-address;
+ }
+ container rpki-config {
+ description
+ "RPKI configuration parameters.";
+ container cache-server-config {
+ description
+ "Configure the RPKI cache-server parameters in rpki-server configuration mode.";
+ choice server {
+ case ip-address {
+ leaf ip-address {
+ type inet:ip-address;
+ mandatory true;
+ }
+ }
+ case host-name {
+ leaf ip-host-address {
+ type inet:host;
+ mandatory true;
+ }
+ }
+ }
+ choice transport {
+ description
+ "Specifies a transport method for the RPKI cache.";
+ case tcp {
+ leaf tcp-port {
+ type uint32;
+ }
+ }
+ case ssh {
+ leaf ssh-port {
+ type uint32;
+ }
+ }
+ }
+ leaf user-name {
+ type string;
+ }
+ leaf password {
+ type string;
+ }
+ leaf preference-value {
+ description
+ "Specifies a preference value for the RPKI cache.
+ Setting a lower preference value is better.";
+ type uint8 {
+ range "1..10";
+ }
+ }
+ leaf purge-time {
+ description
+ "Configures the time BGP waits to keep routes from a cache after the cache session drops. Set purge time in seconds.";
+ type uint16 {
+ range "30..360";
+ }
+ }
+ choice refresh-time {
+ description
+ "Configures the time BGP waits in between sending periodic serial queries to the cache. Set refresh-time in seconds.";
+ case disable {
+ leaf refresh-time-disable {
+ type boolean;
+ }
+ }
+ case set-time {
+ leaf refresh-interval {
+ type uint16 {
+ range "15..3600";
+ }
+ }
+ }
+ }
+ choice responce-time {
+ description
+ "Configures the time BGP waits for a response after sending a serial or reset query. Set response-time in seconds.";
+ case disable {
+ leaf responce-time-disable {
+ type boolean;
+ }
+ }
+ case set-time {
+ leaf responce-interval {
+ type uint16 {
+ range "15..3600";
+ }
+ }
+ }
+ }
+ }
+ container validation-config {
+ description
+ "Controls the behavior of RPKI prefix validation processing.";
+ leaf enable {
+ description
+ "Enables RPKI origin-AS validation.";
+ type boolean;
+ default "true";
+ }
+ leaf enable-ibgp {
+ description
+ "Enables the iBGP signaling of validity state through an extended-community.";
+ type boolean;
+ }
+ choice validation-time {
+ description
+ "Sets prefix validation time (in seconds) or to set off the automatic prefix validation after an RPKI update.";
+ case validation-off {
+ leaf disable {
+ type boolean;
+ }
+ }
+ case set-time {
+ leaf prefix-validation-time {
+ description
+ "Range in seconds.";
+ type uint16 {
+ range "5..60";
+ }
+ }
+ }
+ }
+ }
+ container bestpath-computation {
+ description
+ "Configures RPKI bestpath computation options.";
+ leaf enable {
+ description
+ "Enables the validity states of BGP paths to affect the path's preference in the BGP bestpath process.";
+ type boolean;
+ }
+ leaf allow-invalid {
+ description
+ "Allows all 'invalid' paths to be considered for BGP bestpath computation.";
+ type boolean;
+ }
+ }
+ }
+ container af-configuration {
+ description
+ "Top level container for address families specific configuration of the BGP router.";
+ container ipv4 {
+ container mdt {
+ container bgp {
+ description
+ "BGP specific commands for ipv4-mdt address family/sub-addess family combination.";
+ leaf dampening {
+ description
+ "Enable route-flap dampening.";
+ type boolean;
+ default "false";
+ }
+ leaf scan-time {
+ description
+ "Configure background scanner interval in seconds.";
+ type uint8 {
+ range "5..60";
+ }
+ }
+ uses slow-peer-config;
+ leaf soft-reconfig-backup {
+ description
+ "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
+ type boolean;
+ }
+ leaf propagate-dmzlink-bw {
+ description
+ "Use DMZ Link Bandwidth as weight for BGP multipaths.";
+ type boolean;
+ }
+ }
+ }
+ container multicast {
+ container bgp {
+ description
+ "BGP specific commands for ipv4-multicast address family/sub-addess family combination.";
+ uses bgp-af-config;
+ }
+ leaf auto-summary {
+ description
+ "Enable automatic network number summarization";
+ type boolean;
+ }
+ uses router-af-config;
+ leaf default-metric {
+ description
+ "Set metric of redistributed routes.";
+ type uint32;
+ }
+ }
+ container unicast {
+ container bgp {
+ description
+ "BGP specific commands for ipv4-unicast address family/sub-addess family combination.";
+ uses bgp-af-config;
+ leaf always-compare-med {
+ description
+ "Allow comparing MED from different neighbors.";
+ type boolean;
+ default "false";
+ }
+ leaf enforce-first-as {
+ description
+ "Enforce the first AS for EBGP routes(default).";
+ type boolean;
+ default "true";
+ }
+ leaf fast-external-fallover {
+ description
+ "Immediately reset session if a link to a directly connected external peer goes down.";
+ type boolean;
+ default "true";
+ }
+ leaf suppress-inactive {
+ description
+ "Suppress routes that are not in the routing table.";
+ type boolean;
+ }
+ leaf asnotation {
+ description
+ "Sets the default asplain notation.";
+ type enumeration {
+ enum "asplain";
+ enum "dot";
+ }
+ }
+ leaf enable-client-to-client-reflection {
+ description
+ "Manages client to client route reflection.";
+ type boolean;
+ default "true";
+ }
+ leaf cluster-id {
+ description
+ "Configure Route-Reflector Cluster-id.";
+ type string;
+ }
+ container confederation {
+ description
+ "AS confederation parameters.";
+ leaf identifier {
+ description
+ "Confederation identifier.";
+ type string;
+ }
+ list peers {
+ description
+ "Confederation peers.";
+ key "as-name";
+ leaf as-name {
+ type string;
+ }
+ }
+ }
+ container consistency-checker {
+ description
+ "Consistency-checker configuration.";
+ leaf enable {
+ type boolean;
+ }
+ leaf interval {
+ description
+ "Check interval in minutes.";
+ type uint16 {
+ range "5..1440";
+ }
+ }
+ choice inconsistency-action {
+ case error-message {
+ description
+ "Specifies that when an inconsistency is found, the system will only generate a syslog message.";
+ leaf generate-error-message-only {
+ type boolean;
+ }
+ }
+ case autorepair {
+ description
+ "Specifies that when an inconsistency is found,
+ the system will generate a syslog message and take action
+ based on the type of inconsistency found.";
+ leaf perform-autorepair {
+ type boolean;
+ }
+ }
+ }
+ }
+ leaf deterministic-med {
+ description
+ "If enabled it enforce the deterministic comparison of the MED value between
+ all paths received from within the same autonomous system.";
+ type boolean;
+ }
+ container graceful-restart {
+ description
+ "Controls the BGP graceful restart capability.";
+ leaf enable {
+ type boolean;
+ }
+ leaf restart-time {
+ description
+ "Sets the maximum time period (in seconds) that the local router will wait
+ for a graceful-restart-capable neighbor to return to normal operation after a restart event occurs.";
+ type uint16 {
+ range "1..3600";
+ }
+ default "120";
+ }
+ leaf stalepath-time {
+ description
+ "Sets the maximum time period that the local router will hold stale paths for a restarting peer.";
+ type uint16 {
+ range "5..3600";
+ }
+ default "360";
+ }
+ }
+ container listener-congfig {
+ description
+ "Associates a subnet range with a BGP peer group and activate the BGP dynamic neighbors feature.";
+ leaf enable {
+ type boolean;
+ }
+ leaf limit {
+ description
+ "Sets a maximum limit number of BGP dynamic subnet range neighbors.";
+ type uint16 {
+ range "1..5000";
+ }
+ default "100";
+ }
+ leaf range {
+ description
+ "Specifies a subnet range that is to be associated with a specified peer group.";
+ type uint16 {
+ range "0..32";
+ }
+ }
+ leaf peer-group {
+ description
+ "Specifies a BGP peer group that is to be associated with the specified subnet range.";
+ type string;
+ }
+ }
+ leaf log-neighbor-changes {
+ description
+ "Log neighbor up/down and reset reason.";
+ type boolean;
+ }
+ leaf max-as-limit {
+ description
+ "Configures BGP to discard routes that have a number of autonomous system numbers in AS-path that exceed the specified value.";
+ type uint16 {
+ range "1..254";
+ }
+ }
+ container router-id {
+ description
+ "Configures a fixed router ID for the local BGP routing process.";
+ leaf enable {
+ type boolean;
+ }
+ choice config-type {
+ case static {
+ leaf ip-address {
+ type boolean;
+ }
+ }
+ case auto-config {
+ leaf enable-auto-config {
+ type boolean;
+ }
+ }
+ }
+ }
+ container transport {
+ description
+ "Manages transport session parameters.";
+ leaf enable-path-mtu-discovery {
+ description
+ "Enables transport path MTU discovery.";
+ type boolean;
+ default "true";
+ }
+ }
+ }
+ leaf auto-summary {
+ description
+ "Enable automatic network number summarization";
+ type boolean;
+ }
+ uses router-af-config;
+ uses maximum-paths;
+ leaf synchronization {
+ description
+ "Perform IGP synchronization.";
+ type boolean;
+ }
+ }
+ container mvpn {
+ container bgp {
+ description
+ "BGP specific commands for ipv4-mvpn address family/sub-addess family combination.";
+ uses bgp-af-mvpn-config;
+ }
+ leaf auto-summary {
+ description
+ "Enable automatic network number summarization.";
+ type boolean;
+ }
+ }
+ }
+ container ipv6 {
+ container multicast {
+ container bgp {
+ description
+ "BGP specific commands for ipv6-multicast address family/sub-addess family combination.";
+ uses bgp-af-config;
+ }
+ uses router-af-config;
+ }
+ container unicast {
+ container bgp {
+ description
+ "BGP specific commands for ipv6-unicast address family/sub-addess family combination.";
+ uses bgp-af-config;
+ }
+ uses router-af-config;
+ leaf default-metric {
+ description
+ "Set metric of redistributed routes.";
+ type uint32;
+ }
+ uses maximum-paths;
+ leaf synchronization {
+ description
+ "Perform IGP synchronization.";
+ type boolean;
+ }
+ }
+ container mvpn {
+ container bgp {
+ description
+ "BGP specific commands for ipv6-mvpn address family/sub-addess family combination.";
+ uses bgp-af-mvpn-config;
+ }
+ }
+ }
+ container l2vpn {
+ container vpls {
+ container bgp {
+ description
+ "BGP specific commands for l2vpn-vpls address family/sub-addess family combination.";
+ leaf scan-time {
+ description
+ "Configure background scanner interval in seconds.";
+ type uint8 {
+ range "5..60";
+ }
+ }
+ uses slow-peer-config;
+ }
+ }
+ }
+ container nsap {
+ container unicast {
+ container bgp {
+ description
+ "BGP specific commands for nsap-unicast address family/sub-addess family combination.";
+ container aggregate-timer {
+ description
+ "Configure Aggregation Timer.";
+ leaf enable {
+ type boolean;
+ default "true";
+ }
+ leaf threshold {
+ type uint16 {
+ range "6..60";
+ }
+ }
+ }
+ leaf dampening {
+ description
+ "Enable route-flap dampening.";
+ type boolean;
+ default "false";
+ }
+ leaf propagate-dmzlink-bw {
+ description
+ "Use DMZ Link Bandwidth as weight for BGP multipaths.";
+ type boolean;
+ }
+ leaf redistribute-internal {
+ description
+ "Allow redistribution of iBGP into IGPs (dangerous)";
+ type boolean;
+ }
+ leaf scan-time {
+ description
+ "Configure background scanner interval in seconds.";
+ type uint8 {
+ range "5..60";
+ }
+ }
+ uses slow-peer-config;
+ leaf soft-reconfig-backup {
+ description
+ "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
+ type boolean;
+ }
+ }
+ leaf default-metric {
+ description
+ "Set metric of redistributed routes.";
+ type uint32;
+ }
+ uses maximum-paths;
+ leaf network {
+ description
+ "Specify a network to announce via BGP.";
+ type inet:ip-address;
+ }
+ uses redistribute;
+ leaf synchronization {
+ description
+ "Perform IGP synchronization.";
+ type boolean;
+ }
+ }
+ }
+ }
+ container rtfilter {
+ container unicast {
+ container bgp {
+ description
+ "BGP specific commands for rtfilter-unicast address family/sub-addess family combination.";
+ uses slow-peer-config;
+ }
+ uses maximum-paths;
+ }
+ }
+ container vpnv4 {
+ container unicast {
+ container bgp {
+ description
+ "BGP specific commands for vpnv4-unicast address family/sub-addess family combination.";
+ uses bgp-af-vpn-config;
+ }
+ uses maximum-paths;
+ }
+ container multicast {
+ container bgp {
+ description
+ "BGP specific commands for vpnv4-multicast address family/sub-addess family combination.";
+ uses bgp-af-vpn-config;
+ }
+ uses maximum-paths;
+ }
+ }
+ container vpnv6 {
+ container unicast {
+ container bgp {
+ description
+ "BGP specific commands for vpnv6-unicast address family/sub-addess family combination.";
+ uses bgp-af-vpn-config;
+ }
+ }
+ }
+ }
+ container bgp-neighbors {
+ description
+ "The top level container for the list of neighbours of the BGP router.";
+ list bgp-neighbor {
+ key "as-number";
+ leaf as-number {
+ type uint32;
+ }
+ choice peer-address-type {
+ case ip-address {
+ leaf ip-address {
+ type inet:ip-address;
+ mandatory true;
+ }
+ }
+ case prefix {
+ leaf prefix {
+ type inet:ip-prefix;
+ mandatory true;
+ }
+ }
+ case host {
+ leaf ip-host-address {
+ type inet:host;
+ mandatory true;
+ }
+ }
+ }
+ leaf prefix-list {
+ type prefix-list-ref;
+ }
+ leaf default-action {
+ type actions-enum;
+ }
+ container af-specific-config {
+ description
+ "Address family specific configuration parameters for the neighbours.";
+ container ipv4 {
+ container mdt {
+ uses neighbour-common-af-config;
+ }
+ container unicast {
+ uses neighbour-ip-unicast-af-config;
+ }
+ container multicast {
+ uses neighbour-ip-multicast-af-config;
+ }
+ container mvpn {
+ uses neighbour-cast-af-config;
+ }
+ }
+ container ipv6 {
+ container unicast {
+ uses neighbour-ip-unicast-af-config;
+ }
+ container multicast {
+ uses neighbour-ip-multicast-af-config;
+ }
+ container mvpn {
+ uses neighbour-common-af-config;
+ }
+ }
+ container l2vpn {
+ container evpn {
+ uses neighbour-common-af-config;
+ }
+ container vpls {
+ uses neighbour-common-af-config;
+ }
+ }
+ container nsap {
+ container unicast {
+ uses neighbour-base-af-config;
+ leaf prefix-list {
+ type prefix-list-ref;
+ }
+ }
+ }
+ container rtfilter {
+ container unicast {
+ uses neighbour-base-af-config;
+ leaf soft-reconfiguration {
+ description
+ "Allow inbound soft reconfiguration.";
+ type boolean;
+ }
+ }
+ }
+ container vpnv4 {
+ container unicast {
+ uses neighbour-cast-af-config;
+ }
+ container multicast {
+ uses neighbour-cast-af-config;
+ }
+ }
+ container vpnv6 {
+ container unicast {
+ uses neighbour-cast-af-config;
+ }
+ container multicast {
+ uses neighbour-cast-af-config;
+ }
+ }
+ }
+ container bgp-neighbor-state {
+ description
+ "The operational parameters describing the neighbour state.
+ It is intended that this container may be augmented by vendors to reflect the vendor-specific operational state parameters.";
+ leaf adminStatus {
+ type bgp-peer-admin-status;
+ }
+ leaf in-lastupdatetime {
+ type yang:timestamp;
+ }
+ }
+ container bgp-neighbor-statistics {
+ description
+ "The operational parameters describing the neighbour statistics.
+ It is intended that this container may be augmented by vendors to reflect the vendor-specific staistical parameters.";
+ leaf nr-in-updates {
+ type uint32;
+ }
+ leaf nr-out-updates {
+ type uint32;
+ }
+ }
+ }
+ }
+ container prefix-lists {
+ description
+ "Contains all prefix lists defined
+ on a router.";
+ list prefix-list {
+ key "prefix-list-name";
+ description
+ "A prefix list.";
+ leaf prefix-list-name {
+ type string;
+ }
+ container prefixes {
+ list prefix {
+ key "seq-nr";
+ description
+ "A prefix is a rule with a BGP filter.
+ The left hand side of the rule is the prefix filter.
+ It specifies a set of IP addresses.
+ If a BGP announcement contains an address that matches, the
+ rule is applied. The right hand side of the rule specifies
+ the action that is to be applied.";
+ leaf seq-nr {
+ type uint16;
+ description
+ "Sequence number of the rule.
+ The sequence number is included for compatibility purposes
+ with CLI; from a machine-to-machine interface perspective,
+ it would strictly speaking not be required as list elements
+ can be arranged in a particular order.";
+ }
+ container prefix-filter {
+ choice ip-address-group {
+ case ip-address {
+ leaf ip-address {
+ type inet:ip-address;
+ mandatory true;
+ }
+ }
+ case prefix {
+ leaf prefix {
+ type inet:ip-prefix;
+ mandatory true;
+ }
+ }
+ case host {
+ leaf ip-host-address {
+ type inet:host;
+ mandatory true;
+ }
+ }
+ case ip-range {
+ leaf lower {
+ type inet:ip-address;
+ }
+ leaf upper {
+ type inet:ip-address;
+ }
+ }
+ }
+ leaf action {
+ type actions-enum;
+ mandatory true;
+ description
+ "permit/deny action";
+ }
+ container statistics {
+ leaf prefix-hit-count {
+ type uint32;
+ config false;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}