2 namespace "urn:cisco:params:xml:ns:yang:bgp";
3 // replace with IANA namespace when assigned
6 import ietf-inet-types {
9 import ietf-yang-types {
16 San Jose, CA 95134-1706
19 "Aleksandr Zhdankin azhdanki@cisco.com
20 Keyur Patel keyupate@cisco.com
21 Alexander Clemm alex@cisco.com";
23 "This YANG module defines the generic configuration
24 data for BGP, which is common across all of the vendor
25 implementations of the protocol. It is intended that the module
26 will be extended by vendors to define vendor-specific
27 BGP configuration parameters and policies,
28 for example route maps or route policies.
33 BGP (bgp): Border Gateway Protocol
35 IP (ip): Internet Protocol
37 IPv4 (ipv4):Internet Protocol Version 4
39 IPv6 (ipv6): Internet Protocol Version 6
41 MED(med): Multi Exit Discriminator
43 IGP (igp): Interior Gateway Protocol
45 MTU (mtu) Maximum Transmission Unit
53 typedef prefix-list-ref {
55 "A reference to the prefix list which a bgp-neighbor can use.";
57 path "/prefix-lists/prefix-list/prefix-list-name";
61 typedef neigbour-ref {
63 "A reference to the bgp-neighbor.";
65 path "/bgp-neighbors/bgp-neighbor/as-number";
69 typedef bgp-peer-admin-status {
71 "Administartive status of a BGP peer.";
79 typedef actions-enum {
81 "Permit/deny action.";
90 "Permit/deny action.";
97 grouping slow-peer-config {
99 "Configure a slow-peer.";
100 container detection {
111 leaf split-update-group {
118 grouping update-group-management {
120 "Manage peers in BGP update group.";
121 leaf split-as-override {
123 "Keeps peers with as-override in different update groups.";
128 grouping neighbour-base-af-config {
130 "A set of configuration parameters that is applicable to all neighbour address families.";
133 "Enable the address family for this neighbor.";
137 leaf advertisement-interval {
139 "Minimum interval between sending BGP routing updates.";
144 "Accept as-path with my AS present in it.";
148 leaf maximum-prefix {
150 "Maximum number of prefixes accepted from this peer.";
155 "Enable the next hop calculation for this neighbor.";
159 leaf next-hop-unchanged {
161 "Propagate next hop unchanged for iBGP paths to this neighbour.";
165 container remove-private-as {
166 leaf remove-private-as-number {
168 "Remove private AS number from outbound updates.";
171 leaf replace-with-local-as {
173 "Replace private AS number with local AS.";
177 leaf route-reflector-client {
179 "Configure a neighbor as Route Reflector client.";
183 leaf send-community {
185 "Send Community attribute to this neighbor.";
193 uses slow-peer-config;
196 "Site-of-Origin extended community. Format is ASN:nn or IP-address:nn";
201 "Set default weight for routes from this neighbor.";
206 grouping neighbour-common-af-config {
208 "A set of configuration parameters that is applicable to all neighbour address families,
209 except of nsap and rtfilter.";
210 uses neighbour-base-af-config;
213 "Reference to the prefix list of this neighbour.";
214 type prefix-list-ref;
216 leaf soft-reconfiguration {
218 "Allow inbound soft reconfiguration.";
223 grouping neighbour-cast-af-config {
225 "A set of configuration parameters that is applicable to both unicast and multicast sub-address families.";
226 uses neighbour-common-af-config;
227 leaf propagate-dmzlink-bw {
229 "Propagate the DMZ link bandwidth.";
232 container default-originate {
234 "Originate default route to this neighbor.";
242 grouping neighbour-ip-multicast-af-config {
244 "A set of configuration parameters that is applicable to ip multicast.";
245 uses neighbour-cast-af-config;
246 leaf route-server-client-context {
248 "Specifies Route Server client context name.";
253 grouping neighbour-ip-unicast-af-config {
255 "A set of configuration parameters that is applicable to ip unicast.
256 This grouping is intended to be extended by vendors as necessary to describe the vendor-specific configuration parameters.";
257 uses neighbour-ip-multicast-af-config;
260 grouping bgp-af-config {
262 "A set of configuration parameters that is applicable to all address families of the BFP router.";
263 leaf additional-paths {
265 "Additional paths in the BGP table.";
272 leaf advertise-best-external {
274 "Advertise best external path to internal peers.";
277 container aggregate-timer {
279 "Configure aggregation timer.";
292 "Change the default bestpath selection.";
293 choice bestpath-selection {
296 "Configures a BGP routrer to not consider the autonomous system (AS) path during best path route selection.";
297 leaf ignore-as-path {
302 case compare-routerid {
304 "Configures a BGP routrer to compare identical routes received from different external peers
305 during the best path selection process and to select the route with the lowest router ID as the best path.";
306 leaf ignore-routerid {
311 case cost-community {
313 "Configures a BGP router to not evaluate the cost community attribute
314 during the best path selection process.";
315 leaf ignore-cost-community {
322 "Configures the system to ignore the IGP metric during BGP best path selection.";
323 leaf ignore-igp-metric {
330 "Configure a BGP routing process to compare the Multi Exit Discriminator (MED)
331 between paths learned from confederation peers.";
336 leaf missing-as-worst {
338 "Assigns a value of infinity to routes that are missing
339 the Multi Exit Discriminator (MED) attribute,
340 making the path without a MED value the least desirable path";
349 "Enable route-flap dampening.";
353 leaf propagate-dmzlink-bw {
355 "Use DMZ Link Bandwidth as weight for BGP multipaths.";
358 leaf redistribute-internal {
360 "Allow redistribution of iBGP into IGPs (dangerous)";
365 "Configure background scanner interval in seconds.";
370 uses slow-peer-config;
371 leaf soft-reconfig-backup {
373 "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
378 grouping bgp-af-vpn-config {
380 "A set of configuration parameters that is applicable to vpn sub-address family on the BGP router.";
382 uses update-group-management;
385 grouping bgp-af-mvpn-config {
387 "A set of configuration parameters that is applicable to mvpn sub-address family on the BGP router.";
390 "Configure background scanner interval in seconds.";
395 uses slow-peer-config;
396 leaf soft-reconfig-backup {
398 "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
401 leaf propagate-dmzlink-bw {
403 "Use DMZ Link Bandwidth as weight for BGP multipaths.";
408 "Extended community list name.";
411 uses update-group-management;
414 grouping redistribute {
416 "Redistribute information from another routing protocol.
417 This grouping is intended to be augmented by vendors to implement vendor-specific protocol redistribution configuration options.";
435 leaf enable-connected {
462 grouping router-af-config {
464 "A set of configuration parameters that is applicable to all address families on the BGP router.";
465 leaf aggregate-address {
467 "Configure BGP aggregate address.";
468 type inet:ip-address;
472 "Define an administrative distance.";
479 "Specify a network to announce via BGP.";
480 type inet:ip-address;
485 grouping maximum-paths {
487 "Configures packet forwarding over multiple paths.";
488 leaf number-of-path {
493 leaf ibgp-number-of-path {
500 container bgp-router {
502 "This is a top-level container for the BGP router.";
503 leaf local-as-number {
506 leaf local-as-identifier {
507 type inet:ip-address;
509 container rpki-config {
511 "RPKI configuration parameters.";
512 container cache-server-config {
514 "Configure the RPKI cache-server parameters in rpki-server configuration mode.";
518 type inet:ip-address;
523 leaf ip-host-address {
531 "Specifies a transport method for the RPKI cache.";
549 leaf preference-value {
551 "Specifies a preference value for the RPKI cache.
552 Setting a lower preference value is better.";
559 "Configures the time BGP waits to keep routes from a cache after the cache session drops. Set purge time in seconds.";
564 choice refresh-time {
566 "Configures the time BGP waits in between sending periodic serial queries to the cache. Set refresh-time in seconds.";
568 leaf refresh-time-disable {
573 leaf refresh-interval {
580 choice responce-time {
582 "Configures the time BGP waits for a response after sending a serial or reset query. Set response-time in seconds.";
584 leaf responce-time-disable {
589 leaf responce-interval {
597 container validation-config {
599 "Controls the behavior of RPKI prefix validation processing.";
602 "Enables RPKI origin-AS validation.";
608 "Enables the iBGP signaling of validity state through an extended-community.";
611 choice validation-time {
613 "Sets prefix validation time (in seconds) or to set off the automatic prefix validation after an RPKI update.";
614 case validation-off {
620 leaf prefix-validation-time {
630 container bestpath-computation {
632 "Configures RPKI bestpath computation options.";
635 "Enables the validity states of BGP paths to affect the path's preference in the BGP bestpath process.";
640 "Allows all 'invalid' paths to be considered for BGP bestpath computation.";
645 container af-configuration {
647 "Top level container for address families specific configuration of the BGP router.";
652 "BGP specific commands for ipv4-mdt address family/sub-addess family combination.";
655 "Enable route-flap dampening.";
661 "Configure background scanner interval in seconds.";
666 uses slow-peer-config;
667 leaf soft-reconfig-backup {
669 "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
672 leaf propagate-dmzlink-bw {
674 "Use DMZ Link Bandwidth as weight for BGP multipaths.";
679 container multicast {
682 "BGP specific commands for ipv4-multicast address family/sub-addess family combination.";
687 "Enable automatic network number summarization";
690 uses router-af-config;
691 leaf default-metric {
693 "Set metric of redistributed routes.";
700 "BGP specific commands for ipv4-unicast address family/sub-addess family combination.";
702 leaf always-compare-med {
704 "Allow comparing MED from different neighbors.";
708 leaf enforce-first-as {
710 "Enforce the first AS for EBGP routes(default).";
714 leaf fast-external-fallover {
716 "Immediately reset session if a link to a directly connected external peer goes down.";
720 leaf suppress-inactive {
722 "Suppress routes that are not in the routing table.";
727 "Sets the default asplain notation.";
733 leaf enable-client-to-client-reflection {
735 "Manages client to client route reflection.";
741 "Configure Route-Reflector Cluster-id.";
744 container confederation {
746 "AS confederation parameters.";
749 "Confederation identifier.";
754 "Confederation peers.";
761 container consistency-checker {
763 "Consistency-checker configuration.";
769 "Check interval in minutes.";
774 choice inconsistency-action {
777 "Specifies that when an inconsistency is found, the system will only generate a syslog message.";
778 leaf generate-error-message-only {
784 "Specifies that when an inconsistency is found,
785 the system will generate a syslog message and take action
786 based on the type of inconsistency found.";
787 leaf perform-autorepair {
793 leaf deterministic-med {
795 "If enabled it enforce the deterministic comparison of the MED value between
796 all paths received from within the same autonomous system.";
799 container graceful-restart {
801 "Controls the BGP graceful restart capability.";
807 "Sets the maximum time period (in seconds) that the local router will wait
808 for a graceful-restart-capable neighbor to return to normal operation after a restart event occurs.";
814 leaf stalepath-time {
816 "Sets the maximum time period that the local router will hold stale paths for a restarting peer.";
823 container listener-congfig {
825 "Associates a subnet range with a BGP peer group and activate the BGP dynamic neighbors feature.";
831 "Sets a maximum limit number of BGP dynamic subnet range neighbors.";
839 "Specifies a subnet range that is to be associated with a specified peer group.";
846 "Specifies a BGP peer group that is to be associated with the specified subnet range.";
850 leaf log-neighbor-changes {
852 "Log neighbor up/down and reset reason.";
857 "Configures BGP to discard routes that have a number of autonomous system numbers in AS-path that exceed the specified value.";
862 container router-id {
864 "Configures a fixed router ID for the local BGP routing process.";
875 leaf enable-auto-config {
881 container transport {
883 "Manages transport session parameters.";
884 leaf enable-path-mtu-discovery {
886 "Enables transport path MTU discovery.";
894 "Enable automatic network number summarization";
897 uses router-af-config;
899 leaf synchronization {
901 "Perform IGP synchronization.";
908 "BGP specific commands for ipv4-mvpn address family/sub-addess family combination.";
909 uses bgp-af-mvpn-config;
913 "Enable automatic network number summarization.";
919 container multicast {
922 "BGP specific commands for ipv6-multicast address family/sub-addess family combination.";
925 uses router-af-config;
930 "BGP specific commands for ipv6-unicast address family/sub-addess family combination.";
933 uses router-af-config;
934 leaf default-metric {
936 "Set metric of redistributed routes.";
940 leaf synchronization {
942 "Perform IGP synchronization.";
949 "BGP specific commands for ipv6-mvpn address family/sub-addess family combination.";
950 uses bgp-af-mvpn-config;
958 "BGP specific commands for l2vpn-vpls address family/sub-addess family combination.";
961 "Configure background scanner interval in seconds.";
966 uses slow-peer-config;
974 "BGP specific commands for nsap-unicast address family/sub-addess family combination.";
975 container aggregate-timer {
977 "Configure Aggregation Timer.";
990 "Enable route-flap dampening.";
994 leaf propagate-dmzlink-bw {
996 "Use DMZ Link Bandwidth as weight for BGP multipaths.";
999 leaf redistribute-internal {
1001 "Allow redistribution of iBGP into IGPs (dangerous)";
1006 "Configure background scanner interval in seconds.";
1011 uses slow-peer-config;
1012 leaf soft-reconfig-backup {
1014 "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
1018 leaf default-metric {
1020 "Set metric of redistributed routes.";
1026 "Specify a network to announce via BGP.";
1027 type inet:ip-address;
1030 leaf synchronization {
1032 "Perform IGP synchronization.";
1038 container rtfilter {
1042 "BGP specific commands for rtfilter-unicast address family/sub-addess family combination.";
1043 uses slow-peer-config;
1052 "BGP specific commands for vpnv4-unicast address family/sub-addess family combination.";
1053 uses bgp-af-vpn-config;
1057 container multicast {
1060 "BGP specific commands for vpnv4-multicast address family/sub-addess family combination.";
1061 uses bgp-af-vpn-config;
1070 "BGP specific commands for vpnv6-unicast address family/sub-addess family combination.";
1071 uses bgp-af-vpn-config;
1076 container bgp-neighbors {
1078 "The top level container for the list of neighbours of the BGP router.";
1084 choice peer-address-type {
1087 type inet:ip-address;
1093 type inet:ip-prefix;
1098 leaf ip-host-address {
1105 type prefix-list-ref;
1107 leaf default-action {
1110 container af-specific-config {
1112 "Address family specific configuration parameters for the neighbours.";
1115 uses neighbour-common-af-config;
1118 uses neighbour-ip-unicast-af-config;
1120 container multicast {
1121 uses neighbour-ip-multicast-af-config;
1124 uses neighbour-cast-af-config;
1129 uses neighbour-ip-unicast-af-config;
1131 container multicast {
1132 uses neighbour-ip-multicast-af-config;
1135 uses neighbour-common-af-config;
1140 uses neighbour-common-af-config;
1143 uses neighbour-common-af-config;
1148 uses neighbour-base-af-config;
1150 type prefix-list-ref;
1154 container rtfilter {
1156 uses neighbour-base-af-config;
1157 leaf soft-reconfiguration {
1159 "Allow inbound soft reconfiguration.";
1166 uses neighbour-cast-af-config;
1168 container multicast {
1169 uses neighbour-cast-af-config;
1174 uses neighbour-cast-af-config;
1176 container multicast {
1177 uses neighbour-cast-af-config;
1181 container bgp-neighbor-state {
1183 "The operational parameters describing the neighbour state.
1184 It is intended that this container may be augmented by vendors to reflect the vendor-specific operational state parameters.";
1186 type bgp-peer-admin-status;
1188 leaf in-lastupdatetime {
1189 type yang:timestamp;
1192 container bgp-neighbor-statistics {
1194 "The operational parameters describing the neighbour statistics.
1195 It is intended that this container may be augmented by vendors to reflect the vendor-specific staistical parameters.";
1196 leaf nr-in-updates {
1199 leaf nr-out-updates {
1205 container prefix-lists {
1207 "Contains all prefix lists defined
1210 key "prefix-list-name";
1213 leaf prefix-list-name {
1216 container prefixes {
1220 "A prefix is a rule with a BGP filter.
1221 The left hand side of the rule is the prefix filter.
1222 It specifies a set of IP addresses.
1223 If a BGP announcement contains an address that matches, the
1224 rule is applied. The right hand side of the rule specifies
1225 the action that is to be applied.";
1229 "Sequence number of the rule.
1230 The sequence number is included for compatibility purposes
1231 with CLI; from a machine-to-machine interface perspective,
1232 it would strictly speaking not be required as list elements
1233 can be arranged in a particular order.";
1235 container prefix-filter {
1236 choice ip-address-group {
1239 type inet:ip-address;
1245 type inet:ip-prefix;
1250 leaf ip-host-address {
1257 type inet:ip-address;
1260 type inet:ip-address;
1268 "permit/deny action";
1270 container statistics {
1271 leaf prefix-hit-count {