| 18 | In order to add our switch to the database, we need to setup node and interface types for them. |
| 19 | |
| 20 | We provide some SQL to make this easy. The script switch-types-create defines the following: |
| 21 | |
| 22 | * Node types for hp5412 (which included hp5406), hp2810, and nortel5510 switch types. |
| 23 | * Interfaces for generic inter-switch trunks (if your site has more than one switch) named "trunk_100MbE", "trunk_1GbE", and "trunk_10GbE". |
| 24 | |
| 25 | For other switch types, please refer to the [https://users.emulab.net/trac/emulab/wiki/install/switches-db.html Emulab Documentation]. |
| 26 | |
| 27 | To load these default node and interface types, simply: |
| 28 | |
| 29 | {{{ |
| 30 | mysql tbdb < ~<builduser>/testbed/sql/switch-types-create.sql |
| 31 | }}} |
| 32 | |
| 33 | === Adding your switch to DNS === |
| 34 | |
| 35 | Your switch needs a name that resolves. You must add it either to /etc/hosts or to the name server running on boss. |
| 36 | |
| 37 | To add it to the name server, add it into /etc/namedb/<yoursitename>.internal.db.head. |
| 38 | You then refresh the DNS server by running /usr/testbed/sbin/named_setup. |
| 39 | |
| 40 | |
| 41 | For example, on mini-isi.deterlab.net we have our switch that we will name hp1 at 192.168.254.1 on the HARDWARE_CONTROL network. So we add it to DNS as follows: |
| 42 | |
| 43 | {{{ |
| 44 | [jhickey@boss ~]$ sudo su - |
| 45 | boss# echo "hp1 IN A 192.168.254.1" >> /etc/namedb/mini-isi.deterlab.net.internal.db.head |
| 46 | boss# logout |
| 47 | [jhickey@boss ~]$ /usr/testbed/sbin/named_setup |
| 48 | [jhickey@boss ~]$ ping -c 1 hp1 |
| 49 | PING hp1.mini-isi.deterlab.net (192.168.254.1): 56 data bytes |
| 50 | 64 bytes from 192.168.254.1: icmp_seq=0 ttl=63 time=3.496 ms |
| 51 | |
| 52 | --- hp1.mini-isi.deterlab.net ping statistics --- |
| 53 | 1 packets transmitted, 1 packets received, 0.0% packet loss |
| 54 | round-trip min/avg/max/stddev = 3.496/3.496/3.496/0.000 ms |
| 55 | [jhickey@boss ~]$ |
| 56 | }}} |
| 57 | |
| 58 | |
| 59 | === Adding in your switches to the database === |
| 60 | |
| 61 | {{{ |
| 62 | insert into nodes set |
| 63 | node_id='hp1',phys_nodeid='hp1',type='hp2180',role='testswitch'; |
| 64 | }}} |
| 65 | |
| 66 | Some sites have separate switches for their control and experimental networks. If you are adding a dedicated control network swtich, use '''ctrlswitch''' as the role. |
| 67 | |
| 68 | You must be able to resolve node_id. You must add it in |