OC VLAN

Packages:

  • openconfig-vlan.yang
  • openconfig-vlan-types.yang
  • cisco-nx-openconfig-vlan-deviations.yang

Configuring the Interface Ethertype

Configuring the Interface Ethertype

Request:

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <interfaces xmlns="http://openconfig.net/yang/interfaces">
        <interface>
          <name>eth1/1</name>
          <config>
            <tpid xmlns:oc-vlan-types="http://openconfig.net/yang/vlan-types" xmlns="http://openconfig.net/yang/vlan">oc-vlan-types:TPID_0X9100</tpid>
          </config>
        </interface>
      </interfaces>
    </config>
  </edit-config>
</rpc>

Response:

<?xml version="1.0" encoding="UTF-8"?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
    <ok/>
</rpc-reply>

Note: This example was added in Release 9.3(3).


CLI Commands

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

interface Ethernet1/1
switchport dot1q ethertype 0x9100

Verifying the State Information for the Interface Ethertype

Verifying the State Information for the Interface Ethertype

Request:

<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
  <get>
    <filter>
      <interfaces xmlns="http://openconfig.net/yang/interfaces">
        <interface>
          <name>eth1/1</name>
          <state>
            <tpid xmlns="http://openconfig.net/yang/vlan"/>
          </state>
        </interface>
      </interfaces>
    </filter>
  </get>
</rpc>


Response:

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:783aef70-f7ce-44d4-a6ae-fa6374eaef72">
    <data>
        <interfaces xmlns="http://openconfig.net/yang/interfaces">
            <interface>
                <name>eth1/1</name>
                <state>
                    <tpid xmlns="http://openconfig.net/yang/vlan">TPID_0X9100</tpid>
                </state>
            </interface>
        </interfaces>
    </data>
</rpc-reply>

Note: This example was added in Release 9.3(3).

CLI Output

Switch(config)# show system internal ethpm info interface ethernet 1/1 | grep Ethertype Response: Ethertype 0x9100