APIs in Category: net | API version 1.14

net-config-get-active net-config-get-persistent net-config-set-persistent net-ifconfig-get net-ifconfig-set net-ipspace-assign net-ipspace-create net-ipspace-destroy net-ipspace-list net-ping net-ping-info net-resolve net-route-add net-route-delete net-vlan-create net-vlan-delete | The net APIs provide network management from ONTAP.

NetApp Manage ONTAP

net-config-get-active | [top]

> Output the current network config Output includes vlans, ifgrps and static routes with information from vlan, ifgrp, route & ifconfig commands

> Output Name | Range | Type | Description
> net-config-info |  | net-config-info | Active network configuration.

> Errno | Description
> EINTERFACENOTFOUND |  |

net-config-get-persistent | [top]

> Reads filer's /etc/rc and outputs contents.

> Output Name | Range | Type | Description
> net-config-info |  | net-config-info | Persistent network configuration (/etc/rc).

> Errno | Description
> EINVALIDINPUTERROR |  |

net-config-set-persistent | [top]

> Writes filer's persistent network config.

> Input Name | Range | Type | Description
> net-config-info |  | net-config-info | Persistent network configuration (/etc/rc).

> Errno | Description
> EINVALIDINPUTERROR |  |

net-ifconfig-get | [top]

> Output the current configuration for one interface.

> Input Name | Range | Type | Description
> interface-name |  | string optional | This is the name of the interface to display. If not provided, all interfaces will be displayed.
> Output Name | Range | Type | Description
> interface-config-info |  | interface-config-info[] | configuration of interface

> Errno | Description
> EINTERFACENOTFOUND |  |
> ENOPARTNERIFC |  |
> EINVALIDINPUTERROR |  |

net-ifconfig-set | [top]

> Configure network interface. Does not modify persistent config.

> Input Name | Range | Type | Description
> interface-config-info |  | interface-config-info | Interface configuration.

> Errno | Description
> EINTERFACENOTFOUND |  |
> ENETMASKINVALID |  |
> EBROADCASTINVALID |  |
> EIOCTLERROR |  |
> EINTERNALERROR |  |
> EINVALIDINPUTERROR |  |

net-ipspace-assign | [top]

> Assign a list of interfaces to an ipspace. Modifies persistent config.

> Input Name | Range | Type | Description
> ipspace-config-info |  | ipspace-config-info | Ipspace to create.

> Errno | Description
> EIPSPACEDOESNOTEXIST |  |
> EINVALIDINPUTERROR |  |
> EINTERNALERROR |  |
> EINTERFACENOTFOUND |  |

net-ipspace-create | [top]

> Create a new ipspace. Modifies persistent config.

> Input Name | Range | Type | Description
> ipspace-config-info |  | ipspace-config-info | Ipspace to create.

> Errno | Description
> EIPSPACEDOESNOTEXIST |  |
> EINVALIDINPUTERROR |  |
> EINTERNALERROR |  |
> EINTERFACENOTFOUND |  |

net-ipspace-destroy | [top]

> Destroy an ipspace. Modifies persistent config.

> Input Name | Range | Type | Description
> ipspace-name |  | string | IPSpace name.

> Errno | Description
> EIPSPACEDOESNOTEXIST |  |
> EINVALIDINPUTERROR |  |
> EINTERNALERROR |  |

net-ipspace-list | [top]

> List ipspaces.

> Output Name | Range | Type | Description
> ipspace-list |  | ipspace-config-info[] | List of ipspaces.

net-ping | [top]

> Ping a host. The API returns on the first successful ping of retry-count attempts. EHOSTNOTFOUND is returned if the host cannot be resolved. EONTAPI_EHOSTDOWN is returned if the host cannot be pinged. The interval between retries is 1 second. IPv6 is not supported at this time.

> Input Name | Range | Type | Description
> host-name-or-ip-address |  | string | The name or the IP address of the host to ping. The format is an IPv4 host name or an IP address.
> retry-count |  | integer optional | The number of pings to try before giving up. Default is 3. Range: [1..5]

> Errno | Description
> EHOSTNOTFOUND |  |

> Vfiler-enabled
> Yes

net-ping-info | [top]

> Ping a host. The API pings the host count times, and returns the number of successful pings and times. EHOSTNOTFOUND is returned if the host cannot be resolved. EHOSTNOCONTACT is returned if the host cannot be pinged. The interval between ping attempts is 1 second. IPv6 is not supported at this time.

> Input Name | Range | Type | Description
> host-name-or-ip-address |  | string | The name or the IP address of the host to ping. The format is an IPv4 host name or IP address.
> ping-count |  | integer optional | The number of pings. Default is 3. Range: [1..16]
> Output Name | Range | Type | Description
> packets-received |  | integer optional | The number of packets received. The number of packets lost is the packets-transmitted minus packets-received. Range: [0..16]
> packets-transmitted |  | integer optional | Number of packets transmitted. Should be equal to ping-count. Range: [1..16]
> round-trip-maximum-time |  | integer optional | Maximum time in microseconds for a round trip between the filer and the host if packets-recieved is greater than zero. Range: [0..2^31-1]
> round-trip-mean-time |  | integer optional | Mean time in microseconds for a round trip between the filer and the host if packets-recieved is greater than zero. Range: [0..2^31-1]
> round-trip-minimum-time |  | integer optional | Mimumum time in microseconds for a round trip between the filer and the host if packets-recieved is greater than zero. Range: [0..2^31-1]

> Errno | Description
> EHOSTNOTFOUND |  |

> Vfiler-enabled
> Yes

net-resolve | [top]

> Resolves a host name to one or more IP addresses. Returns EHOSTNOTFOUND if the host name cannot be resolved. Does not support IPv6 at this time.

> Input Name | Range | Type | Description
> host-name |  | string | Name of the host to resolved.
> Output Name | Range | Type | Description
> ip-addresses |  | ip-address[] | The IP addresses of the host.

> Errno | Description
> EHOSTNOTFOUND |  |

> Vfiler-enabled
> Yes

net-route-add | [top]

> Create a new kernel route. Does not modify persistent config.

> Input Name | Range | Type | Description
> route-info |  | route-info | Route to create.

> Errno | Description
> EROUTEEXISTS |  |
> EINVALIDINPUTERROR |  |
> EINVALIDROUTE |  |

> Vfiler-enabled
> Yes

net-route-delete | [top]

> Delete a kernel route. Does not modify persistent config.

> Input Name | Range | Type | Description
> route-info |  | route-info | Route to delete.

> Errno | Description
> EROUTENOTFOUND |  |

> Vfiler-enabled
> Yes

net-vlan-create | [top]

> Create a new vlan interface. Does not modify persistent config.

> Input Name | Range | Type | Description
> vlan-info |  | vlan-info | Vlan to create.

> Errno | Description
> EVLANEXISTS |  |
> EINTERNALERROR |  |
> EINVALIDINPUTERROR |  |
> EINVALIDTAG |  |
> EINTERFACENOTFOUND |  |

net-vlan-delete | [top]

> Delete a vlan interface. Does not modify persistent config.

> Input Name | Range | Type | Description
> vlan-info |  | vlan-info | Vlan to delete.

> Errno | Description
> EINTERFACENOTFOUND |  |

Element definition: interface-config-info | [top]

> Configuration for one interface.

> Name | Range | Type | Description
> aliases |  | ip-address-info[] optional | List of interface IP aliases. Cannot include ipv4 addresses if v4-primary-address is empty, and cannot include ipv6 addresses if v6_primary-address is empty (except for autoconfigured ipv6 addresses).
> dad-attempts |  | integer optional | Number of IPv6 Duplicate Address Detection attempts for this interface.
> flowcontrol |  | string optional | Specifies the flow control type. Possible values: {none | receive | send | full} The meaning of these values is: "none" (no flow control), "receive" (only receive flow control frames), "send" (only send flow control frames), and "full" (send and receive flow control frames). If the flowcontrol option is not specified, the default value is interface-dependent. Fiber Interfaces: If the interface detects that the link partner auto-negotiates, then the operational flow control setting is negotiated (and the configured or default setting for flow control is ignored). Not all interfaces have a flowcontrol (e.g. loopback does not) Default is NIC-specific.
> interface-name |  | string | Name of the interface.
> ipspace-name |  | string | Name of ipspace that the interface belongs to.
> is-enabled |  | boolean optional | Administrative status. (true: interface is administratively up). Default is true.
> is-nfo-enabled |  | boolean optional | true: network failover is configured for this interface. Default is false;
> is-trusted |  | boolean optional | true: interface is trusted. Default is true.
> is-wins-enabled |  | boolean optional | true: interface is advertised to the WINS server. Default is true.
> mac-address |  | string optional | Interface mac address. Not provided for "lo" or "vh" interfaces.
> mediatype |  | string optional | Specifies the Ethernet media type used. Possible values: {tp | tp-fd | 100tx | 100tx-fd | 1000fx | 10g-sr | auto} 10/100, 100/1000, and 10/100/1000 Mbps Copper Interfaces: The acceptable types (which vary from card to card) are "tp" (Half-duplex 10BaseT RJ-45 twisted-pair), "tp-fd" (Full duplex 10Base-T RJ-45 twisted-pair), "100tx" (Half-duplex 100Base-T RJ-45 twisted-pair), "100tx-fd" (Full duplex 100Base-T RJ-45 twisted-pair), and "auto" (Auto RJ-45 twisted-pair). The default media type is set to "tp" or to "auto" where applicable. 1000 Mbps Fiber Interfaces: The Gigabit Ethernet Controllers only support the mediatype "auto". The Gigabit Ethernet Controllers only support full-duplex. 10G bps Fiber Interfaces: The 10G TOE/Ethernet Controllers support the mediatype "10g-sr" and "auto". The interface does not do auto-negotiatition, it only supports 10Gb speed, full duplex. Not all interfaces have a mediatype (e.g. loopback does not)
> mtusize |  | integer optional | Maximum Transfer Unit (MTU) of an interface. Range: 296-9196 Default is 1500.
> partner |  | string optional | Name of CFO partner interface that will failover to this interface. Default is no partner.
> v4-primary-address |  | ip-address-info optional | The primary ipv4 address for this interface If missing, it means the interface has no ipv4 addresses.
> v6-primary-address |  | ip-address-info optional | The primary ipv6 address for this interface If missing, it means the interface has no statically configured ipv6 addresses.

Element definition: ip-address | [top]

> One ip address, in dotted-decimal format (for example, "192.168.11.12").

> [none]

Element definition: ipspace-config-info | [top]

> An IPSpace.

> Name | Range | Type | Description
> interface-list |  | string[] optional | List of interface names in the ipspace. An ipspace with no members is possible.
> ipspace-name |  | string | IPSpace name.

Element definition: net-config-info | [top]

> interface configurations and routes

> Name | Range | Type | Description
> config-status |  | config-status-info[] optional | status of net-config-info object, details of non-fatal errors Note: all the net zapis make a best effort and will return a successful result as long as they are partially successful. It is up to the client to inspect this status field and warn the user if problems were encountered.
> ifgrps |  | ifgrp-info[] optional | List of ifgrp interfaces.
> interfaces |  | interface-config-info[] | List of interface configurations.
> routes |  | route-info[] optional | List of static routes.
> vlans |  | vlan-info[] optional | List of vlan interfaces.

Element definition: route-info | [top]

> A kernel route.

> Name | Range | Type | Description
> addr-family |  | string | Address family. Possible values: {af-inet6 | af-inet}.
> creator |  | string | Entity responsible for creation of route. Possible values: "filer" if created by d-blade for default vfiler. "vfiler: " if created by d-blade for vfiler. "vserver: " if created by n-blade with cluster-wide scope.
> destination |  | ip-address-or-hostname | Destination of route. Possible values: An IP address, hostname, or "default".
> ipspace-name |  | string | IPSpace name. Must match the ipspace assigned to the creator.
> metric |  | integer optional | The route metric. Range: 0-10
> next-hop |  | ip-address | Next hop (router) IP address.
> prefixlen |  | integer optional | Prefix length (netmask) for destination. Range: 1..32 for af-inet and 1..128 for af-inet6.
> route-type |  | string optional | Possible values: "net" or "host".

Element definition: vlan-info | [top]

> vlan

> Name | Range | Type | Description
> gvrp-enabled |  | boolean optional | true: GVRP is enabled.
> interface-name |  | string | The interface name.
> parent-interface |  | string | The interface that hosts the vlan interface.
> vlanid |  | integer | The vlan id. Range: 1..4094.

Element definition: config-status-info | [top]

> status of net-config-info object being returned used to return non-fatal errors encountered

> Name | Range | Type | Description
> operation |  | string | Operation where error was encountered.
> status |  | string | Error status of config object.

Element definition: ifgrp-info | [top]

> ifgrp name, type, and components.

> Name | Range | Type | Description
> favored |  | string optional | interface that is favored. Only applies if ifgrp-type = single.
> ifgrp-policy |  | string optional | Possible values: [rr|mac|ip]. Default is ip.
> ifgrp-type |  | string | Possible values: [single|multi|lacp].
> interface-name |  | string | The interface name.
> links |  | link[] optional | array of interface names in interface group. An ifgrp with no members is possible.
> nofavored |  | string optional | interface that is not favored. Only applies if ifgrp-type = single.

Element definition: interface-config-info | [top]

> Configuration for one interface.

> Name | Range | Type | Description
> aliases |  | ip-address-info[] optional | List of interface IP aliases. Cannot include ipv4 addresses if v4-primary-address is empty, and cannot include ipv6 addresses if v6_primary-address is empty (except for autoconfigured ipv6 addresses).
> dad-attempts |  | integer optional | Number of IPv6 Duplicate Address Detection attempts for this interface.
> flowcontrol |  | string optional | Specifies the flow control type. Possible values: {none | receive | send | full} The meaning of these values is: "none" (no flow control), "receive" (only receive flow control frames), "send" (only send flow control frames), and "full" (send and receive flow control frames). If the flowcontrol option is not specified, the default value is interface-dependent. Fiber Interfaces: If the interface detects that the link partner auto-negotiates, then the operational flow control setting is negotiated (and the configured or default setting for flow control is ignored). Not all interfaces have a flowcontrol (e.g. loopback does not) Default is NIC-specific.
> interface-name |  | string | Name of the interface.
> ipspace-name |  | string | Name of ipspace that the interface belongs to.
> is-enabled |  | boolean optional | Administrative status. (true: interface is administratively up). Default is true.
> is-nfo-enabled |  | boolean optional | true: network failover is configured for this interface. Default is false;
> is-trusted |  | boolean optional | true: interface is trusted. Default is true.
> is-wins-enabled |  | boolean optional | true: interface is advertised to the WINS server. Default is true.
> mac-address |  | string optional | Interface mac address. Not provided for "lo" or "vh" interfaces.
> mediatype |  | string optional | Specifies the Ethernet media type used. Possible values: {tp | tp-fd | 100tx | 100tx-fd | 1000fx | 10g-sr | auto} 10/100, 100/1000, and 10/100/1000 Mbps Copper Interfaces: The acceptable types (which vary from card to card) are "tp" (Half-duplex 10BaseT RJ-45 twisted-pair), "tp-fd" (Full duplex 10Base-T RJ-45 twisted-pair), "100tx" (Half-duplex 100Base-T RJ-45 twisted-pair), "100tx-fd" (Full duplex 100Base-T RJ-45 twisted-pair), and "auto" (Auto RJ-45 twisted-pair). The default media type is set to "tp" or to "auto" where applicable. 1000 Mbps Fiber Interfaces: The Gigabit Ethernet Controllers only support the mediatype "auto". The Gigabit Ethernet Controllers only support full-duplex. 10G bps Fiber Interfaces: The 10G TOE/Ethernet Controllers support the mediatype "10g-sr" and "auto". The interface does not do auto-negotiatition, it only supports 10Gb speed, full duplex. Not all interfaces have a mediatype (e.g. loopback does not)
> mtusize |  | integer optional | Maximum Transfer Unit (MTU) of an interface. Range: 296-9196 Default is 1500.
> partner |  | string optional | Name of CFO partner interface that will failover to this interface. Default is no partner.
> v4-primary-address |  | ip-address-info optional | The primary ipv4 address for this interface If missing, it means the interface has no ipv4 addresses.
> v6-primary-address |  | ip-address-info optional | The primary ipv6 address for this interface If missing, it means the interface has no statically configured ipv6 addresses.

Element definition: ip-address | [top]

> One ip address, in dotted-decimal format (for example, "192.168.11.12").

> [none]

Element definition: ip-address-info | [top]

> A configured IP Address

> Name | Range | Type | Description
> addr-family |  | string | Address family. Possible values: {af-inet6 | af-inet}.
> address |  | ip-address-or-hostname | IP address.
> broadcast |  | ip-address optional | broadcast address. Default if not specified is computed from IP address and netmask. Not used for IPV6. Must be consistent with netmask.
> creator |  | string | Entity responsible for creation of address. "vfiler:" if created by d-blade for vfiler. "vserver:" if created by n-blade with cluster-wide scope.
> lif-type |  | string optional | type of LIF. Possible values are 7G, Data, Cluster, Mgmt, ClusMgmt, InterCluster
> netmask-or-prefix |  | netmask-or-prefix optional | netmask or prefix Default if not specified is autogenerated classful.
> no-ddns |  | boolean optional | true: the address is not advertised to ddns. Default if not specified is true.

Element definition: ip-address-or-hostname | [top]

> IP address string. For example, 198.18.100.12, or "`hostname`-e0c" (backquoted hostname is allowed) or "toaster" (assuming toaster resolves to an IP address) or fd20:8b1e:b255:104:230:48ff:fe8c:6326

> [none]

Element definition: ip-address | [top]

> One ip address, in dotted-decimal format (for example, "192.168.11.12").

> [none]

Element definition: link | [top]

> ifgrp sub-interface name

> [none]

Element definition: netmask-or-prefix | [top]

> netmask. Possible values: dotted decimal or hex integer (range: 0x1 .. 0xffffffff) or '/' followed by hex integer (range: 0x1 .. 0x40) Default if not specified is classful: Class A address - 255.0.0.0 or 0xff000000 or /8 Class B address - 255.255.0.0 or 0xffff0000 or /16 Class C address - 255.255.255.0 or 0xffffff00 or /24 IPV6 address prefix - /1 through /128

> [none]