IP Reg is a IPAM tool to keep track of assets, nodes (IP addresses, MAC addresses, DNS aliases) within different subnets, over different locations or even VLAN's. Written in PHP, used with a MySQL-database to have a unique insight in your local network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ipreg/install/mysql_sample.sql

67 lines
1.8 KiB

INSERT INTO asset (asset_name, assetclass_id) VALUES
('Computer Alice', 1),
('Computer Bob', 1),
('Computer Admin', 1),
('Server', 3),
('Printer', 4),
('Firewall', 6),
('Air Condition System', 8);
INSERT INTO assetclass (assetclassgroup_id, assetclass_name) VALUES
(1, 'Desktop'),
(1, 'Notebook'),
(2, 'Server'),
(3, 'Printer'),
(4, 'Switch'),
(4, 'Firewall'),
(5, 'Scanner'),
(5, 'Other');
INSERT INTO assetclassgroup (assetclassgroup_name, assetclassgroup_color) VALUES
('Personal Computer', '000000'),
('Servers', '0000CC'),
('Periphery', '00CC00'),
('Network', 'CCCC00'),
('Miscellaneous', 'CC0000');
INSERT INTO location (location_name, location_parent) VALUES
('Main Office', 0),
('Branch Office A', 1),
('Branch Office B', 1);
INSERT INTO node (node_ip, node_mac, subnet_id, asset_id) VALUES
('192.168.0.10', '001122334455', 1, 1),
('192.168.0.11', 'aabbccddeeff', 1, 2),
('192.168.0.12', '775544881199', 1, 3),
('192.168.0.1', '667755441122', 1, 4),
('192.168.1.1', '667755441123', 2, 4),
('192.168.10.1', '667755441124', 3, 4),
('192.168.20.1', '667755441125', 4, 4);
INSERT INTO subnet (subnet_address, subnet_mask) VALUES
('192.168.0.0', 24),
('192.168.1.0', 24),
('192.168.10.0', 24),
('192.168.20.0', 24);
INSERT INTO subnetlocation (subnet_id, location_id) VALUES
(1, 1),
(2, 1),
(3, 2),
(4, 3);
INSERT INTO subnetvlan (subnet_id, vlan_id) VALUES
(1, 1);
INSERT INTO user (user_name, user_pass, user_displayname) VALUES
('alice', '$2y$10$CTq04qodeKZBgeuShC3E..cEzfh.SDlaoOEUWcCXXHPDvXJ51nGdq', 'Alice'),
('bob', '$2y$10$hl4NN4lOyuz7KN0ZjLHbOuCqGi08GVaTvl/RiMcL1mbFqGmtzDN76', 'Bob');
INSERT INTO vlan (vlan_number, vlan_name) VALUES
(1, 'DEFAULT_VLAN'),
(2, 'WLAN'),
(3, 'DMZ');
INSERT INTO zone (zone_soa, zone_origin, zone_hostmaster, zone_serial, zone_ns1) VALUES
('ns1.example.com.', 'example.com.', 'hostmaster.example.com.', '2023021301', 'ns1.example.com');