OC Relay Agent

Package: openconfig-relay-agent.yang

Enabling IPv4 DHCP Relay

Enabling IPv4 DHCP Relay 
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcp>
          <config>
            <enable-relay-agent xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">true</enable-relay-agent>
          </config>
        </dhcp>
      </relay-agent>
    </config>
  </edit-config>
</rpc>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

ip dhcp relay

Getting the DHCP Relay-Enable Status

Getting the DHCP Relay-Enable Status
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
    </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcp>
          <config>
            <enable-relay-agent/>
          </config>
        </dhcp>
      </relay-agent>
    </filter>
  </get-config>
</rpc>

Enabling DHCP Relay Address on an Interface

Enabling DHCP Relay Address on an Interface 
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcp>
          <interfaces>
            <interface>
              <id xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">eth1/1</id>
              <config>
                <id xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">eth1/1</id>
                <helper-address xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="create">1.1.1.1</helper-address>
              </config>
            </interface>
          </interfaces>
        </dhcp>
      </relay-agent>
    </config>
  </edit-config>
</rpc>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

interface ethernet 1/1
ip dhcp relay address 1.1.1.1

Getting the Interface DHCP Relay Address Configuration (Interface Filtered)

Getting the Interface DHCP Relay Address Configuration (Interface Filtered)
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
    </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcp>
          <interfaces>
            <interface>
              <id>eth1/1</id>
              <config>
                <id/>
                <helper-address/>
              </config>
            </interface>
          </interfaces>
        </dhcp>
      </relay-agent>
    </filter>
  </get-config>
</rpc>

Getting the DHCP Relay Address Configuration on all Interfaces (Interface Unfiltered)

Getting the DHCP Relay Address Configuration on all Interfaces (Interface Unfiltered)
Request:
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
    </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcp>
          <interfaces>
            <interface>
              <config>
                <id/>
                <helper-address/>
              </config>
            </interface>
          </interfaces>
        </dhcp>
      </relay-agent>
    </filter>
  </get-config>
</rpc>

Enabling Option 82

Enabling Option 82 
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcp>
          <agent-information-option xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">
            <config>
              <enable nc:operation="merge">true</enable>
            </config>
          </agent-information-option>
        </dhcp>
      </relay-agent>
    </config>
  </edit-config>
</rpc>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

ip dhcp relay information option

Getting Option 82 Status

Getting Option 82 Status 
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
    </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcp>
          <agent-information-option/>
        </dhcp>
      </relay-agent>
    </filter>
  </get-config>
</rpc>

Configuring a DHCP Relay Source Interface on an Interface

Configuring a DHCP Relay Source Interface on an Interface 
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcp>
          <interfaces>
            <interface>
              <id xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">eth1/1</id>
              <interface-ref>
                <config>
                  <interface xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">eth1/2</interface>
                </config>
              </interface-ref>
            </interface>
          </interfaces>
        </dhcp>
      </relay-agent>
    </config>
  </edit-config>
</rpc>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

interface Ethernet1/1
 ip dhcp relay source-interface Ethernet1/2
 no shutdown

Getting the Interface DHCP Relay Source Interface Configuration (Interface Filtered)

Getting the Interface DHCP Relay Source Interface Configuration (Interface Filtered)
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
    </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcp>
          <interfaces>
            <interface>
              <id>eth1/1</id>
              <interface-ref>
                <config>
                  <interface/>
                </config>
              </interface-ref>
            </interface>
          </interfaces>
        </dhcp>
      </relay-agent>
    </filter>
  </get-config>
</rpc>

Getting the DHCP Relay Source Interface Configuration on all Interfaces (Interface Unfiltered)

Getting the DHCP Relay Source Interface Configuration on all Interfaces (Interface Unfiltered)
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
    </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcp>
          <interfaces>
            <interface>
              <interface-ref>
                <config>
                  <interface/>
                </config>
              </interface-ref>
            </interface>
          </interfaces>
        </dhcp>
      </relay-agent>
    </filter>
  </get-config>
</rpc>

Enabling IPv6 DHCP Relay

Enabling IPv6 DHCP Relay 
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcpv6>
          <config>
            <enable-relay-agent xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">true</enable-relay-agent>
          </config>
        </dhcpv6>
      </relay-agent>
    </config>
  </edit-config>
</rpc>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

ipv6 dhcp relay

Getting the IPv6 DHCP Relay Status

Getting the IPv6 DHCP Relay Status
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
    </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcpv6>
          <config>
            <enable-relay-agent/>
          </config>
        </dhcpv6>
      </relay-agent>
    </filter>
  </get-config>
</rpc>

Enabling IPv6 DHCP Relay Address on an Interface

Enabling IPv6 DHCP Relay Address on an Interface 
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcpv6>
          <interfaces>
            <interface>
              <id xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">eth1/1</id>
              <config>
                <id xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">eth1/1</id>
                <helper-address xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="create">2001::10</helper-address>
              </config>
            </interface>
          </interfaces>
        </dhcpv6>
      </relay-agent>
    </config>
  </edit-config>
</rpc>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

interface Ethernet1/1
 ipv6 dhcp relay address 2001::10

Getting the Interface IPv6 DHCP Relay Address Configuration (Interface Filtered)

Getting the Interface IPv6 DHCP Relay Address Configuration (Interface Filtered)
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
   </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcpv6>
          <interfaces>
            <interface>
              <id>eth1/1</id>
              <config>
                <id/>
                <helper-address/>
              </config>
            </interface>
          </interfaces>
        </dhcpv6>
      </relay-agent>
    </filter>
  </get-config>
</rpc>

Getting the IPv6 DHCP Relay Address Configuration on all Interfaces (Interface unfiltered)

Getting the IPv6 DHCP Relay Address Configuration on all Interfaces (Interface unfiltered)
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
    </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcpv6>
          <interfaces>
            <interface>
              <config>
                <id/>
                <helper-address/>
              </config>
            </interface>
          </interfaces>
        </dhcpv6>
      </relay-agent>
    </filter>
  </get-config>
</rpc>

Configuring an IPv6 Source Interface on an Interface

Configuring an IPv6 Source Interface on an Interface
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcpv6>
          <interfaces>
            <interface>
              <config>
                <helper-address xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">eth1/1</helper-address>
              </config>
              <interface-ref xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" nc:operation="merge">
                <config>
                  <interface nc:operation="merge">eth1/2</interface>
                </config>
              </interface-ref>
            </interface>
          </interfaces>
        </dhcpv6>
      </relay-agent>
    </config>
  </edit-config>
</rpc>


CLI Commands

The CLI commands are equivalent to the payload examples displayed in the pane on the right.

interface Ethernet1/1
 ipv6 dhcp relay source-interface Ethernet1/2

Getting the Interface IPv6 Source Interface Configuration (Interface Filtered)

Getting the Interface IPv6 Source Interface Configuration (Interface Filtered)
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
    </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcpv6>
          <interfaces>
            <interface>
              <id>eth1/1</id>
              <interface-ref>
                <config>
                  <interface/>
                </config>
              </interface-ref>
            </interface>
          </interfaces>
        </dhcpv6>
      </relay-agent>
    </filter>
  </get-config>
</rpc>

Getting the IPv6 Source Interface Configuration on all Interfaces (Interface Unfiltered)

Getting the IPv6 Source Interface Configuration on all Interfaces (Interface Unfiltered)
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
    </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent">
        <dhcpv6>
          <interfaces>
            <interface>
              <interface-ref>
                <config>
                  <interface/>
                </config>
              </interface-ref>
            </interface>
          </interfaces>
        </dhcpv6>
      </relay-agent>
    </filter>
  </get-config>
</rpc>

Getting the Entire DHCP/DHCPv6 Configuration on the Switch

Getting the Entire DHCP/DHCPv6 Configuration on the Switch
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get-config>
    <source>
      <running/>
    </source>
    <filter>
      <relay-agent xmlns="http://openconfig.net/yang/relay-agent"/>
    </filter>
  </get-config>
</rpc>