network ip
The network ip command manages the IP addresses defined on the interfaces. The address either belongs directly to the interface or is a virtual address taken over between the cluster members. Its panel equivalent is the address screen in the network configuration.
Command Summary
Required Fields
| Order | Field | Status | What it does | What is written after it |
|---|---|---|---|---|
| 1 | v-device | Required | Selects to which virtual device the address will be written | The virtual device; Tab lists them |
| 2 | interface | Required | Selects the interface on which the address will be defined | A network interface record |
| 3 | ip | Required | Determines the address to be defined | The IP address |
| 4 | cidr | Required | Determines the mask length of the address | The CIDR value, for example 24 |
The list, show, update and delete commands also ask for v-device first: in the show and delete commands the identifier is written after this without the field name, and in the update command it is in the id <id> form.
Optional Fields
| Field | What it does | What is written after it |
|---|---|---|
--ipType | Selects the type of the address | interface an address that belongs directly to the interface (the default) · cluster a virtual address taken over between the cluster members |
--ipEnabled | Determines whether the address is enabled or not | true (the default) · false |
--desc | Writes an explanation for the address | Free text |
--isBackup | Determines whether this device is in the backup role in the cluster address or not | true · false (the default is false). It opens only when --ipType cluster is selected and while the cluster is enabled |
--otherIp | Determines the address of the peer device in the cluster configuration | The IP address; it opens only while the cluster is enabled |
--otherIpEnabled | Determines whether the address on the peer device is enabled or not | true (the default) · false; it opens only while the cluster is enabled |
The cluster fields are seen only on the devices with a cluster set up
The --otherIp, --otherIpEnabled and --isBackup fields do not appear in the completion list if the cluster configuration is not enabled on the device.
Examples
Bulk Update
The update-many applies the same change to many address records at once. The writing order is the same in every resource.
target: selected for the records selected from the list, all for the entire collection. target selected is written and no id is given, a selection list with checkboxes opens. | Field | Status | Value |
|---|---|---|
v-device | Required | It is written before target; it determines in which scope the bulk update will run |
target | Required | selected — the records selected from the list · all — the whole collection |
--ids.N | Conditional | The target ids for target selected. It is not suggested in the Tab list: the targets are marked from the selection list. In a script and in a pipeline it is written manually. |
--onError | Optional | abort (default) — if even one of the targets does not pass the validation, nothing is written · skip — the targets that pass are written |
Writable Fields
There are 6 fields in the command; the list above is the same as what appears when -- is written and Tab is pressed on the device. What each of them does and what is written after it are in the table below.
The fields that are condition-bound in the single command (those that open according to the value of another field) are listed here without a condition: in the bulk update every target is validated separately according to its own record, and if the field is not active on a target it is skipped only on that target.
| Field | What it does | What is written after it |
|---|---|---|
--info | Writes what the command will do without running it | It does not take a value; it is written on its own |
--onError | Determines what will happen if a target does not pass the validation | abort writes nothing (default) · skip writes the targets that pass |
--ipEnabled | Determines whether the addresses are enabled or not | true · false |
--otherIpEnabled | Determines whether the addresses on the peer device are enabled or not | true · false |
--isBackup | Determines whether this device is in the backup role in the cluster addresses or not | true · false |
--desc | Writes the same explanation for the addresses | Free text |
Fields that exist in the single command but not here, and the reasons:
| Field | Why it is not here |
|---|---|
ip | The address is specific to the record; the same address cannot be written to many records |
cidr | The mask, together with the address, is specific to the record |
interface | The interface selection depends on the virtual device |
ipType | The type of the address determines the identifier of the record |
otherIp | The address of the peer device is also specific to the record |
Target Selection and Confirmation
The screen language depends on the user
The texts in the selection list and on the confirmation screen come according to the language preference of the signed-in user. The confirmation word is yes in the English interface and evet in the Turkish interface.
The detailed behavior of bulk update — which fields can be written in bulk and the report returned for each target — is on the API Commands page.
Things to Know
- The virtual device is written in every command. All of the
add,list,show,update,deleteandupdate-manycommands ask for thev-devicefield first; the addresses are kept per device. - The cluster address is taken over. The address for which
--ipType clusteris selected is carried between the cluster members at the role change;--isBackupdetermines the initial role of this device. - Turning an address off does not delete the record. The
--ipEnabled falseleaves the address in the configuration, it only stops it from being applied to the interface. - The cluster fields are conditional. If there is no cluster configuration on the device, the
--otherIp,--otherIpEnabledand--isBackupfields are not listed.
