Chapter 2: Command Reference

2.1. Configuration

2.1.1. 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 [-force] 

Options

-force
Force activation, even if no changes have been made.
[Note] Note
Requires Administrator privileges.

2.1.2. 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 IPAddress example_ip Address=1.2.3.4
 Comments="This is an example"
 gw-world:/> add IPAddress example_ip2 Address=2.3.4.5

Add an object with an index:
 gw-world:/RoutingTable/main> add Route Interface=lan Network=all-nets-i
p4

Usage

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

Options

-force
Add object, even if it has 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.3. 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:/LocalUserDatabase/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.4. 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.5. 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 IPAddress example_ip

Delete a referenced object:
(will cause error in examplerule)
 gw-world:/IPRuleSet/main> set IPRule 1(examplerule) SourceNetwork=examp
lenet
 gw-world:/> delete Address IPAddress examplenet -force
Delete a range of objects:
 gw-world:/IPRuleSet/main> delete IPRule -range=1-10

Usage

delete [<Category>] <Type> [<Identifier>] [-force]
       [-range=<Integer Range>] 

Options

-force
Force object to be deleted even if it's used by other objects or has children.
-range=<Integer Range>
One or more ranges of objects to delete, can only be used for indexed types of objects.
<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.6. pskgen

Generate random pre-shared key.

Description

Generates a pre-shared key of the 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 <String> [-comments=<String>] [-size={128 | 256 | 512 | 1024
       | 2048 | 4096}] 

Options

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

2.1.7. 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 IPAddress example_ip
 Comments="This comment will be rejected"
 gw-world:/> reject Address IPAddress example_ip
 gw-world:/> add Address IPAddress example_ip2 Address=1.2.3.4
 Comments="This whole object will be removed"
 gw-world:/> reject Address IPAddress example_ip2

Reject changes recursively:
(will reject changes in the user database and all users)
 gw-world:/LocalUserDatabase/exampledb> set User user1 Comments="Somethi
ng"
 gw-world:/LocalUserDatabase/exampledb> set User user2 Comments="that wi
ll be"
 gw-world:/LocalUserDatabase/exampledb> set User user3 Comments="rejecte
d"
 gw-world:/LocalUserDatabase/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 Address IPAddress example_ip Address=1.2.3.4
 gw-world:/> delete Address IPAddress example_ip
 gw-world:/> reject Address IPAddress 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.8. 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 IPAddress example_ip Address=1.2.3.4
 Comments="This is an example"
 gw-world:/> set IPAddress example_ip2 Address=2.3.4.5
 Comments=comment_without_whitespace
 gw-world:/RoutingTable/main> set Route 1 Comments="A route"
 gw-world:/IPRuleSet/main> set IPRule 12 Index=1
Set properties on a range of objects:
 gw-world:/IPRuleSet/main> set IPRule -range=1-10 LogEnabled=No

Usage

set [<Category>] <Type> [<Identifier>] [-disable] [-enable]
    [-force] [-range=<Integer Range>] [<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.
-range=<Integer Range>
One or more ranges of objects to set values on, can only be used for indexed types of objects.
<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.9. 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.

Unchanged objects are not indicated by a flag.

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 IPAddress example_ip
 gw-world:/RoutingTable/main> show Route 1

Show a table of all objects of a type and a selection of their
properties as well as their status:
 gw-world:/> show Address IPAddress
 gw-world:/> show IPAddress

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 IPAddress example_ip -references

Usage

show 
Show the types and categories available in the current context.
show [<Category>] [<Type> [<Identifier>]] [-system] [-disabled]
     [-references] [-expand] 
Show an object or list a type or category.
show -errors [-verbose] 
Show all errors.
show -changes 
Show all changes.
show -expand 
Show objects with expanded symbolic names where supported.

Options

-changes
Show all changes in the current configuration.
-disabled
Show disabled properties.
-errors
Show all errors in the current configuration.
-expand
Show IP addresses instead of symbolic names.
-references
Show all references to this object from other objects.
-system
Show system properties.
-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.10. 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 IPAddress example_ip
 gw-world:/> undelete Address IPAddress example_ip

Undelete a referenced object:
(will remove the error in examplerule)
 gw-world:/IPRuleSet/main> set IPRule 1(examplerule) SourceNetwork=examp
lenet
 gw-world:/> delete Address IPAddress examplenet -force
 gw-world:/> undelete Address IPAddress 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.