Skip to content

Commit

Permalink
RT-1.26 Basic Static Route Test - Implementation (openconfig#2536)
Browse files Browse the repository at this point in the history
* RT-1.26 Basic Static Route Test - Implementation

* Fix README

* Fix places where Static Route Cfg is being used
  • Loading branch information
Ankur19 authored Jan 10, 2024
1 parent 8976e96 commit 1c09635
Show file tree
Hide file tree
Showing 6 changed files with 1,089 additions and 51 deletions.
6 changes: 3 additions & 3 deletions feature/sflow/otg_tests/sflow_base_test/sflow_base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ const (

var (
staticRoute = &cfgplugins.StaticRouteCfg{
NIName: "DEFAULT",
Prefix: "192.0.2.128/30",
Nexthop: "192.0.2.6",
NetworkInstance: "DEFAULT",
Prefix: "192.0.2.128/30",
NextHops: map[string]string{"0": "192.0.2.6"},
}
dutSrc = &attrs.Attributes{
Desc: "DUT to ATE source",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,41 +19,41 @@
* Connect DUT port-1, port-2 and port-3 to ATE port-1, port-2 and port-3
respectively
* Configure IPv4/IPv6 addresses on DUT and ATE the interfaces
* Configure one IPv4 destination i.e. `ipv4-network = 192.168.10.0/24`
* Configure one IPv4 destination i.e. `ipv4-network = 203.0.113.0/24`
connected to ATE port 1 and 2
* Configure one IPv6 destination i.e. `ipv6-network = 2024:db8:128:128::/64`
* Configure one IPv6 destination i.e. `ipv6-network = 2001:db8:128:128::/64`
connected to ATE port 1 and 2

### RT-1.26.1 [TODO: https://github.com/openconfig/featureprofiles/issues/2489]
### RT-1.26.1

#### Test to validate static route ECMP

* Configure IPv4 static routes:
* Configure one IPv4 static route i.e. ipv4-route-a on the DUT for
destination `ipv4-network 192.168.10.0/24` with the next hop set to the
destination `ipv4-network 203.0.113.0/24` with the next hop set to the
IPv4 address of ATE port-1
* Configure another IPv4 static route i.e. ipv4-route-b on the DUT for
destination `ipv4-network 192.168.10.0/24` with the next hop set to the
destination `ipv4-network 203.0.113.0/24` with the next hop set to the
IPv4 address of ATE port-2
* Validate both the routes i.e. ipv4-route-[a|b] are configured and reported
correctly
* /network-instances/network-instance/protocols/protocol/static-routes/static/prefix
* Configure IPv6 static routes:
* Configure one IPv6 static route i.e. ipv6-route-a on the DUT for
destination `ipv6-network 2024:db8:128:128::/64` with the next hop set
destination `ipv6-network 2001:db8:128:128::/64` with the next hop set
to the IPv6 address of ATE port-1
* Configure another IPv6 static route i.e. ipv6-route-b on the DUT for
destination `ipv6-network 2024:db8:128:128::/64` with the next hop set
destination `ipv6-network 2001:db8:128:128::/64` with the next hop set
to the IPv6 address of ATE port-2
* Validate both the routes i.e. ipv6-route-[a|b] sre configured and reported
* Validate both the routes i.e. ipv6-route-[a|b] are configured and reported
correctly
* /network-instances/network-instance/protocols/protocol/static-routes/static/prefix
* Initiate traffic from ATE port-3 towards destination `ipv4-network
192.168.10.0/24` and `ipv6-network 2024:db8:128:128::/64`
203.0.113.0/24` and `ipv6-network 2001:db8:128:128::/64`
* Validate that traffic is received from DUT on both port-1 and port-2 and
ECMP works

### RT-1.26.2 [TODO: https://github.com/openconfig/featureprofiles/issues/2489]
### RT-1.26.2

#### Test to validate static route metric

Expand All @@ -62,31 +62,31 @@
* Validate that the metric is set correctly
* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/state/metric
* Initiate traffic from ATE port-3 towards destination `ipv4-network
192.168.10.0/24` and `ipv6-network 2024:db8:128:128::/64`
203.0.113.0/24` and `ipv6-network 2001:db8:128:128::/64`
* Validate that traffic is received from DUT on port-1 and not on port-2

### RT-1.26.3 [TODO: https://github.com/openconfig/featureprofiles/issues/2489]
### RT-1.26.3

#### Test to validate static route prefrence
#### Test to validate static route preference

* Configure preference of ipv4-route-a and ipv6-route-a to 200
* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/preference
* Validate that the preference is set correctly
* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/state/preference
* Initiate traffic from ATE port-3 towards destination `ipv4-network
192.168.10.0/24` and `ipv6-network 2024:db8:128:128::/64`
203.0.113.0/24` and `ipv6-network 2001:db8:128:128::/64`
* Validate that traffic is now received from DUT on port-2 and not on port-1

### RT-1.26.4 [TODO: https://github.com/openconfig/featureprofiles/issues/2489]
### RT-1.26.4

#### Test to validate static route tag

* Configure a tag of value 10 on ipv4-route-a and ipv6-route-a
* Configure a tag of value 10 on ipv4 and ipv6 static routes
* /network-instances/network-instance/protocols/protocol/static-routes/static/config/set-tag
* Validate the tag is set
* /network-instances/network-instance/protocols/protocol/static-routes/static/state/set-tag

### RT-1.26.5 [TODO: https://github.com/openconfig/featureprofiles/issues/2489]
### RT-1.26.5

#### Test to validate IPv6 static route with IPv4 next-hop

Expand All @@ -103,11 +103,11 @@
* /network-instances/network-instance/protocols/protocol/static-routes/static/prefix
* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/next-hop
* Initiate traffic from ATE port-3 towards destination `ipv6-network
2024:db8:128:128::/64`
2001:db8:128:128::/64`
* Validate that traffic is received from DUT on both port-1 and port-2 and
ECMP works

### RT-1.26.6 [TODO: https://github.com/openconfig/featureprofiles/issues/2489]
### RT-1.26.6

#### Test to validate IPv4 static route with IPv6 next-hop

Expand All @@ -120,41 +120,40 @@
* /network-instances/network-instance/protocols/protocol/static-routes/static/prefix
* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/next-hop
* Initiate traffic from ATE port-3 towards destination `ipv4-network
192.168.10.0/24`
203.0.113.0/24`
* Validate that traffic is received from DUT on both port-1 and port-2 and
ECMP works

### RT-1.26.7 [TODO: https://github.com/openconfig/featureprofiles/issues/2489]
### RT-1.26.7

#### Test to validate disabling of recursive next-hop resolution

* Remove the ipv4-route-[a|b] and ipv6-route-[a|b] static routes
* Configure ipv4 and ipv6 ISIS between ATE port-1 <-> DUT port-1 and ATE
port-2 <-> DUT port2
* /network-instances/network-instance/protocols/protocol/isis/global/afi-safi
* Configure one IPv4 /32 host route i.e. `ipv4-loopback = 192.168.100.100/32`
* Configure one IPv4 /32 host route i.e. `ipv4-loopback = 198.51.100.100/32`
connected to ATE and advertised to DUT through both the IPv4 ISIS
adjacencies
* Configure one IPv6 /128 host route i.e. `ipv6-loopback =
2023:ab1:64:64::1/128` connected to ATE and advertised to DUT through both
2001:db8::64:64::1/128` connected to ATE and advertised to DUT through both
the IPv6 ISIS adjacencies
* Configure one IPv4 static route i.e. ipv4-route on the DUT for destination
`ipv4-network 192.168.10.0/24` with the next hop of `ipv4-loopback
192.168.100.100/32`
`ipv4-network 203.0.113.0/24` with the next hop of `ipv4-loopback
198.51.100.100/32`. Remove all other existing next hops for the route.
* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/next-hop
* Configure one IPv6 static route i.e. ipv6-route on the DUT for destination
`ipv6-network 2024:db8:128:128::/64` with the next hop of `ipv6-loopback =
2023:ab1:64:64::1/128`
`ipv6-network 2001:db8:128:128::/64` with the next hop of `ipv6-loopback =
2001:db8::64:64::1/128`. Remove all other existing next hops for the route.
* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/next-hop
* Initiate traffic from ATE port-3 towards destination `ipv4-network
192.168.10.0/24` and `ipv6-network 2024:db8:128:128::/64`
* Validate that traffic is received from DUT (doesnt matter which port)
203.0.113.0/24` and `ipv6-network 2001:db8:128:128::/64`
* Validate that traffic is received from DUT (doesn't matter which port)
* Disable static route next-hop recursive lookup (set to false)
* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/config/recurse
* Validate static route next-hop recursive lookup is disabled
* /network-instances/network-instance/protocols/protocol/static-routes/static/next-hops/next-hop/state/recurse
* Initiate traffic from ATE port-3 towards destination `ipv4-network
192.168.10.0/24` and `ipv6-network 2024:db8:128:128::/64`
203.0.113.0/24` and `ipv6-network 2001:db8:128:128::/64`
* Validate that traffic is NOT received from DUT

## Config parameter coverage
Expand Down Expand Up @@ -187,4 +186,3 @@
## Required DUT platform

* FFF

Loading

0 comments on commit 1c09635

Please sign in to comment.