ONTAP Discussions

net-config-set-persistent - configure an interface

JLOUVET35
2,237 Views

Hi,

I am trying to use the ontap api net-config-set-persistent to configure an interface but the result is not quite what I expect. Here is the input:

<?xml version="1.0" encoding="UTF-8"?>

<netapp  xmlns="http://www.netapp.com/filer/admin" version="1.17">

  <net-config-set-persistent>

    <net-config-info>

      <interfaces>

        <interface-config-info>

          <aliases>

            <ip-address-info>

              <addr-family>af-inet</addr-family>

              <address>

                <ip-address-or-hostname>192.168.82.243</ip-address-or-hostname>

              </address>

              <creator>vfiler:filer-pvf0003</creator>

              <netmask-or-prefix>255.255.255.224</netmask-or-prefix>

            </ip-address-info>

          </aliases>

          <interface-name>vif0-45</interface-name>

          <ipspace-name>default-ipspace</ipspace-name>

          <partner>vif0-45</partner>

          <v4-primary-address>

            <ip-address-info>

              <addr-family>af-inet</addr-family>

              <address>

                <ip-address-or-hostname>192.168.82.229</ip-address-or-hostname>

              </address>

              <creator>vfiler:vfiler0</creator>

              <netmask-or-prefix>255.255.255.224</netmask-or-prefix>

            </ip-address-info>

          </v4-primary-address>

        </interface-config-info>

      </interfaces>

      <routes>

        <route-info>

          <addr-family>af-inet</addr-family>

          <creator>vfiler:vfiler0</creator>

          <destination>

            <ip-address-or-hostname>default</ip-address-or-hostname>

          </destination>

          <ipspace-name>default-ipspace</ipspace-name>

          <metric>1</metric>

          <next-hop>

            <ip-address>192.168.82.226</ip-address>

          </next-hop>

          <route-type>net</route-type>

        </route-info>

      </routes>

    </net-config-info>

  </net-config-set-persistent>

</netapp>

Result generated in the /etc/rc file:

  ifconfig vif0-45 `hostname`-vif0-45 netmask 255.255.255.224 partner vif0-45 up

  ifconfig vif0-45 alias   netmask 255.255.255.224 up

  route add net   1

Instead of:

  ifconfig vif0-45 192.168.82.229 netmask 255.255.255.224 partner vif0-45 up

  ifconfig vif0-45 alias 192.168.82.232 netmask 255.255.255.224 up

  route add net 192.168.82.226 1

Sounds like I am using the api incorrectly ... Has anyone successfully use it?

Thanks,

JB

1 REPLY 1

mharding
2,237 Views

Did you ever figure out your problem?  You may want to try posting this and related questions on the 'Interfaces' page of the Developer Network Community: https://communities.netapp.com/community/interfaces_and_tools/interfaces

Also, I'm assuming you've already looked through the SDK documentation, but if not, the latest SDK and documentation are here: https://communities.netapp.com/community/interfaces_and_tools/developer

Public