Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthrino committed Aug 7, 2018
2 parents 7a73978 + 9aa5bcb commit de43adb
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 22 deletions.
69 changes: 47 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,52 +105,77 @@
## Installation
(Instructions for Debian/Ubuntu based systems)

#### Install NodeJS (primary dependency)
### Prerequisites

#### Kea Server installation and startup

- Installation and operational instructions for Kea can be found in the [Kea Admin Reference Guide](https://kea.isc.org/docs/kea-guide.html)
- To run the Kea Server with its default configuration or specified config file, use the kea control command as shown below.
(\*server\* = dhcp4 *or* dhcp6) :
<pre>
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
~$ keactrl start -s *server*
</pre>

### Install Anterius
- Clone source code from Github
<pre>
git clone https://github.com/isc-projects/kea-anterius.git
cd kea-anterius
~$ keactrl start -s *server* -c */path/to/kea-*server*.conf*
</pre>

- Install node modules and run

#### Configure Kea Control Agent (CA)

- Activate the Kea Control Agent using the following command (change -c conf file path if required):
<pre>
sudo npm install
sudo npm start
~$ kea-ctrl-agent -c /usr/local/etc/kea/kea-ctrl-agent.conf
</pre>

- 'npm start' command launches the nodejs server, browse to http://localhost:3000 to use the interface.
- The CA runs on port 8000 by default, defined in the CA config file. Please refer to the [Kea Control Agent Documentation](https://kea.isc.org/docs/kea-guide.html#kea-ctrl-agent) for setting CA parameters and addtional info.

### Configuration with Kea Server
- Anterius interface can be configured to work with a Kea server instance running either on a remote system or the local machine.
- Check status of Kea DHCPv4/v6 servers and Kea Control Agent (must be active) using the command:
<pre>
~$ keactrl status
</pre>

#### Setup Hooks Library for Leases Commands

- Anterius employs a set of commands from the Leases hooks library to fetch current lease information from the server via the CA API. This information would be absent from the dashboard in case this hook is not configured.

- This characteristic is dependant on the address parameter set for the Kea Control Agent that provides API access to the server.
- Add the following lines to the server(v4/v6) config file to enable lease hook library:

- To run the Kea Server with its default configuration or specified config file, use the kea control command as shown:
<pre>
~$ keactrl start -s dhcp4
"hooks-libraries": [{
"library": "/usr/local/lib/hooks/libdhcp_lease_cmds.so"
}]
</pre>

#### Install NodeJS (primary dependency)
<pre>
~$ keactrl start -s dhcp4 -c /path/to/kea-dhcp4.conf
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
</pre>

- Activate the Kea Control Agent using the following command (change -c conf file path if required):

### Anterius Installation
- Clone source code from Github
<pre>
~$ kea-ctrl-agent -c /usr/local/etc/kea/kea-ctrl-agent.conf
git clone https://github.com/isc-projects/kea-anterius.git
cd kea-anterius
</pre>

- Check status of Kea DHCPv4 and Kea Control Agent (both must be active) using the command:
- Install node modules (application dependencies)
<pre>
~$ keactrl status
sudo npm install
</pre>

- Kea Control Agent(CA) runs on port 8000 by default, defined in the CA config file. Please refer to the [Kea Control Agent Documentation](https://kea.isc.org/docs/kea-guide.html#kea-ctrl-agent) for setting CA parameters and addtional info.
- Launch the nodejs server, browse to http://localhost:3000 to use the interface.
<pre>
sudo npm start
</pre>


### Configuration with Kea Server
- Anterius interface can be configured to work with one or more Kea server instances running either on a remote system or the local machine.

- This characteristic is defined by the address parameter set for the Kea Control Agent that provides API access to the server.

![anterius_screenshots](https://raw.githubusercontent.com/isc-projects/kea-anterius/master/public/images/screenshots/anterius_settings.png)

Expand Down
50 changes: 50 additions & 0 deletions tests/mac_addr_list.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
61:22:C1:6C:79:D7
53:D4:15:ED:CE:BD
B5:AF:A6:0F:13:03
58:69:B2:1E:68:F8
07:AF:B9:5D:07:1F
A8:87:0C:7D:04:95
22:C1:1D:8D:DA:DD
ED:12:72:14:06:AF
58:81:0D:14:23:A6
9C:88:2A:24:50:63
DD:F6:F5:79:9A:F2
91:06:BC:D5:F4:33
64:49:E6:BD:1E:8A
0D:C9:E6:60:7F:00
DA:0D:C3:A4:A4:CA
D5:FF:B9:4F:70:33
3B:65:5E:D5:5E:42
E3:B8:48:71:44:6E
53:33:03:C6:53:27
15:79:21:4A:33:BA
FE:D6:33:C9:5A:46
D2:6A:B2:8C:9B:08
F9:AF:41:73:8E:D8
50:2C:36:56:C5:2B
1B:36:B5:00:05:91
75:0C:93:19:C0:F2
35:A0:26:9B:92:A1
91:88:6A:CA:AC:6F
55:2F:73:F4:58:F8
0F:2D:83:CB:68:17
F3:E1:55:15:66:D5
25:36:47:F8:EB:8B
FD:C9:59:7B:E1:01
FE:E6:CB:17:AA:EB
9E:7C:57:3C:08:03
92:A9:61:AD:F6:3E
64:A1:22:0D:50:CA
B7:BE:6B:89:94:7C
F1:4F:E7:F0:97:6C
48:D0:49:4A:6D:F2
EC:21:0D:BC:FC:61
87:78:16:C2:1A:B8
F0:73:BD:B7:F9:91
CA:3A:AC:70:7C:B9
61:E8:79:64:63:A6
3E:0B:B4:46:7C:0E
B5:6C:F6:01:45:7C
6F:AB:7B:71:01:5E
04:B6:A3:6F:43:01
89:BF:08:70:69:AD

0 comments on commit de43adb

Please sign in to comment.