config-format.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4. <html xmlns="http://www.w3.org/1999/xhtml">
  5. <head>
  6. <title>DOCSIS Configuration File Format</title>
  7. <style type="text/css">
  8. /*<![CDATA[*/
  9. .mandatory {
  10. color: red;
  11. font-weight: bold;
  12. }
  13. /*]]>*/
  14. </style>
  15. </head>
  16. <body>
  17. <h1>Configuration File Format</h1>
  18. <p>The configuration file format somewhat resembles a C program. It
  19. is designed to be easily readable and easily "parseable".</p>
  20. <p>The general format is the following:<br /></p>
  21. <pre>
  22. Main {
  23. </pre>
  24. <pre style="padding-left: 0.5in;">
  25. Setting;
  26. </pre>
  27. <pre style="padding-left: 0.5in;">
  28. Setting;
  29. </pre>
  30. <pre style="padding-left: 0.5in;">
  31. ...
  32. </pre>
  33. <pre style="padding-left: 0.5in;">
  34. AggregateSetting {
  35. </pre>
  36. <pre style="padding-left: 1.0in;">
  37. SubSetting;
  38. </pre>
  39. <pre style="padding-left: 1.0in;">
  40. SubSetting;
  41. </pre>
  42. <pre style="padding-left: 0.5in;">
  43. }
  44. </pre>
  45. <pre>
  46. }
  47. </pre>
  48. <p>A configuration setting is generally a Label and a Value. For
  49. example:</p>
  50. <pre>
  51. NetworkAccess 1
  52. </pre>
  53. <pre>
  54. SnmpMibObject sysDescr.0 String "Misc Cable Modem"
  55. </pre>
  56. <p>Each configuration setting has to be terminated by the ";"
  57. character.</p>
  58. <p>The list of <a href="config-settings.html">DOCSIS Configuration Settings</a>
  59. may also be helpful.</p>
  60. <h2>Examples</h2>
  61. <h3>DOCSIS 1.0</h3>
  62. <p>The parts <span style=
  63. "color: rgb(204, 0, 0); font-weight: bold;">marked</span> are
  64. mandatory.</p>
  65. <pre>
  66. <span class="mandatory">Main
  67. {
  68. NetworkAccess 1;</span>
  69. MaxCPE 3;
  70. <span class="mandatory">ClassOfService
  71. {
  72. ClassID 1;</span>
  73. MaxRateDown 512000;
  74. MaxRateUp 256000;
  75. <span class="mandatory">PrivacyEnable 0;
  76. }</span>
  77. SnmpMibObject sysDescr.0 String "Misc Cable Modem";
  78. SnmpWriteControl .1.3.6.1 0;
  79. <span class="mandatory">}</span>
  80. </pre>
  81. <p>In this example, we just allow the cable modem to pass traffic
  82. to the cable network (NetworkAccess 1) and then we give it a basic
  83. class of service with a limit of 512 kbps downstream and 256 kbps
  84. upstream. Baseline Privacy (encryption) is disabled.<br /></p>
  85. <h3>DOCSIS 1.1</h3>
  86. <pre>
  87. Main
  88. {
  89. NetworkAccess 1;
  90. MaxCPE 3;
  91. UsServiceFlow
  92. {
  93. UsServiceFlowRef 1;
  94. QosParamSetType 7;
  95. TrafficPriority 1;
  96. MaxRateSustained 256000;
  97. MaxTrafficBurst 1522;
  98. RequestOrTxPolicy 0x00000018;
  99. }
  100. DsServiceFlow
  101. {
  102. DsServiceFlowRef 101;
  103. QosParamSetType 7;
  104. TrafficPriority 1;
  105. MaxRateSustained 512000;
  106. }
  107. GlobalPrivacyEnable 0;
  108. SnmpMibObject sysDescr.0 String "Misc Cable Modem";
  109. SnmpWriteControl .1.3.6.1 0;
  110. }
  111. </pre>
  112. <p>This file is similar to the one above, except that we have
  113. replaced the ClassOfService with two service flows - one upstream,
  114. one downstream.&nbsp; Also the BaselinePrivacy setting is now a
  115. global configuration setting (and is only recognized by DOCSIS 1.1
  116. cable modems).</p>
  117. <h3>PacketCable Configuration Files</h3>
  118. <p>MTA config files have to start and end with the
  119. MtaConfigDelimiter configuration setting (with values of "1" and
  120. 255).</p>
  121. <pre>
  122. Main {
  123. MtaConfigDelimiter 1;
  124. SnmpMibObject pktcDevMtaEnabled.0 Integer 1;
  125. ...
  126. MtaConfigDelimiter 255;
  127. }
  128. </pre>
  129. <h3>Complex Configuration File</h3>
  130. <p>This configuration file is NOT useable. It is only described
  131. here as a reference and to make the reader more familiar with the
  132. format.</p>
  133. <pre>
  134. Main
  135. {
  136. DsPacketClass
  137. {
  138. ClassifierRef 255;
  139. ClassifierId 65535;
  140. ServiceFlowRef 65535;
  141. ServiceFlowId 2147483647;
  142. RulePriority 255;
  143. ActivationState 1;
  144. IpPacketClassifier
  145. {
  146. IpTos 0x00ffff;
  147. IpProto 234;
  148. IpSrcAddr 10.1.2.3;
  149. IpSrcMask 255.255.0.0;
  150. IpDstAddr 10.5.2.5;
  151. IpDstMask 255.255.0.0;
  152. SrcPortStart 80;
  153. SrcPortEnd 81;
  154. DstPortStart 500;
  155. DstPortEnd 501;
  156. }
  157. }
  158. UsPacketClass
  159. {
  160. ClassifierRef 253;
  161. ClassifierId 65533;
  162. ServiceFlowRef 65533;
  163. ServiceFlowId 2147483645;
  164. RulePriority 255;
  165. ActivationState 1;
  166. LLCPacketClassifier
  167. {
  168. DstMacAddress 00:00:de:ad:be:ef/00:00:ff:ff:ff:ff;
  169. SrcMacAddress 00:a0:a0:a0:a0:a0;
  170. EtherType 0x030303;
  171. }
  172. }
  173. DsServiceFlow
  174. {
  175. DsServiceFlowRef 65535;
  176. DsServiceFlowId 2147483647;
  177. TrafficPriority 6;
  178. MaxRateSustained 3421234;
  179. MaxTrafficBurst 564343;
  180. MaxDsLatency 7856345;
  181. }
  182. UsServiceFlow
  183. {
  184. UsServiceFlowRef 65533;
  185. UsServiceFlowId 2147483645;
  186. TrafficPriority 6;
  187. MaxRateSustained 3421234;
  188. MaxTrafficBurst 564343;
  189. SchedulingType 3;
  190. MaxConcatenatedBurst 34534;
  191. ToleratedGrantJitter 4653512;
  192. }
  193. NetworkAccess 1;
  194. DownstreamFrequency 123000000;
  195. UpstreamChannelId 1;
  196. ClassOfService
  197. {
  198. ClassID 1;
  199. MaxRateDown 512000;
  200. MaxRateUp 64000;
  201. PriorityUp 3;
  202. GuaranteedUp 32000;
  203. MaxBurstUp 254;
  204. }
  205. BaselinePrivacy
  206. {
  207. AuthTimeout 10;
  208. ReAuthTimeout 10;
  209. AuthGraceTime 600;
  210. OperTimeout 10;
  211. ReKeyTimeout 10;
  212. TEKGraceTime 600;
  213. AuthRejectTimeout 9;
  214. SAMapWaitTimeout 1;
  215. SAMapMaxRetries 4;
  216. }
  217. DocsisTwoEnable 1;
  218. GenericTLV TlvCode 16 TlvLength 4 TlvValue 0xc0a8fe43;
  219. SnmpV3Kickstart
  220. {
  221. SnmpV3SecurityName "2adfla6";
  222. }
  223. SnmpV3TrapReceiver
  224. {
  225. SnmpV3TrapRxIP 10.0.1.253;
  226. SnmpV3TrapRxPort 56790;
  227. SnmpV3TrapRxType 2;
  228. SnmpV3TrapRxTimeout 500;
  229. SnmpV3TrapRxRetries 3;
  230. SnmpV3TrapRxSecurityName "2adfla6";
  231. SnmpV3TrapRxFilterOID .1.3.6.1;
  232. }
  233. SnmpWriteControl .1.3.6.1 1 ;
  234. SnmpMibObject sysContact.0 String "evvolve@users.sourceforge.net" ;
  235. SnmpMibObject sysName.0 String "DCM105 test" ;
  236. SnmpMibObject docsDevFilterIpDefault.0 Integer 1; /* discard */
  237. SnmpMibObject docsDevFilterIpStatus.1 Integer 6; /* destroy */
  238. SnmpMibObject docsDevFilterIpControl.1 Integer 2; /* accept */
  239. SnmpMibObject docsDevFilterIpIfIndex.1 Integer 0 ;
  240. SnmpMibObject docsDevFilterIpDirection.1 Integer 3; /* both */
  241. SnmpMibObject docsDevFilterIpBroadcast.1 Integer 2; /* false */
  242. SnmpMibObject docsDevFilterIpSaddr.1 IPAddress 0.0.0.0 ;
  243. SnmpMibObject docsDevFilterIpSmask.1 IPAddress 0.0.0.0 ;
  244. SnmpMibObject docsDevFilterIpDaddr.1 IPAddress 0.0.0.0 ;
  245. SnmpMibObject docsDevFilterIpDmask.1 IPAddress 0.0.0.0 ;
  246. SnmpMibObject docsDevFilterIpProtocol.1 Integer 1 ;
  247. SnmpMibObject docsDevFilterIpStatus.1 Integer 4; /* createAndGo */
  248. SnmpMibObject docsDevFilterIpStatus.2 Integer 6; /* destroy */
  249. SnmpMibObject docsDevFilterIpControl.2 Integer 2; /* accept */
  250. SnmpMibObject docsDevFilterIpIfIndex.2 Integer 0 ;
  251. SnmpMibObject docsDevFilterIpDirection.2 Integer 3; /* both */
  252. SnmpMibObject docsDevFilterIpBroadcast.2 Integer 2; /* false */
  253. SnmpMibObject docsDevFilterIpSaddr.2 IPAddress 0.0.0.0 ;
  254. SnmpMibObject docsDevFilterIpSmask.2 IPAddress 0.0.0.0 ;
  255. SnmpMibObject docsDevFilterIpDaddr.2 IPAddress 10.1.1.1 ;
  256. SnmpMibObject docsDevFilterIpDmask.2 IPAddress 255.255.255.255 ;
  257. SnmpMibObject docsDevFilterIpProtocol.2 Integer 6 ;
  258. SnmpMibObject docsDevFilterIpStatus.2 Integer 4; /* createAndGo */
  259. SnmpMibObject docsDevFilterIpStatus.3 Integer 6; /* destroy */
  260. SnmpMibObject docsDevFilterIpControl.3 Integer 2; /* accept */
  261. SnmpMibObject docsDevFilterIpIfIndex.3 Integer 0 ;
  262. SnmpMibObject docsDevFilterIpDirection.3 Integer 3; /* both */
  263. SnmpMibObject docsDevFilterIpBroadcast.3 Integer 2; /* false */
  264. SnmpMibObject docsDevFilterIpSaddr.3 IPAddress 10.1.1.1 ;
  265. SnmpMibObject docsDevFilterIpSmask.3 IPAddress 255.255.255.255 ;
  266. SnmpMibObject docsDevFilterIpDaddr.3 IPAddress 0.0.0.0 ;
  267. SnmpMibObject docsDevFilterIpDmask.3 IPAddress 0.0.0.0 ;
  268. SnmpMibObject docsDevFilterIpProtocol.3 Integer 6 ;
  269. SnmpMibObject docsDevFilterIpStatus.3 Integer 4; /* createAndGo */
  270. SnmpMibObject docsDevFilterIpStatus.4 Integer 6; /* destroy */
  271. SnmpMibObject docsDevFilterIpControl.4 Integer 2; /* accept */
  272. SnmpMibObject docsDevFilterIpIfIndex.4 Integer 0 ;
  273. SnmpMibObject docsDevFilterIpDirection.4 Integer 3; /* both */
  274. SnmpMibObject docsDevFilterIpBroadcast.4 Integer 1; /* true */
  275. SnmpMibObject docsDevFilterIpSaddr.4 IPAddress 0.0.0.0 ;
  276. SnmpMibObject docsDevFilterIpSmask.4 IPAddress 0.0.0.0 ;
  277. SnmpMibObject docsDevFilterIpDaddr.4 IPAddress 0.0.0.0 ;
  278. SnmpMibObject docsDevFilterIpDmask.4 IPAddress 0.0.0.0 ;
  279. SnmpMibObject docsDevFilterIpProtocol.4 Integer 17 ;
  280. SnmpMibObject docsDevFilterIpStatus.4 Integer 4; /* createAndGo */
  281. SnmpMibObject docsDevFilterIpStatus.5 Integer 6; /* destroy */
  282. SnmpMibObject docsDevFilterIpControl.5 Integer 2; /* accept */
  283. SnmpMibObject docsDevFilterIpIfIndex.5 Integer 0 ;
  284. SnmpMibObject docsDevFilterIpDirection.5 Integer 3; /* both */
  285. SnmpMibObject docsDevFilterIpBroadcast.5 Integer 2; /* false */
  286. SnmpMibObject docsDevFilterIpSaddr.5 IPAddress 0.0.0.0 ;
  287. SnmpMibObject docsDevFilterIpSmask.5 IPAddress 0.0.0.0 ;
  288. SnmpMibObject docsDevFilterIpDaddr.5 IPAddress 0.0.0.0 ;
  289. SnmpMibObject docsDevFilterIpDmask.5 IPAddress 0.0.0.0 ;
  290. SnmpMibObject docsDevFilterIpProtocol.5 Integer 17 ;
  291. SnmpMibObject docsDevFilterIpStatus.5 Integer 4; /* createAndGo */
  292. SnmpMibObject docsDevFilterIpStatus.6 Integer 6; /* destroy */
  293. SnmpMibObject docsDevFilterIpControl.6 Integer 2; /* accept */
  294. SnmpMibObject docsDevFilterIpIfIndex.6 Integer 0 ;
  295. SnmpMibObject docsDevFilterIpDirection.6 Integer 3; /* both */
  296. SnmpMibObject docsDevFilterIpBroadcast.6 Integer 2; /* false */
  297. SnmpMibObject docsDevFilterIpSaddr.6 IPAddress 0.0.0.0 ;
  298. SnmpMibObject docsDevFilterIpSmask.6 IPAddress 0.0.0.0 ;
  299. SnmpMibObject docsDevFilterIpDaddr.6 IPAddress 0.0.0.0 ;
  300. SnmpMibObject docsDevFilterIpDmask.6 IPAddress 0.0.0.0 ;
  301. SnmpMibObject docsDevFilterIpProtocol.6 Integer 6 ;
  302. SnmpMibObject docsDevFilterIpSourcePortLow.6 Integer 53 ;
  303. SnmpMibObject docsDevFilterIpSourcePortHigh.6 Integer 53 ;
  304. SnmpMibObject docsDevFilterIpDestPortLow.6 Integer 53 ;
  305. SnmpMibObject docsDevFilterIpDestPortHigh.6 Integer 53 ;
  306. SnmpMibObject docsDevFilterIpStatus.6 Integer 4; /* createAndGo */
  307. SnmpMibObject enterprises.19.20.21.22.23.24 Integer -3 ;
  308. SnmpMibObject enterprises.19.20.21.22.23.24 Integer -1 ;
  309. SnmpMibObject enterprises.19.30.31.32.33.34 HexString 0x98ffc00ffc00fffff000000000000000 ;
  310. SnmpMibObject enterprises.19.30.1.1.25.1.3.5 Gauge32 250000000 ;
  311. SwUpgradeFilename "example.bin";
  312. SwUpgradeServer 10.1.1.1;
  313. CpeMacAddress 00:00:de:ad:be:ef;
  314. MaxCPE 3;
  315. }
  316. </pre>
  317. </body>
  318. </html>