Skip to content
Smarter by Design.Simpler for Business

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 ​

TR7 WEB-CLI · network ip
# Tab after the command
admin@TR7LBWAF01> network ip
add delete list show update update-many
 
admin@TR7LBWAF01> network ip list v-device <device> # list them all
admin@TR7LBWAF01> network ip show v-device <device> <id> # show one
admin@TR7LBWAF01> network ip add v-device <device> interface <interface> ip <address> cidr <mask>
admin@TR7LBWAF01> network ip update v-device <device> id <id> … # change
admin@TR7LBWAF01> network ip update-many v-device <device> target <target> …
admin@TR7LBWAF01> network ip delete v-device <device> <id> # delete
admin@TR7LBWAF01>  

Required Fields ​

OrderFieldStatusWhat it doesWhat is written after it
1v-deviceRequiredSelects to which virtual device the address will be writtenThe virtual device; Tab lists them
2interfaceRequiredSelects the interface on which the address will be definedA network interface record
3ipRequiredDetermines the address to be definedThe IP address
4cidrRequiredDetermines the mask length of the addressThe 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 ​

FieldWhat it doesWhat is written after it
--ipTypeSelects the type of the addressinterface an address that belongs directly to the interface (the default) · cluster a virtual address taken over between the cluster members
--ipEnabledDetermines whether the address is enabled or nottrue (the default) · false
--descWrites an explanation for the addressFree text
--isBackupDetermines whether this device is in the backup role in the cluster address or nottrue · false (the default is false). It opens only when --ipType cluster is selected and while the cluster is enabled
--otherIpDetermines the address of the peer device in the cluster configurationThe IP address; it opens only while the cluster is enabled
--otherIpEnabledDetermines whether the address on the peer device is enabled or nottrue (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 ​

TR7 WEB-CLI · the interface and the cluster address
# an address that belongs to the interface
admin@TR7LBWAF01> network ip add v-device Host interface <interface> ip 10.0.1.10 cidr 24 \
--desc "management address"
 
# the cluster address: the address of the peer device and the backup role
admin@TR7LBWAF01> network ip add v-device Host interface <interface> ip 10.0.1.20 cidr 24 \
--ipType cluster --otherIp 10.0.1.21 --isBackup false
 
admin@TR7LBWAF01> network ip update v-device Host id <id> --ipEnabled false
admin@TR7LBWAF01> network ip delete v-device Host <id>
admin@TR7LBWAF01>  

Bulk Update ​

The update-many applies the same change to many address records at once. The writing order is the same in every resource.

Step 1 Select the target
The only required field is target: selected for the records selected from the list, all for the entire collection.
Step 2 Add the fields to be written
Only the fields that can be written to many records with the same value are present; the fields specific to the record, such as the identifier, the name, the address and the mask, do not take place in this command.
Step 3 Mark the targets from the list
When target selected is written and no id is given, a selection list with checkboxes opens.
Step 4 Confirm
A warning stating how many records will be affected appears; nothing is written until the confirmation word is typed.
FieldStatusValue
v-deviceRequiredIt is written before target; it determines in which scope the bulk update will run
targetRequiredselected — the records selected from the list · all — the whole collection
--ids.NConditionalThe 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.
--onErrorOptionalabort (default) — if even one of the targets does not pass the validation, nothing is written · skip — the targets that pass are written

Writable Fields ​

TR7 WEB-CLI · update-many · Tab output
# Tab after the command
admin@TR7LBWAF01> network ip update-many v-device <v-device>
--info target
 
# Tab after the target field
admin@TR7LBWAF01> network ip update-many v-device <v-device> target
all selected
 
# write -- and Tab: all the writable fields
admin@TR7LBWAF01> network ip update-many v-device <v-device> target all --
--desc            --info            --ipEnabled
--isBackup        --onError         --otherIpEnabled
admin@TR7LBWAF01>  

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.

FieldWhat it doesWhat is written after it
--infoWrites what the command will do without running itIt does not take a value; it is written on its own
--onErrorDetermines what will happen if a target does not pass the validationabort writes nothing (default) · skip writes the targets that pass
--ipEnabledDetermines whether the addresses are enabled or nottrue · false
--otherIpEnabledDetermines whether the addresses on the peer device are enabled or nottrue · false
--isBackupDetermines whether this device is in the backup role in the cluster addresses or nottrue · false
--descWrites the same explanation for the addressesFree text

Fields that exist in the single command but not here, and the reasons:

FieldWhy it is not here
ipThe address is specific to the record; the same address cannot be written to many records
cidrThe mask, together with the address, is specific to the record
interfaceThe interface selection depends on the virtual device
ipTypeThe type of the address determines the identifier of the record
otherIpThe address of the peer device is also specific to the record

Target Selection and Confirmation ​

TR7 WEB-CLI · selection list and confirmation
admin@TR7LBWAF01> network ip update-many v-device <v-device> target selected --ipEnabled false
 
?  Target objects
    space: mark · ctrl+a: all · enter: confirm
    Filter: (filter by typing) · esc: cancel
 
  [x] <record-1>
  [x] <record-2>
  [ ] <record-3>
    2 selected / 3
 
⚠  2 objects will be updated
    <record-1>, <record-2>
 
Type "yes" to confirm: yes
admin@TR7LBWAF01>  
TR7 WEB-CLI · the whole collection and writing in a script
# the whole collection: the list does not open, the confirmation comes directly
admin@TR7LBWAF01> network ip update-many v-device <v-device> target all --desc "maintenance"
⚠  This operation will update ALL the objects in the collection
Type "yes" to confirm:
 
# in a script or in a pipeline: the targets are written by hand, the list does not open
admin@TR7LBWAF01> network ip update-many v-device <v-device> target selected \
--ids.0 <id-1> --ids.1 <id-2> --ipEnabled false --onError skip
admin@TR7LBWAF01>  

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, delete and update-many commands ask for the v-device field first; the addresses are kept per device.
  • The cluster address is taken over. The address for which --ipType cluster is selected is carried between the cluster members at the role change; --isBackup determines the initial role of this device.
  • Turning an address off does not delete the record. The --ipEnabled false leaves 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, --otherIpEnabled and --isBackup fields are not listed.