diff --git a/README.md b/README.md index 3bfd519..3ecb14e 100644 --- a/README.md +++ b/README.md @@ -4,37 +4,68 @@ EntityDB holds all network allocations and associated information. ## Format -Firstly create an entry by creating a directory with your unique username, `deavmi/` for example. +Every 'entity' has its data stored in a JSON file named as 'UNIQUE.json' where UNIQUE is any unique identifier (UUID/hash/name etc.). -### Networks +### Content of entity (data) -All network declarations are created as entries in the file `deavmi/network` as so: +The data should be a JSON object with a anonymous top-level object and "route" as only object. "route" should be a list of all routes provided by the entity with a required list of devices named "device". -``` -[deavmi.home.network] - # Required network information - Prefix="fdd2:cbf2:61bd::/48" - - # For network connectivity tests - RouterIP="fdd2:cbf2:61bd::1" - -[deavmi.community.network1] - # Required network information - Prefix="fd08:8441:e254::/48" - - # For network connectivity tests - RouterIP="fd08:8441:e254::1" -``` - -### Services - -All network services are declared within `deavmi/services` (file) like so: - -``` -[Web server] - address="fdd2:cbf2:61bd::2" - port=80 -[Babel web] - address="fdd2:cbf2:61bd::2" - port=4444 +"device" must contain at least one device that is reachable. A router is commonly used as the only object for the network as it is necessary in most setups. + +Every device should contain the CRXN IPv6 address, along the optional list of services as "service". + +Services must have a type (eg. tcp, udp, http, rsync, git) and at least one endpoint in the endpoints list. + +Every object may contain a optional description, except lists. + +Descriptions should not be used other than for describing things in a human-readable form. + +### Example + +Here's a example that you may modify to your needs. + +```json +{ + "route": [ + "fdaa:bbcc:ddee::/48": { + "description": "My home network", + "device": [ + "router": { + "description": "My custom router running BIRD", + "address": "fdaa:bbcc:ddee::1" + }, + "mail": { + "description": "Electronic mail endpoint", + "address": "fdaa:bbcc:ddee::5", + "service": [ + { + "type": "smtp", + "endpoint": [ + { "port": 25 } + ] + }, + { + "description": "Super-secret authentication gateway", + "type": "kerberos", + "endpoint": [ + { "port": 89 } + ] + }, + { + "type": "imap", + "endpoint": [ + { "port": 143 } + ] + } + ] + } + ] + }, + "fdcc:ba11:b00b::/48": { + "device": [ + "router": "fdcc:ba11:b00b::1" + ] + } + ] +} ``` diff --git a/deavmi.json b/deavmi.json new file mode 100644 index 0000000..31b55ec --- /dev/null +++ b/deavmi.json @@ -0,0 +1,49 @@ +{ + "route": [ + "fdd2:cbf2:61bd::/48": { + "description": "deavmi.home.network1", + "device": [ + "router": { + "address": "fdd2:cbf2:61bd::1" + }, + "webserver": { + "address": "fdd2:cbf2:61bd::2", + "service": [ + { + "description": "Personal webserver", + "type": "http", + "endpoint": [ + { "port": 80 } + ] + }, + { + "description": "Babel web", + "type": "http", + "endpoint": [ + { "port": 4444 } + ] + } + ] + } + ] + }, + "fda2:a9b0:a02b::/48": { + "description": "deavmi.home.network2", + "device": [ + "router": "fda2:a9b0:a02b::1" + ] + }, + "fd08:8441:e254::/48": { + "description": "deavmi.community.network1", + "device": [ + "router": "fd08:8441:e254::1" + ] + }, + "fd1d:370c:38ee::/48": { + "description": "deavmi.community.network2", + "device": [ + "router": "fd1d:370c:38ee::1" + ] + } + ] +} diff --git a/deavmi/networks b/deavmi/networks deleted file mode 100644 index a82c7f7..0000000 --- a/deavmi/networks +++ /dev/null @@ -1,28 +0,0 @@ -[deavmi.home.network1] - # Required network information - Prefix="fdd2:cbf2:61bd::/48" - - # For network connectivity tests - RouterIP="fdd2:cbf2:61bd::1" - -#Mikrotik network -[deavmi.home.network2] - # Required network information - Prefix="fda2:a9b0:a02b::/48" - - # For network connectivity tests - RouterIP="fda2:a9b0:a02b::1" - -[deavmi.community.network1] - # Required network information - Prefix="fd08:8441:e254::/48" - - # For network connectivity tests - RouterIP="fd08:8441:e254::1" - -[deavmi.community.network2] - # Required network information - Prefix="fd1d:370c:38ee::/48" - - # For network connectivity tests - RouterIP="fd1d:370c:38ee::1" diff --git a/deavmi/services b/deavmi/services deleted file mode 100644 index a82d030..0000000 --- a/deavmi/services +++ /dev/null @@ -1,6 +0,0 @@ -[Web server (personal webserver)] - address="fdd2:cbf2:61bd::2" - port=80 -[Babel web] - address="fdd2:cbf2:61bd::2" - port=4444 diff --git a/minus.json b/minus.json new file mode 100644 index 0000000..d09c332 --- /dev/null +++ b/minus.json @@ -0,0 +1,12 @@ +{ + "route": [ + "fdcf:25b5:8c10::/48": { + "description": "minus.home.network", + "device": [ + "router": { + "address": "fdcf:25b5:8c10::1" + } + ] + } + ] +} diff --git a/minus/networks b/minus/networks deleted file mode 100644 index 6ad4ec2..0000000 --- a/minus/networks +++ /dev/null @@ -1,4 +0,0 @@ -[minus.home.network] - Prefix="fdcf:25b5:8c10::/48" - - RouterIP="fdcf:25b5:8c10::1" diff --git a/rany.json b/rany.json new file mode 100644 index 0000000..64f8880 --- /dev/null +++ b/rany.json @@ -0,0 +1,20 @@ +{ + "route": [ + "fdfb:1a20:a9bf::/48": { + "description": "rany.server.network1", + "device": [ + "router": { + "address": "fdfb:1a20:a9bf::1" + } + ] + }, + "2a04:5b81:2055::/48": { + "description": "rany.server.network2", + "device": [ + "router": { + "address": "2a04:5b81:2055::1" + } + ] + } + ] +} diff --git a/rany/networks b/rany/networks deleted file mode 100644 index 6d77760..0000000 --- a/rany/networks +++ /dev/null @@ -1,13 +0,0 @@ -[rany.server.network1] - # Required network information - Prefix="fdfb:1a20:a9bf::/48" - - # For network connectivity tests - RouterIP="fdfb:1a20:a9bf::1" - -[rany.server.network2] - # Required network information - Prefix="2a04:5b81:2055::/48" - - # For network connectivity tests - RouterIP="2a04:5b81:2055::1" diff --git a/rnb.json b/rnb.json new file mode 100644 index 0000000..dd8d25a --- /dev/null +++ b/rnb.json @@ -0,0 +1,24 @@ +{ + "route": [ + "fd66:7afc:576::/48": { + "description": "rnb.home.network", + "device": [ + "router": { + "address": "fd66:7afc:576::1" + }, + "irc-server": { + "address": "fd66:7afc:576::2", + "service": [ + { + "description": "BNET IRC server", + "type": "irc", + "endpoint": [ + { "port": 6667 } + ] + } + ] + } + ] + } + ] +} diff --git a/rnb/networks b/rnb/networks deleted file mode 100644 index 2f03a63..0000000 --- a/rnb/networks +++ /dev/null @@ -1,4 +0,0 @@ -[rnb.home.network] - Prefix="fd66:7afc:576::/48" - - RouterIP="fd66:7afc:576::1" diff --git a/rnb/services b/rnb/services deleted file mode 100644 index ed859de..0000000 --- a/rnb/services +++ /dev/null @@ -1,3 +0,0 @@ -[IRC] - address="fd66:7afc:576::2" - port=6667 diff --git a/starland.json b/starland.json new file mode 100644 index 0000000..b442b4a --- /dev/null +++ b/starland.json @@ -0,0 +1,16 @@ +{ + "route": [ + "fd9a:1111:98cc::/48": { + "description": "starland.galactic.network", + "device": [ + "router": "fd9a:1111:98cc::1" + ] + }, + "fd7e:33d3:de22::/48": { + "description": "starland.solar.network", + "device": [ + "router": "fd7e:33d3:de22::1" + ] + } + ] +} diff --git a/starland/networks b/starland/networks deleted file mode 100644 index 10ca80b..0000000 --- a/starland/networks +++ /dev/null @@ -1,13 +0,0 @@ -[starland.galactic.network] - # Required network information - Prefix="fd9a:1111:98cc::/48" - - # For network connectivity tests - RouterIP="fd9a:1111:98cc::1" - -[starland.solar.network] - # Required network information - Prefix="fd7e:33d3:de22::/48" - - # For network connectivity tests - RouterIP="fd7e:33d3:de22::1" diff --git a/thooms.json b/thooms.json new file mode 100644 index 0000000..3f0a6d7 --- /dev/null +++ b/thooms.json @@ -0,0 +1,10 @@ +{ + "route": [ + "fdd3:5d24:69d3::/48": { + "description": "thooms@v17", + "device": [ + "router": "fdd3:5d24:69d3::1" + ] + } + ] +} diff --git a/thooms/networks b/thooms/networks deleted file mode 100644 index e471df4..0000000 --- a/thooms/networks +++ /dev/null @@ -1,6 +0,0 @@ -[thooms@v17] - # Required network information - Prefix="fdd3:5d24:69d3::/48" - - # For network connectivity tests - RouterIP="fdd3:5d24:69d3::1" diff --git a/thooms/services b/thooms/services deleted file mode 100644 index e69de29..0000000