Chapter 2: Command Reference

2.1. Configuration

2.1.1. ac

Alias for activate.

2.1.2. activate

Activate changes.

Description

Activate the latest changes.

This will issue a reconfiguration, using the new configuration. If the reconfiguration is successful a commit command must be issued within the configured timeout interval in order to save the changes to media. If not, the system will revert to using the previous version of the configuration.

Usage

activate 

[Note] Note
Requires Administrator privileges.

2.1.3. add

Create a new object.

Description

Create a new object and add it to the configuration.

Specify the type of object you want to create and the identifier, if the type has one, unless the object is identified by an index. Set the properties of the object by writing the propertyname equals (=) and then the value. An optional category can be specified for some object types when using tab completion.

If a mandatory property isn't specified a list of errors will be shown after the object is created. If an invalid property or value type is specified or if the identifier is missing the command will fail and not create an object.

Adjustments can be made after the object is created by using the set command.

Example 2.1. Create a new object

Add objects with an identifier property (not index):
 gw-world:/> add Address IP4Address example_ip Address=1.2.3.4
 Comments="This is an example"
 gw-world:/> add IP4Address example_ip2 Address=2.3.4.5
Add an object with an index:
 gw-world:/main> add Route Interface=lan
Add an object without identifier:
 gw-world:/> add DynDnsClientDyndnsOrg DNSName=example Username=example

Usage

add [<Category>] <Type> [<Identifier>] [-force] [-silent]
    [<key-value pair>]...

Options

-force
Add object, even if it has errors.
-silent
Do not show any errors.
<Category>
Category that groups object types.
<Identifier>
The property that identifies the configuration object. May not be applicable depending on the specified <Type>.
<key-value pair>
One or more property-value pairs, i.e. <property name>=<value> or <property name>="<value>".
<Type>
Type of configuration object to perform operation on.
[Note] Note
Requires Administrator privileges.

2.1.4. cancel

Cancel ongoing commit.

Description

Cancel commit operation immediately, without waiting for the timeout.

Usage

cancel 

[Note] Note
Requires Administrator privileges.

2.1.5. cc

Change the current context.

Description

Change the current configuration context.

A context is a group of objects that are dependent on and grouped by a parent object. Many objects lie in the "root" context and do not have a specific parent. Other objects, e.g. User objects lie in a sub-context (or child context) of the root - in this case in a LocalUserDatabase. In order to add or modify users you have to be in the correct context, e.g. a LocalUserDatabase called "exampledb". Only objects in the current context can be accessed.

Example 2.2. Change context

Change to a sub/child context:
 gw-world:/> cc LocalUserDatabase exampledb
 gw-world:/exampledb>
Go back to the parent context:
 gw-world:/ospf1/area1> cc ..
 gw-world:/ospf1> cc ..
 gw-world:/>
Go back to the root context:
 gw-world:/ospf1/area1> cc
 gw-world:/>
or
 gw-world:/ospf1/area1> cc /
 gw-world:/>

Usage

cc [<Category>] <Type> <Identifier> 
Change the current context.
cc -print 
Print the current context.
cc 
Change to root context (same as "cc /").

Options

-print
Print the current context.
<Category>
Category that groups object types.
<Identifier>
The property that identifies the configuration object. May not be applicable depending on the specified <Type>.
<Type>
Type of configuration object to perform operation on.

2.1.6. commit

Save new configuration to media.

Description

Save the new configuration to media. This command can only be issued after a successful activate command.

Usage

commit 

[Note] Note
Requires Administrator privileges.

2.1.7. delete

Delete specified objects.

Description

Delete the specified object, removing it from the configuration.

Add the force flag to delete the object even if it is referenced by other objects or if it is a context that has child objects that aren't deleted. This may cause objects referring to the specified object or one of its children to get errors that must be corrected before the configuration can be activated.

See also: undelete

Example 2.3. Delete an object

Delete an unreferenced object:
 gw-world:/> delete Address IP4Address example_ip
Delete a referenced object:
(will cause error in examplerule)
 gw-world:/> set IPRule examplerule SourceNetwork=examplenet
 gw-world:/> delete Address IP4Address examplenet -force

Usage

delete [<Category>] <Type> [<Identifier>] [-force] 

Options

-force
Force object to be deleted even if it's used by other objects or has children.
<Category>
Category that groups object types.
<Identifier>
The property that identifies the configuration object. May not be applicable depending on the specified <Type>.
<Type>
Type of configuration object to perform operation on.
[Note] Note
Requires Administrator privileges.

2.1.8. pskgen

Generate random pre-shared key.

Description

Generate a pre-shared key of specified size, containing randomized key data. If a key with the specified name exists, the existing key is modified. Otherwise a new key object is created.

Usage

pskgen <Name> [-comments=<String>] [-size={64 | 128 | 256 | 512 |
       1024 | 2048 | 4096}] 

Options

-comments=<String>
Comments for this key.
-size={64 | 128 | 256 | 512 | 1024 | 2048 | 4096}
Number of bits of data in the generated key. (Default: 64)
<Name>
Name of key.
[Note] Note
Requires Administrator privileges.

2.1.9. reject

Reject changes.

Description

Reject the changes made to the specified object by reverting to the values of the last committed configuration.

All changes made to the object will be lost. If the object is added after the last commit, it will be removed.

To reject the changes in more than one object, use either the -recursive flag to delete a context and all its children recursively or the -all flag to reject the changes in all objects in the configuration.

See also: activate, commit

Example 2.4. Reject changes

Reject changes in individual objects:
 gw-world:/> set Address IP4Address example_ip
 Comments="This comment will be rejected"
 gw-world:/> reject Address IP4Address example_ip
 gw-world:/> add Address IP4Address example_ip2 Address=1.2.3.4
 Comments="This whole object will be removed"
 gw-world:/> reject Address IP4Address example_ip2
Reject changes recursively:
(will reject changes in the user database and all users)
 gw-world:/exampledb> set User user1 Comments="Something"
 gw-world:/exampledb> set User user2 Comments="that will be"
 gw-world:/exampledb> set User user3 Comments="rejected"
 gw-world:/exampledb> cc ..
 gw-world:/> reject LocalUserDatabase exampledb -recursive
Reject all changes:
 gw-world:/anycontext> reject -all
All changes since the last commit will be rejected:
(example_ip will be removed since it is newly added)
 gw-world:/> add IP4Address example_ip Address=1.2.3.4
 gw-world:/> delete IP4Address example_ip
 gw-world:/> reject IP4Address example_ip

Usage

reject [<Category>] <Type> [<Identifier>] [-recursive] 
Reject changes made to the specified object.
reject -all 
Reject all changes in the configuration.

Options

-all
Reject all changes in the configuration.
-recursive
Recursively reject changes.
<Category>
Category that groups object types.
<Identifier>
The property that identifies the configuration object. May not be applicable depending on the specified <Type>.
<Type>
Type of configuration object to perform operation on.
[Note] Note
Requires Administrator privileges.

2.1.10. reset

Reset unit configuration and/or binaries.

Description

Reset configuration to the base configuration as generated by the current core or reset binaries to factory defaults.

Usage

reset [-configuration] [-factorydefault] 

Options

-configuration
Reset the configuration to the current version's default settings.
-factorydefault
Reset the device to factory defaults.
[Note] Note
Requires Administrator privileges.

2.1.11. set

Set property values.

Description

Set property values of configuration objects.

Specify the type of object you want to modify and the identifier, if the type has one. Set the properties of the object by writing the propertyname equals (=) and then the value. An optional category can be specified for some object types when using tab completion.

If a mandatory property hasn't been specified or if a property has an error a list of errors will be shown after the specified properties have been set. If an invalid property or value type is specified the command will fail and not modify the object.

See also: add

Example 2.5. Set property values

Set properties for objects that have an identifier property:
 gw-world:/> set Address IP4Address example_ip Address=1.2.3.4
 Comments="This is an example"
 gw-world:/> set IP4Address example_ip2 Address=2.3.4.5
 Comments=comment_without_whitespace
 gw-world:/main> set Route 1 Comment="A route"
 gw-world:/> set IPRule 12 Index=1
Set properties for an object without identifier:
 gw-world:/> set DynDnsClientDyndnsOrg Username=example

Usage

set [<Category>] <Type> [<Identifier>] [-disable] [-enable]
    [-force] [<key-value pair>]...

Options

-disable
Disable object. This option is not available if the object is already disabled.
-enable
Enable object. This option is not available if the object is already enabled.
-force
Set values, even if they contain errors.
<Category>
Category that groups object types.
<Identifier>
The property that identifies the configuration object. May not be applicable depending on the specified <Type>.
<key-value pair>
One or more property-value pairs, i.e. <property name>=<value> or <property name>="<value>".
<Type>
Type of configuration object to perform operation on.
[Note] Note
Requires Administrator privileges.

2.1.12. show

Show objects.

Description

Show objects.

Show the properties of a specified object. There are a number of flags that can be specified to show otherwise hidden properties. To show a list of object types and categories available in the current context, just type show. Show a table of all objects of a type by specifying a type or a category. Use the -errors or -changes flags to show what objects have been changed or have errors in the configuration.

When showing a table of all objects of a certain type, the status of each object since the last time the configuration was committed is indicated by a flag. The flags used are:

-
The object is deleted.
o
The object is disabled.
!
The object has errors.
+
The object is newly created.
*
The object is modified.

Additional flags:

D
The object has dynamic properties which are updated by the system.

When listing categories and object types, categories are indicated by [] and types where objects may be contexts by /.

Example 2.6. Show objects

Show the properties of an individual object:
 gw-world:/> show Address IP4Address example_ip
 gw-world:/main> show Route 1
 gw-world:/> show Client DynDnsClientDyndnsOrg
Show a table of all objects of a type and a selection of their
properties as well as their status:
 gw-world:/> show Address IP4Address
 gw-world:/> show IP4Address
Show a table of all objects for each type in a category:
 gw-world:/> show Address
Show objects with changes and errors:
 gw-world:/> show -changes
 gw-world:/> show -errors
Show what objects use (refer to) a certain object:
 gw-world:/> show Address IP4Address example_ip -references

Usage

show 
Show the types and categories available in the current context.
show [<Category>] [<Type> [<Identifier>]] [-disabled] [-references]
Show an object or list a type or category.
show -errors [-verbose] 
Show all errors.
show -changes 
Show all changes.

Options

-changes
Show all changes in the current configuration.
-disabled
Show disabled properties.
-errors
Show all errors in the current configuration.
-references
Show all references to this object from other objects.
-verbose
Show error details.
<Category>
Category that groups object types.
<Identifier>
The property that identifies the configuration object. May not be applicable depending on the specified <Type>.
<Type>
Type of configuration object to perform operation on.

2.1.13. undelete

Restore previously deleted objects.

Description

Restore a previously deleted object.

This is possible as long as the activate command has not been called.

See also: delete

Example 2.7. Undelete an object

Undelete an unreferenced object:
 gw-world:/> delete Address IP4Address example_ip
 gw-world:/> undelete Address IP4Address example_ip
Undelete a referenced object:
(will remove the error in examplerule)
 gw-world:/> set IPRule examplerule SourceNetwork=examplenet
 gw-world:/> delete Address IP4Address examplenet -force
 gw-world:/> undelete Address IP4Address examplenet

Usage

undelete [<Category>] <Type> [<Identifier>] 

Options

<Category>
Category that groups object types.
<Identifier>
The property that identifies the configuration object. May not be applicable depending on the specified <Type>.
<Type>
Type of configuration object to perform operation on.
[Note] Note
Requires Administrator privileges.