== Running OsmoNITB

The OsmoNITB executable (`osmo-nitb`) offers the following command-line
arguments:

=== SYNOPSIS

*osmo-nitb* [-h|-V] [-d 'DBGMASK'] [-D] [-c 'CONFIGFILE'] [-s] [-T] [-e 'LOGLEVEL'] [-l 'DATABASE'] [-a] [-P] [-m] [-C] [-r 'RFCTL']

=== OPTIONS

*-h, --help*::
	Print a short help message about the supported options
*-V, --version*::
	Print the compile-time version number of the program
*-d, --debug 'DBGMASK','DBGLEVELS'*::
	Set the log subsystems and levels for logging to stderr. This
	has mostly been superseded by VTY-based logging configuration,
	see <<logging>> for further information.
*-D, --daemonize*::
	Fork the process as a daemon into background.
*-c, --config-file 'CONFIGFILE'*::
	Specify the file and path name of the configuration file to be
	used. If none is specified, use `openbsc.cfg` in the current
	working directory.
*-s, --disable-color*::
	Disable colors for logging to stderr. This has mostly been
	deprecated by VTY based logging configuration, see <<logging>>
	for more information.
*-T, --timestamp*::
	Enable time-stamping of log messages to stderr. This has mostly
	been deprecated by VTY based logging configuration, see
	<<logging>> for more information.
*-e, --log-level 'LOGLEVEL'*::
	Set the global log level for logging to stderr. This has mostly
	been deprecated by VTY based logging configuration, see
	<<logging>> for more information.
*-l, --database 'DATABASE'*::
	Specify the file name of the SQLite3 database to use as HLR/AUC
	storage
*-a, --authorize-everyone*::
	Authorize every subscriber to the network.  This corresponds to
	the `auth-policy open` VTY configuration option.
	+
	WARNING:: This is dangerous as you may disrupt services to
	subscribers that are not part of your network!  Don't use unless
	you absolutely know what you're doing!
*-P, --rtp-proxy*::
	Enable the RTP proxy code inside OsmoNITB.  This will force all
	voice RTP data to pass through OsmoNITB, rather than going
	directly from BTS to MGW, or BTS to BTS.
*-M, --mncc-sock-path*::
	Enable the MNCC socket for an external MNCC handler. See
	<<mncc>> for further information.
*-m, --mncc-sock*::
	Same as option -M (deprecated).
*-C, --no-dbcounter*::
	Disable the regular periodic synchronization of statistics
	counters to the database.
*-r, --rf-ctl 'RFCTL'*::
	Offer a Unix domain socket for RF control at the path/filename
	'RFCTL' in the file system.


=== Multiple instances

Running multiple instances of `osmo-nitb` is possible if all interfaces (VTY,
OML) are separated using the appropriate configuration options. The IP based
interfaces are binding to local host by default. In order to separate the
processes, the user has to bind those services to specific but different
IP addresses.

The VTY and the control interface can be bound to IP addresses from the loopback
address range.

.Example: Binding VTY and control interface to a specific ip-address
----
line vty
 bind 127.0.0.2
ctrl
 bind 127.0.0.2
----

The OML interface also needs to be separated by binding it to different IP
addresses. Usually it is not possible to use addresses from the loopback
address range here since the OML interface needs to be reachable by an external
BTS. If only one ethernet interface is available, sub-devices with different IP
addresses can be created.

.Example: Binding OML to a specific IP address
----
e1_input
 ipa bind 10.9.1.101
----

NOTE: Depending on the application, it is necessary to have different ARFCN,
MCC, MNC and network name settings. It might also be necessary to point to
different database and config files using command line options (see option
-l and -c).

NOTE: If an external MNCC handler is used, the user has to assign a different
socket path to reach osmo-nitb instance using commandline option -M. If option
-M is left out, the internal MNCC handler is used and no further configuration
is required
