ospfd.texi 30 KB

  1. @cindex OSPFv2
  2. @node OSPFv2
  3. @chapter OSPFv2
  4. @acronym{OSPF,Open Shortest Path First} version 2 is a routing protocol
  5. which is described in @cite{RFC2328, OSPF Version 2}. OSPF is an
  6. @acronym{IGP,Interior Gateway Protocol}. Compared with @acronym{RIP},
  7. @acronym{OSPF} can provide scalable network support and faster
  8. convergence times. OSPF is widely used in large networks such as
  9. @acronym{ISP,Internet Service Provider} backbone and enterprise
  10. networks.
  11. @menu
  12. * Configuring ospfd::
  13. * OSPF router::
  14. * OSPF area::
  15. * OSPF interface::
  16. * Redistribute routes to OSPF::
  17. * Showing OSPF information::
  18. * Debugging OSPF::
  19. * OSPF Configuration Examples::
  20. @end menu
  21. @node Configuring ospfd
  22. @section Configuring ospfd
  23. There are no @command{ospfd} specific options. Common options can be
  24. specified (@pxref{Common Invocation Options}) to @command{ospfd}.
  25. @command{ospfd} needs to acquire interface information from
  26. @command{zebra} in order to function. Therefore @command{zebra} must be
  27. running before invoking @command{ospfd}. Also, if @command{zebra} is
  28. restarted then @command{ospfd} must be too.
  29. Like other daemons, @command{ospfd} configuration is done in @acronym{OSPF}
  30. specific configuration file @file{ospfd.conf}.
  31. @node OSPF router
  32. @section OSPF router
  33. To start OSPF process you have to specify the OSPF router. As of this
  34. writing, @command{ospfd} does not support multiple OSPF processes.
  35. @deffn Command {router ospf} {}
  36. @deffnx Command {no router ospf} {}
  37. Enable or disable the OSPF process. @command{ospfd} does not yet
  38. support multiple OSPF processes. So you can not specify an OSPF process
  39. number.
  40. @end deffn
  41. @deffn {OSPF Command} {ospf router-id @var{a.b.c.d}} {}
  42. @deffnx {OSPF Command} {no ospf router-id} {}
  43. @anchor{ospf router-id}This sets the router-ID of the OSPF process. The
  44. router-ID may be an IP address of the router, but need not be - it can
  45. be any arbitrary 32bit number. However it MUST be unique within the
  46. entire OSPF domain to the OSPF speaker - bad things will happen if
  47. multiple OSPF speakers are configured with the same router-ID! If one
  48. is not specified then @command{ospfd} will obtain a router-ID
  49. automatically from @command{zebra}.
  50. @end deffn
  51. @deffn {OSPF Command} {ospf abr-type @var{type}} {}
  52. @deffnx {OSPF Command} {no ospf abr-type @var{type}} {}
  53. @var{type} can be cisco|ibm|shortcut|standard. The "Cisco" and "IBM" types
  54. are equivalent.
  55. The OSPF standard for ABR behaviour does not allow an ABR to consider
  56. routes through non-backbone areas when its links to the backbone are
  57. down, even when there are other ABRs in attached non-backbone areas
  58. which still can reach the backbone - this restriction exists primarily
  59. to ensure routing-loops are avoided.
  60. With the "Cisco" or "IBM" ABR type, the default in this release of
  61. Quagga, this restriction is lifted, allowing an ABR to consider
  62. summaries learnt from other ABRs through non-backbone areas, and hence
  63. route via non-backbone areas as a last resort when, and only when,
  64. backbone links are down.
  65. Note that areas with fully-adjacent virtual-links are considered to be
  66. "transit capable" and can always be used to route backbone traffic, and
  67. hence are unaffected by this setting (@pxref{OSPF virtual-link}).
  68. More information regarding the behaviour controlled by this command can
  69. be found in @cite{RFC 3509, Alternative Implementations of OSPF Area
  70. Border Routers}, and @cite{draft-ietf-ospf-shortcut-abr-02.txt}.
  71. Quote: "Though the definition of the @acronym{ABR,Area Border Router}
  72. in the OSPF specification does not require a router with multiple
  73. attached areas to have a backbone connection, it is actually
  74. necessary to provide successful routing to the inter-area and
  75. external destinations. If this requirement is not met, all traffic
  76. destined for the areas not connected to such an ABR or out of the
  77. OSPF domain, is dropped. This document describes alternative ABR
  78. behaviors implemented in Cisco and IBM routers."
  79. @end deffn
  80. @deffn {OSPF Command} {ospf rfc1583compatibility} {}
  81. @deffnx {OSPF Command} {no ospf rfc1583compatibility} {}
  82. @cite{RFC2328}, the sucessor to @cite{RFC1583}, suggests according
  83. to section G.2 (changes) in section 16.4 a change to the path
  84. preference algorithm that prevents possible routing loops that were
  85. possible in the old version of OSPFv2. More specifically it demands
  86. that inter-area paths and intra-area path are now of equal preference
  87. but still both preferred to external paths.
  88. This command should NOT be set normally.
  89. @end deffn
  90. @deffn {OSPF Command} {log-adjacency-changes [detail]} {}
  91. @deffnx {OSPF Command} {no log-adjacency-changes [detail]} {}
  92. Configures ospfd to log changes in adjacency. With the optional
  93. detail argument, all changes in adjacency status are shown. Without detail,
  94. only changes to full or regressions are shown.
  95. @end deffn
  96. @deffn {OSPF Command} {passive-interface @var{interface}} {}
  97. @deffnx {OSPF Command} {no passive-interface @var{interface}} {}
  98. @anchor{OSPF passive-interface} Do not speak OSPF interface on the
  99. given interface, but do advertise the interface as a stub link in the
  100. router-@acronym{LSA,Link State Advertisement} for this router. This
  101. allows one to advertise addresses on such connected interfaces without
  102. having to originate AS-External/Type-5 LSAs (which have global flooding
  103. scope) - as would occur if connected addresses were redistributed into
  104. OSPF (@pxref{Redistribute routes to OSPF})@. This is the only way to
  105. advertise non-OSPF links into stub areas.
  106. @end deffn
  107. @deffn {OSPF Command} {timers throttle spf @var{delay} @var{initial-holdtime} @var{max-holdtime}} {}
  108. @deffnx {OSPF Command} {no timers throttle spf} {}
  109. This command sets the initial @var{delay}, the @var{initial-holdtime}
  110. and the @var{maximum-holdtime} between when SPF is calculated and the
  111. event which triggered the calculation. The times are specified in
  112. milliseconds and must be in the range of 0 to 600000 milliseconds.
  113. The @var{delay} specifies the minimum amount of time to delay SPF
  114. calculation (hence it affects how long SPF calculation is delayed after
  115. an event which occurs outside of the holdtime of any previous SPF
  116. calculation, and also serves as a minimum holdtime).
  117. Consecutive SPF calculations will always be seperated by at least
  118. 'hold-time' milliseconds. The hold-time is adaptive and initially is
  119. set to the @var{initial-holdtime} configured with the above command.
  120. Events which occur within the holdtime of the previous SPF calculation
  121. will cause the holdtime to be increased by @var{initial-holdtime}, bounded
  122. by the @var{maximum-holdtime} configured with this command. If the adaptive
  123. hold-time elapses without any SPF-triggering event occuring then
  124. the current holdtime is reset to the @var{initial-holdtime}. The current
  125. holdtime can be viewed with @ref{show ip ospf}, where it is expressed as
  126. a multiplier of the @var{initial-holdtime}.
  127. @example
  128. @group
  129. router ospf
  130. timers throttle spf 200 400 10000
  131. @end group
  132. @end example
  133. In this example, the @var{delay} is set to 200ms, the @var{initial
  134. holdtime} is set to 400ms and the @var{maximum holdtime} to 10s. Hence
  135. there will always be at least 200ms between an event which requires SPF
  136. calculation and the actual SPF calculation. Further consecutive SPF
  137. calculations will always be seperated by between 400ms to 10s, the
  138. hold-time increasing by 400ms each time an SPF-triggering event occurs
  139. within the hold-time of the previous SPF calculation.
  140. This command supercedes the @command{timers spf} command in previous Quagga
  141. releases.
  142. @end deffn
  143. @deffn {OSPF Command} {max-metric router-lsa [on-startup|on-shutdown] <5-86400>} {}
  144. @deffnx {OSPF Command} {max-metric router-lsa administrative} {}
  145. @deffnx {OSPF Command} {no max-metric router-lsa [on-startup|on-shutdown|administrative]} {}
  146. This enables @cite{RFC3137, OSPF Stub Router Advertisement} support,
  147. where the OSPF process describes its transit links in its router-LSA as
  148. having infinite distance so that other routers will avoid calculating
  149. transit paths through the router while still being able to reach
  150. networks through the router.
  151. This support may be enabled administratively (and indefinitely) or
  152. conditionally. Conditional enabling of max-metric router-lsas can be
  153. for a period of seconds after startup and/or for a period of seconds
  154. prior to shutdown.
  155. Enabling this for a period after startup allows OSPF to converge fully
  156. first without affecting any existing routes used by other routers,
  157. while still allowing any connected stub links and/or redistributed
  158. routes to be reachable. Enabling this for a period of time in advance
  159. of shutdown allows the router to gracefully excuse itself from the OSPF
  160. domain.
  161. Enabling this feature administratively allows for administrative
  162. intervention for whatever reason, for an indefinite period of time.
  163. Note that if the configuration is written to file, this administrative
  164. form of the stub-router command will also be written to file. If
  165. @command{ospfd} is restarted later, the command will then take effect
  166. until manually deconfigured.
  167. Configured state of this feature as well as current status, such as the
  168. number of second remaining till on-startup or on-shutdown ends, can be
  169. viewed with the @ref{show ip ospf} command.
  170. @end deffn
  171. @deffn {OSPF Command} {auto-cost reference-bandwidth <1-4294967>} {}
  172. @deffnx {OSPF Command} {no auto-cost reference-bandwidth} {}
  173. @anchor{OSPF auto-cost reference-bandwidth}This sets the reference
  174. bandwidth for cost calculations, where this bandwidth is considered
  175. equivalent to an OSPF cost of 1, specified in Mbits/s. The default is
  176. 100Mbit/s (i.e. a link of bandwidth 100Mbit/s or higher will have a
  177. cost of 1. Cost of lower bandwidth links will be scaled with reference
  178. to this cost).
  179. This configuration setting MUST be consistent across all routers within the
  180. OSPF domain.
  181. @end deffn
  182. @deffn {OSPF Command} {network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
  183. @deffnx {OSPF Command} {network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
  184. @deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{a.b.c.d}} {}
  185. @deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{<0-4294967295>}} {}
  186. This command specifies the OSPF enabled interface(s). If the interface has
  187. an address from range then the command below enables ospf
  188. on this interface so router can provide network information to the other
  189. ospf routers via this interface.
  190. @example
  191. @group
  192. router ospf
  193. network area
  194. @end group
  195. @end example
  196. Prefix length in interface must be equal or bigger (ie. smaller network) than
  197. prefix length in network statement. For example statement above doesn't enable
  198. ospf on interface with address, but it does on interface with
  199. address
  200. @end deffn
  201. @node OSPF area
  202. @section OSPF area
  203. @deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
  204. @deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {}
  205. @deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {}
  206. @deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {}
  207. Summarize intra area paths from specified area into one Type-3 summary-LSA
  208. announced to other areas. This command can be used only in ABR and ONLY
  209. router-LSAs (Type-1) and network-LSAs (Type-2) (ie. LSAs with scope area) can
  210. be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS.
  211. Summarizing Type-7 AS-external-LSAs isn't supported yet by Quagga.
  212. @example
  213. @group
  214. router ospf
  215. network area
  216. network area
  217. area range
  218. @end group
  219. @end example
  220. With configuration above one Type-3 Summary-LSA with routing info is
  221. announced into backbone area if area contains at least one intra-area
  222. network (ie. described with router or network LSA) from this range.
  223. @end deffn
  224. @deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
  225. @deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {}
  226. Instead of summarizing intra area paths filter them - ie. intra area paths from this
  227. range are not advertised into other areas.
  228. This command makes sense in ABR only.
  229. @end deffn
  230. @deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
  231. @deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {}
  232. Substitute summarized prefix with another prefix.
  233. @example
  234. @group
  235. router ospf
  236. network area
  237. network area
  238. area range substitute
  239. @end group
  240. @end example
  241. One Type-3 summary-LSA with routing info is announced into backbone area if
  242. area contains at least one intra-area network (ie. described with router-LSA or
  243. network-LSA) from range
  244. This command makes sense in ABR only.
  245. @end deffn
  246. @deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
  247. @deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {}
  248. @deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {}
  249. @deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {}
  250. @anchor{OSPF virtual-link}
  251. @end deffn
  252. @deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {}
  253. @deffnx {OSPF Command} {area <0-4294967295> shortcut} {}
  254. @deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {}
  255. @deffnx {OSPF Command} {no area <0-4294967295> shortcut} {}
  256. Configure the area as Shortcut capable. See @cite{RFC3509}. This requires
  257. that the 'abr-type' be set to 'shortcut'.
  258. @end deffn
  259. @deffn {OSPF Command} {area @var{a.b.c.d} stub} {}
  260. @deffnx {OSPF Command} {area <0-4294967295> stub} {}
  261. @deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {}
  262. @deffnx {OSPF Command} {no area <0-4294967295> stub} {}
  263. Configure the area to be a stub area. That is, an area where no router
  264. originates routes external to OSPF and hence an area where all external
  265. routes are via the ABR(s). Hence, ABRs for such an area do not need
  266. to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the
  267. area. They need only pass Network-Summary (type-3) LSAs into such an area,
  268. along with a default-route summary.
  269. @end deffn
  270. @deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {}
  271. @deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {}
  272. @deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {}
  273. @deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {}
  274. Prevents an @command{ospfd} ABR from injecting inter-area
  275. summaries into the specified stub area.
  276. @end deffn
  277. @deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {}
  278. @deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {}
  279. Set the cost of default-summary LSAs announced to stubby areas.
  280. @end deffn
  281. @deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {}
  282. @deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {}
  283. @deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {}
  284. @deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {}
  285. Filter Type-3 summary-LSAs announced to other areas originated from intra-
  286. area paths from specified area.
  287. @example
  288. @group
  289. router ospf
  290. network area
  291. network area
  292. area export-list foo
  293. !
  294. access-list foo permit
  295. access-list foo deny any
  296. @end group
  297. @end example
  298. With example above any intra-area paths from area and from range
  299. (for example and are announced into
  300. other areas as Type-3 summary-LSA's, but any others (for example
  301. or aren't.
  302. This command is only relevant if the router is an ABR for the specified
  303. area.
  304. @end deffn
  305. @deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {}
  306. @deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {}
  307. @deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {}
  308. @deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {}
  309. Same as export-list, but it applies to paths announced into specified area as
  310. Type-3 summary-LSAs.
  311. @end deffn
  312. @deffn {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME in} {}
  313. @deffnx {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME out} {}
  314. @deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME in} {}
  315. @deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME out} {}
  316. @deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME in} {}
  317. @deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME out} {}
  318. @deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME in} {}
  319. @deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME out} {}
  320. Filtering Type-3 summary-LSAs to/from area using prefix lists. This command
  321. makes sense in ABR only.
  322. @end deffn
  323. @deffn {OSPF Command} {area @var{a.b.c.d} authentication} {}
  324. @deffnx {OSPF Command} {area <0-4294967295> authentication} {}
  325. @deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {}
  326. @deffnx {OSPF Command} {no area <0-4294967295> authentication} {}
  327. Specify that simple password authentication should be used for the given
  328. area.
  329. @end deffn
  330. @deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {}
  331. @deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {}
  332. @anchor{area authentication message-digest}Specify that OSPF packets
  333. must be authenticated with MD5 HMACs within the given area. Keying
  334. material must also be configured on a per-interface basis (@pxref{ip
  335. ospf message-digest-key}).
  336. MD5 authentication may also be configured on a per-interface basis
  337. (@pxref{ip ospf authentication message-digest}). Such per-interface
  338. settings will override any per-area authentication setting.
  339. @end deffn
  340. @node OSPF interface
  341. @section OSPF interface
  342. @deffn {Interface Command} {ip ospf authentication-key @var{AUTH_KEY}} {}
  343. @deffnx {Interface Command} {no ip ospf authentication-key} {}
  344. Set OSPF authentication key to a simple password. After setting @var{AUTH_KEY},
  345. all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars.
  346. Simple text password authentication is insecure and deprecated in favour of
  347. MD5 HMAC authentication (@pxref{ip ospf authentication message-digest}).
  348. @end deffn
  349. @deffn {Interface Command} {ip ospf authentication message-digest} {}
  350. @anchor{ip ospf authentication message-digest}Specify that MD5 HMAC
  351. authentication must be used on this interface. MD5 keying material must
  352. also be configured (@pxref{ip ospf message-digest-key}). Overrides any
  353. authentication enabled on a per-area basis (@pxref{area
  354. authentication message-digest}).
  355. Note that OSPF MD5 authentication requires that time never go backwards
  356. (correct time is NOT important, only that it never goes backwards), even
  357. across resets, if ospfd is to be able to promptly reestabish adjacencies
  358. with its neighbours after restarts/reboots. The host should have system
  359. time be set at boot from an external or non-volatile source (eg battery backed clock, NTP,
  360. etc.) or else the system clock should be periodically saved to non-volative
  361. storage and restored at boot if MD5 authentication is to be expected to work
  362. reliably.
  363. @end deffn
  364. @deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {}
  365. @deffnx {Interface Command} {no ip ospf message-digest-key} {}
  366. @anchor{ip ospf message-digest-key}Set OSPF authentication key to a
  367. cryptographic password. The cryptographic algorithm is MD5.
  368. KEYID identifies secret key used to create the message digest. This ID
  369. is part of the protocol and must be consistent across routers on a
  370. link.
  371. KEY is the actual message digest key, of up to 16 chars (larger strings
  372. will be truncated), and is associated with the given KEYID.
  373. @end deffn
  374. @deffn {Interface Command} {ip ospf cost <1-65535>} {}
  375. @deffnx {Interface Command} {no ip ospf cost} {}
  376. Set link cost for the specified interface. The cost value is set to router-LSA's
  377. metric field and used for SPF calculation.
  378. @end deffn
  379. @deffn {Interface Command} {ip ospf dead-interval <1-65535>} {}
  380. @deffnx {Interface Command} {ip ospf dead-interval minimal hello-multiplier <2-20>} {}
  381. @deffnx {Interface Command} {no ip ospf dead-interval} {}
  382. @anchor{ip ospf dead-interval minimal} Set number of seconds for
  383. RouterDeadInterval timer value used for Wait Timer and Inactivity
  384. Timer. This value must be the same for all routers attached to a
  385. common network. The default value is 40 seconds.
  386. If 'minimal' is specified instead, then the dead-interval is set to 1
  387. second and one must specify a hello-multiplier. The hello-multiplier
  388. specifies how many Hellos to send per second, from 2 (every 500ms) to
  389. 20 (every 50ms). Thus one can have 1s convergence time for OSPF. If this form
  390. is specified, then the hello-interval advertised in Hello packets is set to
  391. 0 and the hello-interval on received Hello packets is not checked, thus
  392. the hello-multiplier need NOT be the same across multiple routers on a common
  393. link.
  394. @end deffn
  395. @deffn {Interface Command} {ip ospf hello-interval <1-65535>} {}
  396. @deffnx {Interface Command} {no ip ospf hello-interval} {}
  397. Set number of seconds for HelloInterval timer value. Setting this value,
  398. Hello packet will be sent every timer value seconds on the specified interface.
  399. This value must be the same for all routers attached to a common network.
  400. The default value is 10 seconds.
  401. This command has no effect if @ref{ip ospf dead-interval minimal} is also
  402. specified for the interface.
  403. @end deffn
  404. @deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {}
  405. @deffnx {Interface Command} {no ip ospf network} {}
  406. Set explicitly network type for specifed interface.
  407. @end deffn
  408. @deffn {Interface Command} {ip ospf priority <0-255>} {}
  409. @deffnx {Interface Command} {no ip ospf priority} {}
  410. Set RouterPriority integer value. The router with the highest priority
  411. will be more eligible to become Designated Router. Setting the value
  412. to 0, makes the router ineligible to become Designated Router. The
  413. default value is 1.
  414. @end deffn
  415. @deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {}
  416. @deffnx {Interface Command} {no ip ospf retransmit interval} {}
  417. Set number of seconds for RxmtInterval timer value. This value is used
  418. when retransmitting Database Description and Link State Request packets.
  419. The default value is 5 seconds.
  420. @end deffn
  421. @deffn {Interface Command} {ip ospf transmit-delay} {}
  422. @deffnx {Interface Command} {no ip ospf transmit-delay} {}
  423. Set number of seconds for InfTransDelay value. LSAs' age should be
  424. incremented by this value when transmitting.
  425. The default value is 1 seconds.
  426. @end deffn
  427. @node Redistribute routes to OSPF
  428. @section Redistribute routes to OSPF
  429. @deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {}
  430. @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {}
  431. @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {}
  432. @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {}
  433. @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {}
  434. @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {}
  435. @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {}
  436. @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {}
  437. @deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {}
  438. @anchor{OSPF redistribute}Redistribute routes of the specified protocol
  439. or kind into OSPF, with the metric type and metric set if specified,
  440. filtering the routes using the given route-map if specified.
  441. Redistributed routes may also be filtered with distribute-lists, see
  442. @ref{ospf distribute-list}.
  443. Redistributed routes are distributed as into OSPF as Type-5 External
  444. LSAs into links to areas that accept external routes, Type-7 External LSAs
  445. for NSSA areas and are not redistributed at all into Stub areas, where
  446. external routes are not permitted.
  447. Note that for connected routes, one may instead use
  448. @dfn{passive-interface}, see @ref{OSPF passive-interface}.
  449. @end deffn
  450. @deffn {OSPF Command} {default-information originate} {}
  451. @deffnx {OSPF Command} {default-information originate metric <0-16777214>} {}
  452. @deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {}
  453. @deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
  454. @deffnx {OSPF Command} {default-information originate always} {}
  455. @deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {}
  456. @deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {}
  457. @deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {}
  458. @deffnx {OSPF Command} {no default-information originate} {}
  459. Originate an AS-External (type-5) LSA describing a default route into
  460. all external-routing capable areas, of the specified metric and metric
  461. type. If the 'always' keyword is given then the default is always
  462. advertised, even when there is no default present in the routing table.
  463. @end deffn
  464. @deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {}
  465. @deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {}
  466. @anchor{ospf distribute-list}Apply the access-list filter, NAME, to
  467. redistributed routes of the given type before allowing the routes to
  468. redistributed into OSPF (@pxref{OSPF redistribute}).
  469. @end deffn
  470. @deffn {OSPF Command} {default-metric <0-16777214>} {}
  471. @deffnx {OSPF Command} {no default-metric} {}
  472. @end deffn
  473. @deffn {OSPF Command} {distance <1-255>} {}
  474. @deffnx {OSPF Command} {no distance <1-255>} {}
  475. @end deffn
  476. @deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {}
  477. @deffnx {OSPF Command} {no distance ospf} {}
  478. @end deffn
  479. @deffn {Command} {router zebra} {}
  480. @deffnx {Command} {no router zebra} {}
  481. @end deffn
  482. @node Showing OSPF information
  483. @section Showing OSPF information
  484. @deffn {Command} {show ip ospf} {}
  485. @anchor{show ip ospf}Show information on a variety of general OSPF and
  486. area state and configuration information.
  487. @end deffn
  488. @deffn {Command} {show ip ospf interface [INTERFACE]} {}
  489. Show state and configuration of OSPF the specified interface, or all
  490. interfaces if no interface is given.
  491. @end deffn
  492. @deffn {Command} {show ip ospf neighbor} {}
  493. @deffnx {Command} {show ip ospf neighbor INTERFACE} {}
  494. @deffnx {Command} {show ip ospf neighbor detail} {}
  495. @deffnx {Command} {show ip ospf neighbor INTERFACE detail} {}
  496. @end deffn
  497. @deffn {Command} {show ip ospf database} {}
  498. @end deffn
  499. @deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {}
  500. @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {}
  501. @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {}
  502. @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {}
  503. @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {}
  504. @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {}
  505. @end deffn
  506. @deffn {Command} {show ip ospf database max-age} {}
  507. @end deffn
  508. @deffn {Command} {show ip ospf database self-originate} {}
  509. @end deffn
  510. @deffn {Command} {show ip ospf route} {}
  511. Show the OSPF routing table, as determined by the most recent SPF calculation.
  512. @end deffn
  513. @node Debugging OSPF
  514. @section Debugging OSPF
  515. @deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
  516. @deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {}
  517. @end deffn
  518. @deffn {Command} {debug ospf ism} {}
  519. @deffnx {Command} {debug ospf ism (status|events|timers)} {}
  520. @deffnx {Command} {no debug ospf ism} {}
  521. @deffnx {Command} {no debug ospf ism (status|events|timers)} {}
  522. @end deffn
  523. @deffn {Command} {debug ospf nsm} {}
  524. @deffnx {Command} {debug ospf nsm (status|events|timers)} {}
  525. @deffnx {Command} {no debug ospf nsm} {}
  526. @deffnx {Command} {no debug ospf nsm (status|events|timers)} {}
  527. @end deffn
  528. @deffn {Command} {debug ospf lsa} {}
  529. @deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {}
  530. @deffnx {Command} {no debug ospf lsa} {}
  531. @deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {}
  532. @end deffn
  533. @deffn {Command} {debug ospf zebra} {}
  534. @deffnx {Command} {debug ospf zebra (interface|redistribute)} {}
  535. @deffnx {Command} {no debug ospf zebra} {}
  536. @deffnx {Command} {no debug ospf zebra (interface|redistribute)} {}
  537. @end deffn
  538. @deffn {Command} {show debugging ospf} {}
  539. @end deffn
  540. @node OSPF Configuration Examples
  541. @section OSPF Configuration Examples
  542. A simple example, with MD5 authentication enabled:
  543. @example
  544. @group
  545. !
  546. interface bge0
  547. ip ospf authentication message-digest
  548. ip ospf message-digest-key 1 md5 ABCDEFGHIJK
  549. !
  550. router ospf
  551. network area
  552. area authentication message-digest
  553. @end group
  554. @end example
  555. An @acronym{ABR} router, with MD5 authentication and performing summarisation
  556. of networks between the areas:
  557. @example
  558. @group
  559. !
  560. password ABCDEF
  561. log file /var/log/quagga/ospfd.log
  562. service advanced-vty
  563. !
  564. interface eth0
  565. ip ospf authentication message-digest
  566. ip ospf message-digest-key 1 md5 ABCDEFGHIJK
  567. !
  568. interface ppp0
  569. !
  570. interface br0
  571. ip ospf authentication message-digest
  572. ip ospf message-digest-key 2 md5 XYZ12345
  573. !
  574. router ospf
  575. ospf router-id
  576. redistribute connected
  577. passive interface ppp0
  578. network area
  579. network area
  580. network area
  581. area authentication message-digest
  582. area range
  583. area range
  584. area authentication message-digest
  585. area range
  586. !
  587. @end group
  588. @end example