#
# Example network topology.
# Use sql/netbuilder.sql to create the tables before running this.
#

DELETE FROM network;
DELETE FROM node;
DELETE FROM nodeparameter;
DELETE FROM link;
DELETE FROM linkparameter;

INSERT INTO network (id,name) VALUES ( 1, 'net60mysql');

INSERT INTO node (id,name) VALUES ( 1, 'rte1');
INSERT INTO node (id,name) VALUES ( 2, 'rte2');
INSERT INTO node (id,name) VALUES ( 3, 'rte3');
INSERT INTO node (id,name) VALUES ( 4, 'rte4');
INSERT INTO node (id,name) VALUES ( 5, 'rte5');
INSERT INTO node (id,name) VALUES ( 6, 'rte6');
INSERT INTO node (id,name) VALUES ( 7, 'rte7');
INSERT INTO node (id,name) VALUES ( 8, 'rte8');
INSERT INTO node (id,name) VALUES ( 9, 'rte9');
INSERT INTO node (id,name) VALUES (10, 'rte10');
INSERT INTO node (id,name) VALUES (11, 'rte11');
INSERT INTO node (id,name) VALUES (12, 'rte12');
INSERT INTO node (id,name) VALUES (13, 'rte13');
INSERT INTO node (id,name) VALUES (14, 'rte14');
INSERT INTO node (id,name) VALUES (15, 'rte15');
INSERT INTO node (id,name) VALUES (16, 'rte16');
INSERT INTO node (id,name) VALUES (17, 'rte17');
INSERT INTO node (id,name) VALUES (18, 'rte18');
INSERT INTO node (id,name) VALUES (19, 'rte19');
INSERT INTO node (id,name) VALUES (20, 'rte20');
INSERT INTO node (id,name) VALUES (21, 'rte21');
INSERT INTO node (id,name) VALUES (22, 'rte22');
INSERT INTO node (id,name) VALUES (23, 'rte23');
INSERT INTO node (id,name) VALUES (24, 'rte24');
INSERT INTO node (id,name) VALUES (25, 'rte25');
INSERT INTO node (id,name) VALUES (26, 'rte26');
INSERT INTO node (id,name) VALUES (27, 'rte27');
INSERT INTO node (id,name) VALUES (28, 'rte28');
INSERT INTO node (id,name) VALUES (29, 'rte29');
INSERT INTO node (id,name) VALUES (30, 'rte30');
INSERT INTO node (id,name) VALUES (31, 'rte31');
INSERT INTO node (id,name) VALUES (32, 'rte32');
INSERT INTO node (id,name) VALUES (33, 'rte33');
INSERT INTO node (id,name) VALUES (34, 'rte34');
INSERT INTO node (id,name) VALUES (35, 'rte35');
INSERT INTO node (id,name) VALUES (36, 'rte36');
INSERT INTO node (id,name) VALUES (37, 'rte37');
INSERT INTO node (id,name) VALUES (38, 'rte38');
INSERT INTO node (id,name) VALUES (39, 'rte39');
INSERT INTO node (id,name) VALUES (40, 'rte40');
INSERT INTO node (id,name) VALUES (41, 'rte41');
INSERT INTO node (id,name) VALUES (42, 'rte42');
INSERT INTO node (id,name) VALUES (43, 'rte43');
INSERT INTO node (id,name) VALUES (44, 'rte44');
INSERT INTO node (id,name) VALUES (45, 'rte45');
INSERT INTO node (id,name) VALUES (46, 'rte46');
INSERT INTO node (id,name) VALUES (47, 'rte47');
INSERT INTO node (id,name) VALUES (48, 'rte48');
INSERT INTO node (id,name) VALUES (49, 'rte49');
INSERT INTO node (id,name) VALUES (50, 'rte50');
INSERT INTO node (id,name) VALUES (51, 'rte51');
INSERT INTO node (id,name) VALUES (52, 'rte52');
INSERT INTO node (id,name) VALUES (53, 'rte53');
INSERT INTO node (id,name) VALUES (54, 'rte54');
INSERT INTO node (id,name) VALUES (55, 'rte55');
INSERT INTO node (id,name) VALUES (56, 'rte56');

UPDATE node SET networkid=1;
UPDATE node SET type='node.Node';
UPDATE node SET display='i=misc/node_vs,gold'  WHERE id<10;
UPDATE node SET display='i=misc/node_vs,cyan'  WHERE id>=10 AND id<20;
UPDATE node SET display='i=misc/node_vs,red'   WHERE id>=20 AND id<30;
UPDATE node SET display='i=misc/node_vs,blue'  WHERE id>=30 AND id<40;
UPDATE node SET display='i=misc/node_vs,green' WHERE id>=40 AND id<50;
UPDATE node SET display='i=misc/node_vs,gray'  WHERE id>=50;

INSERT INTO nodeparameter (nodeid,name,value) select id, 'address', id from node;

INSERT INTO link (srcnodeid,destnodeid) VALUES (0,1);
INSERT INTO link (srcnodeid,destnodeid) VALUES (1,2);
INSERT INTO link (srcnodeid,destnodeid) VALUES (1,4);
INSERT INTO link (srcnodeid,destnodeid) VALUES (3,4);
INSERT INTO link (srcnodeid,destnodeid) VALUES (4,5);
INSERT INTO link (srcnodeid,destnodeid) VALUES (4,7);
INSERT INTO link (srcnodeid,destnodeid) VALUES (5,6);
INSERT INTO link (srcnodeid,destnodeid) VALUES (5,10);
INSERT INTO link (srcnodeid,destnodeid) VALUES (6,7);
INSERT INTO link (srcnodeid,destnodeid) VALUES (6,9);
INSERT INTO link (srcnodeid,destnodeid) VALUES (7,8);
INSERT INTO link (srcnodeid,destnodeid) VALUES (7,12);
INSERT INTO link (srcnodeid,destnodeid) VALUES (9,11);
INSERT INTO link (srcnodeid,destnodeid) VALUES (10,11);
INSERT INTO link (srcnodeid,destnodeid) VALUES (10,13);
INSERT INTO link (srcnodeid,destnodeid) VALUES (11,12);
INSERT INTO link (srcnodeid,destnodeid) VALUES (11,14);
INSERT INTO link (srcnodeid,destnodeid) VALUES (12,15);
INSERT INTO link (srcnodeid,destnodeid) VALUES (13,18);
INSERT INTO link (srcnodeid,destnodeid) VALUES (14,15);
INSERT INTO link (srcnodeid,destnodeid) VALUES (14,22);
INSERT INTO link (srcnodeid,destnodeid) VALUES (15,16);
INSERT INTO link (srcnodeid,destnodeid) VALUES (16,17);
INSERT INTO link (srcnodeid,destnodeid) VALUES (16,23);
INSERT INTO link (srcnodeid,destnodeid) VALUES (18,19);
INSERT INTO link (srcnodeid,destnodeid) VALUES (18,21);
INSERT INTO link (srcnodeid,destnodeid) VALUES (19,20);
INSERT INTO link (srcnodeid,destnodeid) VALUES (19,26);
INSERT INTO link (srcnodeid,destnodeid) VALUES (20,21);
INSERT INTO link (srcnodeid,destnodeid) VALUES (20,24);
INSERT INTO link (srcnodeid,destnodeid) VALUES (20,25);
INSERT INTO link (srcnodeid,destnodeid) VALUES (21,22);
INSERT INTO link (srcnodeid,destnodeid) VALUES (21,23);
INSERT INTO link (srcnodeid,destnodeid) VALUES (21,24);
INSERT INTO link (srcnodeid,destnodeid) VALUES (23,24);
INSERT INTO link (srcnodeid,destnodeid) VALUES (24,28);
INSERT INTO link (srcnodeid,destnodeid) VALUES (25,27);
INSERT INTO link (srcnodeid,destnodeid) VALUES (26,32);
INSERT INTO link (srcnodeid,destnodeid) VALUES (27,29);
INSERT INTO link (srcnodeid,destnodeid) VALUES (27,30);
INSERT INTO link (srcnodeid,destnodeid) VALUES (27,32);
INSERT INTO link (srcnodeid,destnodeid) VALUES (28,29);
INSERT INTO link (srcnodeid,destnodeid) VALUES (28,31);
INSERT INTO link (srcnodeid,destnodeid) VALUES (29,31);
INSERT INTO link (srcnodeid,destnodeid) VALUES (30,36);
INSERT INTO link (srcnodeid,destnodeid) VALUES (31,33);
INSERT INTO link (srcnodeid,destnodeid) VALUES (32,34);
INSERT INTO link (srcnodeid,destnodeid) VALUES (33,37);
INSERT INTO link (srcnodeid,destnodeid) VALUES (34,35);
INSERT INTO link (srcnodeid,destnodeid) VALUES (34,40);
INSERT INTO link (srcnodeid,destnodeid) VALUES (35,36);
INSERT INTO link (srcnodeid,destnodeid) VALUES (35,39);
INSERT INTO link (srcnodeid,destnodeid) VALUES (36,37);
INSERT INTO link (srcnodeid,destnodeid) VALUES (37,38);
INSERT INTO link (srcnodeid,destnodeid) VALUES (38,39);
INSERT INTO link (srcnodeid,destnodeid) VALUES (38,42);
INSERT INTO link (srcnodeid,destnodeid) VALUES (39,40);
INSERT INTO link (srcnodeid,destnodeid) VALUES (39,41);
INSERT INTO link (srcnodeid,destnodeid) VALUES (40,43);
INSERT INTO link (srcnodeid,destnodeid) VALUES (40,44);
INSERT INTO link (srcnodeid,destnodeid) VALUES (40,52);
INSERT INTO link (srcnodeid,destnodeid) VALUES (41,42);
INSERT INTO link (srcnodeid,destnodeid) VALUES (41,43);
INSERT INTO link (srcnodeid,destnodeid) VALUES (42,43);
INSERT INTO link (srcnodeid,destnodeid) VALUES (43,46);
INSERT INTO link (srcnodeid,destnodeid) VALUES (44,45);
INSERT INTO link (srcnodeid,destnodeid) VALUES (44,47);
INSERT INTO link (srcnodeid,destnodeid) VALUES (45,46);
INSERT INTO link (srcnodeid,destnodeid) VALUES (46,49);
INSERT INTO link (srcnodeid,destnodeid) VALUES (47,48);
INSERT INTO link (srcnodeid,destnodeid) VALUES (48,50);
INSERT INTO link (srcnodeid,destnodeid) VALUES (48,51);
INSERT INTO link (srcnodeid,destnodeid) VALUES (49,50);
INSERT INTO link (srcnodeid,destnodeid) VALUES (50,53);
INSERT INTO link (srcnodeid,destnodeid) VALUES (51,52);
INSERT INTO link (srcnodeid,destnodeid) VALUES (51,53);
INSERT INTO link (srcnodeid,destnodeid) VALUES (52,53);
INSERT INTO link (srcnodeid,destnodeid) VALUES (52,54);
INSERT INTO link (srcnodeid,destnodeid) VALUES (53,56);
INSERT INTO link (srcnodeid,destnodeid) VALUES (54,55);
INSERT INTO link (srcnodeid,destnodeid) VALUES (55,56);

UPDATE link SET srcgatevector='port', destgatevector='port', channeltype='ned.DatarateChannel';

INSERT into linkparameter SELECT id, 'delay', '10ms' from link;
INSERT into linkparameter SELECT id, 'datarate', '100Mbps' from link;

