Export Tests for IDRP in GateD
Theory for these tests
Export testing is based upon these aspects:
- static routes can generate with certain IDRP path attributes
- import statements can filter on rdi attributes
RDPATH attributes, local interface, policy attributes
in creating the active list for export to filter.
- The export can filter on any combination of
rdi attributes rdpath,
local interface, call returns the proper gated and IDRP preferences.
The export tests use 2,3, and 4 systems with mixtures of internal
and external peers.
Local Route Generation
The local route generation has three variables:
generate from static, import, export.
Each has a place to filter. What happens if the route:
- route generated form static, not imported, export allowed
- reconfig with static, import, and no export
- reconfig with static, import, and export
Assumptions for Tests
All tests assume that routing tables are clean upon startup.
Export filter Tests - Top Level Match Conditions
Group 1
Basic RDI (ADVFT_RDI) 2 machine tests
The "top-level" match conditions (no ADVFT_PS tests; in the
parser, this means that "idrp_export_optional_info" is empty):
External Peer Tests with Delta routes
- Test 1
- External peers, no route passage (restrict)
- Test 2
- External peers, all route passed (all)
- Test 3
- External peers, some route passed (nlri & all)
- Test 4
- External peers, selected route passed (nlri & all restrict)
External Peer Tests with Rib Refresh
- Test 5 (Test 1 with rib refresh)
- Test 6 (Test 2 with rib refresh)
- Test 7 (Test 3 with rib refresh)
- Test 8 (Test 4 with rib refresh)
Internal Peer Tests with Delta routes
- Test 9 Internal peers and no route passage
- Test 10 Internal peers and all route passed
- Test 11 Internal peers & some routes pass (nlri passed, all restricted )
- Test 12 Internal peers and some selected route passed (nlri restricted)
Internal Peer Tests with Rib Refresh
Group 2
Basic RDI tests with metric
Repeat tests 1-12 with
- metric set on export clause
export proto idrp rdi rdi-of-B metric value1
{
...
};
Expected Results
Routing tables as for original tests. Gated and/or IDRP preferences for *all* exported
routes will be set as specified in the export stanza.
Group 3
Basic RDI with rdi set to any
Repeat tests 1-16 with export clauses with rdi = any on Machine A and
Machine B.
Group 4
Basic RDI (ADVFT_RDI) Multi-machine tests
The tests 1-16 under specified above can be repeated with following topological variants
specified in the Basic IDRP testing document. These multiple machine tests
for export are listed below.
The RD_PATH tests need to test the setting of preference based on a RDPATH. Source routes will
be included for distribution based on their RDPATH setting.
Group 1 of the 2-machine RD_PATH test include 2 external peers with Delta routes
- Test 1 rdpath all
- Test 2 rdpath one rdi exported
- Test 3 rdpath two rdi paths exported
- Test 4 1st RD allowing the RD_PATH exported,
2nd RD blocked
Group 2 of the 2-machine RD_PATH test repeats 1-4 include 2 external peers using
Rib Refresh (tests 5-8)
Group 3 of the 2-machine RD_PATH test repeats 1-4 include 2 internal peers using
delta routes(tests 9-12)
Group 3 of the 2-machine RD_PATH test repeats 1-4 include 2 internal peers using
Rib Refresh (tests 13-16)
RD_PATH (ADVFT_RDPATH) multiple node tests
3 Node tests
Try in all layouts of the 3 node.
- Group 1 - 3 External peers with Delta routes
- Test 1: Deny all route passage via export
- Test 2: Allow via one 1 path, deny others
- Test 3: Allow via one 2 paths, deny others
- Test 4: Allow via one 3 paths, deny others
- Test 5: Prefer 1 path over others (allow all)
- Test 6: Prefer 1 path over others, allow only some
- Group 2 - 3 External peers with Rib Refresh (repeat tests 1-6 in Group 1)
[Tests 7-12]
- Group 3 - 3 External peers with Delta routes (repeat test 1-6 in Group 1)
[Tests 13-18]
- Group 4 - 3 Internal peers with Rib Refresh (repeat tests 1-6 in Group 1)
[Tests 19-24]
4 Node tests
- Group 1 - 4 External peers with Delta routes
- Test 1: Deny all route passage via export
- Test 2: Allow via one 1 path, deny others
- Test 3: Allow via one 2 paths, deny others
- Test 4: Allow via one 3 paths, deny others
- Test 5: Allow via one 4 paths, deny others
- Test 6: Prefer 1 path over others (allow all)
- Test 7: Prefer 1 path over others, allow only some
- Group 2 - 4 External peers with Rib Refresh (repeat tests 1-7 in Group 1)
[Tests 8-14]
- Group 3 - 4 External peers with Delta routes (repeat test 1-7 in Group 1)
[Tests 15-21]
- Group 4 - 4 Internal peers with Rib Refresh (repeat tests 1-7 in Group 1)
[Tests 12-28]
Extended match conditions (ADVFT_PS) Tests
The extended match condition tests are invoked by the idrp-ps-policy-att
clauses in the import statement.
export proto idrp rdi 0x490137
idrp-ps-policy-atts
{
idrp pathway policy filter statements
}
};
export proto idrp rdi 0x490137 local-interface 192.48.60.1
idrp-ps-policy-atts
{
idrp pathway policy filter statements
}
The extended match tests will involve testing each of the clauses below to see that static, or
route imported from idrp can be imported or rejected based on the policy.
This clause modifies the idrp path attribute received to another
attribute for export. This is a MERIT function.
This clause is defined for general use on export.
Import example
import proto idrp rdi 0x490130
idrp-ps-att
{
(policy-statments)
}
Example on export
export proto idrp rdi 0x490130
idrp-ps-att
{
(policy-statments)
}
{
proto idrp rdi 0x490129;
{
all;
}
}