[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The configuration services provides configuration to requesting clients and maintains the registration between user and selected provider.
1.1 Design of the relay agent 1.2 The registration services 1.3 Setting up the MAC database
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The BOOTP relay agent is a modified version of ISCs dhcrelay version 3.0. The relay agent has been modified to instead of sending a recieved DHCP message to one or more servers it now sends the DHCP message to only one server based on the MAC address of the requesting client. This is achieved by looking up the MAC address in a database consisting of mappings between MAC addresses and providers. The database is a PostgreSQL and is accessed trough libpq.
The database has the following definitions:
@verbatim CREATE TABLE T_provider ( provider_id SERIAL, provider_name text, provider_dhcp inet, provider_auth_url text, provider_net inet, provider_netmask inet, primary key (provider_id));
CREATE TABLE T_macbind ( mac_addr macaddr, provider_id bigint, mac_reg_date timestamp, primary key (mac_addr));
CREATE VIEW V_mapping AS SELECT M.mac_addr, P.provider_dhcp, P.provider_net, P.provider_netmask, P.provider_auth_url FROM T_macbind AS M,T_provider AS P WHERE M.provider_id = P.provider_id;
GRANT ALL ON T_provider TO macbind; GRANT ALL ON T_macbind TO macbind; GRANT ALL ON V_mapping TO macbind;
In the table T_provider:
In T_provider there has to exist one entry with `provider_name' = "default" to be used as default when a (MAC address, provider) binding is not available.
In the table T_macbind:
The view V_mapping is just a way to ease up the queries to the database so that the client only has to make one query to get the (MAC address, provider) binding.
1.1.1 Compiling the relay agent
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Unpack the DHCP sources and apply the patch:
tar zxf dhcp-3.0.tar.gz cd dhcp-3.0 patch -p0 < ../dhcp.patch |
Now configure and make DHCP:
./configure make make install |
The relay agent does not need any configuration. All neccessary information is retrieved from the MAC database.
For more instructions, see the included documentation in the original ISC DHCP sources.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The registration service lets users choose the provider to use. It is a web page that records the users choice in the MAC database.
When the user wants to authenticate to the network, he enters the registration page. This page looks up the MAC address of the requesting client in the MAC database and redirects the user to the real authentication webpage of the chosen ISP. The registration page also makes it possible for the user to change ISP.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
PostgreSQL is used for the MAC database.
PostgreSQL is available as convenient packages for many GNU/Linux distributions, including RedHat (+ clones) and Debian.
Alternatively, one can download and compile PostgreSQL from source. The sources are available from http://www.postgresql.org/. Instructions for compiling PostgreSQL are included in the sources.
createdb macbind |
createuser -P macbind |
macbind_qwerty
into the access and DHCP relay
sources. This really has to be fixed.
psql -U macbind -f init-macbind.sql macbind |
Edit the PostgreSQL access configuration file to allow connections to
the macbind database with a password. Add the following line to
/etc/postgresql/pg_hba.conf
:
local macbind password |
[Top] | [Contents] | [Index] | [ ? ] |
[Top] | [Contents] | [Index] | [ ? ] |
1. The configuration services
[Top] | [Contents] | [Index] | [ ? ] |
Button | Name | Go to | From 1.2.3 go to |
---|---|---|---|
[ < ] | Back | previous section in reading order | 1.2.2 |
[ > ] | Forward | next section in reading order | 1.2.4 |
[ << ] | FastBack | previous or up-and-previous section | 1.1 |
[ Up ] | Up | up section | 1.2 |
[ >> ] | FastForward | next or up-and-next section | 1.3 |
[Top] | Top | cover (top) of document | |
[Contents] | Contents | table of contents | |
[Index] | Index | concept index | |
[ ? ] | About | this page |