SONiC Yang model for DHCP-Relay parameters#8946
Conversation
Added DHCPv4 Source interface, Link select, Max hop count, Server VRF, Policy action and VRF Select options. Added DHCPv6 Servers, Source interface, Max hop count, Server VRF and VRF Select options. Tables: VLAN.
dgsudharsan
left a comment
There was a problem hiding this comment.
Please remove the fields for which we don't have backend support
|
@shlomibitton Please review |
Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
@dgsudharsan Removed those fields. |
|
@shlomibitton I still see the "dhcpv6_servers" added to VLAN table only from below configuration. |
|
@AkhileshSamineni by design the DHCPv6 helpers should be configured from the configuration you mentioned. |
@shlomibitton So "dhcpv6_servers" field is getting added to "VLAN" table only right. Please review the yang model changes. |
|
@kellyyeh, can you review? |
| "dhcp_servers": [ | ||
| "10.222.72.116" | ||
| ], | ||
| "dhcpv6_servers": [ |
There was a problem hiding this comment.
We currently store dhcpv6_servers in a separate table called DHCP_RELAY, and SONiC dhcp6relay fetches dhcpv6 server addresses from this table instead of VLAN. This is the draft sonic-dhcpv6-relay.yang
module DHCP_RELAY
container DHCP_RELAY {
list VLAN_LIST {
key name;
leaf name {
type string;
}
leaf dhcpv6_servers {
type inet6:ip-address;
}
leaf dhcpv6_option|rfc6939_support {
type bool;
}
}
}
}
And config_db schema looks like this:
DHCP_RELAY|intf-i|dhcpv6_servers: ["dhcp-server-0", "dhcp-server-1", ...., "dhcp-server-n-1"] DHCP_RELAY|intf-i|dhcpv6_option|rfc6939_support: "true"
202106 version currently still uses ISC-DHCP which reads from VLAN table, so we need to have dhcpv6_servers in both VLAN and DHCP_RELAY
There was a problem hiding this comment.
Added a new 'dhcpv6-relay' yang file changes for DHCP_RELAY table.
@kellyyeh Seeing parsing issues with leaf "dhcpv6_option|rfc6939_support", as it has '|' character.
There was a problem hiding this comment.
Can we add it as just "rfc6939_support" please?
There was a problem hiding this comment.
Yes, added leaf as 'rfc6939_support'.
|
@lguohan Please approve and merge it. |
This commit brings part of sonic-net#8946. Signed-off-by: Praveen Chaudhary <pchaudhary@linkedin.com> RB=2977661 G=lnos-reviewers R=pchaudhary,pmao,samaity,zxu A=
SONiC Yang model for DHCP-Relay parameters
What I did
Added DHCPv6 Servers.
Tables: VLAN, DHCP_RELAY.
How I did it
Defined Yang model for Relay based on Guideline doc:
https://github.com/Azure/SONiC/blob/master/doc/mgmt/SONiC_YANG_Model_Guidelines.md
How to verify it
Added test cases to verify it.
Signed-off-by: Akhilesh Samineni akhilesh.samineni@broadcom.com