Skip to content

Commit e30a202

Browse files
daveruturajgemini-code-assist[bot]dplore
authored
README for DHCP Relay functionality (#4935)
* Create README.md Creating a README file to document dhcp relay testing test cases * Create README.md Creating a README.md for DHCP relay testing. * Update README.md DHCP relay tests cases are submitted. * Delete feature/dhcp/dhcp_relay/otg_tests/dhcp_relay_test/README.md removing the old readme from the incorrect location. * Update README.md Removed the reference of ate port 4. * Update feature/relay-agent/otg_tests/relay_agent_test/README.md Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * Update testregistry.textproto Updated testregistry.textproto with DHCP relay test readme. * Update README.md Updated the readme with the suggestions. * Update README.md Updated the diagram. * Update feature/relay-agent/otg_tests/relay_agent_test/README.md Co-authored-by: Darren Loher <dloher@google.com> * Update README.md with the suggestions. Used RFC 5737 addressing schema and removed non related jason paths. * Update README.md with the correct test number. The test description didn't have the test number as per the standard format. With the change, it is fixed. * Update README.md with correct structuring. Updated the readme according to the repository's contribution guidelines. * Update testregistry.textproto with correct test id Updated the test registry with the correct test id. * change the directory name to remove - in the name. change directory from relay-agent to relay_agent * Update testregistry.textproto change the path * Update README.md with updated canonical path Update README.md with updated canonical path * Update README.md updated with new canonical paths * Update README.md fixed the error in canonical path Update README.md fixed the error in canonical path * Update README.md - fix relay-agent in canonical path Update README.md - fix relay-agent in canonical path * Update README.md with another set of canonical path Update README.md with another set of canonical path * Create metadata.textproto Create metadata.textproto * Update metadata.textproto with new descriptions. Update metadata.textproto with new descriptions. * Rename feature/relay_agent/otg_tests/relay_agent_test/README.md to feature/interface/helper-address/otg_tests/relay_agent_test/README.md Moved the file to feature/interface/helper-address/otg_tests/relay_agent_test/README.md * Apply suggestion from @dplore Co-authored-by: Darren Loher <dloher@google.com> * Updated the README path name to replace - with _ Modify the path name of the README.md and replace directory from helpder-address with helper_address. * Update testregistry.textproto updated the incorrectly removed test cases back. * Update testregistry.textproto by fixing the incorrect exec line. Update testregistry.textproto by fixing the incorrect exec line. * Update and rename feature/relay_agent/otg_tests/relay_agent_test/metadata.textproto to feature/interface/helper_address/otg_tests/relay_agent_test/metadata.textproto Modify the location of metadata.textproto from feature/interface/helper_address/otg_tests/relay_agent_test/ to feature/interface/helper_address/otg_tests/relay_agent_test/ --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Darren Loher <dloher@google.com>
1 parent 85db696 commit e30a202

File tree

3 files changed

+154
-0
lines changed

3 files changed

+154
-0
lines changed
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# RELAY-1.1: DHCP Relay functionality
2+
3+
## Summary
4+
5+
This is to validate the DHCP relay functionality on a DUT. The test validates the following actions -
6+
7+
* DUT receives the IPv4/IPv6 DHCP discovery message over an individual or a LAG port and it will forward the request to the DHCP helper address.
8+
* DUT forwards DHCP exchange messages between the DHCP Client and DHCP server.
9+
* The DHCP client receives a DHCP address.
10+
11+
## Testbed Type
12+
13+
* [`featureprofiles/topologies/atedut_4.testbed`](https://github.com/openconfig/featureprofiles/blob/main/topologies/atedut_4.testbed)
14+
15+
## Procedure
16+
17+
### Test environment setup
18+
19+
```mermaid
20+
graph LR;
21+
A[ATE:Port1] --(Vlan 10)-->B[Port1:DUT:Port3];B --Egress-->C[Port3:ATE];
22+
```
23+
24+
```
25+
---------
26+
| |
27+
[ ATE:Port1, ATE:Port2 ] ==== LAG (VLAN 10)=== | DUT |----Egress---[ ATE:Port3 ]
28+
| |
29+
| |
30+
---------
31+
```
32+
33+
* Connect ports DUT:Ports[1-3] to ports ATE:Ports[1-3]
34+
* Simulate a scenario of having a DHCP server is behind ATE:Port[3]
35+
* DUT:Port[3] IPv4 address = 192.0.2.0/31
36+
* DUT:Port[3] IPv6 address = 2001:db8:a::0/127
37+
38+
### Configuration
39+
40+
* Configure VLAN 10 on DUT.
41+
* Have DUT:Port[1] and DUT:Port[2] be a part of vlan 10
42+
* VLAN10 interface IPv4 address: 192.0.2.33/27
43+
* VLAN10 interface IPv6 address: 2001:db8:a:1::1/64
44+
* Configure IPv4 and IPv6 helper address under VLAN10 interface.
45+
* IPv4 helper address - 192.0.2.254
46+
* IPv6 dhcp relay destination address : 2001:db8:a:2::1
47+
* Configure IPv4 default route on the DUT pointing to ATE:Port[3] IPv4 address.
48+
* Configure IPv6 default route on the DUT pointing to ATE:Port[3] IPv6 address.
49+
50+
51+
### RELAY-1.1.1 DHCP request on an individual port
52+
53+
* Step 1 - Have ATE:Port[1] as an individual port and act as a DHCP client.
54+
* Step 2 - Send IPv4 and IPv6 DHCP request (Discover message) from ATE:Port[1].
55+
56+
**Verify that:**
57+
58+
* The DUT:Port[1] receives the DHCP request and forwards it to the helper IPv4 and IPv6 addresses respectively.
59+
* The ATE:Port[1] can successfully obtain an IPv4 address that is a part of the subnet 192.0.2.32/27 with the default gateway set to 192.0.2.33.
60+
* The ATE:Port[1] can successfully obtain an IPv6 address that is a part of the subnet 2001:db8:a:1::/64 with the default gateway set to 2001:db8:a:1::1.
61+
62+
63+
### RELAY-1.1.2 DHCP request on a lag port
64+
65+
* Step 1 - DUT:Port[1] and DUT:Port[2] are configured as a LACP LAG (LAG1) port to ATE:Port[1] and ATE:Port[2] respectively.
66+
* Step 2 - Send IPv4 and IPv6 DHCP request (Discover message) from ATE:Port[1].
67+
68+
**Verify that:**
69+
70+
* The DUT:Port[1] receives the DHCP request and forwards it to the helper IPv4 and IPv6 addresses respectively.
71+
* The ATE:Port[1] can successfully obtain an IPv4 address that is a part of the subnet 192.0.2.32/27 with the default gateway set to 192.0.2.33.
72+
* The ATE:Port[1] can successfully obtain an IPv6 address that is a part of the subnet 2001:db8:a:1::/64 with the default gateway set to 2001:db8:a:1::1.
73+
74+
#### Canonical OC
75+
76+
```json
77+
{
78+
"openconfig-relay-agent:relay-agent": {
79+
"dhcp": {
80+
"interfaces": {
81+
"interface": [
82+
{
83+
"id": "Vlan10",
84+
"config": {
85+
"id": "Vlan10",
86+
"helper-address": [
87+
"192.0.2.254",
88+
"2001:db8:a:2::1"
89+
]
90+
},
91+
"state": {
92+
"id": "Vlan10"
93+
}
94+
}
95+
]
96+
}
97+
}
98+
}
99+
}
100+
```
101+
102+
## OpenConfig Path and RPC Coverage
103+
104+
```yaml
105+
paths:
106+
107+
## Config Paths ##
108+
109+
/relay-agent/dhcp/interfaces/interface[id=Vlan10]/config/id:
110+
/relay-agent/dhcp/interfaces/interface[id=Vlan10]/ipv4/config/helper-address:
111+
/relay-agent/dhcp/interfaces/interface[id=Vlan10]/ipv6/config/helper-address:
112+
113+
## State Paths ##
114+
115+
116+
/relay-agent/dhcp/interfaces/interface/ipv4/state/helper-address:
117+
/relay-agent/dhcp/interfaces/interface/ipv6/state/helper-address:
118+
119+
rpcs:
120+
gnmi:
121+
gNMI.Set:
122+
union_replace: true
123+
replace: true
124+
gNMI.Subscribe:
125+
on_change: true
126+
127+
```
128+
129+
## Required DUT platform
130+
131+
* Specify the minimum DUT-type:
132+
* FFF - Fixed Form Factor
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# proto-file: github.com/openconfig/featureprofiles/proto/metadata.proto
2+
# proto-message: Metadata
3+
4+
uuid: "4f1bebd9-c0af-4d28-a041-f95b3816f354"
5+
plan_id: "RELAY-1.1"
6+
description: "DHCP Relay functionality"
7+
testbed: TESTBED_DUT_ATE_4LINKS
8+
platform_exceptions: {
9+
platform: {
10+
vendor: ARISTA
11+
}
12+
deviations: {
13+
interface_enabled: true
14+
default_network_instance: "default"
15+
}
16+
}

testregistry.textproto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,12 @@ test: {
647647
readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/platform/tests/interface_parent_component/README.md"
648648
exec: " "
649649
}
650+
test: {
651+
id: "RELAY-1.1"
652+
description: "DHCP Relay functionality"
653+
readme: "https://github.com/openconfig/featureprofiles/blob/main/feature/interface/helper_address/otg_tests/relay_agent_test/README.md"
654+
exec: " "
655+
}
650656
test: {
651657
id: "RT-1.2"
652658
description: "BGP Policy & Route Installation"

0 commit comments

Comments
 (0)