ANTA catalog for BGP tests
multi-agent
Service Routing Protocols Model Requirements
The BGP tests in this section are only supported on switches running the multi-agent
routing protocols model. Starting from EOS version 4.30.1F, service routing protocols model
is set to multi-agent
by default. These BGP commands may not be compatible with switches running the legacy ribd
routing protocols model and may fail if attempted.
Tests¶
VerifyBGPAdvCommunities ¶
Verifies that advertised communities are standard, extended and large for BGP peers.
This test performs the following checks for each specified peer:
- Confirms that the specified VRF is configured.
- Verifies that the peer exists in the BGP configuration.
- Validates that all required community types are advertised:
- Standard communities
- Extended communities
- Large communities
Expected Results
- Success: If all of the following conditions are met:
- All specified peers are found in the BGP configuration.
- Each peer advertises standard, extended and large communities.
- Failure: If any of the following occur:
- A specified peer is not found in the BGP configuration.
- A peer does not advertise standard, extended or large communities.
Examples
anta.tests.routing:
bgp:
- VerifyBGPAdvCommunities:
bgp_peers:
- peer_address: 172.30.11.17
vrf: default
- peer_address: 172.30.11.21
vrf: default
Source code in anta/tests/routing/bgp.py
816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 |
|
VerifyBGPExchangedRoutes ¶
Verifies the advertised and received routes of BGP peers.
This test performs the following checks for each specified peer:
For each advertised and received route: - Confirms that the route exists in the BGP route table. - Verifies that the route is in an ‘active’ and ‘valid’ state.
Expected Results
- Success: If all of the following conditions are met:
- All specified advertised/received routes are found in the BGP route table.
- All routes are in both ‘active’ and ‘valid’ states.
- Failure: If any of the following occur:
- An advertised/received route is not found in the BGP route table.
- Any route is not in an ‘active’ or ‘valid’ state.
Examples
anta.tests.routing:
bgp:
- VerifyBGPExchangedRoutes:
bgp_peers:
- peer_address: 172.30.255.5
vrf: default
advertised_routes:
- 192.0.254.5/32
received_routes:
- 192.0.255.4/32
- peer_address: 172.30.255.1
vrf: default
advertised_routes:
- 192.0.255.1/32
- 192.0.254.5/32
received_routes:
- 192.0.254.3/32
Source code in anta/tests/routing/bgp.py
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 |
|
VerifyBGPPeerASNCap ¶
Verifies the four octet ASN capability of BGP peers.
This test performs the following checks for each specified peer:
- Confirms that the specified VRF is configured.
- Verifies that the peer exists in the BGP configuration.
- Validates that the capability is present in the peer configuration.
- Confirms that the capability is advertised, received, and enabled.
Expected Results
- Success: If all of the following conditions are met:
- All specified peers are found in the BGP configuration.
- The four octet ASN capability is present in each peer configuration.
- The capability is properly negotiated (advertised, received, and enabled) for all peers.
- Failure: If any of the following occur:
- A specified peer is not found in the BGP configuration.
- The four octet ASN capability is not present for a peer.
- The capability is not properly negotiated (not advertised, received, or enabled) for any peer.
Examples
anta.tests.routing:
bgp:
- VerifyBGPPeerASNCap:
bgp_peers:
- peer_address: 172.30.11.1
vrf: default
Source code in anta/tests/routing/bgp.py
539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 |
|
VerifyBGPPeerCount ¶
Verifies the count of BGP peers for given address families.
This test performs the following checks for each specified address family:
- Confirms that the specified VRF is configured.
- Counts the number of peers that are:
- If
check_peer_state
is set to True, Counts the number of BGP peers that are in theEstablished
state and have successfully negotiated the specified AFI/SAFI - If
check_peer_state
is set to False, skips validation of theEstablished
state and AFI/SAFI negotiation.
- If
Expected Results
- Success: If the count of BGP peers matches the expected count with
check_peer_state
enabled/disabled. - Failure: If any of the following occur:
- The specified VRF is not configured.
- The BGP peer count does not match expected value with
check_peer_state
enabled/disabled.”
Examples
anta.tests.routing:
bgp:
- VerifyBGPPeerCount:
address_families:
- afi: "evpn"
num_peers: 2
- afi: "ipv4"
safi: "unicast"
vrf: "PROD"
num_peers: 2
- afi: "ipv4"
safi: "unicast"
vrf: "default"
num_peers: 3
- afi: "ipv4"
safi: "multicast"
vrf: "DEV"
num_peers: 3
Inputs¶
Name | Type | Description | Default |
---|---|---|---|
address_families |
list[BgpAddressFamily]
|
List of BGP address families.
|
- |
Source code in anta/tests/routing/bgp.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
VerifyBGPPeerDropStats ¶
Verifies BGP NLRI drop statistics for the provided BGP IPv4 peer(s).
This test performs the following checks for each specified peer:
- Confirms that the specified VRF is configured.
- Verifies that the peer exists in the BGP configuration.
- Validates the BGP drop statistics:
- If specific drop statistics are provided, checks only those counters.
- If no specific drop statistics are provided, checks all available counters.
- Confirms that all checked counters have a value of zero.
Expected Results
- Success: If all of the following conditions are met:
- All specified peers are found in the BGP configuration.
- All specified drop statistics counters (or all counters if none specified) are zero.
- Failure: If any of the following occur:
- A specified peer is not found in the BGP configuration.
- Any checked drop statistics counter has a non-zero value.
- A specified drop statistics counter does not exist.
Examples
anta.tests.routing:
bgp:
- VerifyBGPPeerDropStats:
bgp_peers:
- peer_address: 172.30.11.1
vrf: default
drop_stats:
- inDropAsloop
- prefixEvpnDroppedUnsupportedRouteType
Source code in anta/tests/routing/bgp.py
961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 |
|
VerifyBGPPeerMD5Auth ¶
Verifies the MD5 authentication and state of IPv4 BGP peers in a specified VRF.
This test performs the following checks for each specified peer:
- Confirms that the specified VRF is configured.
- Verifies that the peer exists in the BGP configuration.
- Validates that the BGP session is in
Established
state. - Confirms that MD5 authentication is enabled for the peer.
Expected Results
- Success: If all of the following conditions are met:
- All specified peers are found in the BGP configuration.
- All peers are in
Established
state. - MD5 authentication is enabled for all peers.
- Failure: If any of the following occur:
- A specified peer is not found in the BGP configuration.
- A peer’s session state is not
Established
. - MD5 authentication is not enabled for a peer.
Examples
anta.tests.routing:
bgp:
- VerifyBGPPeerMD5Auth:
bgp_peers:
- peer_address: 172.30.11.1
vrf: default
- peer_address: 172.30.11.5
vrf: default
Source code in anta/tests/routing/bgp.py
677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 |
|
VerifyBGPPeerMPCaps ¶
Verifies the multiprotocol capabilities of BGP peers.
This test performs the following checks for each specified peer:
- Confirms that the specified VRF is configured.
- Verifies that the peer exists in the BGP configuration.
- For each specified capability:
- Validates that the capability is present in the peer configuration.
- Confirms that the capability is advertised, received, and enabled.
- When strict mode is enabled (
strict: true
):- Verifies that only the specified capabilities are configured.
- Ensures an exact match between configured and expected capabilities.
Expected Results
- Success: If all of the following conditions are met:
- The specified VRF is configured.
- All specified peers are found in the BGP configuration.
- All specified capabilities are present and properly negotiated.
- In strict mode, only the specified capabilities are configured.
- Failure: If any of the following occur:
- The specified VRF is not configured.
- A specified peer is not found in the BGP configuration.
- A specified capability is not found.
- A capability is not properly negotiated (not advertised, received, or enabled).
- In strict mode, additional or missing capabilities are detected.
Examples
anta.tests.routing:
bgp:
- VerifyBGPPeerMPCaps:
bgp_peers:
- peer_address: 172.30.11.1
vrf: default
strict: False
capabilities:
- ipv4Unicast
Source code in anta/tests/routing/bgp.py
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 |
|
VerifyBGPPeerRouteLimit ¶
Verifies maximum routes and outbound route-maps of BGP IPv4 peer(s).
This test performs the following checks for each specified peer:
- Confirms that the specified VRF is configured.
- Verifies that the peer exists in the BGP configuration.
- Confirms the Maximum routes and maximum routes warning limit, if provided match the expected value.
Expected Results
- Success: If all of the following conditions are met:
- All specified peers are found in the BGP configuration.
- The maximum routese/maximum routes warning limit match the expected value for a peer.
- Failure: If any of the following occur:
- A specified peer is not found in the BGP configuration.
- The maximum routese/maximum routes warning limit do not match the expected value for a peer.
Examples
anta.tests.routing:
bgp:
- VerifyBGPPeerRouteLimit:
bgp_peers:
- peer_address: 172.30.11.1
vrf: default
maximum_routes: 12000
warning_limit: 10000
Source code in anta/tests/routing/bgp.py
1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 |
|
VerifyBGPPeerRouteRefreshCap ¶
Verifies the route refresh capabilities of a BGP peer in a specified VRF.
This test performs the following checks for each specified peer:
- Confirms that the specified VRF is configured.
- Verifies that the peer exists in the BGP configuration.
- Validates that the route refresh capability is present in the peer configuration.
- Confirms that the capability is advertised, received, and enabled.
Expected Results
- Success: If all of the following conditions are met:
- All specified peers are found in the BGP configuration.
- The route refresh capability is present in each peer configuration.
- The capability is properly negotiated (advertised, received, and enabled) for all peers.
- Failure: If any of the following occur:
- A specified peer is not found in the BGP configuration.
- The route refresh capability is not present for a peer.
- The capability is not properly negotiated (not advertised, received, or enabled) for any peer.
Examples
anta.tests.routing:
bgp:
- VerifyBGPPeerRouteRefreshCap:
bgp_peers:
- peer_address: 172.30.11.1
vrf: default
Source code in anta/tests/routing/bgp.py
608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 |
|
VerifyBGPPeerUpdateErrors ¶
Verifies BGP update error counters for the provided BGP IPv4 peer(s).
This test performs the following checks for each specified peer:
- Confirms that the specified VRF is configured.
- Verifies that the peer exists in the BGP configuration.
- Validates the BGP update error counters:
- If specific update error counters are provided, checks only those counters.
- If no update error counters are provided, checks all available counters.
- Confirms that all checked counters have a value of zero.
Note: For “disabledAfiSafi” error counter field, checking that it’s not “None” versus 0.
Expected Results
- Success: If all of the following conditions are met:
- All specified peers are found in the BGP configuration.
- All specified update error counters (or all counters if none specified) are zero.
- Failure: If any of the following occur:
- A specified peer is not found in the BGP configuration.
- Any checked update error counters has a non-zero value.
- A specified update error counters does not exist.
Examples
anta.tests.routing:
bgp:
- VerifyBGPPeerUpdateErrors:
bgp_peers:
- peer_address: 172.30.11.1
vrf: default
update_errors:
- inUpdErrWithdraw
Source code in anta/tests/routing/bgp.py
1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 |
|
VerifyBGPPeersHealth ¶
Verifies the health of BGP peers for given address families.
This test performs the following checks for each specified address family:
- Validates that the VRF is configured.
- Checks if there are any peers for the given AFI/SAFI.
- For each relevant peer:
- Verifies that the BGP session is in the
Established
state. - Confirms that the AFI/SAFI state is
negotiated
. - Checks that both input and output TCP message queues are empty.
Can be disabled by setting
check_tcp_queues
toFalse
.
- Verifies that the BGP session is in the
Expected Results
- Success: If all checks pass for all specified address families and their peers.
- Failure: If any of the following occur:
- The specified VRF is not configured.
- No peers are found for a given AFI/SAFI.
- Any BGP session is not in the
Established
state. - The AFI/SAFI state is not ‘negotiated’ for any peer.
- Any TCP message queue (input or output) is not empty when
check_tcp_queues
isTrue
(default).
Examples
anta.tests.routing:
bgp:
- VerifyBGPPeersHealth:
address_families:
- afi: "evpn"
- afi: "ipv4"
safi: "unicast"
vrf: "default"
- afi: "ipv6"
safi: "unicast"
vrf: "DEV"
check_tcp_queues: false
Inputs¶
Name | Type | Description | Default |
---|---|---|---|
address_families |
list[BgpAddressFamily]
|
List of BGP address families.
|
- |
Source code in anta/tests/routing/bgp.py
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
|
VerifyBGPSpecificPeers ¶
Verifies the health of specific BGP peer(s) for given address families.
This test performs the following checks for each specified address family and peer:
- Confirms that the specified VRF is configured.
- For each specified peer:
- Verifies that the peer is found in the BGP configuration.
- Checks that the BGP session is in the
Established
state. - Confirms that the AFI/SAFI state is
negotiated
. - Ensures that both input and output TCP message queues are empty.
Can be disabled by setting
check_tcp_queues
toFalse
.
Expected Results
- Success: If all checks pass for all specified peers in all address families.
- Failure: If any of the following occur:
- The specified VRF is not configured.
- A specified peer is not found in the BGP configuration.
- The BGP session for a peer is not in the
Established
state. - The AFI/SAFI state is not
negotiated
for a peer. - Any TCP message queue (input or output) is not empty for a peer when
check_tcp_queues
isTrue
(default).
Examples
anta.tests.routing:
bgp:
- VerifyBGPSpecificPeers:
address_families:
- afi: "evpn"
peers:
- 10.1.0.1
- 10.1.0.2
- afi: "ipv4"
safi: "unicast"
peers:
- 10.1.254.1
- 10.1.255.0
- 10.1.255.2
- 10.1.255.4
Inputs¶
Name | Type | Description | Default |
---|---|---|---|
address_families |
list[BgpAddressFamily]
|
List of BGP address families.
|
- |
Source code in anta/tests/routing/bgp.py
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 |
|
VerifyBGPTimers ¶
Verifies the timers of BGP peers.
This test performs the following checks for each specified peer:
- Confirms that the specified VRF is configured.
- Verifies that the peer exists in the BGP configuration.
- Confirms the BGP session hold time/keepalive timers match the expected value.
Expected Results
- Success: If all of the following conditions are met:
- All specified peers are found in the BGP configuration.
- The hold time/keepalive timers match the expected value for each peer.
- Failure: If any of the following occur:
- A specified peer is not found in the BGP configuration.
- The hold time/keepalive timers do not match the expected value for a peer.
Examples
anta.tests.routing:
bgp:
- VerifyBGPTimers:
bgp_peers:
- peer_address: 172.30.11.1
vrf: default
hold_time: 180
keep_alive_time: 60
- peer_address: 172.30.11.5
vrf: default
hold_time: 180
keep_alive_time: 60
Source code in anta/tests/routing/bgp.py
882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 |
|
VerifyBgpRouteMaps ¶
Verifies BGP inbound and outbound route-maps of BGP IPv4 peer(s).
This test performs the following checks for each specified peer:
- Confirms that the specified VRF is configured.
- Verifies that the peer exists in the BGP configuration.
- Validates the correct BGP route maps are applied in the correct direction (inbound or outbound).
Expected Results
- Success: If all of the following conditions are met:
- All specified peers are found in the BGP configuration.
- All specified peers has correct BGP route maps are applied in the correct direction (inbound or outbound).
- Failure: If any of the following occur:
- A specified peer is not found in the BGP configuration.
- A incorrect or missing route map in either the inbound or outbound direction.
Examples
anta.tests.routing:
bgp:
- VerifyBgpRouteMaps:
bgp_peers:
- peer_address: 172.30.11.1
vrf: default
inbound_route_map: RM-MLAG-PEER-IN
outbound_route_map: RM-MLAG-PEER-OUT
Source code in anta/tests/routing/bgp.py
1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 |
|
VerifyEVPNType2Route ¶
Verifies the EVPN Type-2 routes for a given IPv4 or MAC address and VNI.
This test performs the following checks for each specified VXLAN endpoint:
- Verifies that the endpoint exists in the BGP EVPN table.
- Confirms that at least one EVPN Type-2 route with a valid and active path exists.
Expected Results
- Success: If all of the following conditions are met:
- All specified VXLAN endpoints are found in the BGP EVPN table.
- Each endpoint has at least one EVPN Type-2 route with a valid and active path.
- Failure: If any of the following occur:
- A VXLAN endpoint is not found in the BGP EVPN table.
- No EVPN Type-2 route with a valid and active path exists for an endpoint.
Examples
anta.tests.routing:
bgp:
- VerifyEVPNType2Route:
vxlan_endpoints:
- address: 192.168.20.102
vni: 10020
- address: aac1.ab5d.b41e
vni: 10010
Inputs¶
Name | Type | Description | Default |
---|---|---|---|
vxlan_endpoints |
list[VxlanEndpoint]
|
List of VXLAN endpoints to verify.
|
- |
Source code in anta/tests/routing/bgp.py
747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 |
|
Input models¶
BgpAddressFamily ¶
Model for a BGP address family.
Name | Type | Description | Default |
---|---|---|---|
afi |
Afi
|
BGP Address Family Identifier (AFI).
|
- |
safi |
Safi | None
|
BGP Subsequent Address Family Identifier (SAFI). Required when `afi` is `ipv4` or `ipv6`.
|
None
|
vrf |
str
|
Optional VRF when `afi` is `ipv4` or `ipv6`. Defaults to `default`.
If the input `afi` is NOT `ipv4` or `ipv6` (e.g. `evpn`, `vpn-ipv4`, etc.), the `vrf` must be `default`.
These AFIs operate at a global level and do not use the VRF concept in the same way as IPv4/IPv6.
|
'default'
|
num_peers |
PositiveInt | None
|
Number of expected established BGP peers with negotiated AFI/SAFI. Required field in the `VerifyBGPPeerCount` test.
|
None
|
peers |
list[IPv4Address | IPv6Address] | None
|
List of expected IPv4/IPv6 BGP peers supporting the AFI/SAFI. Required field in the `VerifyBGPSpecificPeers` test.
|
None
|
check_tcp_queues |
bool
|
Flag to check if the TCP session queues are empty for a BGP peer. Defaults to `True`.
Can be disabled in the `VerifyBGPPeersHealth` and `VerifyBGPSpecificPeers` tests.
|
True
|
check_peer_state |
bool
|
Flag to check if the peers are established with negotiated AFI/SAFI. Defaults to `False`.
Can be enabled in the `VerifyBGPPeerCount` tests.
|
False
|
validate_inputs ¶
validate_inputs() -> Self
Validate the inputs provided to the BgpAddressFamily class.
If afi
is either ipv4
or ipv6
, safi
must be provided.
If afi
is not ipv4
or ipv6
, safi
must NOT be provided and vrf
must be default
.
Source code in anta/input_models/routing/bgp.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
|
Source code in anta/input_models/routing/bgp.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 |
|
BgpNeighbor ¶
Alias for the BgpPeer model to maintain backward compatibility.
When initialised, it will emit a deprecation warning and call the BgpPeer model.
TODO: Remove this class in ANTA v2.0.0.
Source code in anta/input_models/routing/bgp.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
|
BgpPeer ¶
Model for a BGP peer.
Only IPv4 peers are supported for now.
Name | Type | Description | Default |
---|---|---|---|
peer_address |
IPv4Address
|
IPv4 address of the BGP peer.
|
- |
vrf |
str
|
Optional VRF for the BGP peer. Defaults to `default`.
|
'default'
|
advertised_routes |
list[IPv4Network] | None
|
List of advertised routes in CIDR format. Required field in the `VerifyBGPExchangedRoutes` test.
|
None
|
received_routes |
list[IPv4Network] | None
|
List of received routes in CIDR format. Required field in the `VerifyBGPExchangedRoutes` test.
|
None
|
capabilities |
list[MultiProtocolCaps] | None
|
List of BGP multiprotocol capabilities. Required field in the `VerifyBGPPeerMPCaps` test.
|
None
|
strict |
bool
|
If True, requires exact match of the provided BGP multiprotocol capabilities.
Optional field in the `VerifyBGPPeerMPCaps` test. Defaults to False.
|
False
|
hold_time |
int | None
|
BGP hold time in seconds. Required field in the `VerifyBGPTimers` test.
|
Field(default=None, ge=3, le=7200)
|
keep_alive_time |
int | None
|
BGP keepalive time in seconds. Required field in the `VerifyBGPTimers` test.
|
Field(default=None, ge=0, le=3600)
|
drop_stats |
list[BgpDropStats] | None
|
List of drop statistics to be verified.
Optional field in the `VerifyBGPPeerDropStats` test. If not provided, the test will verifies all drop statistics.
|
None
|
update_errors |
list[BgpUpdateError] | None
|
List of update error counters to be verified.
Optional field in the `VerifyBGPPeerUpdateErrors` test. If not provided, the test will verifies all the update error counters.
|
None
|
inbound_route_map |
str | None
|
Inbound route map applied, defaults to None. Required field in the `VerifyBgpRouteMaps` test.
|
None
|
outbound_route_map |
str | None
|
Outbound route map applied, defaults to None. Required field in the `VerifyBgpRouteMaps` test.
|
None
|
maximum_routes |
int | None
|
The maximum allowable number of BGP routes, `0` means unlimited. Required field in the `VerifyBGPPeerRouteLimit` test
|
Field(default=None, ge=0, le=4294967294)
|
warning_limit |
int | None
|
Optional maximum routes warning limit. If not provided, it defaults to `0` meaning no warning limit.
|
Field(default=None, ge=0, le=4294967294)
|
Source code in anta/input_models/routing/bgp.py
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
|
VxlanEndpoint ¶
Model for a VXLAN endpoint.
Name | Type | Description | Default |
---|---|---|---|
address |
IPv4Address | MacAddress
|
IPv4 or MAC address of the VXLAN endpoint.
|
- |
vni |
Vni
|
VNI of the VXLAN endpoint.
|
- |
Source code in anta/input_models/routing/bgp.py
199 200 201 202 203 204 205 206 207 208 209 |
|