Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding test cases for indirect next hops. #3659

Open
wants to merge 50 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
cff9734
adding a new id by sudhin
sudhinj Oct 7, 2024
e755346
adding aft
sudhinj Oct 7, 2024
e66be74
removing files
sudhinj Oct 7, 2024
f1c90b7
adding readme
sudhinj Oct 7, 2024
d6f52a7
adding test cases
sudhinj Oct 10, 2024
be46d35
modify
sudhinj Oct 10, 2024
d7d7481
Merge branch 'openconfig:main' into main
sudhinj Oct 10, 2024
6f1c043
removing faulty oc
sudhinj Oct 10, 2024
ce1275b
adding test cases for prefix counters
sudhinj Oct 10, 2024
910c66b
adding test case numbers
sudhinj Oct 10, 2024
5f47ede
updating the changes
sudhinj Oct 16, 2024
4408124
adding comments for pull request
sudhinj Oct 16, 2024
a08b48f
Merge branch 'main' into main
sudhinj Oct 16, 2024
b609c03
added comments
sudhinj Oct 22, 2024
cc42810
Merge branch 'main' of github.com:sudhinj/featureprofiles
sudhinj Oct 22, 2024
fc255ee
Merge branch 'openconfig:main' into main
sudhinj Oct 22, 2024
e37574e
Merge branch 'openconfig:main' into main
sudhinj Oct 29, 2024
e476a0a
adding the comments
sudhinj Oct 29, 2024
d89eb06
Merge branch 'main' of github.com:sudhinj/featureprofiles
sudhinj Oct 29, 2024
8447245
adding the comments
sudhinj Oct 29, 2024
5596464
adding the comments
sudhinj Oct 29, 2024
e32c54d
adding the comments
sudhinj Oct 29, 2024
a7311d0
adding the comments
sudhinj Oct 29, 2024
d124fc3
adding the comments
sudhinj Oct 29, 2024
8e00c94
latest updates
sudhinj Oct 30, 2024
f6f8591
adding test bed topology
sudhinj Nov 12, 2024
8ef4a58
adding test bed topology
sudhinj Nov 12, 2024
e8c73df
adding scale test multi protocol dual stack for aft summary
sudhinj Nov 12, 2024
dce47ea
corrections
sudhinj Nov 12, 2024
493902d
add
sudhinj Nov 12, 2024
5f886d4
add
sudhinj Nov 12, 2024
c59fa14
fix
sudhinj Nov 12, 2024
630d308
fix
sudhinj Nov 12, 2024
d0fcf93
new
sudhinj Nov 12, 2024
a7c89ae
new fix
sudhinj Nov 12, 2024
8712872
new fix
sudhinj Nov 12, 2024
44ad581
changes
sudhinj Nov 15, 2024
4bba7f5
correction folder
sudhinj Nov 15, 2024
79b29ff
folder name change
sudhinj Nov 15, 2024
69029ad
adding indirect next hop cases
sudhinj Dec 18, 2024
00e19b1
new
sudhinj Dec 18, 2024
ddb8d70
new files
sudhinj Dec 18, 2024
ef5b393
Update README.md
sudhinj Dec 18, 2024
abb4bea
new files
sudhinj Dec 18, 2024
0794030
new files
sudhinj Dec 18, 2024
8a76473
adding
sudhinj Dec 18, 2024
062a61c
removing protocols unused
sudhinj Dec 19, 2024
42f5640
Merge branch 'openconfig:main' into main
sudhinj Dec 19, 2024
d40c4c4
new
sudhinj Dec 19, 2024
bfe37ee
Merge branch 'main' into main
sudhinj Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 15 additions & 23 deletions feature/aft/aft_base/otg_tests/afts_base/README.md
sudhinj marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,18 @@ IPv4/IPv6 unicast routes next hop group and next hop.
Configure DUT:port1,port2,port3 for IS-IS session with ATE:port1,port2,port3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to specify how to configure the addressing in this README -- since if you're expecting multiple BGP NHs, how does the DUT resolve these?

* IS-IS must be level 2 only with wide metric.
* IS-IS must be point to point.
* Send 1000 ipv4 and 1000 ipv6 IS-IS prefixes from ATE:port3 to DUT:port3.
* Send 100 ipv4 and 100 ipv6 prefixes from ATE:port1 to DUT:port1.
sudhinj marked this conversation as resolved.
Show resolved Hide resolved


Establish eBGP sessions between ATE:port1,port2 and DUT:port1,port2 and another between ATE:port3 and DUT:port3.
* Configure eBGP over the interface ip.
* eBGP must be multipath.
* Advertise 1000 ipv4,ipv6 prefixes from ATE port1,port2 observe received prefixes at DUT.
Comment on lines 21 to -24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why we need this scale for a base test? It seems like we're testing more than just than just base AFT exports work correctly here. Please consider breaking this test down into:

  • IS-IS installed route appears correctly in AFT
  • BGP installed route appears correctly in AFT
  • BGP installed route with IS-IS next-hop installed route appears correctly in AFT
  • BGP installed route that resolves to a BGP installed route that resolves to IS-IS appears correctly in AFT
  • BGP installed route that has multiple next-hops appears correctly in AFT

There can be signficant code sharing between these, but this will give you the "base" functionality that ensures that the right AFT exports are happening. Some of these could be added as test cases within BGP and IS-IS -- please discuss with @rohit-rp.

We can then start to say, "OK test negative cases":

  • DUT has a link fail
  • DUT has a BGP session fail
  • DUT has an IS-IS adjacency go away
  • ...

We can then start to say, "OK, introduce scale" and add test cases that validate:

  • DUT has XXX IS-IS routes injected, validate AFT entries.
  • DUT has YYY BGP routes injected, validate AFT entries.
  • DUT has XXX IS-IS and YYY BGP routes injected, validate AFT entries.

And then inject churn:

  • Device has a period of churn -- validate that after this device converges to expected state.

This way -- you know that the base export works as you expect and we test the contract there, then we know that the scale is OK in steady state, and then we start to introduce scale+churn to validate these together. The last cases are more complex and fragile than the first, but we don't want them to break because of functional gaps -- so the former cases help us validate that (and encode the contract in code).

* Configure eBGP over the interface ip between ATE:port1,port2 and DUT:port1,port2.
* Configure eBGP over multihop between ATE:port3 and DUT:port3.
sudhinj marked this conversation as resolved.
Show resolved Hide resolved
* eBGP must be multipath on ATE:port1,port2 and multihop on ATE:port3.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this mean? We need to specify the routes that are going to be advertised over this session if we expect that this is multi-path -- since I assume that you mean some prefix must be resolved to >1 BGP NH?

* Advertise 100 ipv4,ipv6 prefixes from ATE port1,port2 observe received prefixes at DUT.
sudhinj marked this conversation as resolved.
Show resolved Hide resolved
* Validate total number of entries of AFT for IPv4 and IPv6.
* Each prefix must have 2 next hops pointing to ATE port1,port2.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear why in this test case this is true -- this is why we need to spell out the topology more clearly.

* Advertise 100 ipv4,ipv6 from ATE port3 observe received prefixes at DUT.

Establish RSVP Sessions between ATE:port3 and SUT:port3.
* Configure mpls and rsvp sessions.
* Configure 2 ingress TE tunnels from DUT:port3 to ATE:port3.
* Tunnel destination is interface ip of ATE:port3.
* Configure explicit null and ipv6 tunneling.
* BGP advertised routes from ATE:port3 must be pointing to the 2 tunnels in the DUT.
* Each prefix must have 1 next hop pointing to BGP neighbour ip.

### Procedure

Expand All @@ -41,8 +36,7 @@ Establish RSVP Sessions between ATE:port3 and SUT:port3.
### Verifications

* BGP route advertised from ATE:port1,port2 must have 2 nexthops.
* IS-IS route advertised from ATE:port3 must have one next hop.
* BGP route advertised from ATE:port3 must have 2 next hops pointing to tunnels.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not define what "tunnels" are -- and you removed the RSVP-TE config (which I agree with). Can we update the rest of the README to reflect this?

* BGP route advertised from ATE:port3 must have next hop pointing towards BGP neigbour ip.
* Use gnmi Subscribe with ON_CHANGE option to /network-instances/network-instance/afts.
* For verifying prefix, nexthop groups, next hop use the leaves mentioed in the path section.
* Verify afts prefix advertised by BGP,ISIS.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please expand on this "verify" -- does this mean we check that the AFT prefixes are exactly what was injected?

Especially for "verify all other leaves mentioned in the path section", this seems very ambiguous. Please consider writing this README as though you are trying to plan what code you're going to write. We don't need to enumerate exactly the check in prose, but we do need to define the correctness criteria.

Expand All @@ -60,8 +54,8 @@ Bring down the link between ATE:port2 and DUT:port2 using OTG api.
### Verifications

* BGP routes advertised from ATE:port1,port2 must have 1 nexthop.
* IS-IS routes advertised from ATE:port3 must have one next hop.
* BGP routes advertised from ATE:port3 must have 2 next hops pointing to tunnels.
* IS-IS routes advertised from ATE:port1 must have one next hop.
* BGP route advertised from ATE:port3 must have next hop pointing towards BGP neigbour ip.
* For verifying prefix, nexthop groups, next hop use the leaves mentioed in the path section.
* Verify afts prefix advertised by BGP,ISIS.
* Verify its next hop group, number of next hop and its interfaces.
Expand All @@ -76,8 +70,8 @@ Bring down both links between ATE:port1,port2 and DUT:port1,port2 using OTG api.
### Verifications

* BGP routes advertised from ATE:port1,port2 must be removed from RIB,FIB of the DUT, query results nil.
* IS-IS routes advertised from ATE:port3 must have one next hop.
* BGP routes advertised from ATE:port3 must have 2 next hops pointing to tunnels.
* IS-IS routes advertised from ATE:port1 must have one next hop.
* BGP route advertised from ATE:port3 must have next hop pointing towards BGP neigbour ip.
* For verifying prefix, nexthop groups, next hop use the leaves mentioed in the path section.
* Verify afts prefix advertised by BGP,ISIS.
* Verify its next hop group, number of next hop and its interfaces.
sudhinj marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -92,8 +86,8 @@ Bring up link between ATE:port1 and DUT:port1 using OTG api.
### Verifications

* BGP routes advertised from ATE:port1,port2 must have one next hop.
* IS-IS routes advertised from ATE:port3 must have one next hop.
* BGP routes advertised from ATE:port3 must have 2 next hops pointing to tunnels.
* IS-IS routes advertised from ATE:port1 must have one next hop.
* BGP route advertised from ATE:port3 must have next hop pointing towards BGP neigbour ip.
* Verify afts prefix advertised by BGP,ISIS.
* For verifying prefix, nexthop groups, next hop use the leaves mentioed in the path section.
* Verify its next hop group, number of next hop and its interfaces.
Expand All @@ -108,8 +102,8 @@ Bring up both link between ATE:port1,port2 and DUT:port1,port2 using OTG api.
### Verifications

* BGP routes advertised from ATE:port1,port2 must have 2 next hops.
sudhinj marked this conversation as resolved.
Show resolved Hide resolved
* IS-IS routes advertised from ATE:port3 must have one next hop.
* BGP routes advertised from ATE:port3 must have 2 next hops pointing to tunnels.
* IS-IS routes advertised from ATE:port1 must have one next hop.
* BGP route advertised from ATE:port3 must have next hop pointing towards BGP neigbour ip.
* For verifying prefix, nexthop groups, next hop use the leaves mentioed in the path section.
* Verify afts prefix advertised by BGP,ISIS.
* Verify its next hop group, number of next hop and its interfaces.
Expand Down Expand Up @@ -169,8 +163,6 @@ rpcs:

BGP
IS-IS
RSVP
MPLS

## Minimum DUT Platform Requirement

Expand Down
Loading