|
| 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 |
0 commit comments