swreg.inc.php 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <?php
  2. # Globals
  3. define('LOGFILE', '/var/log/swreg.log');
  4. define('LOG_LEVEL', 7);
  5. define('TFTPBOOT', '/tftpboot');
  6. define('PORT_TMPL_DIR', TFTPBOOT . '/port-templates');
  7. define('VLAN_TMPL_DIR', TFTPBOOT . '/vlan-templates');
  8. define('DEVICE_TMPL_DIR', TFTPBOOT . '/device-templates');
  9. define('DEVICE_CONFIG_DIR', TFTPBOOT . '/device-configs');
  10. define('DEVICE_TMP_DIR', TFTPBOOT . '/device-tmp');
  11. define('PORT_PROFILE_DIR', TFTPBOOT . '/port-profiles');
  12. define('EEM_TMPL_DIR', TFTPBOOT . '/eem-templates');
  13. define('FPING_PROGRAM', '/usr/local/sbin/fping');
  14. define('TOOL_NAME', 'CiscoLive Switch Registration Tool');
  15. define('PRIME_CRED_PROFILE', 'CLUS-creds');
  16. define('PRIME_URL', 'https://63.231.220.90');
  17. define('DNS_SERVER', '216.206.190.98');
  18. define('DNS_ZONE', 'noc.ciscolive.com');
  19. define('DEBUG', 0);
  20. # Addressing scheme
  21. # Choose one of IDF, NEXT_FREE, or NONE
  22. # IDF : The IDF switch is assumed to be .1 and each switch associated with
  23. # it will match on the first three octets.
  24. #
  25. # NEXT_FREE : Pick the next free address for a given MDF
  26. #
  27. # NONE : IP address assignment will be done manually
  28. define('ADDRESS_SCHEME', 'IDF');
  29. # The MDFs are L3 domains.
  30. # MANDATORY!
  31. $MDFS = array(
  32. 'HILTON',
  33. 'HYATT',
  34. 'NODE',
  35. 'SDCC',
  36. );
  37. # List all PIDs or PID patterns here.
  38. # MANDATORY!
  39. $ZTP_PIDS = array(
  40. 'WS-C3560CG-8PC-S',
  41. 'WS-C3750X',
  42. );
  43. # Fill in each of these arrays based on the ZTP PIDs listed above.
  44. # MANDATORY!
  45. $IMG_VERS = array(
  46. 'WS-C3560CG-8PC-S' => '15.0(2)SE7',
  47. 'WS-C3750X' => '15.0(2)SE7',
  48. );
  49. $IMG_FILES = array(
  50. 'WS-C3560CG-8PC-S' => 'c3560c405ex-universalk9-mz.150-2.SE7.bin',
  51. 'WS-C3750X' => 'c3750e-universalk9-mz.150-2.SE7.bin',
  52. );
  53. $START_PORTS = array(
  54. 'WS-C3560CG-8PC-S' => '0/1',
  55. 'WS-C3750X' => '1/0/1',
  56. );
  57. $PORT_TYPES = array(
  58. 'WS-C3560CG-8PC-S' => 'GigabitEthernet',
  59. 'WS-C3750X' => 'GigabitEthernet',
  60. );
  61. # End PID arrays
  62. # Fill out PIDs mapping to number of ports.
  63. # MANDATORY!
  64. $PID_PORTS = array(
  65. 'WS-C3560CG-8PC-S' => '8',
  66. 'WS-C3750X-24' => '24',
  67. 'WS-C3750X-48' => '48',
  68. );
  69. # Port patterns
  70. # The patterns that start a port name
  71. # MANDATORY!
  72. $PORT_PATTERNS = array(
  73. 'WS-C3560CG-8PC-S' => '0/',
  74. 'WS-C3750X-24' => '1/0/',
  75. 'WS-C3750X-48' => '1/0/',
  76. );
  77. # Map the PID ports to a ZTP PID
  78. # This is only needed if you don't use fully-qualified
  79. # PIDs in the ZTP PIDs.
  80. # OPTIONAL
  81. $PID_MAP = array(
  82. 'WS-C3750X-24' => 'WS-C3750X',
  83. 'WS-C3750X-48' => 'WS-C3750X',
  84. );
  85. # Fill in VLAN mappings
  86. # VLAN macro will be the name with spaces turned to '_' and
  87. # all letters uppercase followed by _VLAN.
  88. # E.g., for NOC Device Mgmt, the macro will be
  89. # %%NOC_DEVICE_MGMT_VLAN%%
  90. # MANDATORY!
  91. $VLANS = array(
  92. 'NOC Device Mgmt' => '100',
  93. 'NOC Wired' => '110',
  94. 'Wireless AP' => '210',
  95. 'Voice TP' => '300',
  96. 'Video Surveillance' => '310',
  97. 'Speaker' => '350',
  98. 'CiscoTV' => '360',
  99. 'CiscoTV DMP' => '370',
  100. 'Session Capture' => '380',
  101. 'Cisco Store' => '390',
  102. 'Registration' => '400',
  103. 'Session Signage' => '420',
  104. 'Labs CCIE' => '500',
  105. 'Labs Testing Center' => '510',
  106. 'Labs Session Labs' => '520',
  107. 'DevNet' => '600',
  108. 'NOC Public' => '751',
  109. 'Registration Public' => '752',
  110. 'SDCC Public' => '753',
  111. 'Labs Public' => '754',
  112. 'CiscoTV Public' => '755',
  113. 'Cisco Campus Public' => '761',
  114. 'Wired NAT' => '2000',
  115. 'NODE Public' => '757',
  116. 'WoS Booths' => '550',
  117. 'WISP Labs' => '530',
  118. 'HILTON Public' => '758',
  119. 'HYATT Public' => '759',
  120. );
  121. # VLAN Overrides
  122. # Fill in any per-MDF VLAN override
  123. # OPTIONAL
  124. /*
  125. $VLAN_OVERRIDES = array(
  126. 'SDCC' => array(
  127. 'CiscoTV Public' => '756',
  128. ),
  129. 'NODE' => array(
  130. 'CiscoTV Public' => '762',
  131. ),
  132. );
  133. */
  134. # Custom Macros
  135. # Put any general custom macros and
  136. # their replacements here. They will
  137. # be converted to %%MACRO_NAME%% and replaced
  138. # in your configs.
  139. # OPTIONAL
  140. $CUSTOM_MACROS = array(
  141. 'MAX_MACS' => '10',
  142. );
  143. # MDF Overrides
  144. # Put macros here that will be replaced
  145. # based on the MDF location
  146. # OPTIONAL
  147. $MDF_OVERRIDES = array(
  148. 'NODE' => array(
  149. 'MAX_MACS' => '100',
  150. ),
  151. );
  152. ?>