aboutsummaryrefslogtreecommitdiffstats
path: root/notes/projects/radius/sql/README.ippool.md
diff options
context:
space:
mode:
authorDavid M. Syzdek <syzdek@bindlebinaries.com>2019-05-14 11:42:52 -0800
committerDavid M. Syzdek <syzdek@bindlebinaries.com>2019-05-14 11:42:52 -0800
commitb9b38cac5e2e41326de396164c8422d946817ef0 (patch)
tree08cf53149f867ad2c7695781b9e73eca8dbdc392 /notes/projects/radius/sql/README.ippool.md
parent3de9bf226c0dc72b838bacb0ca2668b50220fcda (diff)
downloadscratchpad-b9b38cac5e2e41326de396164c8422d946817ef0.tar.gz
scratchpad-b9b38cac5e2e41326de396164c8422d946817ef0.tar.bz2
scratchpad-b9b38cac5e2e41326de396164c8422d946817ef0.tar.xz
scratchpad-b9b38cac5e2e41326de396164c8422d946817ef0.zip
updating README
Diffstat (limited to '')
-rw-r--r--notes/projects/radius/sql/README.ippool.md61
1 files changed, 47 insertions, 14 deletions
diff --git a/notes/projects/radius/sql/README.ippool.md b/notes/projects/radius/sql/README.ippool.md
index 871889a..b463df8 100644
--- a/notes/projects/radius/sql/README.ippool.md
+++ b/notes/projects/radius/sql/README.ippool.md
@@ -14,36 +14,69 @@ Files
14 14
15 * README.ippool.md - This file 15 * README.ippool.md - This file
16 * ippool-database.sql - Creates database 16 * ippool-database.sql - Creates database
17 * ippool-schema.sql - Creates database schema (tables, indexes, etc)
18 * ippool-functions.sql - Creates end-user/end-application functions
19 * ippool-demo.sql - Loads demo data 17 * ippool-demo.sql - Loads demo data
18 * ippool-functions.sql - Creates end-user/end-application functions
20 * ippool-queries.sql - Common or useful queries 19 * ippool-queries.sql - Common or useful queries
20 * ippool-schema.sql - Creates database schema (tables, indexes, etc)
21 * radius-roles.sql - Common database roles for RADIUS 21 * radius-roles.sql - Common database roles for RADIUS
22 22
23 23
24Initializing New Database 24Initializing New Database
25------------------------- 25-------------------------
26 26
27 * Create base database roles for RADIUS, not not already created: 27 * Create base database roles for RADIUS, if not not already created:
28
29 psql \
30 -h raddbtest.prv.acsalaska.net \
31 -f radius-roles.sql
32
33 * Create database and load schema:
34
35 psql \
36 -h raddbtest.prv.acsalaska.net \
37 -f ippool-database.sql
28 38
29 psql -h raddbtest.prv.acsalaska.net -f radius-roles.sql 39 psql \
40 -h raddbtest.prv.acsalaska.net \
41 -f ippool-schema.sql \
42 -f ippool-functions.sql \
43 radius_ippool
30 44
31 * Create database and load schema: 45 * Optionally, load demo data:
32 46
33 psql -h raddbtest.prv.acsalaska.net -f ippool-database.sql 47 psql \
34 psql -h raddbtest.prv.acsalaska.net -f ippool-schema.sql radius_ippool 48 -h raddbtest.prv.acsalaska.net \
35 psql -h raddbtest.prv.acsalaska.net -f ippool-functions.sql radius_ippool 49 -f ippool-demo.sql \
50 radius_ippool
36 51
37 * Create RADIUS pools using `pool_add()`. 52 * Create RADIUS pools using `pool_add()`.
38 * Create RADIUS regions using `region_add()`. 53 * Create RADIUS regions using `region_add()`.
39 * Create RADIUS NAS clients using `nas_add()`. 54 * Create RADIUS NAS clients using `nas_add()`.
40 * Create network blocks using `netblock_add()`. 55 * Create network blocks using `netblock_add()`.
41 * Add IP addresses with `ip_add_network()` if `netblock_add()` was not called 56 * Add IP addresses with `ip_add_network()` if `netblock_add()` was not called
42 with `addIpEntries := TRUE`. 57 with `addIpEntries := TRUE`.
43 58
44For examples of using the above functions, please read `ippool-demo.sql`. 59For examples of using the above functions, please read `ippool-demo.sql`.
45 60
46 61
62Destroying existing database
63----------------------------
64
65The following Postgresql (psql) commands will purge the database:
66
67 \c :USER
68 SET ROLE wheel;
69 DROP DATABASE radius_ippool;
70
71The following PostgreSQL (psql) commands will purge RADIUS roles from Postgresql:
72
73 SET ROLE wheel;
74 DROP ROLE radius_user;
75 DROP ROLE radius_app;
76 DROP ROLE radius_admin;
77 DROP ROLE radius;
78
79
47Network Block Management 80Network Block Management
48------------------------ 81------------------------
49 82