Appendix A. Technical Details

This appendix describes the Sauron database layout. Sauron database contains database version number stored in settings table. This database version number must match with the version Sauron "back end" was made for. If database format changes in future versions, the database version number will be incremented and a conversion script from previous version will be shipped with Sauron.

Current Sauron Database version is 1.0

Figure A-1. Table Relations

Sauron: SQL table descriptions

Tables:

Table Descriptions

servers

This table contains servers that are managed with this system. For each server named/dhcpd/printer configuration files can be automagically generated from the database.

fieldtypecomments
idSERIAL PRIMARY KEY unique ID
nameTEXT NOT NULL CHECK(name <> '') server name
zones_onlyBOOL DEFAULT false if true, generate named.zones file otherwise generate complete named.conf
no_rootsBOOL DEFAULT false if true, no root server (hint)zone entry is generated
dhcp_modeINT DEFAULT 1 DHCP subnet map creation mode: 0 = use VLANs,1 = use networks
dhcp_flagsINT DEFAULT 0 DHCP option flags: 0x01 = auto-generate domainnames0x02 = enable failover protocol
named_flagsINT DEFAULT 0 named option flags: 0x01 = access control from master (slave only) 0x02 = include also slave zones from master (slave only) 0x04 = do NOT generate HINFO records0x08 = do NOT generate WKS records
masterserverINT DEFAULT -1 dynamically add slave zonesfor all zones in master server
   named.conf options...more to be added as needed...
versionTEXT version string to display (optional)
directoryTEXT base directory for named (optional)
pid_fileTEXT pid-file pathname (optional)
dump_fileTEXT dump-file pathname (optiona)
named_xferTEXT named-xfer pathname (optional)
stats_fileTEXT statistics-file pathname (optional)
memstats_fileTEXT memstatistics-file pathname (optional)
named_caTEXT DEFAULT 'named.ca' root servers filename
pzone_pathTEXT DEFAULT '' relative path for masterzone files
szone_pathTEXT DEFAULT 'NS2/' relative path for slave zone files
query_src_ipTEXT query source ip (optional) (ip | '*')
query_src_portTEXT query source port (optional) (port | '*')
listen_on_portTEXT listen on port (optional)
transfer_sourceINET transfer-source (optional)
forwardCHAR(1) DEFAULT 'D' forward: D=defaultO=only, F=first
   check-names: D=default, W=warn, F=fail, I=ignore
checknames_mCHAR(1) DEFAULT 'D' check-names master
checknames_sCHAR(1) DEFAULT 'D' check-names slave
checknames_rCHAR(1) DEFAULT 'D' check-names response
   boolean flags: D=default, Y=yes, N=no
nnotifyCHAR(1) DEFAULT 'D' notify
recursionCHAR(1) DEFAULT 'D' recursion
authnxdomainCHAR(1) DEFAULT 'D' auth-nxdomain
dialupCHAR(1) DEFAULT 'D' dialup
multiple_cnamesCHAR(1) DEFAULT 'D' multiple-cnames
rfc2308_type1CHAR(1) DEFAULT 'D' rfc2308-type1
   default TTLs
ttlINT4 DEFAULT 86400 default TTL for RR records
refreshINT4 DEFAULT 43200 default SOA refresh
retryINT4 DEFAULT 3600 default SOA retry
expireINT4 DEFAULT 2419200 default SOA expire
minimumINT4 DEFAULT 86400 default SOA minimum (negative caching ttl)
   IPv6
ipv6TEXT reserved
   DHCP failover
df_portINT DEFAULT 519 listen port
df_max_delayINT DEFAULT 60 max-response-delay
df_max_uupdatesINT DEFAULT 10 max-unacked-updates
df_mcltINT DEFAULT 3600 mlct
df_splitINT DEFAULT 128 split
df_loadbalmaxINT DEFAULT 3 load balance max seconds
   defaults to use in zones
hostnameTEXT primary servername for sibling zone SOAs
hostaddrINET primary server IP address
hostmasterTEXT hostmaster name for sibling zone SOAsunless overided in zone
commentTEXT 
CONSTRAINTservers_name_key UNIQUE(name)

zones

This table contains zone definitions of a server.

hosts

This table contains host entries for a zone.

fieldtypecomments
idSERIAL PRIMARY KEY unique ID
zoneINT4 NOT NULL ptr to a zone table record-->zones.id
typeINT4 DEFAULT 0 host type: 0=misc, 1=host, 2=subdomain (delegation), 3=mx entry, 4=alias (cname), 5=printer, 6=glue record, 7=alias (arec), 8=srv entry, 9=dhcp only, 10=zone, 101=host reservation
domainTEXT NOT NULL CHECK(domain <> '') host domain name
ttlINT4 TTL for host records, default if NULL
classCHAR(2) DEFAULT 'IN' class (IN)
grpINT4 DEFAULT -1 ptr to group-->groups.id
aliasINT4 DEFAULT -1 ptr to another host record(for CNAME alias)
cname_txtTEXT CNAME value for out-of-zone alias
hinfo_hwTEXT HINFO hardware
hinfo_swTEXT HINFO software
locTEXT LOC record value
wksINT4 DEFAULT -1 ptr to wks_templates table entry-->wks_templates.id
mxINT4 DEFAULT -1 ptr to mx_templates table entry-->mx_templates.id
rp_mboxTEXT DEFAULT '.' RP mbox
rp_txtTEXT DEFAULT '.' RP txt
routerINT4 DEFAULT 0 router if > 0, also router priority(1 being highest priority)
prnBOOL DEFAULT false true for virtual printer entries
flagsINT4 DEFAULT 0 reserved
etherCHAR(12) Ethernet address (MAC)
ether_aliasINT4 DEFAULT -1 ptr to another host record(for ETHER address)
dhcp_dateINT4 last time host requested IP
dhcp_infoTEXT reserved
infoTEXT Host info (appears as TXT record)
locationTEXT Host location info
deptTEXT Department name
huserTEXT User info
modelTEXT host model info
serialTEXT serial number
miscTEXT misc info
asset_idTEXT asset ID
commentTEXT comment
CONSTRAINThostname_key UNIQUE (domain,zone),
CONSTRAINTether_key UNIQUE(ether,zone),
CONSTRAINTasset_key UNIQUE(asset_id,zone)