Skip to content
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

Relay Agent helper: add support for source, hostname, and network instance #1191

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 145 additions & 1 deletion release/models/relay-agent/openconfig-relay-agent.yang
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ module openconfig-relay-agent {
// import some basic types
import ietf-inet-types { prefix inet; }
import ietf-yang-types { prefix yang; }
import openconfig-network-instance { prefix oc-ni; }
import openconfig-interfaces { prefix oc-if; }
import openconfig-extensions { prefix oc-ext; }
import openconfig-inet-types { prefix oc-inet; }


// meta
Expand All @@ -27,7 +29,14 @@ module openconfig-relay-agent {
packets. The supports both DHCP and DHCPv6 and device-wide and
per-interface settings.";

oc-ext:openconfig-version "0.1.2";
oc-ext:openconfig-version "0.2.0";

revision "2024-09-18" {
description
"Turn helper-address into a keyed list and add attributes for
source and hostname configuration";
reference "0.2.0";
}

revision "2023-02-06" {
description
Expand Down Expand Up @@ -624,6 +633,62 @@ module openconfig-relay-agent {

}

grouping relay-agent-ipv4-helper-address-config {
description
"Configuration options for an IP helper-address";

leaf address {
type oc-inet:host;
description
"IP address to relay DHCP requests to";
}

leaf local-address {
rachidtt marked this conversation as resolved.
Show resolved Hide resolved
type union {
type inet:ipv4-address;
type oc-if:interface-id;
}
description
"IP address or interface whose IP address is to be used as source in
relayed DHCP requests";
}

leaf network-instance {
type oc-ni:network-instance-ref;
description
"The network instance that this DHCP Server
is associated with";
}
}

grouping relay-agent-ipv6-helper-address-config {
description
"Configuration options for an IPv6 helper-address";

leaf address {
type oc-inet:host;
description
"IPv6 address to relay DHCPv6 requests to";
}

leaf local-address {
rachidtt marked this conversation as resolved.
Show resolved Hide resolved
type union {
type inet:ipv6-address;
type oc-if:interface-id;
}
description
"IPv6 address or interface whose IPv6 address is to be used as source in
relayed DHCPv6 requests";
}

leaf network-instance {
type oc-ni:network-instance-ref;
description
"The network instance that this DHCP Server
is associated with";
}
}

grouping relay-agent-ipv4-interfaces-config {
description
"Configuration data for interfaces enabled for relaying";
Expand All @@ -644,13 +709,53 @@ module openconfig-relay-agent {

leaf-list helper-address {
type inet:ip-address;
status deprecated;
description
"List of IPv4 or IPv6 addresses of DHCP servers to which the
relay agent should forward DHCPv4 requests. The relay agent is
expected to forward DHCPv4/BOOTP requests to all listed
server addresses when DHCPv4 relaying is enabled globally, or
on the interface.";
}

container helper-addresses {
description
"Enclosing container for helper addresses";
list helper-address {
key "address";
description
"List of IPv4 addresses of DHCP servers to which the
relay agent should forward DHCPv4 requests. The relay agent is
expected to forward DHCPv4/BOOTP requests to all listed
server addresses when DHCPv4 relaying is enabled globally, or
on the interface.";

leaf address {
type leafref {
path "../config/address";
}
description
"Reference to list key representing IP helper address";
}


container config {
description
"Configuration data for IP helper address";

uses relay-agent-ipv4-helper-address-config;
}

container state {
config false;

description
"Operational state for IP helper address";

uses relay-agent-ipv4-helper-address-config;
}
}
}
}

grouping relay-agent-ipv4-interfaces-state {
Expand Down Expand Up @@ -736,13 +841,52 @@ module openconfig-relay-agent {

leaf-list helper-address {
type inet:ipv6-address;
status deprecated;
description
"List of IPv6 addresses of DHCP servers to which the
relay agent should forward DHCPv6 requests. The relay agent
is expected to forward DHCPv4/BOOTP requests to all listed
server addresses when DHCPv6 relaying is enabled globally, or
on the interface.";
}

container helper-addresses {
description
"Enclosing container for IPv6 helper addresses";
list helper-address {
key "address";
description
"List of IPv6 addresses of DHCP servers to which the
relay agent should forward DHCPv6 requests. The relay agent
is expected to forward DHCPv4/BOOTP requests to all listed
server addresses when DHCPv6 relaying is enabled globally, or
on the interface.";

leaf address {
type leafref {
path "../config/address";
}
description
"Reference to list key representing IP helper address";
}

container config {
description
"Configuration data for IP helper address";

uses relay-agent-ipv6-helper-address-config;
}

container state {
config false;

description
"Operational state for IP helper address";

uses relay-agent-ipv6-helper-address-config;
}
}
}
}

grouping relay-agent-ipv6-interfaces-state {
Expand Down
Loading