OSPF.xsd 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  3. <xsd:simpleType name="AreaIdType">
  4. <xsd:annotation>
  5. <xsd:documentation xml:lang="en">
  6. A string containing an IPv4 address in dotted decimal notation.
  7. </xsd:documentation>
  8. </xsd:annotation>
  9. <xsd:restriction base="xsd:string">
  10. <xsd:pattern value="(([0-1]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))\.){3}([0-1]?[0-9]?[0-9]|2([0-4][0-9]|5[0-5]))" />
  11. </xsd:restriction>
  12. </xsd:simpleType>
  13. <xsd:simpleType name="IPv4AddressResolvType">
  14. <xsd:annotation>
  15. <xsd:documentation xml:lang="en">
  16. A string containing a string which resolvable by IPvXAddressResolver class in INET.
  17. </xsd:documentation>
  18. </xsd:annotation>
  19. <xsd:restriction base="xsd:string">
  20. </xsd:restriction>
  21. </xsd:simpleType>
  22. <xsd:simpleType name="NodePathType">
  23. <xsd:annotation>
  24. <xsd:documentation xml:lang="en">
  25. A string containing a node path, for example "Area1.Router2".
  26. </xsd:documentation>
  27. </xsd:annotation>
  28. <xsd:restriction base="xsd:string">
  29. </xsd:restriction>
  30. </xsd:simpleType>
  31. <xsd:simpleType name="InterfaceNameType">
  32. <xsd:annotation>
  33. <xsd:documentation xml:lang="en">
  34. A string containing an interface name.
  35. </xsd:documentation>
  36. </xsd:annotation>
  37. <xsd:restriction base="xsd:string">
  38. </xsd:restriction>
  39. </xsd:simpleType>
  40. <xsd:simpleType name="StatusTypeEnum">
  41. <xsd:annotation>
  42. <xsd:documentation xml:lang="en">
  43. A value type which decides whether an address range will be advertised
  44. in Summary LSAs.
  45. </xsd:documentation>
  46. </xsd:annotation>
  47. <xsd:restriction base="xsd:string">
  48. <xsd:enumeration value="Advertise" />
  49. <xsd:enumeration value="DoNotAdvertise" />
  50. </xsd:restriction>
  51. </xsd:simpleType>
  52. <xsd:simpleType name="MetricType">
  53. <xsd:annotation>
  54. <xsd:documentation xml:lang="en">
  55. Link cost metric datatype. Should be less then 1000.
  56. </xsd:documentation>
  57. </xsd:annotation>
  58. <xsd:restriction base="xsd:positiveInteger">
  59. <xsd:maxExclusive value="1000" />
  60. </xsd:restriction>
  61. </xsd:simpleType>
  62. <xsd:simpleType name="AuthenticationTypeEnum">
  63. <xsd:annotation>
  64. <xsd:documentation xml:lang="en">
  65. Possible OSPF packet authentication protocols.
  66. </xsd:documentation>
  67. </xsd:annotation>
  68. <xsd:restriction base="xsd:string">
  69. <xsd:enumeration value="NullType" />
  70. <xsd:enumeration value="SimplePasswordType" />
  71. <xsd:enumeration value="CrytographicType" />
  72. </xsd:restriction>
  73. </xsd:simpleType>
  74. <xsd:simpleType name="AuthenticationKeyType">
  75. <xsd:annotation>
  76. <xsd:documentation xml:lang="en">
  77. Key value for the chosen authentication protocol. A string of at most 8
  78. bytes given in hexadecimal form. It starts with the '0x' string and
  79. continues with 1 to 8 pairs of hexadecimal digits.
  80. </xsd:documentation>
  81. </xsd:annotation>
  82. <xsd:restriction base="xsd:string">
  83. <xsd:pattern value="0x([0-9a-fA-F]{2}){1,8}" />
  84. </xsd:restriction>
  85. </xsd:simpleType>
  86. <xsd:simpleType name="ExternalRouteTagType">
  87. <xsd:annotation>
  88. <xsd:documentation xml:lang="en">
  89. 4 bytes describing the external route tag propagated for an external
  90. route in AS External LSAs. A string of at most 4 bytes given in
  91. hexadecimal form. It starts with the '0x' string and continues with 1 to
  92. 4 pairs of hexadecimal digits.
  93. </xsd:documentation>
  94. </xsd:annotation>
  95. <xsd:restriction base="xsd:string">
  96. <xsd:pattern value="0x([0-9a-fA-F]{2}){1,4}" />
  97. </xsd:restriction>
  98. </xsd:simpleType>
  99. <xsd:simpleType name="ExternalInterfaceOutputCostType">
  100. <xsd:annotation>
  101. <xsd:documentation xml:lang="en">
  102. The output cost type of an external link.
  103. </xsd:documentation>
  104. </xsd:annotation>
  105. <xsd:restriction base="xsd:string">
  106. <xsd:enumeration value="Type1" />
  107. <xsd:enumeration value="Type2" />
  108. </xsd:restriction>
  109. </xsd:simpleType>
  110. <xsd:attributeGroup name="ifAttr">
  111. <xsd:attribute name="ifName" type="InterfaceNameType" use="optional" />
  112. <xsd:attribute name="toward" type="NodePathType" use="optional" />
  113. <!-- TODO: only one from @ifName and @toward is required!!! -->
  114. </xsd:attributeGroup>
  115. <xsd:element name="AddressRange">
  116. <xsd:annotation>
  117. <xsd:documentation xml:lang="en">
  118. Describes an address range of an OSPF area.
  119. </xsd:documentation>
  120. </xsd:annotation>
  121. <xsd:complexType>
  122. <xsd:attribute name="address" type="IPv4AddressResolvType" use="required" />
  123. <xsd:attribute name="mask" type="IPv4AddressResolvType" use="required" />
  124. <xsd:attribute name="status" type="StatusTypeEnum" use="required" />
  125. </xsd:complexType>
  126. </xsd:element>
  127. <xsd:element name="Stub">
  128. <xsd:annotation>
  129. <xsd:documentation xml:lang="en">
  130. An OSPF area (except the backbone) can be configured as a stub area. This
  131. element signals this occurrence and defines the default route cost
  132. advertised for that area.
  133. </xsd:documentation>
  134. </xsd:annotation>
  135. <xsd:complexType>
  136. <xsd:attribute name="defaultCost" type="MetricType" use="required" />
  137. </xsd:complexType>
  138. </xsd:element>
  139. <xsd:element name="Area">
  140. <xsd:annotation>
  141. <xsd:documentation xml:lang="en">
  142. The definition of an OSPF area. It has to have an Area ID given in the
  143. form of an IPv4 address. (The backbone is '0.0.0.0'.)
  144. </xsd:documentation>
  145. </xsd:annotation>
  146. <xsd:complexType>
  147. <xsd:sequence>
  148. <xsd:element ref="AddressRange" minOccurs="1" maxOccurs="unbounded" />
  149. <xsd:element ref="Stub" minOccurs="0" maxOccurs="1" />
  150. </xsd:sequence>
  151. <xsd:attribute name="id" type="AreaIdType" use="required" />
  152. </xsd:complexType>
  153. </xsd:element>
  154. <xsd:element name="PointToPointInterface">
  155. <xsd:annotation>
  156. <xsd:documentation xml:lang="en">
  157. Describes the parameters of a point-to-point interface. It is identified
  158. in the router by its ifName value, or name of toward module.
  159. HelloInterval and RouterDeadInterval must be the same for all router
  160. interfaces attached to the same network.
  161. </xsd:documentation>
  162. </xsd:annotation>
  163. <xsd:complexType>
  164. <xsd:attributeGroup ref="ifAttr" />
  165. <xsd:attribute name="areaID" type="AreaIdType" use="optional" />
  166. <xsd:attribute name="interfaceOutputCost" type="MetricType" use="optional" />
  167. <xsd:attribute name="retransmissionInterval" type="xsd:unsignedShort" use="optional" />
  168. <xsd:attribute name="interfaceTransmissionDelay" type="xsd:unsignedByte" use="optional" />
  169. <xsd:attribute name="helloInterval" type="xsd:unsignedShort" use="optional" />
  170. <xsd:attribute name="routerDeadInterval" type="xsd:unsignedShort" use="optional" />
  171. <xsd:attribute name="authenticationType" type="AuthenticationTypeEnum" use="optional" />
  172. <xsd:attribute name="authenticationKey" type="AuthenticationKeyType" use="optional" />
  173. </xsd:complexType>
  174. </xsd:element>
  175. <xsd:element name="BroadcastInterface">
  176. <xsd:annotation>
  177. <xsd:documentation xml:lang="en">
  178. Describes the parameters of a broadcast interface. It is identified in
  179. the router by its ifName value, or name of toward module.
  180. HelloInterval and RouterDeadInterval must be the same for all router
  181. interfaces attached to the same network.
  182. </xsd:documentation>
  183. </xsd:annotation>
  184. <xsd:complexType>
  185. <xsd:attributeGroup ref="ifAttr" />
  186. <xsd:attribute name="areaID" type="AreaIdType" use="optional" />
  187. <xsd:attribute name="interfaceOutputCost" type="MetricType" use="optional" />
  188. <xsd:attribute name="retransmissionInterval" type="xsd:unsignedShort" use="optional" />
  189. <xsd:attribute name="interfaceTransmissionDelay" type="xsd:unsignedByte" use="optional" />
  190. <xsd:attribute name="routerPriority" type="xsd:unsignedByte" use="optional" />
  191. <xsd:attribute name="helloInterval" type="xsd:unsignedShort" use="optional" />
  192. <xsd:attribute name="routerDeadInterval" type="xsd:unsignedShort" use="optional" />
  193. <xsd:attribute name="authenticationType" type="AuthenticationTypeEnum" use="optional" />
  194. <xsd:attribute name="authenticationKey" type="AuthenticationKeyType" use="optional" />
  195. </xsd:complexType>
  196. </xsd:element>
  197. <xsd:element name="NBMANeighbor">
  198. <xsd:annotation>
  199. <xsd:documentation xml:lang="en">
  200. Describes the preconfigured parameters of one of an NBMA router's neighbor.
  201. </xsd:documentation>
  202. </xsd:annotation>
  203. <xsd:complexType>
  204. <xsd:attribute name="networkInterfaceAddress" type="IPv4AddressResolvType" use="required" />
  205. <xsd:attribute name="neighborPriority" type="xsd:unsignedByte" use="required" />
  206. </xsd:complexType>
  207. </xsd:element>
  208. <xsd:element name="NBMANeighborList">
  209. <xsd:annotation>
  210. <xsd:documentation xml:lang="en">
  211. A list of the available neighbors on an NBMA network.
  212. </xsd:documentation>
  213. </xsd:annotation>
  214. <xsd:complexType>
  215. <xsd:sequence>
  216. <xsd:element ref="NBMANeighbor" minOccurs="1" maxOccurs="unbounded" />
  217. </xsd:sequence>
  218. </xsd:complexType>
  219. </xsd:element>
  220. <xsd:element name="NBMAInterface">
  221. <xsd:annotation>
  222. <xsd:documentation xml:lang="en">
  223. Describes the parameters of an NBMA interface. It is identified in the
  224. router by its ifName value, or name of toward module.
  225. HelloInterval and RouterDeadInterval must be the same for all router
  226. interfaces attached to the same network.
  227. </xsd:documentation>
  228. </xsd:annotation>
  229. <xsd:complexType>
  230. <xsd:sequence>
  231. <xsd:element ref="NBMANeighborList" minOccurs="1" maxOccurs="1" />
  232. </xsd:sequence>
  233. <xsd:attributeGroup ref="ifAttr" />
  234. <xsd:attribute name="areaID" type="AreaIdType" use="optional" />
  235. <xsd:attribute name="interfaceOutputCost" type="MetricType" use="optional" />
  236. <xsd:attribute name="retransmissionInterval" type="xsd:unsignedShort" use="optional" />
  237. <xsd:attribute name="interfaceTransmissionDelay" type="xsd:unsignedByte" use="optional" />
  238. <xsd:attribute name="routerPriority" type="xsd:unsignedByte" use="optional" />
  239. <xsd:attribute name="helloInterval" type="xsd:unsignedShort" use="optional" />
  240. <xsd:attribute name="routerDeadInterval" type="xsd:unsignedShort" use="optional" />
  241. <xsd:attribute name="authenticationType" type="AuthenticationTypeEnum" use="optional" />
  242. <xsd:attribute name="authenticationKey" type="AuthenticationKeyType" use="optional" />
  243. <xsd:attribute name="pollInterval" type="xsd:unsignedShort" use="optional" />
  244. </xsd:complexType>
  245. </xsd:element>
  246. <xsd:element name="PointToMultiPointNeighborList">
  247. <xsd:annotation>
  248. <xsd:documentation xml:lang="en">
  249. A list of the available neighbors on a PointToMultiPoint network.
  250. </xsd:documentation>
  251. </xsd:annotation>
  252. <xsd:complexType>
  253. <xsd:sequence>
  254. <xsd:element name="PointToMultiPointNeighbor" type="IPv4AddressResolvType" minOccurs="1" maxOccurs="unbounded" />
  255. </xsd:sequence>
  256. </xsd:complexType>
  257. </xsd:element>
  258. <xsd:element name="PointToMultiPointInterface">
  259. <xsd:annotation>
  260. <xsd:documentation xml:lang="en">
  261. Describes the parameters of a point-to-multipoint interface. It is
  262. identified in the router by its ifName value, or name of toward module.
  263. HelloInterval and RouterDeadInterval must be the same for all router
  264. interfaces attached to the same network.
  265. </xsd:documentation>
  266. </xsd:annotation>
  267. <xsd:complexType>
  268. <xsd:sequence>
  269. <xsd:element ref="PointToMultiPointNeighborList" minOccurs="1" maxOccurs="1" />
  270. </xsd:sequence>
  271. <xsd:attributeGroup ref="ifAttr" />
  272. <xsd:attribute name="areaID" type="AreaIdType" use="optional" />
  273. <xsd:attribute name="interfaceOutputCost" type="MetricType" use="optional" />
  274. <xsd:attribute name="retransmissionInterval" type="xsd:unsignedShort" use="optional" />
  275. <xsd:attribute name="interfaceTransmissionDelay" type="xsd:unsignedByte" use="optional" />
  276. <xsd:attribute name="helloInterval" type="xsd:unsignedShort" use="optional" />
  277. <xsd:attribute name="routerDeadInterval" type="xsd:unsignedShort" use="optional" />
  278. <xsd:attribute name="authenticationType" type="AuthenticationTypeEnum" use="optional" />
  279. <xsd:attribute name="authenticationKey" type="AuthenticationKeyType" use="optional" />
  280. </xsd:complexType>
  281. </xsd:element>
  282. <xsd:element name="ExternalInterface">
  283. <xsd:annotation>
  284. <xsd:documentation xml:lang="en">
  285. Describes the parameters of an external interface. These parameters will
  286. be advertised in the AS External LSA for this external route. The
  287. interface is identified in the router by its ifName value, or name of toward module.
  288. </xsd:documentation>
  289. </xsd:annotation>
  290. <xsd:complexType>
  291. <xsd:attributeGroup ref="ifAttr" />
  292. <xsd:attribute name="advertisedExternalNetworkAddress" type="IPv4AddressResolvType" use="optional" />
  293. <xsd:attribute name="advertisedExternalNetworkMask" type="IPv4AddressResolvType" use="optional" />
  294. <xsd:attribute name="externalInterfaceOutputType" type="ExternalInterfaceOutputCostType" use="optional" />
  295. <xsd:attribute name="externalInterfaceOutputCost" type="MetricType" use="optional" />
  296. <xsd:attribute name="forwardingAddress" type="IPv4AddressResolvType" use="optional" />
  297. <xsd:attribute name="externalRouteTag" type="ExternalRouteTagType" use="optional" />
  298. </xsd:complexType>
  299. </xsd:element>
  300. <xsd:element name="HostInterface">
  301. <xsd:annotation>
  302. <xsd:documentation xml:lang="en">
  303. Describes the parameters of a host interface (an interface to which a
  304. single host is attached). The interface is identified in the router by
  305. its ifName value, or name of toward module.
  306. </xsd:documentation>
  307. </xsd:annotation>
  308. <xsd:complexType>
  309. <xsd:attributeGroup ref="ifAttr" />
  310. <xsd:attribute name="areaID" type="AreaIdType" use="optional" />
  311. <xsd:attribute name="attachedHost" type="IPv4AddressResolvType" use="optional" />
  312. <xsd:attribute name="linkCost" type="MetricType" use="optional" />
  313. </xsd:complexType>
  314. </xsd:element>
  315. <xsd:element name="VirtualLink">
  316. <xsd:annotation>
  317. <xsd:documentation xml:lang="en">
  318. Describes a virtual link between two backbone routers.
  319. RetransmissionInterval should be well over the expected round-trip delay
  320. between the two routers. The virtual link is identified by its end
  321. point's router ID.
  322. </xsd:documentation>
  323. </xsd:annotation>
  324. <xsd:complexType>
  325. <xsd:attribute name="endPointRouterID" type="IPv4AddressResolvType" use="optional" /> <!-- must use '_nodename_%routerId' -->
  326. <xsd:attribute name="transitAreaID" type="AreaIdType" use="optional" />
  327. <xsd:attribute name="retransmissionInterval" type="xsd:unsignedShort" use="optional" />
  328. <xsd:attribute name="interfaceTransmissionDelay" type="xsd:unsignedByte" use="optional" />
  329. <xsd:attribute name="helloInterval" type="xsd:unsignedShort" use="optional" />
  330. <xsd:attribute name="routerDeadInterval" type="xsd:unsignedShort" use="optional" />
  331. <xsd:attribute name="authenticationType" type="AuthenticationTypeEnum" use="optional" />
  332. <xsd:attribute name="authenticationKey" type="AuthenticationKeyType" use="optional" />
  333. </xsd:complexType>
  334. </xsd:element>
  335. <xsd:element name="Router">
  336. <xsd:annotation>
  337. <xsd:documentation xml:lang="en">
  338. Describes an OSPF router with its interfaces. Interface 'ifName' and 'toward' module name values
  339. must be unique within the same router. A router is identified by its
  340. Router ID, which is given as an IPv4 address (but isn't necessarily one).
  341. </xsd:documentation>
  342. </xsd:annotation>
  343. <xsd:complexType>
  344. <xsd:sequence>
  345. <xsd:choice minOccurs="1" maxOccurs="255">
  346. <xsd:element ref="PointToPointInterface" />
  347. <xsd:element ref="BroadcastInterface" />
  348. <xsd:element ref="NBMAInterface" />
  349. <xsd:element ref="PointToMultiPointInterface" />
  350. <xsd:element ref="ExternalInterface" />
  351. <xsd:element ref="HostInterface" />
  352. </xsd:choice>
  353. <xsd:element ref="VirtualLink" minOccurs="0" maxOccurs="unbounded" />
  354. </xsd:sequence>
  355. <xsd:attribute name="name" type="NodePathType" use="required" />
  356. <xsd:attribute name="RFC1583Compatible" type="xsd:boolean" use="optional" />
  357. </xsd:complexType>
  358. <xsd:unique name="IfIndexConstraint">
  359. <xsd:selector xpath="PointToPointInterface|BroadcastInterface|NBMAInterface|PointToMultiPointInterface|ExternalInterface|HostInterface" />
  360. <xsd:field xpath="@ifName" />
  361. </xsd:unique>
  362. <xsd:unique name="towardConstraint">
  363. <xsd:selector xpath="PointToPointInterface|BroadcastInterface|NBMAInterface|PointToMultiPointInterface|ExternalInterface|HostInterface" />
  364. <xsd:field xpath="@toward" />
  365. </xsd:unique>
  366. <xsd:unique name="VirtualLinkEndPointConstraint">
  367. <xsd:selector xpath="VirtualLink" />
  368. <xsd:field xpath="@endPointRouterID" />
  369. </xsd:unique>
  370. </xsd:element>
  371. <xsd:element name="OSPFASConfig">
  372. <xsd:annotation>
  373. <xsd:documentation xml:lang="en">
  374. Describes an OSPF autonomous system with its areas and its routers. The
  375. Area IDs, Router IDs and area Address Ranges must be unique within the
  376. autonomous system.
  377. </xsd:documentation>
  378. </xsd:annotation>
  379. <xsd:complexType>
  380. <xsd:sequence>
  381. <xsd:element ref="Area" minOccurs="1" maxOccurs="unbounded" />
  382. <xsd:element ref="Router" minOccurs="2" maxOccurs="unbounded" />
  383. </xsd:sequence>
  384. </xsd:complexType>
  385. <xsd:unique name="AreaIDConstraint">
  386. <xsd:selector xpath="Area" />
  387. <xsd:field xpath="@id" />
  388. </xsd:unique>
  389. <xsd:unique name="RouterIDConstraint">
  390. <xsd:selector xpath="Router" />
  391. <xsd:field xpath="@id" />
  392. </xsd:unique>
  393. <xsd:unique name="AddressRangeConstraint">
  394. <xsd:selector xpath="Area/AddressRange" />
  395. <xsd:field xpath="Address" />
  396. <xsd:field xpath="Mask" />
  397. </xsd:unique>
  398. </xsd:element>
  399. </xsd:schema>