]>
Commit | Line | Data |
---|---|---|
4b547606 | 1 | |
f912cb4f | 2 | @cindex OSPFv2 |
76b89b4a | 3 | @node OSPFv2 |
718e3744 | 4 | @chapter OSPFv2 |
5 | ||
e5b308d1 | 6 | @acronym{OSPF,Open Shortest Path First} version 2 is a routing protocol |
7 | which is described in @cite{RFC2328, OSPF Version 2}. OSPF is an | |
f912cb4f | 8 | @acronym{IGP,Interior Gateway Protocol}. Compared with @acronym{RIP}, |
e5b308d1 | 9 | @acronym{OSPF} can provide scalable network support and faster |
10 | convergence times. OSPF is widely used in large networks such as | |
11 | @acronym{ISP,Internet Service Provider} backbone and enterprise | |
12 | networks. | |
718e3744 | 13 | |
14 | @menu | |
356a55e3 | 15 | * OSPF Fundamentals:: |
718e3744 | 16 | * Configuring ospfd:: |
17 | * OSPF router:: | |
18 | * OSPF area:: | |
19 | * OSPF interface:: | |
20 | * Redistribute routes to OSPF:: | |
21 | * Showing OSPF information:: | |
4b547606 OD |
22 | * Opaque LSA:: |
23 | * OSPF Traffic Engineering:: | |
24 | * Router Information:: | |
cf9b9f77 | 25 | * Segment Routing:: |
718e3744 | 26 | * Debugging OSPF:: |
e5b308d1 | 27 | * OSPF Configuration Examples:: |
718e3744 | 28 | @end menu |
29 | ||
356a55e3 PJ |
30 | @include ospf_fundamentals.texi |
31 | ||
76b89b4a | 32 | @node Configuring ospfd |
718e3744 | 33 | @section Configuring ospfd |
34 | ||
e5b308d1 | 35 | There are no @command{ospfd} specific options. Common options can be |
718e3744 | 36 | specified (@pxref{Common Invocation Options}) to @command{ospfd}. |
e5b308d1 | 37 | @command{ospfd} needs to acquire interface information from |
38 | @command{zebra} in order to function. Therefore @command{zebra} must be | |
39 | running before invoking @command{ospfd}. Also, if @command{zebra} is | |
40 | restarted then @command{ospfd} must be too. | |
718e3744 | 41 | |
e5b308d1 | 42 | Like other daemons, @command{ospfd} configuration is done in @acronym{OSPF} |
718e3744 | 43 | specific configuration file @file{ospfd.conf}. |
44 | ||
76b89b4a | 45 | @node OSPF router |
718e3744 | 46 | @section OSPF router |
47 | ||
48 | To start OSPF process you have to specify the OSPF router. As of this | |
49 | writing, @command{ospfd} does not support multiple OSPF processes. | |
50 | ||
51 | @deffn Command {router ospf} {} | |
52 | @deffnx Command {no router ospf} {} | |
53 | Enable or disable the OSPF process. @command{ospfd} does not yet | |
54 | support multiple OSPF processes. So you can not specify an OSPF process | |
55 | number. | |
56 | @end deffn | |
57 | ||
58 | @deffn {OSPF Command} {ospf router-id @var{a.b.c.d}} {} | |
59 | @deffnx {OSPF Command} {no ospf router-id} {} | |
c3eab60e PJ |
60 | @anchor{ospf router-id}This sets the router-ID of the OSPF process. The |
61 | router-ID may be an IP address of the router, but need not be - it can | |
62 | be any arbitrary 32bit number. However it MUST be unique within the | |
63 | entire OSPF domain to the OSPF speaker - bad things will happen if | |
64 | multiple OSPF speakers are configured with the same router-ID! If one | |
65 | is not specified then @command{ospfd} will obtain a router-ID | |
66 | automatically from @command{zebra}. | |
718e3744 | 67 | @end deffn |
68 | ||
69 | @deffn {OSPF Command} {ospf abr-type @var{type}} {} | |
70 | @deffnx {OSPF Command} {no ospf abr-type @var{type}} {} | |
f912cb4f PJ |
71 | @var{type} can be cisco|ibm|shortcut|standard. The "Cisco" and "IBM" types |
72 | are equivalent. | |
73 | ||
74 | The OSPF standard for ABR behaviour does not allow an ABR to consider | |
75 | routes through non-backbone areas when its links to the backbone are | |
76 | down, even when there are other ABRs in attached non-backbone areas | |
77 | which still can reach the backbone - this restriction exists primarily | |
78 | to ensure routing-loops are avoided. | |
79 | ||
80 | With the "Cisco" or "IBM" ABR type, the default in this release of | |
438f5286 | 81 | Frr, this restriction is lifted, allowing an ABR to consider |
f912cb4f PJ |
82 | summaries learnt from other ABRs through non-backbone areas, and hence |
83 | route via non-backbone areas as a last resort when, and only when, | |
84 | backbone links are down. | |
85 | ||
86 | Note that areas with fully-adjacent virtual-links are considered to be | |
87 | "transit capable" and can always be used to route backbone traffic, and | |
88 | hence are unaffected by this setting (@pxref{OSPF virtual-link}). | |
e5b308d1 | 89 | |
d4f5031c | 90 | More information regarding the behaviour controlled by this command can |
e5b308d1 | 91 | be found in @cite{RFC 3509, Alternative Implementations of OSPF Area |
92 | Border Routers}, and @cite{draft-ietf-ospf-shortcut-abr-02.txt}. | |
93 | ||
94 | Quote: "Though the definition of the @acronym{ABR,Area Border Router} | |
d4f5031c | 95 | in the OSPF specification does not require a router with multiple |
96 | attached areas to have a backbone connection, it is actually | |
97 | necessary to provide successful routing to the inter-area and | |
98 | external destinations. If this requirement is not met, all traffic | |
99 | destined for the areas not connected to such an ABR or out of the | |
100 | OSPF domain, is dropped. This document describes alternative ABR | |
101 | behaviors implemented in Cisco and IBM routers." | |
718e3744 | 102 | @end deffn |
103 | ||
104 | @deffn {OSPF Command} {ospf rfc1583compatibility} {} | |
105 | @deffnx {OSPF Command} {no ospf rfc1583compatibility} {} | |
f912cb4f | 106 | @cite{RFC2328}, the sucessor to @cite{RFC1583}, suggests according |
e5b308d1 | 107 | to section G.2 (changes) in section 16.4 a change to the path |
108 | preference algorithm that prevents possible routing loops that were | |
109 | possible in the old version of OSPFv2. More specifically it demands | |
37075da7 | 110 | that inter-area paths and intra-area backbone path are now of equal preference |
e5b308d1 | 111 | but still both preferred to external paths. |
112 | ||
113 | This command should NOT be set normally. | |
718e3744 | 114 | @end deffn |
115 | ||
d7e60dd7 AS |
116 | @deffn {OSPF Command} {log-adjacency-changes [detail]} {} |
117 | @deffnx {OSPF Command} {no log-adjacency-changes [detail]} {} | |
118 | Configures ospfd to log changes in adjacency. With the optional | |
119 | detail argument, all changes in adjacency status are shown. Without detail, | |
120 | only changes to full or regressions are shown. | |
121 | @end deffn | |
122 | ||
f912cb4f PJ |
123 | @deffn {OSPF Command} {passive-interface @var{interface}} {} |
124 | @deffnx {OSPF Command} {no passive-interface @var{interface}} {} | |
c3eab60e PJ |
125 | @anchor{OSPF passive-interface} Do not speak OSPF interface on the |
126 | given interface, but do advertise the interface as a stub link in the | |
127 | router-@acronym{LSA,Link State Advertisement} for this router. This | |
128 | allows one to advertise addresses on such connected interfaces without | |
129 | having to originate AS-External/Type-5 LSAs (which have global flooding | |
130 | scope) - as would occur if connected addresses were redistributed into | |
131 | OSPF (@pxref{Redistribute routes to OSPF})@. This is the only way to | |
132 | advertise non-OSPF links into stub areas. | |
e5b308d1 | 133 | @end deffn |
134 | ||
135 | @deffn {OSPF Command} {timers throttle spf @var{delay} @var{initial-holdtime} @var{max-holdtime}} {} | |
136 | @deffnx {OSPF Command} {no timers throttle spf} {} | |
137 | This command sets the initial @var{delay}, the @var{initial-holdtime} | |
138 | and the @var{maximum-holdtime} between when SPF is calculated and the | |
139 | event which triggered the calculation. The times are specified in | |
140 | milliseconds and must be in the range of 0 to 600000 milliseconds. | |
141 | ||
142 | The @var{delay} specifies the minimum amount of time to delay SPF | |
143 | calculation (hence it affects how long SPF calculation is delayed after | |
144 | an event which occurs outside of the holdtime of any previous SPF | |
145 | calculation, and also serves as a minimum holdtime). | |
146 | ||
147 | Consecutive SPF calculations will always be seperated by at least | |
148 | 'hold-time' milliseconds. The hold-time is adaptive and initially is | |
149 | set to the @var{initial-holdtime} configured with the above command. | |
150 | Events which occur within the holdtime of the previous SPF calculation | |
151 | will cause the holdtime to be increased by @var{initial-holdtime}, bounded | |
152 | by the @var{maximum-holdtime} configured with this command. If the adaptive | |
153 | hold-time elapses without any SPF-triggering event occuring then | |
154 | the current holdtime is reset to the @var{initial-holdtime}. The current | |
155 | holdtime can be viewed with @ref{show ip ospf}, where it is expressed as | |
156 | a multiplier of the @var{initial-holdtime}. | |
718e3744 | 157 | |
e5b308d1 | 158 | @example |
159 | @group | |
160 | router ospf | |
161 | timers throttle spf 200 400 10000 | |
162 | @end group | |
163 | @end example | |
718e3744 | 164 | |
e5b308d1 | 165 | In this example, the @var{delay} is set to 200ms, the @var{initial |
166 | holdtime} is set to 400ms and the @var{maximum holdtime} to 10s. Hence | |
167 | there will always be at least 200ms between an event which requires SPF | |
168 | calculation and the actual SPF calculation. Further consecutive SPF | |
169 | calculations will always be seperated by between 400ms to 10s, the | |
170 | hold-time increasing by 400ms each time an SPF-triggering event occurs | |
171 | within the hold-time of the previous SPF calculation. | |
172 | ||
438f5286 | 173 | This command supercedes the @command{timers spf} command in previous Frr |
e5b308d1 | 174 | releases. |
175 | @end deffn | |
176 | ||
177 | @deffn {OSPF Command} {max-metric router-lsa [on-startup|on-shutdown] <5-86400>} {} | |
178 | @deffnx {OSPF Command} {max-metric router-lsa administrative} {} | |
179 | @deffnx {OSPF Command} {no max-metric router-lsa [on-startup|on-shutdown|administrative]} {} | |
180 | This enables @cite{RFC3137, OSPF Stub Router Advertisement} support, | |
181 | where the OSPF process describes its transit links in its router-LSA as | |
182 | having infinite distance so that other routers will avoid calculating | |
183 | transit paths through the router while still being able to reach | |
184 | networks through the router. | |
185 | ||
186 | This support may be enabled administratively (and indefinitely) or | |
187 | conditionally. Conditional enabling of max-metric router-lsas can be | |
188 | for a period of seconds after startup and/or for a period of seconds | |
189 | prior to shutdown. | |
190 | ||
191 | Enabling this for a period after startup allows OSPF to converge fully | |
192 | first without affecting any existing routes used by other routers, | |
193 | while still allowing any connected stub links and/or redistributed | |
194 | routes to be reachable. Enabling this for a period of time in advance | |
195 | of shutdown allows the router to gracefully excuse itself from the OSPF | |
196 | domain. | |
197 | ||
198 | Enabling this feature administratively allows for administrative | |
199 | intervention for whatever reason, for an indefinite period of time. | |
200 | Note that if the configuration is written to file, this administrative | |
201 | form of the stub-router command will also be written to file. If | |
202 | @command{ospfd} is restarted later, the command will then take effect | |
203 | until manually deconfigured. | |
204 | ||
205 | Configured state of this feature as well as current status, such as the | |
206 | number of second remaining till on-startup or on-shutdown ends, can be | |
207 | viewed with the @ref{show ip ospf} command. | |
208 | @end deffn | |
209 | ||
210 | @deffn {OSPF Command} {auto-cost reference-bandwidth <1-4294967>} {} | |
211 | @deffnx {OSPF Command} {no auto-cost reference-bandwidth} {} | |
c3eab60e PJ |
212 | @anchor{OSPF auto-cost reference-bandwidth}This sets the reference |
213 | bandwidth for cost calculations, where this bandwidth is considered | |
214 | equivalent to an OSPF cost of 1, specified in Mbits/s. The default is | |
215 | 100Mbit/s (i.e. a link of bandwidth 100Mbit/s or higher will have a | |
216 | cost of 1. Cost of lower bandwidth links will be scaled with reference | |
217 | to this cost). | |
e5b308d1 | 218 | |
219 | This configuration setting MUST be consistent across all routers within the | |
220 | OSPF domain. | |
718e3744 | 221 | @end deffn |
222 | ||
223 | @deffn {OSPF Command} {network @var{a.b.c.d/m} area @var{a.b.c.d}} {} | |
224 | @deffnx {OSPF Command} {network @var{a.b.c.d/m} area @var{<0-4294967295>}} {} | |
225 | @deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{a.b.c.d}} {} | |
226 | @deffnx {OSPF Command} {no network @var{a.b.c.d/m} area @var{<0-4294967295>}} {} | |
52c62ab8 | 227 | @anchor{OSPF network command} |
a5b2b59a | 228 | This command specifies the OSPF enabled interface(s). If the interface has |
229 | an address from range 192.168.1.0/24 then the command below enables ospf | |
230 | on this interface so router can provide network information to the other | |
231 | ospf routers via this interface. | |
e5b308d1 | 232 | |
718e3744 | 233 | @example |
234 | @group | |
235 | router ospf | |
a5b2b59a | 236 | network 192.168.1.0/24 area 0.0.0.0 |
718e3744 | 237 | @end group |
238 | @end example | |
e5b308d1 | 239 | |
a5b2b59a | 240 | Prefix length in interface must be equal or bigger (ie. smaller network) than |
241 | prefix length in network statement. For example statement above doesn't enable | |
242 | ospf on interface with address 192.168.1.1/23, but it does on interface with | |
243 | address 192.168.1.129/25. | |
f0ec832a AS |
244 | |
245 | Note that the behavior when there is a peer address | |
246 | defined on an interface changed after release 0.99.7. | |
247 | Currently, if a peer prefix has been configured, | |
248 | then we test whether the prefix in the network command contains | |
249 | the destination prefix. Otherwise, we test whether the network command prefix | |
250 | contains the local address prefix of the interface. | |
52c62ab8 JAG |
251 | |
252 | In some cases it may be more convenient to enable OSPF on a per | |
253 | interface/subnet basis (@pxref{OSPF ip ospf area command}). | |
254 | ||
718e3744 | 255 | @end deffn |
256 | ||
76b89b4a | 257 | @node OSPF area |
718e3744 | 258 | @section OSPF area |
259 | ||
260 | @deffn {OSPF Command} {area @var{a.b.c.d} range @var{a.b.c.d/m}} {} | |
261 | @deffnx {OSPF Command} {area <0-4294967295> range @var{a.b.c.d/m}} {} | |
262 | @deffnx {OSPF Command} {no area @var{a.b.c.d} range @var{a.b.c.d/m}} {} | |
263 | @deffnx {OSPF Command} {no area <0-4294967295> range @var{a.b.c.d/m}} {} | |
63869f11 | 264 | Summarize intra area paths from specified area into one Type-3 summary-LSA |
265 | announced to other areas. This command can be used only in ABR and ONLY | |
266 | router-LSAs (Type-1) and network-LSAs (Type-2) (ie. LSAs with scope area) can | |
267 | be summarized. Type-5 AS-external-LSAs can't be summarized - their scope is AS. | |
438f5286 | 268 | Summarizing Type-7 AS-external-LSAs isn't supported yet by Frr. |
e5b308d1 | 269 | |
63869f11 | 270 | @example |
271 | @group | |
272 | router ospf | |
273 | network 192.168.1.0/24 area 0.0.0.0 | |
274 | network 10.0.0.0/8 area 0.0.0.10 | |
275 | area 0.0.0.10 range 10.0.0.0/8 | |
276 | @end group | |
277 | @end example | |
e5b308d1 | 278 | |
63869f11 | 279 | With configuration above one Type-3 Summary-LSA with routing info 10.0.0.0/8 is |
280 | announced into backbone area if area 0.0.0.10 contains at least one intra-area | |
281 | network (ie. described with router or network LSA) from this range. | |
282 | @end deffn | |
283 | ||
284 | @deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {} | |
285 | @deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX not-advertise} {} | |
286 | Instead of summarizing intra area paths filter them - ie. intra area paths from this | |
287 | range are not advertised into other areas. | |
288 | This command makes sense in ABR only. | |
718e3744 | 289 | @end deffn |
290 | ||
6b3fac0a | 291 | @deffn {OSPF Command} {area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {} |
718e3744 | 292 | @deffnx {OSPF Command} {no area @var{a.b.c.d} range IPV4_PREFIX substitute IPV4_PREFIX} {} |
63869f11 | 293 | Substitute summarized prefix with another prefix. |
e5b308d1 | 294 | |
63869f11 | 295 | @example |
296 | @group | |
297 | router ospf | |
298 | network 192.168.1.0/24 area 0.0.0.0 | |
299 | network 10.0.0.0/8 area 0.0.0.10 | |
300 | area 0.0.0.10 range 10.0.0.0/8 substitute 11.0.0.0/8 | |
301 | @end group | |
302 | @end example | |
e5b308d1 | 303 | |
63869f11 | 304 | One Type-3 summary-LSA with routing info 11.0.0.0/8 is announced into backbone area if |
305 | area 0.0.0.10 contains at least one intra-area network (ie. described with router-LSA or | |
306 | network-LSA) from range 10.0.0.0/8. | |
307 | This command makes sense in ABR only. | |
718e3744 | 308 | @end deffn |
309 | ||
310 | @deffn {OSPF Command} {area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {} | |
311 | @deffnx {OSPF Command} {area <0-4294967295> virtual-link @var{a.b.c.d}} {} | |
312 | @deffnx {OSPF Command} {no area @var{a.b.c.d} virtual-link @var{a.b.c.d}} {} | |
313 | @deffnx {OSPF Command} {no area <0-4294967295> virtual-link @var{a.b.c.d}} {} | |
c3eab60e | 314 | @anchor{OSPF virtual-link} |
718e3744 | 315 | @end deffn |
316 | ||
317 | @deffn {OSPF Command} {area @var{a.b.c.d} shortcut} {} | |
318 | @deffnx {OSPF Command} {area <0-4294967295> shortcut} {} | |
319 | @deffnx {OSPF Command} {no area @var{a.b.c.d} shortcut} {} | |
320 | @deffnx {OSPF Command} {no area <0-4294967295> shortcut} {} | |
f912cb4f | 321 | Configure the area as Shortcut capable. See @cite{RFC3509}. This requires |
e5b308d1 | 322 | that the 'abr-type' be set to 'shortcut'. |
718e3744 | 323 | @end deffn |
324 | ||
325 | @deffn {OSPF Command} {area @var{a.b.c.d} stub} {} | |
326 | @deffnx {OSPF Command} {area <0-4294967295> stub} {} | |
327 | @deffnx {OSPF Command} {no area @var{a.b.c.d} stub} {} | |
328 | @deffnx {OSPF Command} {no area <0-4294967295> stub} {} | |
e5b308d1 | 329 | Configure the area to be a stub area. That is, an area where no router |
330 | originates routes external to OSPF and hence an area where all external | |
331 | routes are via the ABR(s). Hence, ABRs for such an area do not need | |
332 | to pass AS-External LSAs (type-5s) or ASBR-Summary LSAs (type-4) into the | |
333 | area. They need only pass Network-Summary (type-3) LSAs into such an area, | |
f912cb4f | 334 | along with a default-route summary. |
718e3744 | 335 | @end deffn |
336 | ||
337 | @deffn {OSPF Command} {area @var{a.b.c.d} stub no-summary} {} | |
338 | @deffnx {OSPF Command} {area <0-4294967295> stub no-summary} {} | |
339 | @deffnx {OSPF Command} {no area @var{a.b.c.d} stub no-summary} {} | |
340 | @deffnx {OSPF Command} {no area <0-4294967295> stub no-summary} {} | |
e5b308d1 | 341 | Prevents an @command{ospfd} ABR from injecting inter-area |
342 | summaries into the specified stub area. | |
718e3744 | 343 | @end deffn |
344 | ||
345 | @deffn {OSPF Command} {area @var{a.b.c.d} default-cost <0-16777215>} {} | |
346 | @deffnx {OSPF Command} {no area @var{a.b.c.d} default-cost <0-16777215>} {} | |
e5b308d1 | 347 | Set the cost of default-summary LSAs announced to stubby areas. |
718e3744 | 348 | @end deffn |
349 | ||
350 | @deffn {OSPF Command} {area @var{a.b.c.d} export-list NAME} {} | |
351 | @deffnx {OSPF Command} {area <0-4294967295> export-list NAME} {} | |
352 | @deffnx {OSPF Command} {no area @var{a.b.c.d} export-list NAME} {} | |
353 | @deffnx {OSPF Command} {no area <0-4294967295> export-list NAME} {} | |
63869f11 | 354 | Filter Type-3 summary-LSAs announced to other areas originated from intra- |
355 | area paths from specified area. | |
e5b308d1 | 356 | |
63869f11 | 357 | @example |
358 | @group | |
359 | router ospf | |
360 | network 192.168.1.0/24 area 0.0.0.0 | |
361 | network 10.0.0.0/8 area 0.0.0.10 | |
362 | area 0.0.0.10 export-list foo | |
363 | ! | |
364 | access-list foo permit 10.10.0.0/16 | |
365 | access-list foo deny any | |
366 | @end group | |
367 | @end example | |
e5b308d1 | 368 | |
63869f11 | 369 | With example above any intra-area paths from area 0.0.0.10 and from range |
370 | 10.10.0.0/16 (for example 10.10.1.0/24 and 10.10.2.128/30) are announced into | |
371 | other areas as Type-3 summary-LSA's, but any others (for example 10.11.0.0/16 | |
372 | or 10.128.30.16/30) aren't. | |
e5b308d1 | 373 | |
374 | This command is only relevant if the router is an ABR for the specified | |
375 | area. | |
718e3744 | 376 | @end deffn |
377 | ||
378 | @deffn {OSPF Command} {area @var{a.b.c.d} import-list NAME} {} | |
379 | @deffnx {OSPF Command} {area <0-4294967295> import-list NAME} {} | |
380 | @deffnx {OSPF Command} {no area @var{a.b.c.d} import-list NAME} {} | |
381 | @deffnx {OSPF Command} {no area <0-4294967295> import-list NAME} {} | |
63869f11 | 382 | Same as export-list, but it applies to paths announced into specified area as |
383 | Type-3 summary-LSAs. | |
384 | @end deffn | |
385 | ||
808c0a7f | 386 | @deffn {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME in} {} |
387 | @deffnx {OSPF Command} {area @var{a.b.c.d} filter-list prefix NAME out} {} | |
388 | @deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME in} {} | |
389 | @deffnx {OSPF Command} {area <0-4294967295> filter-list prefix NAME out} {} | |
390 | @deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME in} {} | |
391 | @deffnx {OSPF Command} {no area @var{a.b.c.d} filter-list prefix NAME out} {} | |
392 | @deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME in} {} | |
393 | @deffnx {OSPF Command} {no area <0-4294967295> filter-list prefix NAME out} {} | |
c266ac78 | 394 | Filtering Type-3 summary-LSAs to/from area using prefix lists. This command |
395 | makes sense in ABR only. | |
718e3744 | 396 | @end deffn |
397 | ||
398 | @deffn {OSPF Command} {area @var{a.b.c.d} authentication} {} | |
399 | @deffnx {OSPF Command} {area <0-4294967295> authentication} {} | |
400 | @deffnx {OSPF Command} {no area @var{a.b.c.d} authentication} {} | |
401 | @deffnx {OSPF Command} {no area <0-4294967295> authentication} {} | |
e5b308d1 | 402 | Specify that simple password authentication should be used for the given |
403 | area. | |
718e3744 | 404 | @end deffn |
405 | ||
406 | @deffn {OSPF Command} {area @var{a.b.c.d} authentication message-digest} {} | |
407 | @deffnx {OSPF Command} {area <0-4294967295> authentication message-digest} {} | |
c3eab60e PJ |
408 | |
409 | @anchor{area authentication message-digest}Specify that OSPF packets | |
410 | must be authenticated with MD5 HMACs within the given area. Keying | |
411 | material must also be configured on a per-interface basis (@pxref{ip | |
412 | ospf message-digest-key}). | |
413 | ||
414 | MD5 authentication may also be configured on a per-interface basis | |
415 | (@pxref{ip ospf authentication message-digest}). Such per-interface | |
416 | settings will override any per-area authentication setting. | |
718e3744 | 417 | @end deffn |
418 | ||
76b89b4a | 419 | @node OSPF interface |
718e3744 | 420 | @section OSPF interface |
421 | ||
52c62ab8 JAG |
422 | @deffn {Interface Command} {ip ospf area @var{AREA} [@var{ADDR}]} {} |
423 | @deffnx {Interface Command} {no ip ospf area [@var{ADDR}]} {} | |
424 | @anchor{OSPF ip ospf area command} | |
425 | ||
426 | Enable OSPF on the interface, optionally restricted to just the IP address | |
427 | given by @var{ADDR}, putting it in the @var{AREA} area. Per interface area | |
428 | settings take precedence to network commands (@pxref{OSPF network command}). | |
429 | ||
430 | If you have a lot of interfaces, and/or a lot of subnets, then enabling OSPF | |
431 | via this command may result in a slight performance improvement. | |
432 | ||
433 | @end deffn | |
434 | ||
e5b308d1 | 435 | @deffn {Interface Command} {ip ospf authentication-key @var{AUTH_KEY}} {} |
718e3744 | 436 | @deffnx {Interface Command} {no ip ospf authentication-key} {} |
437 | Set OSPF authentication key to a simple password. After setting @var{AUTH_KEY}, | |
438 | all OSPF packets are authenticated. @var{AUTH_KEY} has length up to 8 chars. | |
f912cb4f PJ |
439 | |
440 | Simple text password authentication is insecure and deprecated in favour of | |
c3eab60e | 441 | MD5 HMAC authentication (@pxref{ip ospf authentication message-digest}). |
718e3744 | 442 | @end deffn |
443 | ||
c3eab60e PJ |
444 | @deffn {Interface Command} {ip ospf authentication message-digest} {} |
445 | @anchor{ip ospf authentication message-digest}Specify that MD5 HMAC | |
446 | authentication must be used on this interface. MD5 keying material must | |
447 | also be configured (@pxref{ip ospf message-digest-key}). Overrides any | |
448 | authentication enabled on a per-area basis (@pxref{area | |
449 | authentication message-digest}). | |
e2ea9fef | 450 | |
451 | Note that OSPF MD5 authentication requires that time never go backwards | |
e5b308d1 | 452 | (correct time is NOT important, only that it never goes backwards), even |
e2ea9fef | 453 | across resets, if ospfd is to be able to promptly reestabish adjacencies |
454 | with its neighbours after restarts/reboots. The host should have system | |
466c9656 | 455 | time be set at boot from an external or non-volatile source (eg battery backed clock, NTP, |
e2ea9fef | 456 | etc.) or else the system clock should be periodically saved to non-volative |
457 | storage and restored at boot if MD5 authentication is to be expected to work | |
458 | reliably. | |
718e3744 | 459 | @end deffn |
460 | ||
c3eab60e PJ |
461 | @deffn {Interface Command} {ip ospf message-digest-key KEYID md5 KEY} {} |
462 | @deffnx {Interface Command} {no ip ospf message-digest-key} {} | |
463 | @anchor{ip ospf message-digest-key}Set OSPF authentication key to a | |
464 | cryptographic password. The cryptographic algorithm is MD5. | |
465 | ||
466 | KEYID identifies secret key used to create the message digest. This ID | |
467 | is part of the protocol and must be consistent across routers on a | |
468 | link. | |
469 | ||
470 | KEY is the actual message digest key, of up to 16 chars (larger strings | |
471 | will be truncated), and is associated with the given KEYID. | |
472 | @end deffn | |
473 | ||
718e3744 | 474 | @deffn {Interface Command} {ip ospf cost <1-65535>} {} |
475 | @deffnx {Interface Command} {no ip ospf cost} {} | |
476 | Set link cost for the specified interface. The cost value is set to router-LSA's | |
477 | metric field and used for SPF calculation. | |
478 | @end deffn | |
479 | ||
480 | @deffn {Interface Command} {ip ospf dead-interval <1-65535>} {} | |
e5b308d1 | 481 | @deffnx {Interface Command} {ip ospf dead-interval minimal hello-multiplier <2-20>} {} |
718e3744 | 482 | @deffnx {Interface Command} {no ip ospf dead-interval} {} |
c3eab60e PJ |
483 | @anchor{ip ospf dead-interval minimal} Set number of seconds for |
484 | RouterDeadInterval timer value used for Wait Timer and Inactivity | |
485 | Timer. This value must be the same for all routers attached to a | |
486 | common network. The default value is 40 seconds. | |
e5b308d1 | 487 | |
488 | If 'minimal' is specified instead, then the dead-interval is set to 1 | |
489 | second and one must specify a hello-multiplier. The hello-multiplier | |
490 | specifies how many Hellos to send per second, from 2 (every 500ms) to | |
491 | 20 (every 50ms). Thus one can have 1s convergence time for OSPF. If this form | |
492 | is specified, then the hello-interval advertised in Hello packets is set to | |
493 | 0 and the hello-interval on received Hello packets is not checked, thus | |
494 | the hello-multiplier need NOT be the same across multiple routers on a common | |
495 | link. | |
718e3744 | 496 | @end deffn |
497 | ||
498 | @deffn {Interface Command} {ip ospf hello-interval <1-65535>} {} | |
499 | @deffnx {Interface Command} {no ip ospf hello-interval} {} | |
500 | Set number of seconds for HelloInterval timer value. Setting this value, | |
501 | Hello packet will be sent every timer value seconds on the specified interface. | |
502 | This value must be the same for all routers attached to a common network. | |
503 | The default value is 10 seconds. | |
e5b308d1 | 504 | |
505 | This command has no effect if @ref{ip ospf dead-interval minimal} is also | |
506 | specified for the interface. | |
718e3744 | 507 | @end deffn |
508 | ||
509 | @deffn {Interface Command} {ip ospf network (broadcast|non-broadcast|point-to-multipoint|point-to-point)} {} | |
510 | @deffnx {Interface Command} {no ip ospf network} {} | |
511 | Set explicitly network type for specifed interface. | |
512 | @end deffn | |
513 | ||
514 | @deffn {Interface Command} {ip ospf priority <0-255>} {} | |
515 | @deffnx {Interface Command} {no ip ospf priority} {} | |
f912cb4f PJ |
516 | Set RouterPriority integer value. The router with the highest priority |
517 | will be more eligible to become Designated Router. Setting the value | |
518 | to 0, makes the router ineligible to become Designated Router. The | |
519 | default value is 1. | |
718e3744 | 520 | @end deffn |
521 | ||
522 | @deffn {Interface Command} {ip ospf retransmit-interval <1-65535>} {} | |
523 | @deffnx {Interface Command} {no ip ospf retransmit interval} {} | |
524 | Set number of seconds for RxmtInterval timer value. This value is used | |
525 | when retransmitting Database Description and Link State Request packets. | |
526 | The default value is 5 seconds. | |
527 | @end deffn | |
528 | ||
529 | @deffn {Interface Command} {ip ospf transmit-delay} {} | |
530 | @deffnx {Interface Command} {no ip ospf transmit-delay} {} | |
531 | Set number of seconds for InfTransDelay value. LSAs' age should be | |
532 | incremented by this value when transmitting. | |
533 | The default value is 1 seconds. | |
534 | @end deffn | |
535 | ||
953cde65 JT |
536 | @deffn {Interface Command} {ip ospf area (A.B.C.D|<0-4294967295>)} {} |
537 | @deffnx {Interface Command} {no ip ospf area} {} | |
538 | Enable ospf on an interface and set associated area. | |
539 | @end deffn | |
540 | ||
76b89b4a | 541 | @node Redistribute routes to OSPF |
718e3744 | 542 | @section Redistribute routes to OSPF |
543 | ||
544 | @deffn {OSPF Command} {redistribute (kernel|connected|static|rip|bgp)} {} | |
545 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) @var{route-map}} {} | |
546 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2)} {} | |
547 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) route-map @var{word}} {} | |
548 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214>} {} | |
549 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric <0-16777214> route-map @var{word}} {} | |
550 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214>} {} | |
551 | @deffnx {OSPF Command} {redistribute (kernel|connected|static|rip|bgp) metric-type (1|2) metric <0-16777214> route-map @var{word}} {} | |
552 | @deffnx {OSPF Command} {no redistribute (kernel|connected|static|rip|bgp)} {} | |
c3eab60e PJ |
553 | @anchor{OSPF redistribute}Redistribute routes of the specified protocol |
554 | or kind into OSPF, with the metric type and metric set if specified, | |
555 | filtering the routes using the given route-map if specified. | |
556 | Redistributed routes may also be filtered with distribute-lists, see | |
557 | @ref{ospf distribute-list}. | |
f912cb4f PJ |
558 | |
559 | Redistributed routes are distributed as into OSPF as Type-5 External | |
560 | LSAs into links to areas that accept external routes, Type-7 External LSAs | |
561 | for NSSA areas and are not redistributed at all into Stub areas, where | |
562 | external routes are not permitted. | |
563 | ||
564 | Note that for connected routes, one may instead use | |
565 | @dfn{passive-interface}, see @ref{OSPF passive-interface}. | |
718e3744 | 566 | @end deffn |
567 | ||
568 | @deffn {OSPF Command} {default-information originate} {} | |
569 | @deffnx {OSPF Command} {default-information originate metric <0-16777214>} {} | |
570 | @deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2)} {} | |
571 | @deffnx {OSPF Command} {default-information originate metric <0-16777214> metric-type (1|2) route-map @var{word}} {} | |
572 | @deffnx {OSPF Command} {default-information originate always} {} | |
573 | @deffnx {OSPF Command} {default-information originate always metric <0-16777214>} {} | |
574 | @deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2)} {} | |
575 | @deffnx {OSPF Command} {default-information originate always metric <0-16777214> metric-type (1|2) route-map @var{word}} {} | |
576 | @deffnx {OSPF Command} {no default-information originate} {} | |
e5b308d1 | 577 | Originate an AS-External (type-5) LSA describing a default route into |
578 | all external-routing capable areas, of the specified metric and metric | |
579 | type. If the 'always' keyword is given then the default is always | |
580 | advertised, even when there is no default present in the routing table. | |
718e3744 | 581 | @end deffn |
582 | ||
583 | @deffn {OSPF Command} {distribute-list NAME out (kernel|connected|static|rip|ospf} {} | |
584 | @deffnx {OSPF Command} {no distribute-list NAME out (kernel|connected|static|rip|ospf} {} | |
c3eab60e PJ |
585 | @anchor{ospf distribute-list}Apply the access-list filter, NAME, to |
586 | redistributed routes of the given type before allowing the routes to | |
587 | redistributed into OSPF (@pxref{OSPF redistribute}). | |
718e3744 | 588 | @end deffn |
589 | ||
590 | @deffn {OSPF Command} {default-metric <0-16777214>} {} | |
591 | @deffnx {OSPF Command} {no default-metric} {} | |
592 | @end deffn | |
593 | ||
594 | @deffn {OSPF Command} {distance <1-255>} {} | |
595 | @deffnx {OSPF Command} {no distance <1-255>} {} | |
596 | @end deffn | |
597 | ||
598 | @deffn {OSPF Command} {distance ospf (intra-area|inter-area|external) <1-255>} {} | |
599 | @deffnx {OSPF Command} {no distance ospf} {} | |
600 | @end deffn | |
601 | ||
65efcfce LB |
602 | @deffn {Command} {router zebra} {} |
603 | @deffnx {Command} {no router zebra} {} | |
604 | @end deffn | |
605 | ||
76b89b4a | 606 | @node Showing OSPF information |
718e3744 | 607 | @section Showing OSPF information |
608 | ||
609 | @deffn {Command} {show ip ospf} {} | |
c3eab60e PJ |
610 | @anchor{show ip ospf}Show information on a variety of general OSPF and |
611 | area state and configuration information. | |
718e3744 | 612 | @end deffn |
613 | ||
614 | @deffn {Command} {show ip ospf interface [INTERFACE]} {} | |
e5b308d1 | 615 | Show state and configuration of OSPF the specified interface, or all |
616 | interfaces if no interface is given. | |
718e3744 | 617 | @end deffn |
618 | ||
619 | @deffn {Command} {show ip ospf neighbor} {} | |
620 | @deffnx {Command} {show ip ospf neighbor INTERFACE} {} | |
621 | @deffnx {Command} {show ip ospf neighbor detail} {} | |
622 | @deffnx {Command} {show ip ospf neighbor INTERFACE detail} {} | |
623 | @end deffn | |
624 | ||
625 | @deffn {Command} {show ip ospf database} {} | |
626 | @end deffn | |
627 | ||
628 | @deffn {Command} {show ip ospf database (asbr-summary|external|network|router|summary)} {} | |
629 | @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id}} {} | |
630 | @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} adv-router @var{adv-router}} {} | |
631 | @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) adv-router @var{adv-router}} {} | |
632 | @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) @var{link-state-id} self-originate} {} | |
633 | @deffnx {Command} {show ip ospf database (asbr-summary|external|network|router|summary) self-originate} {} | |
634 | @end deffn | |
635 | ||
636 | @deffn {Command} {show ip ospf database max-age} {} | |
637 | @end deffn | |
638 | ||
639 | @deffn {Command} {show ip ospf database self-originate} {} | |
640 | @end deffn | |
641 | ||
718e3744 | 642 | @deffn {Command} {show ip ospf route} {} |
e5b308d1 | 643 | Show the OSPF routing table, as determined by the most recent SPF calculation. |
718e3744 | 644 | @end deffn |
645 | ||
4b547606 OD |
646 | @node Opaque LSA |
647 | @section Opaque LSA | |
648 | ||
649 | @deffn {OSPF Command} {ospf opaque-lsa} {} | |
650 | @deffnx {OSPF Command} {capability opaque} {} | |
651 | @deffnx {OSPF Command} {no ospf opaque-lsa} {} | |
652 | @deffnx {OSPF Command} {no capability opaque} {} | |
653 | @command{ospfd} support Opaque LSA (RFC2370) as fondment for MPLS Traffic Engineering LSA. Prior to used MPLS TE, opaque-lsa must be enable in the configuration file. Alternate command could be "mpls-te on" (@ref{OSPF Traffic Engineering}). | |
654 | @end deffn | |
655 | ||
656 | @deffn {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external)} {} | |
657 | @deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) @var{link-state-id}} {} | |
658 | @deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) @var{link-state-id} adv-router @var{adv-router}} {} | |
659 | @deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) adv-router @var{adv-router}} {} | |
660 | @deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) @var{link-state-id} self-originate} {} | |
661 | @deffnx {Command} {show ip ospf database (opaque-link|opaque-area|opaque-external) self-originate} {} | |
662 | Show Opaque LSA from the database. | |
663 | @end deffn | |
664 | ||
665 | @node OSPF Traffic Engineering | |
666 | @section Traffic Engineering | |
667 | ||
668 | @deffn {OSPF Command} {mpls-te on} {} | |
669 | @deffnx {OSPF Command} {no mpls-te} {} | |
670 | Enable Traffic Engineering LSA flooding. | |
671 | @end deffn | |
672 | ||
673 | @deffn {OSPF Command} {mpls-te router-address <A.B.C.D>} {} | |
674 | @deffnx {OSPF Command} {no mpls-te} {} | |
675 | Configure stable IP address for MPLS-TE. This IP address is then advertise in Opaque LSA Type-10 TLV=1 (TE) | |
676 | option 1 (Router-Address). | |
677 | @end deffn | |
678 | ||
679 | @deffn {OSPF Command} {mpls-te inter-as area <area-id>|as} {} | |
680 | @deffnx {OSPF Command} {no mpls-te inter-as} {} | |
681 | Enable RFC5392 suuport - Inter-AS TE v2 - to flood Traffic Engineering parameters of Inter-AS link. | |
682 | 2 modes are supported: AREA and AS; LSA are flood in AREA <area-id> with Opaque Type-10, | |
683 | respectively in AS with Opaque Type-11. In all case, Opaque-LSA TLV=6. | |
684 | @end deffn | |
685 | ||
686 | @deffn {Command} {show ip ospf mpls-te interface} {} | |
687 | @deffnx {Command} {show ip ospf mpls-te interface @var{interface}} {} | |
688 | Show MPLS Traffic Engineering parameters for all or specified interface. | |
689 | @end deffn | |
690 | ||
691 | @deffn {Command} {show ip ospf mpls-te router} {} | |
692 | Show Traffic Engineering router parameters. | |
693 | @end deffn | |
694 | ||
695 | @node Router Information | |
696 | @section Router Information | |
697 | ||
698 | @deffn {OSPF Command} {router-info [as | area <A.B.C.D>]} {} | |
699 | @deffnx {OSPF Command} {no router-info} {} | |
700 | Enable Router Information (RFC4970) LSA advertisement with AS scope (default) or Area scope flooding | |
701 | when area is specified. | |
702 | @end deffn | |
703 | ||
704 | @deffn {OSPF Command} {pce address <A.B.C.D>} {} | |
705 | @deffnx {OSPF Command} {no pce address} {} | |
706 | @deffnx {OSPF Command} {pce domain as <0-65535>} {} | |
707 | @deffnx {OSPF Command} {no pce domain as <0-65535>} {} | |
708 | @deffnx {OSPF Command} {pce neighbor as <0-65535>} {} | |
709 | @deffnx {OSPF Command} {no pce neighbor as <0-65535>} {} | |
710 | @deffnx {OSPF Command} {pce flag BITPATTERN} {} | |
711 | @deffnx {OSPF Command} {no pce flag} {} | |
712 | @deffnx {OSPF Command} {pce scope BITPATTERN} {} | |
713 | @deffnx {OSPF Command} {no pce scope} {} | |
714 | The commands are conform to RFC 5088 and allow OSPF router announce Path Compuatation Elemenent (PCE) capabilities | |
715 | through the Router Information (RI) LSA. Router Information must be enable prior to this. The command set/unset | |
716 | respectively the PCE IP adress, Autonomous System (AS) numbers of controlled domains, neighbor ASs, flag and scope. | |
717 | For flag and scope, please refer to RFC5088 for the BITPATTERN recognition. Multiple 'pce neighbor' command could | |
718 | be specified in order to specify all PCE neighbours. | |
719 | @end deffn | |
720 | ||
721 | @deffn {Command} {show ip ospf router-info} {} | |
722 | Show Router Capabilities flag. | |
723 | @end deffn | |
724 | @deffn {Command} {show ip ospf router-info pce} {} | |
725 | Show Router Capabilities PCE parameters. | |
726 | @end deffn | |
727 | ||
cf9b9f77 OD |
728 | @node Segment Routing |
729 | @section Segment Routing | |
730 | ||
731 | This is an EXPERIMENTAL support of Segment Routing as per draft | |
7743f2f8 | 732 | draft-ietf-ospf-segment-routing-extensions-24.txt for MPLS dataplane. |
cf9b9f77 OD |
733 | |
734 | @deffn {OSPF Command} {segment-routing on} {} | |
735 | @deffnx {OSPF Command} {no segment-routing} {} | |
736 | Enable Segment Routing. Even if this also activate routing information support, | |
737 | it is preferable to also activate routing information, and set accordingly the | |
738 | Area or AS flooding. | |
739 | @end deffn | |
740 | ||
741 | @deffn {OSPF Command} {segment-routing global-block (0-1048575) (0-1048575)} {} | |
742 | @deffnx {OSPF Command} {no segment-routing global-block} {} | |
743 | Fix the Segment Routing Global Block i.e. the label range used by MPLS to store | |
744 | label in the MPLS FIB. | |
745 | @end deffn | |
746 | ||
747 | @deffn {OSPF Command} {segment-routing node-msd (1-16)} {} | |
748 | @deffnx {OSPF Command} {no segment-routing node-msd} {} | |
7743f2f8 | 749 | Fix the Maximum Stack Depth supported by the router. The value depend of the |
cf9b9f77 OD |
750 | MPLS dataplane. E.g. for Linux kernel, since version 4.13 it is 32. |
751 | @end deffn | |
752 | ||
753 | @deffn {OSPF Command} {segment-routing prefix A.B.C.D/M index (0-65535)} {} | |
7743f2f8 | 754 | @deffnx {OSPF Command} {segment-routing prefix A.B.C.D/M index (0-65535) no-php-flag} {} |
cf9b9f77 OD |
755 | @deffnx {OSPF Command} {no segment-routing prefix A.B.C.D/M} {} |
756 | Set the Segment Rounting index for the specifyed prefix. Note | |
7743f2f8 OD |
757 | that, only prefix with /32 corresponding to a loopback interface are |
758 | currently supported. The 'no-php-flag' means NO Penultimate Hop Popping that | |
759 | allows SR node to request to its neighbor to not pop the label. | |
cf9b9f77 OD |
760 | @end deffn |
761 | ||
76665890 OD |
762 | @deffn {Command} {show ip ospf database segment-routing [json]} {} |
763 | @deffnx {Command} {show ip ospf database segment-routing adv-router @var{adv-router} [json]} {} | |
764 | @deffnx {Command} {show ip ospf database segment-routing self-originate [json]} {} | |
cf9b9f77 | 765 | Show Segment Routing Data Base, all SR nodes, specific advertized router or self router. |
76665890 | 766 | Optional Json output could be obtain by adding 'json' at the end of the command. |
cf9b9f77 OD |
767 | @end deffn |
768 | ||
76b89b4a | 769 | @node Debugging OSPF |
718e3744 | 770 | @section Debugging OSPF |
771 | ||
772 | @deffn {Command} {debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {} | |
773 | @deffnx {Command} {no debug ospf packet (hello|dd|ls-request|ls-update|ls-ack|all) (send|recv) [detail]} {} | |
4b547606 | 774 | Dump Packet for debugging |
718e3744 | 775 | @end deffn |
776 | ||
777 | @deffn {Command} {debug ospf ism} {} | |
778 | @deffnx {Command} {debug ospf ism (status|events|timers)} {} | |
779 | @deffnx {Command} {no debug ospf ism} {} | |
780 | @deffnx {Command} {no debug ospf ism (status|events|timers)} {} | |
4b547606 | 781 | Show debug information of Interface State Machine |
718e3744 | 782 | @end deffn |
783 | ||
784 | @deffn {Command} {debug ospf nsm} {} | |
785 | @deffnx {Command} {debug ospf nsm (status|events|timers)} {} | |
786 | @deffnx {Command} {no debug ospf nsm} {} | |
787 | @deffnx {Command} {no debug ospf nsm (status|events|timers)} {} | |
4b547606 OD |
788 | Show debug information of Network State Machine |
789 | @end deffn | |
790 | ||
791 | @deffn {Command} {debug ospf event} {} | |
792 | @deffnx {Command} {no debug ospf event} {} | |
793 | Show debug information of OSPF event | |
794 | @end deffn | |
795 | ||
796 | @deffn {Command} {debug ospf nssa} {} | |
797 | @deffnx {Command} {no debug ospf nssa} {} | |
798 | Show debug information about Not So Stub Area | |
718e3744 | 799 | @end deffn |
800 | ||
801 | @deffn {Command} {debug ospf lsa} {} | |
802 | @deffnx {Command} {debug ospf lsa (generate|flooding|refresh)} {} | |
803 | @deffnx {Command} {no debug ospf lsa} {} | |
804 | @deffnx {Command} {no debug ospf lsa (generate|flooding|refresh)} {} | |
4b547606 OD |
805 | Show debug detail of Link State messages |
806 | @end deffn | |
807 | ||
808 | @deffn {Command} {debug ospf te} {} | |
809 | @deffnx {Command} {no debug ospf te} {} | |
810 | Show debug information about Traffic Engineering LSA | |
718e3744 | 811 | @end deffn |
812 | ||
813 | @deffn {Command} {debug ospf zebra} {} | |
814 | @deffnx {Command} {debug ospf zebra (interface|redistribute)} {} | |
815 | @deffnx {Command} {no debug ospf zebra} {} | |
816 | @deffnx {Command} {no debug ospf zebra (interface|redistribute)} {} | |
4b547606 | 817 | Show debug information of ZEBRA API |
718e3744 | 818 | @end deffn |
819 | ||
820 | @deffn {Command} {show debugging ospf} {} | |
821 | @end deffn | |
822 | ||
e5b308d1 | 823 | @node OSPF Configuration Examples |
824 | @section OSPF Configuration Examples | |
825 | A simple example, with MD5 authentication enabled: | |
826 | ||
827 | @example | |
828 | @group | |
829 | ! | |
830 | interface bge0 | |
831 | ip ospf authentication message-digest | |
832 | ip ospf message-digest-key 1 md5 ABCDEFGHIJK | |
833 | ! | |
834 | router ospf | |
835 | network 192.168.0.0/16 area 0.0.0.1 | |
836 | area 0.0.0.1 authentication message-digest | |
837 | @end group | |
838 | @end example | |
839 | ||
840 | An @acronym{ABR} router, with MD5 authentication and performing summarisation | |
841 | of networks between the areas: | |
842 | ||
843 | @example | |
844 | @group | |
845 | ! | |
846 | password ABCDEF | |
438f5286 | 847 | log file /var/log/frr/ospfd.log |
e5b308d1 | 848 | service advanced-vty |
849 | ! | |
850 | interface eth0 | |
851 | ip ospf authentication message-digest | |
852 | ip ospf message-digest-key 1 md5 ABCDEFGHIJK | |
853 | ! | |
854 | interface ppp0 | |
855 | ! | |
856 | interface br0 | |
857 | ip ospf authentication message-digest | |
858 | ip ospf message-digest-key 2 md5 XYZ12345 | |
859 | ! | |
860 | router ospf | |
861 | ospf router-id 192.168.0.1 | |
862 | redistribute connected | |
863 | passive interface ppp0 | |
864 | network 192.168.0.0/24 area 0.0.0.0 | |
865 | network 10.0.0.0/16 area 0.0.0.0 | |
866 | network 192.168.1.0/24 area 0.0.0.1 | |
867 | area 0.0.0.0 authentication message-digest | |
868 | area 0.0.0.0 range 10.0.0.0/16 | |
869 | area 0.0.0.0 range 192.168.0.0/24 | |
870 | area 0.0.0.1 authentication message-digest | |
871 | area 0.0.0.1 range 10.2.0.0/16 | |
872 | ! | |
873 | @end group | |
874 | @end example | |
4b547606 OD |
875 | |
876 | A Traffic Engineering configuration, with Inter-ASv2 support. | |
877 | ||
878 | - First, the 'zebra.conf' part: | |
879 | ||
880 | @example | |
881 | @group | |
882 | hostname HOSTNAME | |
883 | password PASSWORD | |
884 | log file /var/log/zebra.log | |
885 | ! | |
886 | interface eth0 | |
887 | ip address 198.168.1.1/24 | |
ee65c55e OD |
888 | link-params |
889 | enable | |
890 | admin-grp 0xa1 | |
891 | metric 100 | |
892 | max-bw 1.25e+07 | |
893 | max-rsv-bw 1.25e+06 | |
894 | unrsv-bw 0 1.25e+06 | |
895 | unrsv-bw 1 1.25e+06 | |
896 | unrsv-bw 2 1.25e+06 | |
897 | unrsv-bw 3 1.25e+06 | |
898 | unrsv-bw 4 1.25e+06 | |
899 | unrsv-bw 5 1.25e+06 | |
900 | unrsv-bw 6 1.25e+06 | |
901 | unrsv-bw 7 1.25e+06 | |
4b547606 OD |
902 | ! |
903 | interface eth1 | |
904 | ip address 192.168.2.1/24 | |
ee65c55e OD |
905 | link-params |
906 | enable | |
907 | metric 10 | |
908 | max-bw 1.25e+07 | |
909 | max-rsv-bw 1.25e+06 | |
910 | unrsv-bw 0 1.25e+06 | |
911 | unrsv-bw 1 1.25e+06 | |
912 | unrsv-bw 2 1.25e+06 | |
913 | unrsv-bw 3 1.25e+06 | |
914 | unrsv-bw 4 1.25e+06 | |
915 | unrsv-bw 5 1.25e+06 | |
916 | unrsv-bw 6 1.25e+06 | |
917 | unrsv-bw 7 1.25e+06 | |
918 | neighbor 192.168.2.2 as 65000 | |
4b547606 OD |
919 | @end group |
920 | @end example | |
921 | ||
922 | - Then the 'ospfd.conf' itself: | |
923 | ||
924 | @example | |
925 | @group | |
926 | hostname HOSTNAME | |
927 | password PASSWORD | |
928 | log file /var/log/ospfd.log | |
929 | ! | |
930 | ! | |
931 | interface eth0 | |
932 | ip ospf hello-interval 60 | |
933 | ip ospf dead-interval 240 | |
934 | ! | |
935 | interface eth1 | |
936 | ip ospf hello-interval 60 | |
937 | ip ospf dead-interval 240 | |
938 | ! | |
939 | ! | |
940 | router ospf | |
941 | ospf router-id 192.168.1.1 | |
942 | network 192.168.0.0/16 area 1 | |
943 | ospf opaque-lsa | |
944 | mpls-te | |
945 | mpls-te router-address 192.168.1.1 | |
946 | mpls-te inter-as area 1 | |
947 | ! | |
948 | line vty | |
949 | @end group | |
950 | @end example | |
951 | ||
952 | A router information example with PCE advsertisement: | |
953 | ||
954 | @example | |
955 | @group | |
956 | ! | |
957 | router ospf | |
958 | ospf router-id 192.168.1.1 | |
959 | network 192.168.0.0/16 area 1 | |
960 | capability opaque | |
961 | mpls-te | |
962 | mpls-te router-address 192.168.1.1 | |
963 | router-info area 0.0.0.1 | |
964 | pce address 192.168.1.1 | |
965 | pce flag 0x80 | |
966 | pce domain as 65400 | |
967 | pce neighbor as 65500 | |
968 | pce neighbor as 65200 | |
969 | pce scope 0x80 | |
970 | ! | |
971 | @end group | |
972 | @end example |