From 7f46964056a1d311759d85cdc4ab7d8e029cbfe2 Mon Sep 17 00:00:00 2001 From: kellyyeh <42761586+kellyyeh@users.noreply.github.com> Date: Thu, 8 Dec 2022 15:27:48 -0800 Subject: [PATCH] Address PR comments --- .../DHCPv6-relay-agent-High-Level-Design.md | 49 +++++++++++++++++-- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/doc/DHCPv6_relay/DHCPv6-relay-agent-High-Level-Design.md b/doc/DHCPv6_relay/DHCPv6-relay-agent-High-Level-Design.md index 6eecffdfd10..126a26dd99b 100644 --- a/doc/DHCPv6_relay/DHCPv6-relay-agent-High-Level-Design.md +++ b/doc/DHCPv6_relay/DHCPv6-relay-agent-High-Level-Design.md @@ -19,6 +19,8 @@ - [CONFIG DB schema](#config-db-schema) - [YANG Model schema](#yang-model-schema) - [Option 79 for client link-layer address](#option-79-for-client-link-layer-address) + - [Option 18 for Interface-ID](#option-18-for-interface-id) + - [Config Update](#config-update) - [Option for Dual ToR](#option-for-dual-tor) - [Feature table](#feature-table) - [RADV modification](#radv-modification) @@ -167,6 +169,20 @@ RELAY-REPLY DHCP|intf-i|dhcpv6_servers: ["dhcp-server-0", "dhcp-server-1", ...., "dhcp-server-n-1"] DHCP|intf-i|dhcpv6_option|rfc6939_support: "true" + +DHCP|intf-i|dhcpv6_option|interface_id: "true" + + +
+{
+        "DHCP_RELAY" :{
+                "Vlan100" : {
+                        "dhcpv6_servers" : ["fc02:2000::2"]
+			"dhcpv6_option|rfc6939_support" : "true"
+			"dhcpv6_option|interface_id" : "true"
+                }
+        }
+}
 
# YANG Model schema @@ -239,11 +255,19 @@ config vlan dhcp_relay add ``` Restart dhcp_relay after updating ipv6 helper information. -**only DHCP_RELAY table needs to be updated for the latest versions. - -Example: +Or edit directly in config_db.json and apply config_reload: ``` -admin@sonic:~$ redis-cli -n 4 hset DHCP_RELAY|Vlan1000 dhcpv6_option|rfc6939_support false +/etc/sonic/config_db.json: +{ + "DHCP_RELAY" :{ + "Vlan100" : { + "dhcpv6_servers" : ["fc02:2000::2"] + "dhcpv6_option|rfc6939_support" : "true" + } + } +} + +sudo config reload ``` # Option 18 for Interface-ID @@ -255,12 +279,29 @@ Usage: config vlan dhcp_relay add redis-cli -n 4 hset DHCP_RELAY| dhcpv6_option|interface_id ``` +Or edit directly in config_db.json and apply config_reload: +/etc/sonic/config_db.json: +{ + "DHCP_RELAY" :{ + "Vlan100" : { + "dhcpv6_servers" : ["fc02:2000::2"], + "dhcpv6_option|interface_id" : "true" + } + } +} + +sudo config reload Example: ``` admin@sonic:~$ redis-cli -n 4 hset DHCP_RELAY|Vlan1000 dhcpv6_option|interface_id true ``` +# Config Update + +We have shifted from VLAN table to DHCP_RELAY table to store ipv6 helper information. +Only DHCP_RELAY table needs to be updated for the versions containing PR https://github.com/sonic-net/sonic-buildimage/pull/10654, or version 20201231.75 and 20181130.98 and above + # Option for Dual ToR Relayed DHCPv6 packet from ToR may have the response routed to the peer ToR that has the link as standby. Since the originating client is not active on this ToR, the peer ToR won't be able to relay the response. Peer ToR will not receive the packets as the originating client is not active on this ToR. Instead of using Vlan SVI IP address, relay agent source address needs to be set to listen on the loopback address. When DHCP server responses are received by relay agent on the peer ToR, DHCP relay agent would then forward the packet to the peer ToR using its loopback IP interface.