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