Network Datalinks
The network datalinks command provides datalink management on Oracle ZFS Storage Appliance. You can list, modify, create, and delete datalink resources.
Table 8-1 Network Datalink Commands
| Request | Append to Path /network/v{1|2} | Description |
|---|---|---|
|
POST |
/datalinks |
Create a new network datalink |
|
GET |
/datalinks/datalink |
Get the specified network datalink properties |
|
GET |
/datalinks |
List all network datalink objects |
|
PUT |
/datalinks/datalink |
Modify the specified network datalink object |
|
DELETE |
/datalinks/datalink |
Destroy the specified datalink object |
Table 8-2 Physical Device Datalink Properties
| Property | Type | Description |
|---|---|---|
|
|
String |
“device” (“immutable”) |
|
|
NetworkLabel |
Label |
|
|
ChooseOne |
Links [“igb1”, “igb0”, “ixgbe2”, “ixgbe3”, “igb4”, “igb3”, “ixgbe1”, “igb2”, “igb5”] |
|
|
Boolean |
Use Jumbo Frames [“true”, “false”] (“deprecated”) |
|
|
PositiveInteger |
Max transmission unit (MTU) |
|
|
ChooseOne |
Large receive offload (LRO) ["on", "off"] |
|
|
ChooseOne |
Link Speed [“auto”, “10”, “100”, “1000”, “10000”] |
|
|
ChooseOne |
Link Duplex [“auto”, “half”, “full”] |
Table 8-3 VNIC Device Datalink Properties
| Property | Type | Description |
|---|---|---|
|
|
String |
“vnic” (“immutable”) |
|
|
NetworkLabel |
Label |
|
|
ChooseOne |
Links [“ixgbe0”] |
|
|
PositiveInteger |
Max transmission unit (MTU) |
|
|
ChooseOne |
Large receive offload (LRO) ["on", "off"] |
|
|
VLAN |
VLAN ID |
Table 8-4 VLAN Device Datalink Properties
| Property | Type | Description |
|---|---|---|
|
|
String |
“vlan” (“immutable”) |
|
|
NetworkLabel |
Label |
|
|
ChooseOne |
Links [“ixgbe0”] |
|
|
PositiveInteger |
Max transmission unit (MTU) |
|
|
ChooseOne |
Large receive offload (LRO) ["on", "off"] |
|
|
VLAN |
VLAN ID |
Table 8-5 Aggregation Based Device Datalink Properties
| Property | Type | Description |
|---|---|---|
|
|
String |
“aggregation” (“immutable”) |
|
|
NetworkLabel |
Label |
|
|
ChooseN |
Links [“igb1”, “igb0”, “ixgbe2”, “ixgbe3”, “igb4”, “igb3”, “ixgbe1”, “igb2”, “igb5”] |
|
|
Boolean |
Use Jumbo Frames [“true”, “false”] (“deprecated”) |
|
|
PositiveInteger |
Max transmission unit (MTU) |
|
|
ChooseOne |
Large receive offload (LRO) ["on", "off"] |
|
|
ChooseOne |
Policy [“L2”, “L3”, “L4”, “L2+L3”, “L2+L4”, “L3+L4”] |
|
|
ChooseOne |
Mode [“active”, “passive”, “off”] |
|
|
ChooseOne |
Timer [“short”, “long”] |
|
|
Integer |
Aggregation Key (“immutable”) |
Table 8-6 IP-Partition-Based Device Datalink Properties
| Property | Type | Description |
|---|---|---|
|
|
String |
“partition” (“immutable”) |
|
|
NetworkLabel |
Label |
|
|
ChooseOne |
Links |
|
|
Pkey |
Partition Key |
|
|
ChooseOne |
Link Mode [“cm”, “ud”] |
List Network Datalinks
Lists all configured datalinks on Oracle ZFS Storage Appliance. Each object in the datalinks list contains an href to get the operation on a single datalink resource along with datalink properties.
Example Request:
GET /api/network/v1/datalinks HTTP/1.1 Host: zfs-storage.example.com:215 Accept: application/json
Example JSON Data:
{
"datalinks": [{
"href": "/api/network/v1/datalinks/ixgbe0",
...
}, {
"href": "/api/network/v1/datalinks/ixgbe1",
...
}, {
"href": "/api/network/v1/datalinks/ixgbe2",
...
}, {
"href": "/api/network/v1/datalinks/ixgbe3",
...
}]
}Get Network Datalink
The GET method returns a JSON object that contains a datalink property with a list of datalink objects.
GET /api/network/v1/datalinks/ixgbe0 HTTP/1.1 Host: zfs-storage.example.com:215 Accept: application/json
Example JSON Data:
{
"datalink": {
"class": "device",
"datalink": "ixgbe0",
"duplex": "auto",
"href": "/api/network/v1/datalinks/ixgbe0",
"jumbo": false,
"label": "Untitled Datalink",
"links": [
"ixgbe0"
],
"mac": "0:21:28:a1:d9:68",
"mtu": 1500,
"speed": "auto"
}
}Create Network Datalink
The POST command creates a new datalink. One additional
property that is needed when creating a new datalink is the class property,
which defines the class of datalink to create. The datalinks class is defined
during datalink creation and can be one of the following class types:
-
device– Create a device-based datalink -
vnic– Create a VNIC-based datalink -
vlan– Create a VLAN-based datalink -
aggregation– Create an aggregation-based datalink -
partition– Create an IB partition datalink
The properties map to the same CLI properties available in the configuration net datalinks menu.
Example Request:
POST /api/network/v1/datalinks HTTP/1.1
Host: zfs-storage.example.com:215
X-Auth-User: root
X-Auth-Key: password
Content-Type: application/json
Content-Length: 78
{
"class": "device",
"jumbo": true,
"links": ["ixgbe2"],
"label": "TestDataLink"
}Example Result:
HTTP/1.1 201 Created X-Zfssa-Appliance-Api: 1.0 Location: /api/network/v1/datalinks/ixgbe2
Modify Network Datalink
The PUT method is used to modify datalink properties. For
details on setting up datalinks, see the CLI documentation.
Example Request:
PUT /api/network/v1/datalinks/ixgbe2 HTTP/1.1
{"jumbo": true}Example Result:
HTTP/1.1 202 Accepted
X-Zfssa-Appliance-Api: 1.0
Content-Type: application/json
Content-Length: 219
{
"datalink": {
"href": "/api/network/v1/datalinks/ixgbe2",
"class": "device",
"label": "MyDataLink",
"links": ["ixgbe2"],
"mac": "0:21:28:a1:d9:6a",
"mtu": 9000,
"duplex": "auto",
"jumbo": true,
"speed": "auto"
}
}