2 namespace "urn:cisco:params:xml:ns:yang:bgp";
3 // replace with IANA namespace when assigned
6 import ietf-inet-types {
8 revision-date "2010-09-24";
10 import ietf-yang-types {
17 San Jose, CA 95134-1706
20 "Aleksandr Zhdankin azhdanki@cisco.com
21 Keyur Patel keyupate@cisco.com
22 Alexander Clemm alex@cisco.com";
24 "This YANG module defines the generic configuration
25 data for BGP, which is common across all of the vendor
26 implementations of the protocol. It is intended that the module
27 will be extended by vendors to define vendor-specific
28 BGP configuration parameters and policies,
29 for example route maps or route policies.
34 BGP (bgp): Border Gateway Protocol
36 IP (ip): Internet Protocol
38 IPv4 (ipv4):Internet Protocol Version 4
40 IPv6 (ipv6): Internet Protocol Version 6
42 MED(med): Multi Exit Discriminator
44 IGP (igp): Interior Gateway Protocol
46 MTU (mtu) Maximum Transmission Unit
54 typedef prefix-list-ref {
56 "A reference to the prefix list which a bgp-neighbor can use.";
58 path "/prefix-lists/prefix-list/prefix-list-name";
62 typedef neigbour-ref {
64 "A reference to the bgp-neighbor.";
66 path "/bgp-neighbors/bgp-neighbor/as-number";
70 typedef bgp-peer-admin-status {
72 "Administartive status of a BGP peer.";
80 typedef actions-enum {
82 "Permit/deny action.";
91 "Permit/deny action.";
98 grouping slow-peer-config {
100 "Configure a slow-peer.";
101 container detection {
112 leaf split-update-group {
119 grouping update-group-management {
121 "Manage peers in BGP update group.";
122 leaf split-as-override {
124 "Keeps peers with as-override in different update groups.";
129 grouping neighbour-base-af-config {
131 "A set of configuration parameters that is applicable to all neighbour address families.";
134 "Enable the address family for this neighbor.";
138 leaf advertisement-interval {
140 "Minimum interval between sending BGP routing updates.";
145 "Accept as-path with my AS present in it.";
149 leaf maximum-prefix {
151 "Maximum number of prefixes accepted from this peer.";
156 "Enable the next hop calculation for this neighbor.";
160 leaf next-hop-unchanged {
162 "Propagate next hop unchanged for iBGP paths to this neighbour.";
166 container remove-private-as {
167 leaf remove-private-as-number {
169 "Remove private AS number from outbound updates.";
172 leaf replace-with-local-as {
174 "Replace private AS number with local AS.";
178 leaf route-reflector-client {
180 "Configure a neighbor as Route Reflector client.";
184 leaf send-community {
186 "Send Community attribute to this neighbor.";
194 uses slow-peer-config;
197 "Site-of-Origin extended community. Format is ASN:nn or IP-address:nn";
202 "Set default weight for routes from this neighbor.";
207 grouping neighbour-common-af-config {
209 "A set of configuration parameters that is applicable to all neighbour address families,
210 except of nsap and rtfilter.";
211 uses neighbour-base-af-config;
214 "Reference to the prefix list of this neighbour.";
215 type prefix-list-ref;
217 leaf soft-reconfiguration {
219 "Allow inbound soft reconfiguration.";
224 grouping neighbour-cast-af-config {
226 "A set of configuration parameters that is applicable to both unicast and multicast sub-address families.";
227 uses neighbour-common-af-config;
228 leaf propagate-dmzlink-bw {
230 "Propagate the DMZ link bandwidth.";
233 container default-originate {
235 "Originate default route to this neighbor.";
243 grouping neighbour-ip-multicast-af-config {
245 "A set of configuration parameters that is applicable to ip multicast.";
246 uses neighbour-cast-af-config;
247 leaf route-server-client-context {
249 "Specifies Route Server client context name.";
254 grouping neighbour-ip-unicast-af-config {
256 "A set of configuration parameters that is applicable to ip unicast.
257 This grouping is intended to be extended by vendors as necessary to describe the vendor-specific configuration parameters.";
258 uses neighbour-ip-multicast-af-config;
261 grouping bgp-af-config {
263 "A set of configuration parameters that is applicable to all address families of the BFP router.";
264 leaf additional-paths {
266 "Additional paths in the BGP table.";
273 leaf advertise-best-external {
275 "Advertise best external path to internal peers.";
278 container aggregate-timer {
280 "Configure aggregation timer.";
293 "Change the default bestpath selection.";
294 choice bestpath-selection {
297 "Configures a BGP routrer to not consider the autonomous system (AS) path during best path route selection.";
298 leaf ignore-as-path {
303 case compare-routerid {
305 "Configures a BGP routrer to compare identical routes received from different external peers
306 during the best path selection process and to select the route with the lowest router ID as the best path.";
307 leaf ignore-routerid {
312 case cost-community {
314 "Configures a BGP router to not evaluate the cost community attribute
315 during the best path selection process.";
316 leaf ignore-cost-community {
323 "Configures the system to ignore the IGP metric during BGP best path selection.";
324 leaf ignore-igp-metric {
331 "Configure a BGP routing process to compare the Multi Exit Discriminator (MED)
332 between paths learned from confederation peers.";
337 leaf missing-as-worst {
339 "Assigns a value of infinity to routes that are missing
340 the Multi Exit Discriminator (MED) attribute,
341 making the path without a MED value the least desirable path";
350 "Enable route-flap dampening.";
354 leaf propagate-dmzlink-bw {
356 "Use DMZ Link Bandwidth as weight for BGP multipaths.";
359 leaf redistribute-internal {
361 "Allow redistribution of iBGP into IGPs (dangerous)";
366 "Configure background scanner interval in seconds.";
371 uses slow-peer-config;
372 leaf soft-reconfig-backup {
374 "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
379 grouping bgp-af-vpn-config {
381 "A set of configuration parameters that is applicable to vpn sub-address family on the BGP router.";
383 uses update-group-management;
386 grouping bgp-af-mvpn-config {
388 "A set of configuration parameters that is applicable to mvpn sub-address family on the BGP router.";
391 "Configure background scanner interval in seconds.";
396 uses slow-peer-config;
397 leaf soft-reconfig-backup {
399 "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
402 leaf propagate-dmzlink-bw {
404 "Use DMZ Link Bandwidth as weight for BGP multipaths.";
409 "Extended community list name.";
412 uses update-group-management;
415 grouping redistribute {
417 "Redistribute information from another routing protocol.
418 This grouping is intended to be augmented by vendors to implement vendor-specific protocol redistribution configuration options.";
436 leaf enable-connected {
463 grouping router-af-config {
465 "A set of configuration parameters that is applicable to all address families on the BGP router.";
466 leaf aggregate-address {
468 "Configure BGP aggregate address.";
469 type inet:ip-address;
473 "Define an administrative distance.";
480 "Specify a network to announce via BGP.";
481 type inet:ip-address;
486 grouping maximum-paths {
488 "Configures packet forwarding over multiple paths.";
489 leaf number-of-path {
494 leaf ibgp-number-of-path {
501 container bgp-router {
503 "This is a top-level container for the BGP router.";
504 leaf local-as-number {
507 leaf local-as-identifier {
508 type inet:ip-address;
510 container rpki-config {
512 "RPKI configuration parameters.";
513 container cache-server-config {
515 "Configure the RPKI cache-server parameters in rpki-server configuration mode.";
519 type inet:ip-address;
524 leaf ip-host-address {
532 "Specifies a transport method for the RPKI cache.";
550 leaf preference-value {
552 "Specifies a preference value for the RPKI cache.
553 Setting a lower preference value is better.";
560 "Configures the time BGP waits to keep routes from a cache after the cache session drops. Set purge time in seconds.";
565 choice refresh-time {
567 "Configures the time BGP waits in between sending periodic serial queries to the cache. Set refresh-time in seconds.";
569 leaf refresh-time-disable {
574 leaf refresh-interval {
581 choice responce-time {
583 "Configures the time BGP waits for a response after sending a serial or reset query. Set response-time in seconds.";
585 leaf responce-time-disable {
590 leaf responce-interval {
598 container validation-config {
600 "Controls the behavior of RPKI prefix validation processing.";
603 "Enables RPKI origin-AS validation.";
609 "Enables the iBGP signaling of validity state through an extended-community.";
612 choice validation-time {
614 "Sets prefix validation time (in seconds) or to set off the automatic prefix validation after an RPKI update.";
615 case validation-off {
621 leaf prefix-validation-time {
631 container bestpath-computation {
633 "Configures RPKI bestpath computation options.";
636 "Enables the validity states of BGP paths to affect the path's preference in the BGP bestpath process.";
641 "Allows all 'invalid' paths to be considered for BGP bestpath computation.";
646 container af-configuration {
648 "Top level container for address families specific configuration of the BGP router.";
653 "BGP specific commands for ipv4-mdt address family/sub-addess family combination.";
656 "Enable route-flap dampening.";
662 "Configure background scanner interval in seconds.";
667 uses slow-peer-config;
668 leaf soft-reconfig-backup {
670 "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
673 leaf propagate-dmzlink-bw {
675 "Use DMZ Link Bandwidth as weight for BGP multipaths.";
680 container multicast {
683 "BGP specific commands for ipv4-multicast address family/sub-addess family combination.";
688 "Enable automatic network number summarization";
691 uses router-af-config;
692 leaf default-metric {
694 "Set metric of redistributed routes.";
701 "BGP specific commands for ipv4-unicast address family/sub-addess family combination.";
703 leaf always-compare-med {
705 "Allow comparing MED from different neighbors.";
709 leaf enforce-first-as {
711 "Enforce the first AS for EBGP routes(default).";
715 leaf fast-external-fallover {
717 "Immediately reset session if a link to a directly connected external peer goes down.";
721 leaf suppress-inactive {
723 "Suppress routes that are not in the routing table.";
728 "Sets the default asplain notation.";
734 leaf enable-client-to-client-reflection {
736 "Manages client to client route reflection.";
742 "Configure Route-Reflector Cluster-id.";
745 container confederation {
747 "AS confederation parameters.";
750 "Confederation identifier.";
755 "Confederation peers.";
762 container consistency-checker {
764 "Consistency-checker configuration.";
770 "Check interval in minutes.";
775 choice inconsistency-action {
778 "Specifies that when an inconsistency is found, the system will only generate a syslog message.";
779 leaf generate-error-message-only {
785 "Specifies that when an inconsistency is found,
786 the system will generate a syslog message and take action
787 based on the type of inconsistency found.";
788 leaf perform-autorepair {
794 leaf deterministic-med {
796 "If enabled it enforce the deterministic comparison of the MED value between
797 all paths received from within the same autonomous system.";
800 container graceful-restart {
802 "Controls the BGP graceful restart capability.";
808 "Sets the maximum time period (in seconds) that the local router will wait
809 for a graceful-restart-capable neighbor to return to normal operation after a restart event occurs.";
815 leaf stalepath-time {
817 "Sets the maximum time period that the local router will hold stale paths for a restarting peer.";
824 container listener-congfig {
826 "Associates a subnet range with a BGP peer group and activate the BGP dynamic neighbors feature.";
832 "Sets a maximum limit number of BGP dynamic subnet range neighbors.";
840 "Specifies a subnet range that is to be associated with a specified peer group.";
847 "Specifies a BGP peer group that is to be associated with the specified subnet range.";
851 leaf log-neighbor-changes {
853 "Log neighbor up/down and reset reason.";
858 "Configures BGP to discard routes that have a number of autonomous system numbers in AS-path that exceed the specified value.";
863 container router-id {
865 "Configures a fixed router ID for the local BGP routing process.";
876 leaf enable-auto-config {
882 container transport {
884 "Manages transport session parameters.";
885 leaf enable-path-mtu-discovery {
887 "Enables transport path MTU discovery.";
895 "Enable automatic network number summarization";
898 uses router-af-config;
900 leaf synchronization {
902 "Perform IGP synchronization.";
909 "BGP specific commands for ipv4-mvpn address family/sub-addess family combination.";
910 uses bgp-af-mvpn-config;
914 "Enable automatic network number summarization.";
920 container multicast {
923 "BGP specific commands for ipv6-multicast address family/sub-addess family combination.";
926 uses router-af-config;
931 "BGP specific commands for ipv6-unicast address family/sub-addess family combination.";
934 uses router-af-config;
935 leaf default-metric {
937 "Set metric of redistributed routes.";
941 leaf synchronization {
943 "Perform IGP synchronization.";
950 "BGP specific commands for ipv6-mvpn address family/sub-addess family combination.";
951 uses bgp-af-mvpn-config;
959 "BGP specific commands for l2vpn-vpls address family/sub-addess family combination.";
962 "Configure background scanner interval in seconds.";
967 uses slow-peer-config;
975 "BGP specific commands for nsap-unicast address family/sub-addess family combination.";
976 container aggregate-timer {
978 "Configure Aggregation Timer.";
991 "Enable route-flap dampening.";
995 leaf propagate-dmzlink-bw {
997 "Use DMZ Link Bandwidth as weight for BGP multipaths.";
1000 leaf redistribute-internal {
1002 "Allow redistribution of iBGP into IGPs (dangerous)";
1007 "Configure background scanner interval in seconds.";
1012 uses slow-peer-config;
1013 leaf soft-reconfig-backup {
1015 "Use soft-reconfiguration inbound only when route-refresh is not negotiated.";
1019 leaf default-metric {
1021 "Set metric of redistributed routes.";
1027 "Specify a network to announce via BGP.";
1028 type inet:ip-address;
1031 leaf synchronization {
1033 "Perform IGP synchronization.";
1039 container rtfilter {
1043 "BGP specific commands for rtfilter-unicast address family/sub-addess family combination.";
1044 uses slow-peer-config;
1053 "BGP specific commands for vpnv4-unicast address family/sub-addess family combination.";
1054 uses bgp-af-vpn-config;
1058 container multicast {
1061 "BGP specific commands for vpnv4-multicast address family/sub-addess family combination.";
1062 uses bgp-af-vpn-config;
1071 "BGP specific commands for vpnv6-unicast address family/sub-addess family combination.";
1072 uses bgp-af-vpn-config;
1077 container bgp-neighbors {
1079 "The top level container for the list of neighbours of the BGP router.";
1085 choice peer-address-type {
1088 type inet:ip-address;
1094 type inet:ip-prefix;
1099 leaf ip-host-address {
1106 type prefix-list-ref;
1108 leaf default-action {
1111 container af-specific-config {
1113 "Address family specific configuration parameters for the neighbours.";
1116 uses neighbour-common-af-config;
1119 uses neighbour-ip-unicast-af-config;
1121 container multicast {
1122 uses neighbour-ip-multicast-af-config;
1125 uses neighbour-cast-af-config;
1130 uses neighbour-ip-unicast-af-config;
1132 container multicast {
1133 uses neighbour-ip-multicast-af-config;
1136 uses neighbour-common-af-config;
1141 uses neighbour-common-af-config;
1144 uses neighbour-common-af-config;
1149 uses neighbour-base-af-config;
1151 type prefix-list-ref;
1155 container rtfilter {
1157 uses neighbour-base-af-config;
1158 leaf soft-reconfiguration {
1160 "Allow inbound soft reconfiguration.";
1167 uses neighbour-cast-af-config;
1169 container multicast {
1170 uses neighbour-cast-af-config;
1175 uses neighbour-cast-af-config;
1177 container multicast {
1178 uses neighbour-cast-af-config;
1182 container bgp-neighbor-state {
1184 "The operational parameters describing the neighbour state.
1185 It is intended that this container may be augmented by vendors to reflect the vendor-specific operational state parameters.";
1187 type bgp-peer-admin-status;
1189 leaf in-lastupdatetime {
1190 type yang:timestamp;
1193 container bgp-neighbor-statistics {
1195 "The operational parameters describing the neighbour statistics.
1196 It is intended that this container may be augmented by vendors to reflect the vendor-specific staistical parameters.";
1197 leaf nr-in-updates {
1200 leaf nr-out-updates {
1206 container prefix-lists {
1208 "Contains all prefix lists defined
1211 key "prefix-list-name";
1214 leaf prefix-list-name {
1217 container prefixes {
1221 "A prefix is a rule with a BGP filter.
1222 The left hand side of the rule is the prefix filter.
1223 It specifies a set of IP addresses.
1224 If a BGP announcement contains an address that matches, the
1225 rule is applied. The right hand side of the rule specifies
1226 the action that is to be applied.";
1230 "Sequence number of the rule.
1231 The sequence number is included for compatibility purposes
1232 with CLI; from a machine-to-machine interface perspective,
1233 it would strictly speaking not be required as list elements
1234 can be arranged in a particular order.";
1236 container prefix-filter {
1237 choice ip-address-group {
1240 type inet:ip-address;
1246 type inet:ip-prefix;
1251 leaf ip-host-address {
1258 type inet:ip-address;
1261 type inet:ip-address;
1269 "permit/deny action";
1271 container statistics {
1272 leaf prefix-hit-count {