ConfigurationΒΆ

VLANd uses a simple ini-style file format for configuration. The default location for the file is /etc/vland.cfg. As it contains passwords for database and switch access, it should be kept private (i.e. not world-readable). The example config file with this package (reproduced below) includes commented examples for everything than VLANd might use.

There are several groups of things that should be configured here. VLANd itself uses all the settings (database, port numbers, switch config and login details). The admin program vland-admin also needs to know the port number for VLANd to be able to communicate. Obviously, if you choose a different communication port then all API users will need to be updated too.

# Example config for VLANd

[database]
#server=
#port=
dbname = vland
username = vland
#password=

[vland]
port = 3080
#default_vlan_tag = 1

[visualisation]
enabled = False
port = 3081
refresh = False

[logging]
# Supply a filename, or leave unspecified for stderr
filename = /var/log/vland.log
# valid options are DEBUG INFO WARNING ERROR CRITICAL
level = DEBUG

##########
# Example switch configs below for the various types of supported
# switch
##########

#[switch vlandswitch01]
#name = vlandswitch01
#driver = CiscoCatalyst
##username = username
#password = password
#enable_password = enable
#debug = True
#
#[switch vlandswitch02]
#name = vlandswitch02
#driver = CiscoSX300
#username = cisco
#password = cisco
#enable_password = 
#
#[switch vlandswitch03]
#name = vlandswitch03
#driver = CiscoSX300
#username = cisco
#password = cisco
#enable_password = 
##debug = True
#
#[switch vlandswitch04]
#name = vlandswitch04
#driver = TPLinkTLSG2XXX
#username = admin
#password = admin
#enable_password = 
#debug = True

#[switch vlandswitch05]
#name = vlandswitch05
#driver = NetgearXSM
#username = admin
#password = 
#enable_password =
#debug = True

# Examples for testing with mocked-up dummy switched
#[switch dummy-25]
#name = dummy-25
#driver = Dummy
#
#[switch dummy-48]
#name = dummy-48
#driver = Dummy
#
#[switch dummy-41]
#name = dummy-41
#driver = Dummy
#
#[switch dummy-42]
#name = dummy-42
#driver = Dummy
#
#[switch dummy-23]
#name = dummy-23
#driver = Dummy
#
#[switch dummy-24]
#name = dummy-24
#driver = Dummy

#[wibble]