ippoolconfig(1)

NAME
ippoolconfig - command-line configuration for ippoold

SYNOPSIS
ippoolconfig [-q] [-R <ipaddr>] [command]

DESCRIPTION
ippoolconfig is a command line application for managing ippoold(8), an IP address pool daemon.

ippoold is controlled using a Remote Procedure Call (RPC) interface documented in ippool_rpc(4). ippoolconfig is an RPC client application implementing this interface.

ippoold was originally written for the OpenL2TP project but was repackaged as a separate application so that it could be used by other applications.

OPTIONS

-q  Quiet mode. Suppresses information messages, such as "Created xyz".

-R ipaddr
    Send commands to ippoold running at ipaddr rather than to the local host. Remote management must be enabled for ippoold at the remote host for this option to work. ipaddr may be specified as an IP address or a hostname.

command
    the specified command is executed and then ippoolconfig terminates. When no command is given, ippoolconfig enters interactive mode, presenting the user with a Command Line Interface (CLI) providing command line editing, context sensitive help and TAB completion.

ENVIRONMENT
ippoold must be running before the first ippoolconfig command is issued. ippoolconfig uses Sun RPC to communicate with ippoold, so the system must be capable of running RPC.

INTERACTIVE MODE
ippoolconfig provides a context-sensitive Command Line Interface (CLI). Hitting <TAB> at the prompt shows a list of keywords applicable. Entering a few letters of a keyword and hitting TAB again completes the keyword (if possible). Hitting TAB again shows a list of next valid keywords. When valid object type name and operation are present, <TAB> shows a list of valid parameters for the operation. Entering a few letters of a parameter and hitting <TAB> completes the parameter name if possible and appends a '=' sign after the name if the parameter takes a value.

The <?> key behaves similarly to <TAB> in that it displays possible completions but it also gives descriptive help about each option.

  KEY BINDINGS
ippoolconfig provides intuitive command line editing with history. Key bindings are the same as bash(1) by default, although they can be changed using ippoolconfig entries in a .inputrc file. See the readline(3) manual page for more information.

Commonly used default key bindings are:

<ctrl-a>
    beginning of line

<ctrl-e>
    end of line

<ctrl-k>
    kill characters from cursor to end of line

<ctrl-y>
    yank characters last killed into line at cursor position

<meta-f>
    forward a word

<meta-b>
    back a word

<meta-t>
    transpose word at cursor position with previous word.

On keyboards without a Meta (Alt) key, the Escape key can be used.

  COMMAND HISTORY
In interactive mode, ippoolconfig writes command history data to ~/.ippool_history when the application exits. This gives the operator the ability to recall commands from a previous session.

If desired, the environment variable IPPOOL_HISTFILE can be used to point to an alternative history file and IPPOOL_HISTFILESIZE can be used to limit the history file to nnn entries. If IPPOOL_HISTFILE is set to an empty string, the writing of history information to a file is disabled.

PERSISTENT CONFIGURATION
ippoold does not use configuration files; all configuration is done using an RPC client application such as ippoolconfig. However, it is useful to save and restore configuration snapshots. ippoolconfig provides

config save file=<filename>

and

config restore file=<filename>

commands for this purpose. Configuration data is written to the file in plain text so may be edited by hand if desired. Note that this feature is implemented in ippoolconfig, not the ippoold daemon. Future versions may add an RPC interface to allow RPC client applications the ability to retrieve and restore configuration in a binary format.

SYNTAX SUMMARY
The following output is taken from the context sensitive help in ippoolconfig's. interactive mode. Use the <?> key to ask for context sensitive help.

  COMMAND SUMMARY
ippool> ?
exit    - exit application
server  - sets application to manage a remote ippoold server
config  - configuration save/restore
quit    - exit application

ippool> ippool ?
create  - create a new IP address pool
address - address related commands
list    - list all IP address pools
show    - show an IP address pool
modify  - modify an IP address pool
delete  - delete an IP address pool

ippool> server ?
modify - switch to manage a remote ippoold server
show   - show server parameters

ippool> config ?
save    - save configuration
restore - restore configurationfrom file

  IPPOOL CREATE
ippool> pool create ?
pool_name  - Name of ip pool
first_addr - First address in the pool
num_addrs  - Number of addresses in the pool. Default: derived
             from netmask
trace      - Pool trace control. Default: OFF.
drain      - Drain pool (disable further allocations). Default: OFF.
max_addrs  - Maximum number of addresses contained in pool.
             Default = 0 (unlimited)

  IPPOOL MODIFY
ippool> pool modify ?
pool_name - Name of ip pool
trace     - Pool trace control. Default: OFF.
drain     - Drain pool (disable further allocations). Default: OFF.
max_addrs - Maximum number of addresses contained in pool.
            Default = 0 (unlimited)

  IPPOOL ADDRESS ADD
ippool> pool address add
pool_name  - Name of ip pool
netmask    - IP netmask for address block. Default: 255.255.255.0.
first_addr - First address in the block
num_addrs  - Number of addresses in the block. Default: derived
             from netmask.

    Any number of non-overlapping address blocks may be added to a pool.

  IPPOOL ADDRESS REMOVE
ippool> pool address add
pool_name  - Name of ip pool
netmask    - IP netmask for address block. Default: 255.255.255.0.
first_addr - First address in the block.
num_addrs  - Number of addresses in the block. Default: derived
             from netmask.

    Partial address blocks cannot be removed. The first_addr and num_addrs parameters must match the values used when the address block was created.

  IPPOOL ADDRESS RESERVE
ippool> pool address add
pool_name  - Name of ip pool
first_addr - First address in the block.
num_addrs  - Number of addresses in the block.

  IPPOOL ADDRESS UNRESERVE
ippool> pool address add
pool_name  - Name of ip pool
first_addr - First address in the block.
num_addrs  - Number of addresses in the block.

  IPPOOL SHOW
ippool> pool show
pool_name - Name of ip pool

  IPPOOL DELETE
ippool> pool show
pool_name - Name of ip pool

  SERVER MODIFY
ippool> server modify ?
name - IP address or hostname of L2TP daemon to attach to. Default=localhost.

  CONFIG SAVE
ippool> config save ?
file   - Filename for save/restore operation.

  CONFIG RESTORE
ippool> config restore ?
file   - Filename for save/restore operation.

EXAMPLES

Configure ippoold with an address pool called one. Some addresses within the pool are reserved (assigned for other uses).

ippool> pool create pool_name=one first_addr=10.1.1.1 num_addrs=10
    ippool> pool address add pool_name=one first_addr=10.2.1.1 num_addrs=100
    ippool> pool address reserve pool_name=one first_addr=10.1.1.5 num_addrs=2
    ippool> pool show pool_name=one
    IP pool one:-
      max pool size: 0 (unlimited)
      debug messages: NO, drain: NO
      address blocks:-
        base 10.1.1.1 thru 10.1.1.10 (size 10), netmask 255.255.255.0
        base 10.2.1.1 thru 10.2.1.100 (size 100), netmask 255.255.255.0
      reserved address blocks:-
        base 10.1.1.5 thru 10.1.1.6 (size 2), netmask 255.255.255.0
      total addresses: 110, available: 108
      pool use statistics:-
        allocs: 0, frees: 0, alloc_fails: 0
      available address blocks:-
        base 10.1.1.1 thru 10.1.1.4
        base 10.1.1.7 thru 10.1.1.10
        base 10.2.1.1 thru 10.2.1.100

FILES
~/.ippool_history

REPORTING BUGS
Please report bugs to <openl2tp-bugs@lists.sourceforge.net>.

SEE ALSO
ippoolconfig(1), ippoold(8), readline(3).