-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Update dhcpv6 options and performance #1109
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,12 +19,15 @@ | |
- [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) | ||
- [CoPP manager](#copp-manager) | ||
- [Source IP](#source-ip) | ||
* [Performance](#performance) | ||
* [Scalability](#scalability) | ||
* [Testing](#testing) | ||
|
||
# Scope | ||
|
@@ -166,33 +169,138 @@ 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" | ||
</pre> | ||
|
||
<pre> | ||
{ | ||
"DHCP_RELAY" :{ | ||
"Vlan100" : { | ||
"dhcpv6_servers" : ["fc02:2000::2"] | ||
"dhcpv6_option|rfc6939_support" : "true" | ||
"dhcpv6_option|interface_id" : "true" | ||
} | ||
} | ||
} | ||
</pre> | ||
|
||
# YANG Model schema | ||
|
||
sonic-dhcpv6-relay.yang | ||
<pre> | ||
module DHCP | ||
container DHCP { | ||
list VLAN_LIST { | ||
key name; | ||
leaf name { | ||
type string; | ||
} | ||
leaf dhcpv6_servers { | ||
type inet6:ip-address; | ||
} | ||
leaf dhcpv6_option|rfc6939_support { | ||
type bool; | ||
} | ||
module sonic-dhcpv6-relay { | ||
|
||
namespace "http://github.com/Azure/sonic-dhcpv6-relay"; | ||
|
||
prefix sdhcpv6relay; | ||
|
||
yang-version 1.1; | ||
|
||
import ietf-inet-types { | ||
prefix inet; | ||
} | ||
|
||
organization "SONiC"; | ||
|
||
contact "SONiC"; | ||
|
||
description "DHCPv6 Relay yang Module for SONiC OS"; | ||
|
||
revision 2021-10-30 { | ||
description "First Revision"; | ||
} | ||
|
||
container sonic-dhcpv6-relay { | ||
|
||
container DHCP_RELAY { | ||
|
||
description "DHCP_RELAY part of config_db.json"; | ||
|
||
list DHCP_RELAY_LIST { | ||
|
||
key "name"; | ||
|
||
leaf name { | ||
type string; | ||
} | ||
|
||
leaf-list dhcpv6_servers { | ||
description "Configure the dhcpv6 servers"; | ||
type inet:ipv6-address; | ||
} | ||
|
||
leaf dhcpv6_option|rfc6939_support { | ||
description "Set rfc6939 for the relay"; | ||
type bool; | ||
} | ||
|
||
leaf dhcpv6_option|interface_id { | ||
description "Set interface-id for the relay"; | ||
type bool; | ||
} | ||
} | ||
} | ||
} | ||
</pre> | ||
|
||
# Option 79 for client link-layer address | ||
|
||
Option 79 should be enabled by default and can be disabled through command line. | ||
Option 79 should be enabled by default and can be disabled through editing config_db.json and reapplying configuration or config database directly by the following commands: | ||
|
||
Usage: | ||
``` | ||
redis-cli -n 4 hset DHCP_RELAY|<vlan> dhcpv6_option|rfc6939_support <true/false> | ||
kellyyeh marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using redis-cli is not a standard way of configuring SONiC. It should be done through config load of json when click CLI is not available. Please update the documentation to have all configuration examples using json format and mention it can be used with config load command. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a json example of the config to be put it. Eg:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This comment is still applicable |
||
config vlan dhcp_relay add <vlan_id> <dhcp_relay_destination_ip> | ||
``` | ||
Restart dhcp_relay after updating ipv6 helper information. | ||
|
||
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|rfc6939_support" : "true" | ||
} | ||
} | ||
} | ||
|
||
sudo config reload | ||
``` | ||
|
||
# Option 18 for Interface-ID | ||
|
||
Option 18 is disabled by default and can be enabled through editing config_db.json and reapplying configuration or config database directly by the following commands: | ||
|
||
Usage: | ||
``` | ||
config vlan dhcp_relay add <vlan_id> <dhcp_relay_destination_ip> | ||
redis-cli -n 4 hset DHCP_RELAY|<vlan> dhcpv6_option|interface_id <true/false> | ||
``` | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you also include this PR sonic-net/sonic-buildimage#13006 and those versions might not work completely as suggested in the description of the PR |
||
|
||
# Option for Dual ToR | ||
|
||
|
@@ -224,6 +332,17 @@ Configurable option to use loopback address for dual ToR | |
|
||
SONiC DHCP relay agent is currently not relaying many DHCP requests. Frequency arrival rate of DHCP packets is not high so it is not going to affect performance. | ||
|
||
# Scalability | ||
Typical number of vlans used with dhcp6relay is around 2 vlans. Performance degration and high CPU utilization is seen on devices with more than 25 vlans configured, especially devices with weaker CPU's. | ||
kellyyeh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Tests have shown functionality and performance degradation when there are more than 20 vlans configured on weaker CPU's. | ||
|
||
• 25 Vlans - Passed on SPC1. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove Vendor specific information like SPC1. |
||
|
||
• 100 and 50 Vlans - Failed on SPC1. | ||
|
||
• 100 Vlans - Passed on SPC2 and SPC3 with high CPU utilization. | ||
|
||
|
||
# Testing | ||
|
||
Use counter to check if DHCP messages are forwarded successfully using DHCPv6 relay agent | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see this in the yang model. Is this a future change? https://github.com/sonic-net/sonic-buildimage/blob/master/src/sonic-yang-models/yang-models/sonic-dhcpv6-relay.yang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes will be a future change